CN110891249A - Short message interface allocation method, server, client and system - Google Patents

Short message interface allocation method, server, client and system Download PDF

Info

Publication number
CN110891249A
CN110891249A CN201911416354.3A CN201911416354A CN110891249A CN 110891249 A CN110891249 A CN 110891249A CN 201911416354 A CN201911416354 A CN 201911416354A CN 110891249 A CN110891249 A CN 110891249A
Authority
CN
China
Prior art keywords
short message
client
verification information
message interface
request message
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
CN201911416354.3A
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.)
Hefei Hualing Co Ltd
Hefei Midea Intelligent Technologies Co Ltd
Original Assignee
Hefei Hualing Co Ltd
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 Hefei Hualing Co Ltd filed Critical Hefei Hualing Co Ltd
Priority to CN201911416354.3A priority Critical patent/CN110891249A/en
Publication of CN110891249A publication Critical patent/CN110891249A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a short message interface distribution method, a server, a client and a system. The distribution method comprises the following steps: receiving a first request message which is sent by a client and used for requesting a short message interface, wherein the first request message carries verification information; extracting the verification information from the first request message, and verifying the validity of the client according to the verification information; and when the client side is legal, distributing a corresponding target short message interface to the client side so that the client side transmits the short message through the target short message interface. According to the distribution method provided by the embodiment of the invention, the server can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, the legality of the client is verified according to the verification information, and the corresponding short message interface is distributed to the client when the client is legal, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and reliability of the short message interface are improved.

Description

