CN115835147A - Short message related information processing method and device - Google Patents

Short message related information processing method and device Download PDF

Info

Publication number
CN115835147A
CN115835147A CN202211478139.8A CN202211478139A CN115835147A CN 115835147 A CN115835147 A CN 115835147A CN 202211478139 A CN202211478139 A CN 202211478139A CN 115835147 A CN115835147 A CN 115835147A
Authority
CN
China
Prior art keywords
service
short message
key value
cache
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211478139.8A
Other languages
Chinese (zh)
Inventor
邹晓鸥
徐翥
朱道彬
曾凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211478139.8A priority Critical patent/CN115835147A/en
Publication of CN115835147A publication Critical patent/CN115835147A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a method and a device for processing short message related information, relates to the technical field of short message data processing, and can be used in the financial field or other technical fields. The method comprises the following steps: receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number; checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal; wherein. The device performs the above method. The method and the device for processing the short message related information provided by the embodiment of the invention can reduce the short message processing pressure of the service interface, improve the stability of service operation and save the cost of sending the short message.

Description

Short message related information processing method and device
Technical Field
The invention relates to the technical field of short message data processing, in particular to a method and a device for processing short message related information.
Background
With the development of the internet era, user registration is often the most basic function of some services. However, along with the registration behavior of the user, the mobile phone number is often used as a content that must be filled in during registration, and meanwhile, the server issues an authentication code message to the user according to the mobile phone number filled in by the user, so that the service necessarily needs to have a function of issuing short messages. At this time, it may happen that the short message issuing interface of the service is maliciously called, which affects the operation stability of the service itself and increases the short message cost of the company.
Although the short message service provider has an anti-attack means, a large number of spam requests still occur, the service provider only limits the times and time, and the short message service provider still sends the short message after a period of time; the service can also adopt a blacklist mode, numbers appearing in the interface are added into a blacklist list immediately after a certain number of requests, when the requests are carried out again, if the numbers are the numbers in the blacklist, error codes are directly returned, no other processing is carried out, and a short message sending interface cannot be called.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for processing short message related information, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides a method for processing short message related information, including:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
Before the step of sending a short message call request to a service interface by the receiving terminal, the method for processing the short message related information further comprises the following steps:
if the short message calling request sent to a service interface by a terminal is determined to be received for the first time, carrying out hash calculation on the mobile phone number and the service number corresponding to the service interface;
taking the hash value as a key value, determining a life cycle corresponding to the key value, synchronizing the key value and the corresponding life cycle to a remote dictionary server, and respectively taking the key value as pre-stored key values respectively corresponding to a service self cache and a remote dictionary service cache;
controlling the storage duration of the pre-stored key values in the service self cache and the remote dictionary service cache respectively according to the life cycle;
wherein the storage capacity of the service self cache is less than that of the remote dictionary service cache.
The method for processing the short message related information further comprises the following steps:
if not, forwarding the key value to a remote dictionary server;
if a first feedback result returned by the remote dictionary server is received, returning a prompt message of the sent short message to the terminal; the first feedback result indicates that the pre-stored key value identical to the key value exists in the remote dictionary service cache.
The method for processing the short message related information further comprises the following steps:
if a second feedback result returned by the remote dictionary server is received, the short message is sent to the terminal again, the key value is determined to be the preset storage key value and the life cycle corresponding to the key value again, and the preset storage key value is stored in a service self cache; the second feedback result indicates that the pre-stored key value identical to the key value does not exist in the remote dictionary service cache.
The method for processing the short message related information further comprises the following steps:
and if the storage capacity of the service self cache is determined to be over-limit, deleting the prestored key value stored in the service self cache at the earliest time.
The method for processing the short message related information further comprises the following steps:
and determining to receive a short message calling request sent by the terminal to the service interface for the first time according to the inherent identifier of the terminal.
Determining a life cycle corresponding to the key value includes:
and setting a life cycle corresponding to the key value through a command for setting the service expiration time of the remote dictionary.
In one aspect, the present invention provides a device for processing short message related information, including:
the computing unit is used for receiving a short message calling request sent to a service interface by a terminal, carrying out hash computation on a mobile phone number and a service number corresponding to the service interface and taking a hash value as a key value; the short message calling request carries the mobile phone number;
a returning unit, configured to check whether a pre-stored key value identical to the key value exists in a service own cache, and if so, return a prompt message that a short message has been sent to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
In another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform a method comprising:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
According to the method and the device for processing the related information of the short message, provided by the embodiment of the invention, a short message calling request sent to a service interface by a terminal is received, hash calculation is carried out on a mobile phone number and a service number corresponding to the service interface, and a hash value is used as a key value; the short message calling request carries the mobile phone number; checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal; the service self-cache is a part of the memory opened from the memory space of the application program and used for storing data required in the service operation process, the short message processing pressure of a service interface can be reduced, the service operation stability is improved, and the short message issuing cost is saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart illustrating a method for processing short message related information according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a method for processing short message related information according to another embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a short message related information processing apparatus according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Redis (Remote Dictionary Server), a Remote Dictionary service, is an open-source log-type and Key-Value database written in ANSI C language, supporting network, based on memory and persistent.
TTL (Time To Live), the instant life cycle. TTL is set for data stored in Redis through an EXPIRE command in Redis, and the aim of automatically deleting the data due to expiration is achieved.
And the multi-level cache is to make full use of each link of request processing to add the cache respectively, so that the service performance is improved.
Fig. 1 is a schematic flow chart of a method for processing short message related information according to an embodiment of the present invention, and as shown in fig. 1, the method for processing short message related information according to the embodiment of the present invention includes:
step S1: receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; and the short message calling request carries the mobile phone number.
Step S2: checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
In the step S1, the device receives a short message call request sent by a terminal to a service interface, performs hash calculation on a mobile phone number and a service number corresponding to the service interface, and uses a hash value as a key value; and the short message calling request carries the mobile phone number. The apparatus may be a computer device for executing the method, and may be, for example, a server, and may specifically be an application server. It should be noted that the embodiments of the present invention relate to the acquisition and analysis of data being authorized by the user. As shown in fig. 2, the "short message interface service" in fig. 2 corresponds to a service interface, the service interface and a service cache may be deployed in an application server, the Redis cache service may be deployed in a remote dictionary server, and the application server and the remote dictionary server may implement network communication connection.
The terminal may be a mobile phone as shown in fig. 2, and the mobile phone sends a short message call request to the service interface, where the short message call request carries a mobile phone number of the mobile phone.
The service interfaces have service numbers, and different service interfaces correspond to different service numbers, so that the service numbers can be understood to play a role in identifying the service interfaces.
The service number may be represented by a character string, and is not particularly limited.
The mobile phone number and the service number can be combined, the combination mode is not specifically limited, the number and the character obtained by combination are subjected to Hash calculation to obtain a Hash value, and the Hash value is used as a key value of Redis.
Before the step of sending a short message call request to a service interface by the receiving terminal, the method for processing the short message related information further comprises the following steps:
if the short message calling request sent to a service interface by a terminal is determined to be received for the first time, carrying out hash calculation on the mobile phone number and the service number corresponding to the service interface; the step may refer to the description of the short message call request sent by the non-primary receiving terminal to the service interface, and is not described in detail.
The short message related information processing method further comprises the following steps:
and determining to receive a short message calling request sent by the terminal to the service interface for the first time according to the inherent identifier of the terminal. The terminal inherent identity may comprise an IMEI code, which is illustrated as follows:
the International Mobile Equipment Identity (IMEI), which is commonly called a Mobile phone serial number and a Mobile phone "serial number," is used to identify Mobile communication Equipment such as each independent Mobile phone in a Mobile phone network, and is equivalent to an Identity card of a Mobile phone.
That is, if the IMEI code is acquired for the first time, it means that the short message call request sent by the terminal to the service interface is received for the first time.
Taking the hash value as a key value, determining a life cycle corresponding to the key value, synchronizing the key value and the corresponding life cycle to a remote dictionary server, and respectively taking the key value as pre-stored key values respectively corresponding to a service self cache and a remote dictionary service cache; determining a life cycle corresponding to the key value, including:
and setting a life cycle corresponding to the key value through a command for setting the service expiration time of the remote dictionary. That is, TTL is set for data stored in Redis based on the EXPIRE command in Redis. According to the embodiment of the invention, the life cycle corresponding to the key value is determined in the application program server, and then the key value and the corresponding life cycle are synchronized to the remote dictionary server through the network.
The application program server takes the key value as a pre-stored key value and stores the key value in a local service self cache; the remote dictionary server takes the key value as a pre-stored key value and stores the key value in a local remote dictionary service cache.
The lifetime may be set autonomously according to an actual situation, for example, 5 minutes, and it may be understood that the storage time of the pre-stored key values in the service self cache and the remote dictionary service cache is 5 minutes, and if the storage time exceeds the storage time, the pre-stored key values may be automatically deleted from the service self cache and the remote dictionary service cache, respectively.
Controlling the storage duration of the pre-stored key values in the service self cache and the remote dictionary service cache respectively according to the life cycle; namely, when the storage duration of the pre-stored key values in the cache of the service self reaches the life cycle, the pre-stored key values in the cache of the service self are automatically deleted, and when the storage duration of the pre-stored key values in the remote dictionary service cache of the remote dictionary server reaches the life cycle, the pre-stored key values in the remote dictionary service cache are automatically deleted.
Wherein the storage capacity of the service self cache is less than that of the remote dictionary service cache. The short message related information processing method further comprises the following steps:
and if the storage capacity of the service self cache is determined to be over limit, deleting the oldest stored pre-stored key value in the service self cache. Because the storage capacity of the service cache is small, if a condition that the number of the short message call requests in concurrency is large exists in a time period corresponding to the life cycle, the storage capacity of the service cache is over-limited, so that the earliest stored pre-stored key value in the service cache can be deleted, for example, when the ith pre-stored key value is stored, the storage capacity of the service cache is full, and when the (i + 1) th pre-stored key value needs to be stored, the earliest stored pre-stored key value in the service cache can be deleted.
At this time, the earliest stored pre-stored key value does not exist in the service cache, but also exists in the remote dictionary service cache.
In the step S2, the device checks whether a pre-stored key value identical to the key value exists in the service own cache, and if so, returns a prompt message that the short message has been sent to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process. If the pre-stored key value identical to the key value exists in the service self cache, the fact that the storage time length of the pre-stored key value does not reach the life cycle is shown, and the pre-stored key value still exists in the service self cache (the pre-stored key value is not deleted because the storage capacity of the service self cache exceeds the limit), therefore, a prompt message of sending the short message is directly returned to the terminal, namely the short message does not need to be sent, the short message cost is saved, and a remote dictionary server does not need to participate in data processing.
The short message related information processing method further comprises the following steps:
if not, forwarding the key value to a remote dictionary server; and the remote dictionary server receives the key value, compares the key value with a pre-stored key value in a remote dictionary service cache, if the comparison result is the same, the key value is deleted because the storage capacity of the service cache is exceeded, and returns a first feedback result to the application program server.
If a first feedback result returned by the remote dictionary server is received, returning a prompt message of the sent short message to the terminal; the first feedback result indicates that the pre-stored key value identical to the key value exists in the remote dictionary service cache. Reference is made to the above description and no further description is given.
The short message related information processing method further comprises the following steps:
if a second feedback result returned by the remote dictionary server is received, the short message is sent to the terminal again, the key value is determined to be the preset storage key value and the life cycle corresponding to the key value again, and the preset storage key value is stored in a service self cache; the second feedback result indicates that the pre-stored key value identical to the key value does not exist in the remote dictionary service cache. And the remote dictionary server receives the key value, compares the key value with a pre-stored key value in a remote dictionary service cache, if the comparison result is different, the storage duration of the key value exceeds the life cycle and is automatically deleted, the key value needs to be determined as the preset storage key value and the life cycle corresponding to the key value again, and the preset storage key value is stored in the service cache.
It should be noted that, if the remote dictionary server determines that a pre-stored key value identical to the key value does not exist in the remote dictionary service cache, it is also necessary to re-determine that the key value is the preset stored key value and the life cycle corresponding to the key value, and store the preset stored key value in the remote dictionary service cache.
The short message related information processing method provided by the embodiment of the invention comprises the steps of receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and using a hash value as a key value; the short message calling request carries the mobile phone number; checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal; the service self-cache is a part of the memory opened from the memory space of the application program and used for storing data required in the service operation process, the short message processing pressure of a service interface can be reduced, the service operation stability is improved, and the short message issuing cost is saved.
Further, before the step of sending a short message call request to a service interface by the receiving terminal, the method for processing the short message related information further includes:
if the short message calling request sent to a service interface by a terminal is determined to be received for the first time, carrying out hash calculation on the mobile phone number and the service number corresponding to the service interface; reference is made to the above description and no further description is made.
Taking the hash value as a key value, determining a life cycle corresponding to the key value, synchronizing the key value and the corresponding life cycle to a remote dictionary server, and respectively taking the key value as pre-stored key values respectively corresponding to a service self cache and a remote dictionary service cache; reference is made to the above description and no further description is made.
Controlling the storage duration of the pre-stored key values in the service self cache and the remote dictionary service cache respectively according to the life cycle; reference is made to the above description and no further description is made.
Wherein the storage capacity of the service self cache is less than that of the remote dictionary service cache. Reference is made to the above description and no further description is made.
The method for processing the short message related information provided by the embodiment of the invention realizes the control of the short message related information based on a secondary cache mechanism, further can reduce the short message processing pressure of a service interface, improves the stability of service operation and saves the cost of sending the short message.
Further, the method for processing the short message related information further comprises the following steps:
if not, forwarding the key value to a remote dictionary server; reference is made to the above description and no further description is made.
If a first feedback result returned by the remote dictionary server is received, returning a prompt message of the sent short message to the terminal; the first feedback result indicates that the pre-stored key value identical to the key value exists in the remote dictionary service cache. Reference is made to the above description and no further description is made.
According to the short message related information processing method provided by the embodiment of the invention, the application program server directly returns the prompt message of the sent short message to the terminal, so that the short message processing pressure of the service interface can be further reduced, the service operation stability is improved, and the cost of sending the short message is saved.
Further, the method for processing the short message related information further comprises the following steps:
if a second feedback result returned by the remote dictionary server is received, the short message is sent to the terminal again, the key value is determined to be the preset storage key value and the life cycle corresponding to the key value again, and the preset storage key value is stored in a service self cache; the second feedback result indicates that no pre-stored key value identical to the key value exists in the remote dictionary service cache. Reference is made to the above description and no further description is made.
According to the short message related information processing method provided by the embodiment of the invention, the application program server sends the short message to the terminal again, and the like, so that the short message processing pressure of the service interface can be further reduced, the service operation stability is improved, and the cost for sending the short message is saved.
Further, the method for processing the short message related information further comprises the following steps:
and if the storage capacity of the service self cache is determined to be over limit, deleting the oldest stored pre-stored key value in the service self cache. Reference is made to the above description and no further description is given.
The short message related information processing method provided by the embodiment of the invention realizes the optimized storage of the pre-stored key values.
Further, the method for processing the short message related information further comprises the following steps:
and determining to receive a short message calling request sent by the terminal to the service interface for the first time according to the inherent identifier of the terminal. Reference is made to the above description and no further description is made.
The method for processing the short message related information provided by the embodiment of the invention can effectively determine the short message calling request sent by the first receiving terminal to the service interface.
Further, determining a life cycle corresponding to the key value includes:
and setting a life cycle corresponding to the key value through a command for setting the service expiration time of the remote dictionary. Reference is made to the above description and no further description is made.
The method for processing the related information of the short message can conveniently determine the life cycle corresponding to the key value.
It should be noted that the method for processing short message related information provided by the embodiment of the present invention may be used in the financial field, and may also be used in any technical field except the financial field.
Fig. 3 is a schematic structural diagram of a short message related information processing apparatus according to an embodiment of the present invention, and as shown in fig. 3, the short message related information processing apparatus according to the embodiment of the present invention includes a calculating unit 301 and a returning unit 302, where:
the calculation unit 301 is configured to receive a short message call request sent by a terminal to a service interface, perform hash calculation on a mobile phone number and a service number corresponding to the service interface, and use a hash value as a key value; the short message calling request carries the mobile phone number; the returning unit 302 is configured to check whether a pre-stored key value identical to the key value exists in a service cache of the terminal, and if so, return a prompt message that the short message has been sent to the terminal; the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
Specifically, a computing unit 301 in the device is configured to receive a short message call request sent by a terminal to a service interface, perform hash computation on a mobile phone number and a service number corresponding to the service interface, and use a hash value as a key value; the short message calling request carries the mobile phone number; the returning unit 302 is configured to check whether a pre-stored key value identical to the key value exists in the service cache, and if so, return a prompt message that the short message has been sent to the terminal; the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
The short message related information processing device provided by the embodiment of the invention receives a short message calling request sent by a terminal to a service interface, performs hash calculation on a mobile phone number and a service number corresponding to the service interface, and takes a hash value as a key value; the short message calling request carries the mobile phone number; checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal; the service self-cache is a part of the memory opened from the memory space of the application program and used for storing data required in the service operation process, the short message processing pressure of a service interface can be reduced, the service operation stability is improved, and the short message issuing cost is saved.
Further, before the step of sending a short message call request to a service interface by the receiving terminal, the short message related information processing device is further configured to:
if the short message calling request sent to a service interface by a terminal is determined to be received for the first time, carrying out hash calculation on the mobile phone number and the service number corresponding to the service interface;
taking the hash value as a key value, determining a life cycle corresponding to the key value, synchronizing the key value and the corresponding life cycle to a remote dictionary server, and respectively taking the key value as pre-stored key values respectively corresponding to a service self cache and a remote dictionary service cache;
controlling the storage duration of the pre-stored key values in the service self cache and the remote dictionary service cache respectively according to the life cycle;
wherein the storage capacity of the service self cache is less than that of the remote dictionary service cache.
The short message related information processing device provided by the embodiment of the invention realizes the control of the short message related information based on a secondary cache mechanism, further can reduce the short message processing pressure of a service interface, improves the stability of service operation and saves the cost of sending short messages.
Further, the short message related information processing device is further configured to:
if not, forwarding the key value to a remote dictionary server;
if a first feedback result returned by the remote dictionary server is received, returning a prompt message of the sent short message to the terminal; the first feedback result indicates that the pre-stored key value identical to the key value exists in the remote dictionary service cache.
According to the short message related information processing device provided by the embodiment of the invention, the application program server directly returns the prompt message of the sent short message to the terminal, so that the short message processing pressure of the service interface can be further reduced, the service operation stability is improved, and the cost of sending the short message is saved.
Further, the short message related information processing device is further configured to:
if a second feedback result returned by the remote dictionary server is received, the short message is sent to the terminal again, the key value is determined to be the preset storage key value and the life cycle corresponding to the key value again, and the preset storage key value is stored in a service self cache; the second feedback result indicates that the pre-stored key value identical to the key value does not exist in the remote dictionary service cache.
According to the short message related information processing device provided by the embodiment of the invention, the application program server sends the short message to the terminal again, so that the short message processing pressure of the service interface can be further reduced, the service operation stability is improved, and the cost for sending the short message is saved.
Further, the short message related information processing device is further configured to:
and if the storage capacity of the service self cache is determined to be over limit, deleting the oldest stored pre-stored key value in the service self cache.
The short message related information processing device provided by the embodiment of the invention realizes the optimized storage of the pre-stored key values.
Further, the short message related information processing device is further configured to:
and determining to receive a short message calling request sent by the terminal to the service interface for the first time according to the inherent identifier of the terminal.
The short message related information processing device provided by the embodiment of the invention can effectively determine the short message calling request sent by the first receiving terminal to the service interface.
Further, the short message related information processing device is further configured to:
and setting a life cycle corresponding to the key value through a command for setting the service expiration time of the remote dictionary.
The short message related information processing device provided by the embodiment of the invention can conveniently determine the life cycle corresponding to the key value.
The embodiment of the apparatus for processing short message related information provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes: a processor (processor) 401, a memory (memory) 402, and a bus 403;
the processor 401 and the memory 402 complete communication with each other through a bus 403;
the processor 401 is configured to call the program instructions in the memory 402 to execute the methods provided by the above method embodiments, for example, including:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the foregoing method embodiments, for example, the method includes:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for processing related information of short messages is characterized by comprising the following steps:
receiving a short message calling request sent to a service interface by a terminal, carrying out hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
checking whether a pre-stored key value identical to the key value exists in a service self cache, and if so, returning a prompt message of the sent short message to the terminal;
the service self cache is a part of memory opened from the memory space of the application program and used for storing data required in the service operation process.
2. The method of claim 1, wherein before the step of sending the short message call request to the service interface by the receiving terminal, the method further comprises:
if the short message calling request sent to a service interface by a terminal is determined to be received for the first time, carrying out hash calculation on the mobile phone number and the service number corresponding to the service interface;
taking the hash value as a key value, determining a life cycle corresponding to the key value, synchronizing the key value and the corresponding life cycle to a remote dictionary server, and respectively taking the key value as pre-stored key values respectively corresponding to a service self cache and a remote dictionary service cache;
controlling the storage duration of the pre-stored key values in the service self cache and the remote dictionary service cache respectively according to the life cycle;
wherein the storage capacity of the service self cache is less than that of the remote dictionary service cache.
3. The method for processing related information of short message according to claim 1 or 2, wherein the method further comprises:
if not, forwarding the key value to a remote dictionary server;
if a first feedback result returned by the remote dictionary server is received, returning a prompt message of the sent short message to the terminal; the first feedback result indicates that the pre-stored key value identical to the key value exists in the remote dictionary service cache.
4. The method of claim 3, further comprising:
if a second feedback result returned by the remote dictionary server is received, the short message is sent to the terminal again, the key value is determined to be the preset storage key value and the life cycle corresponding to the key value again, and the preset storage key value is stored in a service self cache; the second feedback result indicates that the pre-stored key value identical to the key value does not exist in the remote dictionary service cache.
5. The method of claim 1, further comprising:
and if the storage capacity of the service self cache is determined to be over limit, deleting the oldest stored pre-stored key value in the service self cache.
6. The method of claim 2, wherein the method further comprises:
and determining to receive a short message calling request sent by the terminal to the service interface for the first time according to the inherent identifier of the terminal.
7. The method of claim 2, wherein determining the life cycle corresponding to the key value comprises:
and setting a life cycle corresponding to the key value through a command for setting the service expiration time of the remote dictionary.
8. A short message related information processing device is characterized by comprising:
the mobile phone comprises a computing unit, a service interface and a service processing unit, wherein the computing unit is used for receiving a short message calling request sent by a terminal to the service interface, performing hash calculation on a mobile phone number and a service number corresponding to the service interface, and taking a hash value as a key value; the short message calling request carries the mobile phone number;
a returning unit, configured to check whether a pre-stored key value identical to the key value exists in a service own cache, and if so, return a prompt message that a short message has been sent to the terminal;
the service self cache is a part of the memory opened from the memory space of the application program and is used for storing data required in the service operation process.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211478139.8A 2022-11-23 2022-11-23 Short message related information processing method and device Pending CN115835147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211478139.8A CN115835147A (en) 2022-11-23 2022-11-23 Short message related information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211478139.8A CN115835147A (en) 2022-11-23 2022-11-23 Short message related information processing method and device