Short message interface allocation method, server, client and system
Technical Field
The invention relates to the technical field of information, in particular to a short message interface distribution method, a server, a client, a system, electronic equipment and a computer readable storage medium.
Background
At present, due to business requirements, a server sometimes needs to send a short message to a client and receive the short message sent by the client, and the server needs to allocate a short message interface to the client.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide a method for allocating a short message interface, in which a server can extract verification information from a request message sent by a client for requesting the short message interface, verify the validity of the client according to the verification information, and allocate a corresponding short message interface to the client when the client is valid, so as to effectively prevent brute force of the short message interface and improve the safety and reliability of the short message interface.
The second objective of the present invention is to provide another method for allocating short message interfaces.
A third object of the present invention is to provide a server.
A fourth object of the present invention is to provide a client.
The fifth objective of the present invention is to provide a short message interface distribution system.
A sixth object of the present invention is to provide an electronic apparatus.
A seventh object of the present invention is to provide a computer-readable storage medium.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for allocating short message interfaces, including the following steps: receiving a first request message which is sent by a client and used for requesting a short message interface, wherein the first request message carries verification information; extracting the verification information from the first request message, and verifying the validity of the client according to the verification information; and when the client side is legal, distributing a corresponding target short message interface to the client side so that the client side transmits the short message through the target short message interface.
According to the short message interface distribution method provided by the embodiment of the invention, the server can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, the legality of the client is verified according to the verification information, and when the client is legal, the corresponding short message interface is distributed to the client, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and reliability of the short message interface are improved.
In addition, the method for allocating short message interfaces according to the above embodiment of the present invention may further have the following additional technical features:
in one embodiment of the invention, the verification information is generated by the client according to the current timestamp, the key and the identity of the client; the verifying the validity of the client according to the verification information comprises: verifying the timeliness of the first request message according to the timestamp in the verification information; verifying the authenticity of the first request message according to the secret key in the verification information; verifying the validity of the identity of the client according to the identity in the verification information; when the validity, the authenticity and the validity are verified, identifying that the client is legal; and when one of the validity, the authenticity and the legality is not verified, identifying that the client is illegal.
In an embodiment of the present invention, the verifying the timeliness of the first request message according to the timestamp in the verification information includes: and acquiring the timestamp from the verification information, identifying that the time difference between the timestamp and the current timestamp is smaller than a preset time difference value, determining that the timeliness verification of the first request message passes, and identifying that the time difference between the timestamp and the current timestamp is greater than or equal to the preset time difference value, determining that the timeliness verification of the first request message does not pass.
In one embodiment of the present invention, the verifying the authenticity of the first request message according to the key in the verification information includes: and acquiring a first key string generated by the key from the verification information, generating a second key string by using the key stored in the verification information, comparing the first key string with the second key string to be consistent, determining that the authenticity verification of the first request message passes, and comparing the first key string with the second key string to be inconsistent, determining that the authenticity verification of the first request message does not pass.
In an embodiment of the present invention, the verifying the validity of the identity of the client according to the identity identifier in the verification information includes: and acquiring the identity identifier from the verification information, and determining that the validity verification of the identity of the client passes if the identity identifier is not included in a blacklist, and determining that the validity verification of the identity of the client does not pass if the identity identifier is included in the blacklist.
In an embodiment of the present invention, the allocating a corresponding target short message interface to the client includes: identifying the occupation state of each short message interface, and determining candidate short message interfaces in an idle state from all short message interfaces according to the occupation state; randomly selecting one of the candidate short message interfaces in the idle state as the target short message interface; or, acquiring the transmission capability parameter of the candidate short message interface in the idle state, and screening the target short message interface from the candidate short message interface in the idle state according to the transmission capability parameter.
In an embodiment of the present invention, the screening out the target short message interface from the candidate short message interfaces in the idle state according to the transmission capability parameter includes: according to the transmission capacity parameter, determining a candidate short message interface with optimal transmission capacity from the candidate short message interfaces in the idle state as the target short message interface; or acquiring identification information of the client, determining the transmission capability requirement of the client according to the identification information, and selecting a candidate short message interface matched with the transmission capability requirement from the candidate short message interfaces in the idle state as the target short message interface according to the transmission capability parameter.
In order to achieve the above object, a second embodiment of the present invention provides another short message interface allocation method, including the following steps: acquiring data for generating verification information, and generating the verification information of a client according to the data; sending a first request message for requesting a short message interface to a server, wherein the first request message carries the verification information; and acquiring a short message interface distributed by the server after verifying that the client is legal.
According to the short message interface distribution method provided by the embodiment of the invention, the client can generate the verification information according to the related data, so that the server can verify the legality of the client according to the verification information, when the client is legal, the server distributes the short message interface to the client, and then the client can acquire the corresponding short message interface, so that brute force cracking of the short message interface can be effectively prevented, and the safety and reliability of the short message interface are improved.
In order to achieve the above object, a third embodiment of the present invention provides a server, including: the request receiving module is used for receiving a first request message which is sent by a client and used for requesting a short message interface, wherein the first request message carries verification information; the verification module is used for extracting the verification information from the first request message and verifying the validity of the client according to the verification information; and the distribution module is used for distributing a corresponding target short message interface to the client when the client is legal so as to enable the client to transmit the short message through the target short message interface.
The server of the embodiment of the invention can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, verify the legality of the client according to the verification information, and distribute the corresponding short message interface to the client when the client is legal, thereby effectively preventing brute force of the short message interface and improving the safety and reliability of the short message interface.
In addition, the server proposed according to the above embodiment of the present invention may further have the following additional technical features:
in one embodiment of the invention, the verification information is generated by the client according to the current timestamp, the key and the identity of the client; the verification module is specifically configured to: verifying the timeliness of the first request message according to the timestamp in the verification information; verifying the authenticity of the first request message according to the secret key in the verification information; verifying the validity of the identity of the client according to the identity in the verification information; when the validity, the authenticity and the validity are verified, identifying that the client is legal; and when one of the validity, the authenticity and the legality is not verified, identifying that the client is illegal.
In an embodiment of the present invention, the verification module is specifically configured to: and acquiring the timestamp from the verification information, identifying that the time difference between the timestamp and the current timestamp is smaller than a preset time difference value, determining that the timeliness verification of the first request message passes, and identifying that the time difference between the timestamp and the current timestamp is greater than or equal to the preset time difference value, determining that the timeliness verification of the first request message does not pass.
In an embodiment of the present invention, the verification module is specifically configured to: and acquiring a first key string generated by the key from the verification information, generating a second key string by using the key stored in the verification information, comparing the first key string with the second key string to be consistent, determining that the authenticity verification of the first request message passes, and comparing the first key string with the second key string to be inconsistent, determining that the authenticity verification of the first request message does not pass.
In an embodiment of the present invention, the verification module is specifically configured to: and acquiring the identity identifier from the verification information, and determining that the validity verification of the identity of the client passes if the identity identifier is not included in a blacklist, and determining that the validity verification of the identity of the client does not pass if the identity identifier is included in the blacklist.
In an embodiment of the present invention, the allocating module is further configured to: identifying the occupation state of each short message interface, and determining candidate short message interfaces in an idle state from all short message interfaces according to the occupation state; randomly selecting one of the candidate short message interfaces in the idle state as the target short message interface; or, acquiring the transmission capability parameter of the candidate short message interface in the idle state, and screening the target short message interface from the candidate short message interface in the idle state according to the transmission capability parameter.
In an embodiment of the present invention, the allocating module is further configured to: according to the transmission capacity parameter, determining a candidate short message interface with optimal transmission capacity from the candidate short message interfaces in the idle state as the target short message interface; or acquiring identification information of the client, determining the transmission capability requirement of the client according to the identification information, and selecting a candidate short message interface matched with the transmission capability requirement from the candidate short message interfaces in the idle state as the target short message interface according to the transmission capability parameter.
In order to achieve the above object, a fourth aspect of the present invention provides a client, including: the generation module is used for acquiring data used for generating verification information and generating the verification information of the client according to the data; the sending module is used for sending a first request message for requesting a short message interface to a server, wherein the first request message carries the verification information; and the acquisition module is used for acquiring the short message interface distributed by the server after the client is verified to be legal.
The client of the embodiment of the invention can generate the verification information according to the related data, so that the server can verify the legality of the client according to the verification information, when the client is legal, the server distributes the short message interface to the client, and then the client can acquire the corresponding short message interface, thereby effectively preventing brute force cracking of the short message interface and improving the safety and reliability of the short message interface.
In order to achieve the above object, a fifth embodiment of the present invention provides a short message interface distribution system, which includes the server according to the third embodiment of the present invention and the client according to the fourth embodiment of the present invention.
According to the distribution system of the short message interfaces, the server can extract the verification information from the request information which is sent by the client and used for requesting the short message interfaces, the legality of the client is verified according to the verification information, and when the client is legal, the corresponding short message interfaces are distributed to the client, so that brute force cracking of the short message interfaces can be effectively prevented, and the safety and reliability of the short message interfaces are improved.
In order to achieve the above object, a sixth aspect of the present invention provides an electronic device, including a memory, a processor; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the short message interface allocation method according to the first aspect of the present invention and the short message interface allocation method according to the second aspect of the present invention.
According to the electronic equipment provided by the embodiment of the invention, the processor executes the computer program stored on the memory, the server can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, the legality of the client is verified according to the verification information, and when the client is legal, the corresponding short message interface is distributed to the client, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and reliability of the short message interface are improved.
To achieve the above object, a seventh embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer-readable storage medium implements the short message interface allocation method according to the first embodiment of the present invention and the short message interface allocation method according to the second embodiment of the present invention.
The computer readable storage medium of the embodiment of the invention stores the computer program and is executed by the processor, the server can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, the legality of the client is verified according to the verification information, and the corresponding short message interface is distributed to the client when the client is legal, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and the reliability of the short message interface are improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a short message interface allocation method according to an embodiment of the present invention;
fig. 2 is a flowchart of a short message interface allocation method according to another embodiment of the present invention;
fig. 3 is a flowchart of a short message interface allocation method according to a specific example of the present invention;
fig. 4 is a flowchart of a short message interface allocation method according to another embodiment of the present invention;
FIG. 5 is a block diagram of a server according to one embodiment of the invention;
FIG. 6 is a block diagram of a client according to one embodiment of the invention;
FIG. 7 is a block diagram of a short message interface distribution system according to an embodiment of the present invention; and
FIG. 8 is a block diagram of an electronic device in accordance with one embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The short message interface allocation method, the server, the client, the system, the electronic device and the computer-readable storage medium according to the embodiments of the present invention are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a short message interface allocation method according to an embodiment of the present invention.
As shown in fig. 1, the method for allocating short message interfaces according to the embodiment of the present invention includes the following steps:
s101, receiving a first request message sent by a client for requesting a short message interface, wherein the first request message carries verification information.
It should be noted that, in the embodiment of the present invention, the server is an execution subject. The client may include a mobile phone APP (Application), and the like, and the client may establish a network connection with the server to perform data transmission with the server, and optionally, the network connection may be a mobile network, such as 3G, 4G, 5G, and the like.
In an embodiment of the present invention, when a client needs to send a short message to a server or receive a short message sent by the server due to a service requirement, the server needs to allocate a short message interface to the client, and the client can generate a first request message for requesting the short message interface and then send the first request message to the server, so that the server receives the first request message.
In the prior art, after receiving a request message for requesting a short message interface sent by a client, a server directly allocates a short message interface to the client, and the short message interface is easy to crack violently, so that the safety and reliability are low. The first request message which is sent by the client to the server and used for requesting the short message interface carries the verification information, so that the server can verify the validity of the client according to the verification information, the short message interface is not easy to crack violently, and the safety and the reliability of the short message interface are improved.
Optionally, the verification information can be generated by the client according to the current timestamp, the key and the identity of the client, the verification information generated by the method is not easy to crack violently, and the safety and the reliability are high. The key is that when the client registers in the server, the server makes an appointment with the client in advance, and then the server issues the client for storage. Accordingly, the server may store the client's key locally for subsequent authentication. Alternatively, the identity of the client may include the MAC address of the device on which the client is loaded.
For example, the client may generate a key string according to the current timestamp, the key, the identity of the client, and a preset algorithm logic, and use the key string as the verification information, where the key string may include a first key string generated by the client according to the key. The algorithm logic can be calibrated according to actual conditions and is preset in the storage space of the client and the server.
S102, extracting verification information from the first request message, and verifying the validity of the client according to the verification information.
In an embodiment of the present invention, after receiving the first request message sent by the client, the server may extract the verification information from the first request message, and further, the server may verify the legitimate line of the client based on the verification information to identify whether the first request message originates from an illegitimate client, so as to avoid that the short message interface is stolen by the illegitimate client, which may threaten the security of the information.
S103, when the client is legal, a corresponding target short message interface is distributed to the client so that the client can transmit short messages through the target short message interface.
In summary, according to the short message interface allocation method of the embodiment of the present invention, the server may extract the verification information from the request message sent by the client for requesting the short message interface, verify the validity of the client according to the verification information, and allocate the corresponding short message interface to the client when the client is valid, so that brute force cracking of the short message interface can be effectively prevented, and the security and reliability of the short message interface are improved.
The method for allocating short message interfaces according to another embodiment of the present invention is described below with reference to fig. 2.
As shown in fig. 2, the method for allocating short message interfaces according to the embodiment of the present invention includes the following steps:
s201, receiving a first request message sent by a client for requesting a short message interface, wherein the first request message carries verification information, the verification information is generated by the client according to a current timestamp, a key and an identity of the client, and the verification information comprises a first key string generated by the client according to the key.
S202, extracting the verification information from the first request message.
And S203, extracting the timestamp, the key and the identity of the client from the verification information.
In an embodiment of the present invention, the verification information may be generated by the client according to the current timestamp, the key, and the identity of the client, and the server may further extract the timestamp, the key, and the identity of the client from the verification information, and then verify the validity of the client according to the timestamp, the key, and the identity of the client.
For example, the client may generate a key string according to the current timestamp, the key, the identity of the client, and a preset algorithm logic, and use the key string as the verification information, where the key string may include a first key string generated by the client according to the key. After receiving a first request message sent by a client, a server can extract a key string from the first request message, then extract a timestamp, the first key string and an identity of the client from the key string according to a preset algorithm logic, and then verify the validity of the client according to the timestamp, the first key string and the identity of the client.
And S204, verifying the timeliness of the first request message according to the timestamp.
In an embodiment of the present invention, verifying the timeliness of the first request message according to the timestamp may include identifying that a time difference between the timestamp and the current timestamp is smaller than a preset time difference value, which indicates that the time difference between the timestamp and the current timestamp is smaller, and the timeliness of the first request message is higher, and it may be determined that the timeliness verification of the first request message passes. If the time difference between the identification timestamp and the current timestamp is greater than or equal to the preset time difference value, the time difference between the identification timestamp and the current timestamp is larger, the timeliness of the first request message is lower, and the fact that the timeliness verification of the first request message fails can be determined. The preset time difference value can be calibrated according to actual conditions, for example, can be calibrated to 60 seconds, and is preset in the storage space of the server.
The method can determine whether the timeliness verification of the first request message passes according to the relation between the time difference between the timestamp and the current timestamp and the preset time difference, can effectively prevent brute force cracking of the short message interface, and improves the safety and reliability of the short message interface.
And S205, verifying the authenticity of the first request message according to the key.
In an embodiment of the present invention, verifying the authenticity of the first request message according to the key may include that the client may generate a first key string according to the key, where the verification information carries the first key string, and the server may further obtain the first key string from the verification information, and generate a second key string by using a key stored in the server, and determine whether the authenticity verification of the first request message passes by comparing whether the first key string and the second key string are consistent.
If the first key string and the second key string are compared to be consistent, the keys stored in the client and the server are consistent, and the authenticity verification of the first request message can be determined to be passed. If the first key string and the second key string are not consistent through comparison, the keys stored in the client and the server are not consistent, and the authenticity verification of the first request message can be determined to be failed.
The method can determine whether the authenticity verification of the first request message passes through by comparing whether the first key string generated by the client according to the key is consistent with the second key string generated by the server according to the key, thereby effectively preventing brute force cracking of the short message interface and improving the safety and reliability of the short message interface.
S206, verifying the legality of the identity of the client according to the identity of the client.
In an embodiment of the present invention, verifying the validity of the identity of the client according to the identity of the client may include recognizing that the blacklist does not include the identity, which indicates that the identity of the client is valid, and may determine that the validity verification of the identity of the client passes. If the identification blacklist comprises the identity, the identity of the client is not legal, and the validity verification of the identity of the client can be determined to be failed. The blacklist can be pre-stored in a storage space of the server, and can be updated in real time along with judgment of the server on the identity of the client.
The method can determine whether the validity verification of the identity of the client passes or not according to whether the identity mark of the client is in the blacklist or not, can effectively prevent brute force cracking of the short message interface, and improves the safety and reliability of the short message interface.
Optionally, after obtaining the identity of the client, the server may call a blacklist from its own storage space, identify whether the identity is in the blacklist, and if the identity is in the blacklist, determine that the validity verification of the identity of the client fails. If the identity is not in the blacklist, whether the identity is abnormal or not may be continuously determined, for example, whether the number of short messages sent or received by the identity within a preset time reaches a preset threshold or whether the number of request messages sent by the identity within the preset time for requesting the short message interface reaches the preset threshold or not may be determined, and the method for determining whether the identity is abnormal or not is not limited herein.
Further, if it is determined that the identity identifier is not abnormal, it may be finally determined that the validity of the identity of the client passes the verification. If the identity is judged to be abnormal, the validity verification of the identity of the client can be finally determined to be failed, and the identity is added into the blacklist.
The method can finally determine whether the validity verification of the identity of the client passes or not by judging whether the identity is abnormal or not after identifying that the identity of the client is not in the blacklist, and can update the blacklist in real time according to the judgment result of whether the identity is abnormal or not, so that the flexibility is high, the brute force cracking of the short message interface can be effectively prevented, and the safety and the reliability of the short message interface are improved.
And S207, identifying that the client is legal when the timeliness and the authenticity of the first request message and the validity of the identity of the client are verified.
In an embodiment of the present invention, the client is identified as legitimate only if the validity and authenticity of the first request message and the validity of the client identity are verified, and the client is identified as illegitimate when one of the validity and authenticity of the first request message or the validity of the client identity is not verified.
The method generates verification information according to the timestamp, the key and the identity of the client, verifies timeliness and authenticity of the request message sent by the client and legality of the identity of the client according to the timestamp, the key and the identity of the client, and identifies the legality of the client when the timeliness, the authenticity and the legality are passed, so that brute force of a short message interface can be effectively prevented, and safety and reliability of the short message interface are improved.
And S208, distributing a corresponding target short message interface to the client so that the client transmits the short message through the target short message interface.
In an embodiment of the present invention, allocating the corresponding target short message interface to the client may include identifying an occupied state of each short message interface, determining candidate short message interfaces in an idle state from all the short message interfaces according to the occupied state, and then selecting one of the candidate short message interfaces in the idle state as the target short message interface.
The method can determine the short message interface in an idle state according to the occupation state of the short message interface, and then selects one short message interface as a target short message interface, so that the distribution of the short message interface is more reasonable, the load of the short message interface can be effectively relieved, and the transmission of the short message is more efficient.
Further, a random selection mode can be adopted to select one of the candidate short message interfaces in the idle state as a target short message interface, or the transmission capability parameters of the candidate short message interfaces in the idle state are acquired, and then the target short message interface is screened out from the candidate short message interfaces in the idle state according to the transmission capability parameters.
Optionally, screening out the target short message interface according to the transmission capability parameter from the candidate short message interfaces in the idle state may include determining a candidate short message interface with the optimal transmission capability from the candidate short message interfaces in the idle state according to the transmission capability parameter, and using the candidate short message interface as the target short message interface. The method can allocate the short message interface with the optimal transmission capability in the idle state to the client, and can better utilize the resources of the short message interface.
As another embodiment, the screening out the target short message interface according to the transmission capability parameter from the candidate short message interfaces in the idle state may include obtaining identification information of the client, determining the transmission capability requirement of the client according to the identification information, and then selecting a candidate short message interface matching the transmission capability requirement from the candidate short message interfaces in the idle state according to the transmission capability parameter as the target short message interface. The method can allocate the short message interface which is in an idle state at present and has the transmission capacity matched with the transmission capacity requirement of the client to the client, and can allocate the short message interface more reasonably and efficiently. The identification information of the client may include information such as a MAC address of a device on which the client is installed, and an account of the client.
In summary, according to the short message interface allocation method of the embodiment of the present invention, the client generates the verification information according to the timestamp, the key and the identity of the client, and the server verifies the timeliness and the authenticity of the request message sent by the client and the validity of the identity of the client according to the timestamp, the key and the identity of the client, and identifies that the client is legal when the timeliness, the authenticity and the validity all pass, so that brute force cracking of the short message interface can be effectively prevented, and the security and the reliability of the short message interface are improved.
To make the present invention more clear to those skilled in the art, fig. 3 is a flowchart of a short message interface allocation method according to an embodiment of the present invention, and as shown in fig. 3, the control method may include the following steps:
s301, receiving a first request message sent by a client for requesting a short message interface, wherein the first request message carries verification information, the verification information is generated by the client according to a current timestamp, a key and an identity of the client, and the verification information comprises a first key string generated by the client according to the key.
S302, the authentication information is extracted from the first request message.
S303, extracting the timestamp, the first key string and the identity of the client from the verification information.
S304, the time difference between the identification timestamp and the current timestamp is smaller than a preset time difference value.
S305, determining that the timeliness verification of the first request message passes.
S306, generating a second key string by using the key stored in the key storage device, and comparing the first key string and the second key string to be consistent.
S307, it is determined that the authenticity verification of the first request message passes.
S308, identifying that the blacklist does not include the identity of the client.
S309, the validity verification of the identity of the client is determined to be passed.
S310, when the timeliness and the authenticity of the first request message and the verification of the validity of the identity of the client pass, the client is identified to be legal.
S311, distributing a corresponding target short message interface to the client so that the client transmits the short message through the target short message interface.
For the specific description of the steps, reference is made to the descriptions of the related contents in the above embodiments, which are not described herein again.
The method for allocating short message interfaces according to another embodiment of the present invention is described below with reference to fig. 4.
As shown in fig. 4, the method for allocating short message interfaces according to the embodiment of the present invention includes the following steps:
s401, acquiring data for generating verification information, and generating verification information of a client according to the data.
It should be noted that, in the embodiment of the present invention, the client is an execution subject. The client side can establish network connection with the server so as to carry out data transmission with the server. Alternatively, the network connection may be a mobile network, such as 3G, 4G, 5G, etc.
In an embodiment of the present invention, when the client needs to send a short message to the server or receive a short message sent by the server due to a service requirement, the client may obtain data for generating the verification information, and generate the verification information according to the data, so that the server can verify the validity of the client according to the verification information.
Optionally, the data used to generate the authentication information may include a current timestamp, a key, and an identification of the client. The method enables the client to generate the verification information according to the current timestamp, the key and the identity of the client, the verification information is not easy to crack violently, and the safety and the reliability are high.
S402, sending a first request message for requesting a short message interface to a server, wherein the first request message carries verification information.
S403, acquiring a short message interface distributed by the server after the client is verified to be legal.
In an embodiment of the present invention, after the client sends the first request message for requesting the short message interface to the server, the server may receive the first request message, extract the verification information from the first request message, verify the validity of the client according to the verification information, after verifying the validity of the client, the server may allocate a corresponding short message interface to the client, and the server may acquire the short message interface and send the short message to the server or receive the short message sent by the server through the short message interface.
In the invention, the server distributes the corresponding short message interface to the client only after the server verifies that the client is legal, and then the client can acquire the corresponding short message interface, so that brute force cracking of the short message interface can be effectively prevented, and the safety and reliability of the short message interface are improved.
It should be noted that, for details that are not disclosed in the method for allocating a short message interface according to the embodiment of the present invention, please refer to the details disclosed in the above embodiments of the present invention, which are not described herein again.
In summary, according to the short message interface allocation method provided by the embodiment of the present invention, the client can generate the verification information according to the relevant data, so that the server can verify the validity of the client according to the verification information, when the client is valid, the server allocates the short message interface to the client, and then the client can acquire the corresponding short message interface, so that brute force of the short message interface can be effectively prevented, and the security and reliability of the short message interface are improved.
In order to implement the foregoing embodiment, the present invention further provides a server 100, as shown in fig. 5, including a request receiving module 11, a verification module 12, and an allocation module 13.
The request receiving module 11 is configured to receive a first request message sent by a client and used for requesting a short message interface, where the first request message carries verification information.
The verification module 12 is configured to extract the verification information from the first request message, and verify the validity of the client according to the verification information.
The allocation module 13 is configured to allocate a corresponding target short message interface to the client when the client is legal, so that the client transmits a short message through the target short message interface.
In one embodiment of the invention, the verification information is generated by the client according to the current timestamp, the key and the identity of the client; the verification module 12 is specifically configured to verify timeliness of the first request message according to the timestamp in the verification information; verifying the authenticity of the first request message according to the secret key in the verification information; verifying the validity of the identity of the client according to the identity in the verification information; when the validity, the authenticity and the validity are verified, identifying that the client is legal; and when one of the validity, the authenticity and the legality is not verified, identifying that the client is illegal.
In an embodiment of the present invention, the verification module 12 is specifically configured to obtain the timestamp from the verification information, identify that a time difference between the timestamp and the current timestamp is smaller than a preset time difference value, determine that the timeliness verification of the first request message passes, and identify that the time difference between the timestamp and the current timestamp is greater than or equal to the preset time difference value, determine that the timeliness verification of the first request message fails.
In an embodiment of the present invention, the verification module 12 is specifically configured to obtain a first key string generated by the key from the verification information, generate a second key string by using a key stored in the verification module, compare the first key string with the second key string to determine that the authenticity verification of the first request message passes, and compare the first key string with the second key string to determine that the authenticity verification of the first request message fails.
In an embodiment of the present invention, the verification module 12 is specifically configured to obtain the identity identifier from the verification information, and if the identity identifier is not included in a black list, it is determined that the validity of the identity of the client is verified, and if the identity identifier is included in the black list, it is determined that the validity of the identity of the client is verified.
In an embodiment of the present invention, the allocation module 13 is further configured to identify an occupied state of each short message interface, and determine candidate short message interfaces in an idle state from all short message interfaces according to the occupied state; randomly selecting one of the candidate short message interfaces in the idle state as the target short message interface; or, acquiring the transmission capability parameter of the candidate short message interface in the idle state, and screening the target short message interface from the candidate short message interface in the idle state according to the transmission capability parameter.
In an embodiment of the present invention, the allocating module 13 is further configured to determine, according to the transmission capability parameter, a candidate short message interface with an optimal transmission capability from the candidate short message interfaces in the idle state, as the target short message interface; or acquiring identification information of the client, determining the transmission capability requirement of the client according to the identification information, and selecting a candidate short message interface matched with the transmission capability requirement from the candidate short message interfaces in the idle state as the target short message interface according to the transmission capability parameter.
It should be noted that, for details that are not disclosed in the server according to the embodiment of the present invention, please refer to details that are disclosed in the short message interface allocation method according to the above embodiment of the present invention, which are not described herein again.
To sum up, the server of the embodiment of the invention can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, verify the legality of the client according to the verification information, and distribute the corresponding short message interface to the client when the client is legal, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and the reliability of the short message interface are improved.
In order to implement the foregoing embodiment, the present invention further provides a client 200, as shown in fig. 6, including a generating module 21, a sending module 22, and an obtaining module 23.
The generating module 21 is configured to obtain data used for generating authentication information, and generate authentication information of a client according to the data.
The sending module 22 is configured to send a first request message for requesting a short message interface to a server, where the first request message carries the verification information.
The obtaining module 23 is configured to obtain a short message interface allocated by the server after verifying that the client is legal.
It should be noted that, for details that are not disclosed in the client according to the embodiment of the present invention, please refer to details disclosed in the short message interface allocation method according to the above embodiment of the present invention, which are not described herein again.
The client of the embodiment of the invention can generate the verification information according to the related data, so that the server can verify the legality of the client according to the verification information, when the client is legal, the server distributes the short message interface to the client, and then the client can acquire the corresponding short message interface, thereby effectively preventing brute force cracking of the short message interface and improving the safety and reliability of the short message interface.
In order to implement the foregoing embodiment, the present invention further provides a short message interface distribution system 300, as shown in fig. 7, which includes the server 100 and the client 200.
According to the distribution system of the short message interfaces, the server can extract the verification information from the request information which is sent by the client and used for requesting the short message interfaces, the legality of the client is verified according to the verification information, and when the client is legal, the corresponding short message interfaces are distributed to the client, so that brute force cracking of the short message interfaces can be effectively prevented, and the safety and reliability of the short message interfaces are improved.
In order to implement the above embodiments, the present invention further provides an electronic device 400, as shown in fig. 8, where the electronic device 400 includes a memory 41 and a processor 42. The processor 42 reads the executable program code stored in the memory 31 to run the program corresponding to the executable program code, so as to implement the short message interface allocation method.
According to the electronic equipment provided by the embodiment of the invention, the processor executes the computer program stored on the memory, the server can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, the legality of the client is verified according to the verification information, and when the client is legal, the corresponding short message interface is distributed to the client, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and reliability of the short message interface are improved.
In order to implement the foregoing embodiments, the present invention further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the foregoing short message interface allocation method.
The computer readable storage medium of the embodiment of the invention stores the computer program and is executed by the processor, the server can extract the verification information from the request message which is sent by the client and used for requesting the short message interface, the legality of the client is verified according to the verification information, and the corresponding short message interface is distributed to the client when the client is legal, so that the brute force cracking of the short message interface can be effectively prevented, and the safety and the reliability of the short message interface are improved.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," and the like are used in the orientations and positional relationships indicated in the drawings for convenience in describing the invention and to simplify the description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and are not to be considered limiting of the invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean 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 are not necessarily intended to 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. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (13)

1. A method for distributing short message interfaces is characterized by comprising the following steps:
receiving a first request message which is sent by a client and used for requesting a short message interface, wherein the first request message carries verification information;
extracting the verification information from the first request message, and verifying the validity of the client according to the verification information;
and when the client side is legal, distributing a corresponding target short message interface to the client side so that the client side transmits the short message through the target short message interface.
2. The method of claim 1, wherein the authentication information is generated by the client based on a current timestamp, a key, and an identity of the client;
the verifying the validity of the client according to the verification information comprises:
verifying the timeliness of the first request message according to the timestamp in the verification information;
verifying the authenticity of the first request message according to the secret key in the verification information;
verifying the validity of the identity of the client according to the identity in the verification information;
when the validity, the authenticity and the validity are verified, identifying that the client is legal;
and when one of the validity, the authenticity and the legality is not verified, identifying that the client is illegal.
3. The method of claim 2, wherein verifying the timeliness of the first request message according to the timestamp in the verification information comprises:
and acquiring the timestamp from the verification information, identifying that the time difference between the timestamp and the current timestamp is smaller than a preset time difference value, determining that the timeliness verification of the first request message passes, and identifying that the time difference between the timestamp and the current timestamp is greater than or equal to the preset time difference value, determining that the timeliness verification of the first request message does not pass.
4. The method of claim 2, wherein verifying the authenticity of the first request message based on the key in the verification information comprises:
and acquiring a first key string generated by the key from the verification information, generating a second key string by using the key stored in the verification information, comparing the first key string with the second key string to be consistent, determining that the authenticity verification of the first request message passes, and comparing the first key string with the second key string to be inconsistent, determining that the authenticity verification of the first request message does not pass.
5. The method according to claim 2, wherein the verifying the validity of the identity of the client according to the identity identifier in the verification information comprises:
and acquiring the identity identifier from the verification information, and determining that the validity verification of the identity of the client passes if the identity identifier is not included in a blacklist, and determining that the validity verification of the identity of the client does not pass if the identity identifier is included in the blacklist.
6. The method according to any one of claims 1-5, wherein said assigning a corresponding target SMS interface to the client comprises:
identifying the occupation state of each short message interface, and determining candidate short message interfaces in an idle state from all short message interfaces according to the occupation state;
randomly selecting one of the candidate short message interfaces in the idle state as the target short message interface; alternatively, the first and second electrodes may be,
and acquiring the transmission capability parameter of the candidate short message interface in the idle state, and screening the target short message interface from the candidate short message interface in the idle state according to the transmission capability parameter.
7. The method of claim 6, wherein the screening out the target short message interface according to the transmission capability parameter from the candidate short message interfaces in the idle state comprises:
according to the transmission capacity parameter, determining a candidate short message interface with optimal transmission capacity from the candidate short message interfaces in the idle state as the target short message interface; alternatively, the first and second electrodes may be,
acquiring identification information of the client, determining the transmission capability requirement of the client according to the identification information, and selecting a candidate short message interface matched with the transmission capability requirement from the candidate short message interfaces in the idle state as the target short message interface according to the transmission capability parameter.
8. A method for distributing short message interfaces is characterized by comprising the following steps:
acquiring data for generating verification information, and generating the verification information of a client according to the data;
sending a first request message for requesting a short message interface to a server, wherein the first request message carries the verification information;
and acquiring a short message interface distributed by the server after verifying that the client is legal.
9. A server, comprising:
the request receiving module is used for receiving a first request message which is sent by a client and used for requesting a short message interface, wherein the first request message carries verification information;
the verification module is used for extracting the verification information from the first request message and verifying the validity of the client according to the verification information;
and the distribution module is used for distributing a corresponding target short message interface to the client when the client is legal so as to enable the client to transmit the short message through the target short message interface.
10. A client, comprising:
the generation module is used for acquiring data used for generating verification information and generating the verification information of the client according to the data;
the sending module is used for sending a first request message for requesting a short message interface to a server, wherein the first request message carries the verification information;
and the acquisition module is used for acquiring the short message interface distributed by the server after the client is verified to be legal.
11. A short message interface distribution system, comprising the server of claim 9 and the client of claim 10.
12. An electronic device comprising a memory, a processor;
wherein the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the short message interface allocation method according to any one of claims 1 to 7, or implement the short message interface allocation method according to claim 8.
13. A computer-readable storage medium storing a computer program, wherein the program, when executed by a processor, implements the method for assigning short message interfaces according to any one of claims 1 to 7, or implements the method for assigning short message interfaces according to claim 8.
CN201911416354.3A 2019-12-31 2019-12-31 Short message interface allocation method, server, client and system Pending CN110891249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911416354.3A CN110891249A (en) 2019-12-31 2019-12-31 Short message interface allocation method, server, client and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911416354.3A CN110891249A (en) 2019-12-31 2019-12-31 Short message interface allocation method, server, client and system