Publications (1)

Publication Number Publication Date
CN115835147A true CN115835147A (en) 2023-03-21

Family

ID=85530863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211478139.8A Pending CN115835147A (en) 2022-11-23 2022-11-23 Short message related information processing method and device

Country Status (1)

Country Link
CN (1) CN115835147A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090305673A1 (en) * 2008-06-06 2009-12-10 Ebay, Inc. Secure short message service (sms) communications
CN102946596A (en) * 2012-11-29 2013-02-27 广东全通教育股份有限公司 Method and system for preventing resending of short message based on digital signature technology
US8504083B1 (en) * 2011-06-24 2013-08-06 Amazon Technologies, Inc. Analysis of message service provider quality of service
CN104113830A (en) * 2014-07-29 2014-10-22 广东能龙教育股份有限公司 Large-scale short message resend-preventing method based on message digest 5 algorithm (MD5) and distributed cache
WO2017092351A1 (en) * 2015-12-01 2017-06-08 乐视控股(北京)有限公司 Cache data update method and device
CN111031498A (en) * 2018-10-10 2020-04-17 中兴通讯股份有限公司 Network architecture supporting 5G terminal short message service and construction method thereof
CN113407363A (en) * 2021-06-23 2021-09-17 京东科技控股股份有限公司 Sliding window counting method and device based on remote dictionary service
WO2022095427A1 (en) * 2020-11-05 2022-05-12 平安科技(深圳)有限公司 Redis cache management method and apparatus, and computer device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090305673A1 (en) * 2008-06-06 2009-12-10 Ebay, Inc. Secure short message service (sms) communications
US8504083B1 (en) * 2011-06-24 2013-08-06 Amazon Technologies, Inc. Analysis of message service provider quality of service
CN102946596A (en) * 2012-11-29 2013-02-27 广东全通教育股份有限公司 Method and system for preventing resending of short message based on digital signature technology
CN104113830A (en) * 2014-07-29 2014-10-22 广东能龙教育股份有限公司 Large-scale short message resend-preventing method based on message digest 5 algorithm (MD5) and distributed cache
WO2017092351A1 (en) * 2015-12-01 2017-06-08 乐视控股(北京)有限公司 Cache data update method and device
CN111031498A (en) * 2018-10-10 2020-04-17 中兴通讯股份有限公司 Network architecture supporting 5G terminal short message service and construction method thereof
WO2022095427A1 (en) * 2020-11-05 2022-05-12 平安科技(深圳)有限公司 Redis cache management method and apparatus, and computer device and storage medium
CN113407363A (en) * 2021-06-23 2021-09-17 京东科技控股股份有限公司 Sliding window counting method and device based on remote dictionary service