Publications (1)

Publication Number Publication Date
CN110891249A true CN110891249A (en) 2020-03-17

Family

ID=69753500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911416354.3A Pending CN110891249A (en) 2019-12-31 2019-12-31 Short message interface allocation method, server, client and system

Country Status (1)

Country Link
CN (1) CN110891249A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282950A (en) * 2021-07-26 2021-08-20 阿里云计算有限公司 Operation and maintenance method, device, equipment and system of encryption machine
CN115361659A (en) * 2022-09-23 2022-11-18 中信百信银行股份有限公司 Method and device for pre-controlling message sending and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233298A1 (en) * 2009-09-14 2012-09-13 Hugo Verbandt Management of application server-related user data
CN103001936A (en) * 2011-09-16 2013-03-27 北京新媒传信科技有限公司 Method and system for third party application interface authorization
CN103701761A (en) * 2012-09-28 2014-04-02 中国电信股份有限公司 Authentication method for invoking open interface and system
CN108365961A (en) * 2018-01-02 2018-08-03 深圳壹账通智能科技有限公司 The response method and server that interface call method and terminal device, interface call

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233298A1 (en) * 2009-09-14 2012-09-13 Hugo Verbandt Management of application server-related user data
CN103001936A (en) * 2011-09-16 2013-03-27 北京新媒传信科技有限公司 Method and system for third party application interface authorization
CN103701761A (en) * 2012-09-28 2014-04-02 中国电信股份有限公司 Authentication method for invoking open interface and system
CN108365961A (en) * 2018-01-02 2018-08-03 深圳壹账通智能科技有限公司 The response method and server that interface call method and terminal device, interface call

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282950A (en) * 2021-07-26 2021-08-20 阿里云计算有限公司 Operation and maintenance method, device, equipment and system of encryption machine
CN115361659A (en) * 2022-09-23 2022-11-18 中信百信银行股份有限公司 Method and device for pre-controlling message sending and readable storage medium

Similar Documents

Publication Publication Date Title
CN107786548B (en) Charging management method and device, server and computer readable storage medium
CN109583181B (en) Authentication method, authentication device and machine-readable storage medium
US7580669B2 (en) Content distribution system, method for distributing content and computer program thereof
CN108710681B (en) File acquisition method, device, equipment and storage medium
US10595248B2 (en) Method and device for identifying pseudo-base station by a mobile terminal
CN104426847A (en) Method, system and server for securely accessing and verifying an Internet service
CN110891249A (en) Short message interface allocation method, server, client and system
CN108429879B (en) Electronic apparatus, camera control method, camera control apparatus, and computer-readable storage medium
EP3422634B1 (en) Resource authorization method for vnf deployment, vnfm and nfvo
CN105516055B (en) Data access method, access device, target device and management server
CN102960005A (en) Authentication system and authentication method therefor in a wireless LAN environment
CN105681258A (en) Session method and session device based on third-party server
CN101521885B (en) Authority control method, system and equipment
CN105243311A (en) Fingerprint information safe calling method, fingerprint information safe calling device and mobile terminal
CN110162274B (en) Data processing method, device and equipment based on block chain
CN102461232B (en) Method for authenticating a universal subscriber identity module and system thereof
CN105979519B (en) The method and device of access network is controlled by charged state
CN105227305B (en) Security verification method and device
CN110839215B (en) Cluster communication method, server, terminal equipment and storage medium
CN107785963B (en) Charging method and charging system
CN111835765B (en) Verification method and device
CN113436378A (en) Self-service visitor management method and system, storage medium and cloud platform
CN106576245B (en) User equipment proximity request authentication
JP4547306B2 (en) Identification information management apparatus and identification information management method
CN108076009B (en) Resource sharing method, device and system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200317

RJ01 Rejection of invention patent application after publication