Similar Documents

Publication Publication Date Title
CN108595207B (en) Gray scale publishing method, rule engine, system, terminal and storage medium
CN109582684B (en) Local cache data updating method and device, server and storage medium
CN109391673B (en) Method, system and terminal equipment for managing update file
CN110222500A (en) Method for edition management, device, equipment and computer readable storage medium
CN107026879B (en) Data caching method and background application system
WO2011023122A1 (en) Method, device and system for routing service
CN111666745A (en) File downloading method, device, server and medium
CN110287007A (en) Data call response method, server and computer readable storage medium
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
WO2024193352A1 (en) Data processing method and apparatus, computer device, and readable storage medium
CN111857772A (en) Method and equipment for remote transmission and dynamic loading of terminal edge application program
US20070050447A1 (en) Method and device arrangement for managing a client/server environment
CN110740163A (en) Idempotent control method, idempotent control device, electronic equipment and readable storage medium
CN113836155A (en) Data processing method and device based on distributed system and storage medium
CN104104701A (en) Online service configuration updating method and system
CN113010238A (en) Permission determination method, device and system for micro application call interface
CN115835147A (en) Short message related information processing method and device
CN113805957B (en) Method and device for dynamically loading edge program
CN111654398B (en) Configuration updating method and device, computer equipment and readable storage medium
CN113890906A (en) Call forwarding method and device, electronic equipment and computer readable storage medium
CN111176679B (en) Application program updating method and device
CN112148803A (en) Method, device and equipment for calling tasks in block chain and readable storage medium
CN114095475B (en) Data processing method, device, electronic equipment, system and storage medium
CN117883789B (en) Data acquisition method, apparatus, device, readable storage medium, and program product
CN111404979B (en) Method and device for processing service request and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination