WO2018094594A1 - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
WO2018094594A1
WO2018094594A1 PCT/CN2016/106885 CN2016106885W WO2018094594A1 WO 2018094594 A1 WO2018094594 A1 WO 2018094594A1 CN 2016106885 W CN2016106885 W CN 2016106885W WO 2018094594 A1 WO2018094594 A1 WO 2018094594A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
short message
server
smsc
sent
Prior art date
Application number
PCT/CN2016/106885
Other languages
French (fr)
Chinese (zh)
Inventor
刘海
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2016/106885 priority Critical patent/WO2018094594A1/en
Publication of WO2018094594A1 publication Critical patent/WO2018094594A1/en

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]

Definitions

  • the present application relates to the field of communications and, more particularly, to a communication method and apparatus.
  • the network can authenticate the terminal device, and the terminal device does not authenticate the network.
  • the pseudo base station can masquerade as the base station of the operator, forcibly connect the terminal device to the pseudo base station, and send a short message to the terminal device. Since the short message sent by the pseudo base station often contains malicious spoofed content, the user is deceived.
  • the embodiment of the present application provides a communication method and device, which can ensure the security of a short message received by the terminal device.
  • the embodiment of the present application provides a communication method, including: receiving, by a terminal device, the short information key sent by a server accessed by the terminal device; when receiving the short message, the terminal device according to the The short message key decrypts the short message.
  • the terminal device decrypts the received short message according to the short message key sent by the server, so that the security of the short message received by the terminal device can be ensured, and the short message service center sends the short message service center.
  • the short message can be decrypted correctly, and the short message sent by the pseudo base station may be decrypted into garbled, so that the content after the decryption can indicate whether the short message is legal, thereby reducing the influence of the illegal short message on the user.
  • the terminal device receives the short message key sent by the server, and can prevent the short message service from being sent by the short message service center to the terminal device, where the terminal device cannot know that the key sender is a short message service.
  • the center is also a problem with pseudo base stations.
  • the method further includes: the terminal device hiding or deleting the short message; / or the terminal device sends the short message to a server accessed by the terminal device.
  • the terminal device directly hides or deletes the decrypted short message without presenting the decrypted content to the user, and can reduce the interference of the short message to the user;
  • the short message is directly sent to the server, so that the server can perform big data analysis, thereby assisting the government department in combating the work of the pseudo base station.
  • the terminal device when the terminal device decrypts the short message and decrypts successfully, the terminal device may present the short message to the user.
  • the terminal device may present the obtained content to the user, and the user may determine the legality of the short message according to whether the content is garbled.
  • the method before the terminal device receives the short message key sent by the server accessed by the terminal device, the method further includes: the terminal device according to the terminal device Determining, by the at least one of the type of the attached network, the location of the terminal device, and the user setting, whether the short message service center corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device; When the short message service center needs to encrypt the short message to be sent to the terminal device, the terminal device sends the first indication information to the server, where the first indication information is used to indicate that the short message service center needs to be sent The short message of the terminal device is encrypted.
  • the server may determine that the short message service center needs to encrypt a short message to be sent to the terminal device;
  • the server may determine that the short message service center does not need to encrypt the short message to be sent to the terminal device.
  • an area where the long-term evolution signal strength is less than a preset threshold may be defined as a long-term evolution weak coverage area, and an area where the long-term evolution signal strength is greater than or equal to a preset threshold is defined as a long-term evolution strong coverage area, where
  • the server may determine that the short message service center needs to encrypt the short message to be sent to the terminal device; when the terminal device is in a strong coverage area of the long term evolution signal The server may determine that the short message service center does not need to encrypt the short message to be sent to the terminal device.
  • the server may determine, according to the user equipment, that the short message service center needs to encrypt the short message to be sent to the terminal device; when the user sets the encryption to be unnecessary, the server The server may determine, according to the user equipment, that the short message service center does not need to encrypt the short message to be sent to the terminal device.
  • the terminal device receives the service accessed by the terminal device Before the short message key sent by the server, the method further includes: the terminal device transmitting, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting Species
  • the terminal device receives the short message key sent by the server accessed by the terminal device, and the terminal device receives the short message key, where the short message key is the server Determining, according to at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and the user setting, that the short message service center needs to encrypt a short message to be sent to the terminal device .
  • the method further includes: receiving, by the terminal device, algorithm indication information that is sent by the server to indicate an encryption algorithm; and determining, by the terminal device, the Encryption Algorithm;
  • the terminal device decrypts the short message according to the short message key when receiving the short message, and the terminal device: the terminal device decrypts the short message according to the short information key and the encryption algorithm. .
  • the encryption algorithm may be a data encryption algorithm standard or an advanced encryption standard.
  • the embodiment of the present application provides a communication method, including: a short message service center encrypts a short message to be sent to the terminal device according to a short information key corresponding to the terminal device; the short message service center The encrypted short message to be sent is sent to the terminal device.
  • the short message service center needs to encrypt the short message to be sent to the terminal device by using the short message key, thereby ensuring the security of the short message received by the terminal device, and the short message service.
  • the short message sent by the center can be decrypted correctly, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby reducing the influence of the illegal short message on the user.
  • the method further includes: receiving, by the short message service center, a notification message sent by the server, where the notification message is used to notify the short message service center to send the a short message key; the short message service center generates the short message key; the short message service center sends the short message key to the server.
  • the short message service center may randomly generate the short message key.
  • the method further includes: receiving, by the short message service center The short message key sent by the server.
  • the method before the short message service center and the server perform information transmission, the method further includes: the short message service center establishing a connection with the server.
  • the method further includes: the short message service center receives algorithm indication information sent by the server to indicate an encryption algorithm; and the SMSC determines where the algorithm indicates information Encryption algorithm
  • the short message service center encrypts the short message to be sent to the terminal device according to the short message key corresponding to the terminal device, including: the short message service center according to the short message key and the encryption algorithm Encrypt the short message.
  • the method further includes: the short message service center determines an encryption algorithm; and the short message service center sends an algorithm indication information for indicating the encryption algorithm to the server;
  • the short message service center encrypts the short message to be sent to the terminal device according to the short message key corresponding to the terminal device, including: the short message service center according to the short message key and the encryption algorithm Encrypt the short message.
  • the embodiment of the present application provides a communication method, including: a server generating a short message key; the server transmitting the short message key to a terminal device and the terminal device that have accessed the server Corresponding short message service center, wherein the short message key is used by the terminal device to decrypt the received short message, and the short message service center encrypts the short message to be sent to the terminal device .
  • the terminal device needs to decrypt the received short message by using the short message key, and the short message service center corresponding to the terminal device needs to be sent to the terminal by using the short message key.
  • the short message of the device is encrypted, so that the security of the short message received by the terminal device can be ensured, and the short message sent by the short message service center can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that after decryption
  • the content can indicate whether the short message is legal, thereby reducing the impact of the illegal short message on the user.
  • the terminal device cannot know that the key sender is the short message service center. It is also a problem of the pseudo base station; and when the server generates the short message key, different short message keys can be set for each terminal device, thereby further improving security.
  • the server may randomly generate the short message key.
  • the method before the server generates the short message key, the method further includes: the server is configured according to a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting. Determining, according to the encryption indication information sent by the terminal device, whether the short message service center needs to encrypt the short message to be sent to the terminal device;
  • the server generates the short message key, and the server generates the short message key when it is determined that the short message service center sends the short message to be treated to the terminal device.
  • the server may further determine, according to the user information and the preset rule, that the short message service center needs to encrypt the short message to be sent to the terminal device.
  • the method before the server sends the short message key to a terminal device that has accessed the server and a short message service center corresponding to the terminal device, the method further includes: The server determines the short message service center corresponding to the terminal device; the server establishes a new connection with the short message service center.
  • the determining, by the server, the short message service center corresponding to the terminal device the determining, by the server, determining, according to the phone number segment uploaded by the terminal device, the terminal device The short message service center.
  • the method further includes: the server determining an encryption algorithm, where the encryption algorithm is when the terminal device decrypts the received short message according to the short message key, and And an encryption algorithm required by the short message service center to encrypt the short message to be sent to the terminal device according to the short message key; the server sends an algorithm indication information for indicating the encryption algorithm to the a terminal device and the short message service center.
  • the method further includes: the server receiving, by the short message service center, algorithm indication information for indicating an encryption algorithm, where the algorithm indication information is used to indicate that the terminal device is And an encryption algorithm required to be used when the short message service center decrypts the received short message according to the short message key, and the short message service center encrypts the short message to be sent to the terminal device according to the short message key;
  • the server sends the algorithm indication information to the terminal device.
  • the server is a cloud server.
  • the embodiment of the present application provides a terminal device, which is used to perform the method in any of the foregoing possible implementation manners of the first aspect or the first aspect.
  • the terminal device includes a module unit for performing the method in any of the above possible implementation manners of the first aspect or the first aspect.
  • the embodiment of the present application provides a short message service center, which is used to perform the method in any of the foregoing possible implementation manners of the second aspect or the second aspect.
  • the short message service center includes a module unit for performing the method in any of the above possible implementation manners of the second aspect or the second aspect.
  • the embodiment of the present application provides a server, which is used to perform the method in any one of the foregoing possible implementation manners of the third aspect or the third aspect.
  • the server comprises a modular unit for performing the method of any of the possible implementations of the third aspect or the third aspect described above.
  • the embodiment of the present application provides a terminal device, where the method of any one of the foregoing first aspect or the first aspect is implemented, where the terminal device includes a processor, a memory, and a transceiver.
  • the processor, the memory, and the transceiver are coupled by a bus system, wherein the memory is for storing instructions, the transceiver is for receiving and transmitting information, and the processor is configured to perform the memory storage instruction.
  • the transceiver is configured to receive a short message key sent by a server accessed by the terminal device;
  • the processor is configured to decrypt the short message according to the short message key when the receiving module receives the short message.
  • the embodiment of the present application provides a short message service center, where the method of any one of the foregoing second aspect or the second aspect is implemented, where the short message service center includes a processor, a memory and a transceiver, the processor, the memory and the transceiver are connected by a bus system, wherein the memory is for storing instructions, the transceiver is for receiving and transmitting information, and the processor is configured to execute The instructions stored in the memory.
  • the processor is configured to encrypt a short message to be sent to the terminal device according to a short information key corresponding to the terminal device;
  • the transceiver is configured to send the short message encrypted by the encryption module to the terminal device.
  • the embodiment of the present application provides a server for performing the foregoing third aspect or A method in any one of the possible implementations of the third aspect, the server comprising a processor, a memory and a transceiver, the processor, the memory and the transceiver are connected by a bus system, wherein the memory For storing instructions, the transceiver is for receiving and transmitting information, and the processor is configured to execute the instructions stored by the memory.
  • the processor is configured to generate a short message key
  • the transceiver is configured to send the short message key to a terminal device that has accessed the server and a short message service center corresponding to the terminal device, where the short message key is used for the terminal device Decrypting the received short message and encrypting the short message to be sent to the terminal device by the short message service center.
  • the embodiment of the present application provides a computer readable medium for storing a computer program, where the computer program includes any possible implementation manner for performing the above first aspect or the first aspect, and second Aspect or any of the possible implementations of the second aspect and the instructions of the method of the third aspect or any of the possible implementations of the third aspect.
  • FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application.
  • FIG. 2 is a schematic interaction diagram of a communication method in accordance with an embodiment of the present application.
  • FIG. 3 is a schematic interaction diagram of a communication method according to an embodiment of the present application.
  • FIG. 4 is a schematic interaction diagram of a communication method in accordance with an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of a terminal device according to an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a short message service center according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a server in accordance with an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a short message service center according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • FDD Frequency Division Duplex
  • TDD Time Division Duplex
  • UMTS Universal Mobile Telecommunication System
  • 5G fifth generation
  • the present application describes various embodiments in connection with a terminal device.
  • the terminal device may also refer to a user equipment (User Equipment, referred to as "UE"), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, and a wireless communication.
  • UE User Equipment
  • Device user agent, or user device.
  • the terminal device has a function of receiving a short message.
  • FIG. 1 is a schematic diagram of an application scenario 100 of an embodiment of the present application.
  • the short message service center (SMSC) 10 first sends a short message to a mobile switching center (Mobile Switch Center, referred to as “MSC” for short).
  • MSC Mobile Switch Center
  • the MSC 20 sends the short message to the base station 30, and the base station 30 sends the short message to the terminal device 40.
  • the pseudo base station 50 can forcibly connect the terminal device 40 to the pseudo base station 50. At this time, the pseudo base station 50 sends short information including the spoofed content to the terminal device 40, and the terminal device 40 does not know that the short message is false. The base station 50 sends.
  • the embodiment of the present application provides a communication method and device.
  • the communication method of the embodiment of the present application will be described below with reference to FIG. 2 to FIG.
  • FIG. 2 shows a schematic interaction diagram of a communication method 200 of an embodiment of the present application.
  • the method 200 can be applied to the scenario shown in FIG. 1 and can also be applied to other scenarios.
  • the SMSC 10 can send a short message to the terminal device 40 through other devices, which is not limited in this embodiment of the present application.
  • the server accessed by the terminal device acquires a short message key.
  • the short message key is used by the terminal device to decrypt the received short message, and the short message key used by the terminal device is encrypted by the SMSC to be sent to the terminal device.
  • the server may obtain the short message key in the following manner.
  • the server may generate the short message key; the server may send the short message key to the SMSC corresponding to the terminal device.
  • the server may randomly generate the short message key.
  • the server may send a notification message to the SMSC corresponding to the terminal device, where the notification message is used to notify the SMSC to send the short message key to the server; the server may receive the Short message key.
  • the server may determine whether the SMSC needs to encrypt the short message to be sent to the terminal device; and the server determines that the SMSC needs to be sent.
  • the server can acquire the short message key.
  • the server may determine whether the SMSC needs to encrypt the short message sent to the terminal device in the following manner.
  • the terminal device may send, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting; the server may be based on a type of the network to which the terminal device is attached, a location of the terminal device, and At least one of the user settings determines whether the SMSC corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device.
  • the type of the network to which the terminal device is attached may include a GSM attachment type and an LTE attachment type.
  • the location of the terminal device may include that the terminal device is in a weak coverage area of the LTE and the terminal device is in a strong coverage area of the LTE, where an area where the LTE signal strength is less than a preset threshold may be defined as a weak coverage of the LTE.
  • the area, the area where the LTE signal strength is greater than or equal to the preset threshold is defined as a strong coverage area of LTE.
  • the user setting may include: requiring encryption and no encryption, wherein the user is configured to indicate that the SMSC needs to encrypt the short message to be sent to the terminal device when the user needs to be encrypted, and the user is configured to use the encryption when not required.
  • the SMSC is instructed not to encrypt the short message to be sent to the terminal device.
  • the server may determine that the SMSC needs to encrypt the short message to be sent to the terminal device; when the type of the network to which the terminal device is attached is the LTE attachment type, The server can determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
  • the server may determine that the SMSC needs to encrypt the short message to be sent to the terminal device; When the LTE signal has a strong coverage area, the server may determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
  • the server may determine, according to the user setting, that the SMSC needs to encrypt the short message to be sent to the terminal device; when the user device does not need to be encrypted, the server may determine according to the user setting. The SMSC does not need to encrypt the short message to be sent to the terminal device.
  • the server may determine, according to the type of the network to which the terminal device is attached, the location of the terminal device, and the highest priority in the user setting, whether the SMSC corresponding to the terminal device needs to be sent to the The short message of the terminal device is encrypted.
  • the server may determine that the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the type of the network to which the terminal device is attached is a GSM attachment type
  • the user sets the SMS to be sent to the terminal device by the SMSC.
  • the server can determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
  • the server may determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
  • the terminal device may periodically send, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting.
  • the terminal device may send the location of the terminal device to the server when the location of the terminal device changes.
  • the terminal device may send the user setting to the server when the user setting changes.
  • the terminal device can be based on the type of the network to which the terminal device is attached and the location of the terminal device. And determining, by the at least one of the user settings, whether the SMSC corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device; when the terminal device determines that the encryption is required, the terminal device may send the first indication to the server
  • the first indication information is used to indicate that the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the server may determine, according to the first indication information, that the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the terminal device determines that encryption is required, and Sending the first indication information to the server.
  • the terminal device determines whether the encryption is needed in the mode 2 is similar to the case where the server determines whether the encryption is needed in the mode 1, and details are not described herein again.
  • the terminal device when the terminal device determines that encryption is not required according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting, the terminal device may The server sends the second indication information, where the second indication information is used to indicate that the SMSC does not need to encrypt the short message to be sent to the terminal device; the server may determine, according to the second indication information, that the SMSC does not need to be sent to the The short message of the terminal device is encrypted.
  • the terminal device may determine that the corresponding SMSC does not need to encrypt the short message to be sent to the terminal device, and send the second indication information to the server.
  • the server when the server determines that the SMSC corresponding to the terminal device does not need to encrypt the short message to be sent to the terminal device, and the SMSC corresponding to the terminal device is to be sent to the terminal device.
  • the server can notify the SMSC that it does not need to encrypt when sending a short message to the terminal device, and can notify the terminal device that it does not need to decrypt when receiving the short message.
  • the server may further determine, according to the user information and the preset rule that the terminal device counts, whether the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the terminal device may collect statistics on the processing of the short message by the user and send the information to the server, and the server may determine the click rate of the link in the short message, and if the click rate exceeds a certain threshold, the user may be determined to be a vulnerable user. It is determined that the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the server can determine that the SMSC needs to encrypt the message to be sent to the terminal device during a certain time period.
  • the server when the server determines that the SMSC corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device, the server may determine the SMSC corresponding to the terminal device.
  • the server may determine the SMSC corresponding to the terminal device according to the phone number segment uploaded by the terminal device.
  • the server stores a mapping table of the telephone number segment and the SMSC, and the telephone number segment of the terminal device is 131, and the server can determine that the telephone number segment 131 corresponds to the SMSC1 according to the mapping table.
  • the server may further determine the SMSC corresponding to the terminal device according to other information of the terminal device, for example, the terminal device uploads the identification code of the phone number segment, and the server may determine the corresponding SMSC according to the identification code.
  • the server may determine whether a connection has been established with the SMSC; if the connection is not established, the server establishes a new connection with the SMSC.
  • the server may send a connection establishment request message to the SMSC for requesting to establish a connection with the SMSC; after receiving the connection establishment request message, the SMSC may establish a connection with the server; after the connection establishment is completed, the server may A connection establishment complete message is fed back to the SMSC.
  • the server may determine an encryption algorithm, and send algorithm indication information for indicating the encryption algorithm to the terminal device and the SMSC; or the server may receive the identifier sent by the SMSC for indicating encryption.
  • the algorithm of the algorithm indicates information, and the algorithm indication information used to indicate the encryption algorithm is sent to the terminal device.
  • the encryption algorithm may be a Data Encryption Standard ("DES”) or an Advanced Encryption Standard (“AES”).
  • DES Data Encryption Standard
  • AES Advanced Encryption Standard
  • the server sends the short message key to the accessed terminal device.
  • the terminal device receives the short message key.
  • the server may be a cloud server, or may be another server.
  • the terminal device accesses the cloud server before sending the information to the cloud server, and disconnects from the cloud server after receiving the short message key; the terminal device may also access the cloud server all the time.
  • the terminal device may receive algorithm indication information sent by the server to indicate an encryption algorithm.
  • the SMSC obtains the short message key.
  • the SMSC can receive the short message key sent by the server.
  • the SMSC may receive the notification information sent by the server, where the notification message is used to notify the SMSC to send the short message key to the server; the SMSC generates the short message key; the SMSC will The short message key is sent to the server.
  • the SMSC can randomly generate the short message key.
  • the SMSC may determine an encryption algorithm, and send the algorithm indication information used to indicate the encryption algorithm to the server; or the SMSC receives an algorithm indication information sent by the server to indicate the encryption algorithm. .
  • the SMSC when the SMSC needs to send a short message to the terminal device, the SMSC can encrypt the short message according to the short message key.
  • the SMSC may encrypt the short message according to the encryption algorithm and the short message key.
  • the SMSC sends the encrypted short message to the terminal device.
  • the terminal device receives the short message.
  • the short message may be an encrypted short message sent by the SMSC, or may be a short message sent by the pseudo base station.
  • the terminal device can decrypt the received short message according to the short message key.
  • the terminal device when the terminal device decrypts the short message and the decryption succeeds, the terminal device may present the short message to the user.
  • the terminal device may determine that the short message is a legitimate short message, and present the information content to the user, so that the user can learn the short message content. .
  • the terminal device when the terminal device decrypts the short message and the decryption fails, the terminal device may hide or delete the short message.
  • the decryption failure refers to that the content obtained after decryption is used for The user may not be readable, that is, the content that failed to decrypt is some garbled meaningless.
  • the terminal device can determine that the short message is an illegal short message, and may not present the short message to the user, SMS deletion or hiding.
  • the terminal device when the terminal device decrypts the short message and fails to decrypt, the terminal device may send the short message to the server, so that the server can perform big data analysis, thereby assisting the government department to attack the pseudo base station. jobs.
  • the terminal device can determine that the short message is an illegal short message, and the short message can be sent to the server, and the short message can be deleted after being sent.
  • the terminal device when the terminal device decrypts the short message and the decryption fails, the terminal device may further prompt the user that the short message decryption fails.
  • the terminal device may present the obtained content to the user, because the content obtained when the decryption fails is not readable by the user, so the user The legitimacy of the short message can be determined based on whether the content is readable.
  • the terminal device may decrypt the received short message according to the encryption algorithm and the short message key.
  • the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into a garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby Reduce the impact of illegal SMS on users.
  • the short message key is sent to the terminal device by the server, it is possible to avoid the problem that the terminal device cannot know whether the key sender is the SMSC or the pseudo base station when the SMSC sends the short message key to the terminal device;
  • the server or the SMSC generates the short message key, different short message keys can be set for each terminal device, thereby further improving security.
  • FIG. 3 is a schematic interaction diagram of a communication method 300 in accordance with an embodiment of the present application.
  • the server is described as a cloud server.
  • the terminal device may send, to the cloud server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting.
  • the cloud server may determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting, that the SMSC corresponding to the terminal device needs to send a message to the terminal device. Encrypt.
  • the cloud server may determine an SMSC corresponding to the terminal device.
  • the cloud server may determine whether a connection is established with the SMSC corresponding to the terminal device; if the connection is not established, the cloud server may newly establish a connection with the SMSC.
  • the cloud server can generate a short message key.
  • the cloud server can specify an encryption algorithm.
  • the cloud server can send the short message key to the terminal device.
  • the cloud server may send algorithm indication information for indicating an encryption algorithm to the terminal device.
  • the cloud server may send the short message key to the SMSC corresponding to the terminal device.
  • the cloud server may send algorithm indication information for indicating an encryption algorithm to the SMSC.
  • the SMS message may be encrypted according to the short message key to obtain the first short message.
  • the SMSC may encrypt the short message according to the encryption algorithm and the short message key.
  • the SMSC sends the first short message to the terminal device.
  • the terminal device decrypts the first short message according to the short message key.
  • the terminal device may decrypt the first short message according to the encryption algorithm and the short message key.
  • the first short message is a short message sent by the SMSC corresponding to the terminal device, the first short message can be decrypted correctly, so that the user can know the short message content.
  • the pseudo base station sends a second short message to the terminal device.
  • the terminal device decrypts the second short message according to the short message key.
  • the second short message is a short message sent by the pseudo base station
  • the user cannot be decrypted normally, so that the user cannot know the short message content, so that the user can avoid being affected by the short message sent by the pseudo base station.
  • the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into a garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby Reduce the impact of illegal SMS on users.
  • the generation of the short message key by the cloud server can reduce the burden on the SMSC.
  • FIG. 4 is a schematic interaction diagram of a communication method 400 in accordance with an embodiment of the present application.
  • the server is described as a cloud server.
  • the terminal device may determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting, that the SMSC corresponding to the terminal device needs to send a short message to the terminal device. Encrypt.
  • the terminal device may send first indication information to the cloud server, where the first indication information is used to indicate that the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the cloud server may determine, according to the first indication information, that the SMSC needs to encrypt the short message to be sent to the terminal device.
  • the cloud server may determine an SMSC corresponding to the terminal device.
  • the cloud server may determine whether a connection is established with the SMSC corresponding to the terminal device; if the connection is not established, the cloud server may newly establish a connection with the SMSC.
  • the cloud server may send a notification message to the SMSC corresponding to the terminal device, where the notification message is used to notify the SMSC to send the short message key to the cloud server.
  • the SMSC can generate a short message key.
  • the SMSC can specify an encryption algorithm.
  • the SMSC can send the short message key to the cloud server.
  • the SMSC may send the cloud server to the cloud server.
  • An algorithm indication information for indicating an encryption algorithm is sent.
  • the cloud server can send the short message key to the terminal device.
  • the cloud server may send the algorithm indication information to the terminal device.
  • the execution process of 408 to 412 is the same as the execution process of 306 to 310 in the communication method 300 shown in FIG. 3, and details are not described herein again.
  • the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into a garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby Reduce the impact of illegal SMS on users.
  • generating a short message key by the SMSC can give the SMSC the freedom to allocate the short message key.
  • FIG. 5 is a schematic block diagram of a terminal device 500 according to an embodiment of the present application. As shown in FIG. 5, the terminal device 500 includes:
  • the receiving module 501 is configured to receive a short message key sent by a server accessed by the terminal device;
  • the decryption module 502 is configured to decrypt the short message according to the short message key when the receiving module receives the short message.
  • the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC short message service center can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate the Whether the SMS is legal, thus reducing the impact of illegal SMS on the user.
  • the terminal device receives the short message key sent by the server, and can prevent the short message service center from sending the short message key to the terminal device, and the terminal device cannot know whether the key sender is the short message service center or The problem with the pseudo base station.
  • the terminal device further includes a processing module, configured to hide or delete the short message; and/or a first sending module, configured to send the short message to the server.
  • a processing module configured to hide or delete the short message
  • a first sending module configured to send the short message to the server.
  • the terminal device further includes a determining module, configured to determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, the terminal device Whether the corresponding SMSC needs to encrypt the short message sent to the terminal device;
  • a second sending module configured to send, to the server, first indication information, when the SMSC needs to encrypt the short message to be sent to the terminal device, where the first indication information is used to indicate that the SMSC needs to be sent to the terminal device
  • the text message is encrypted.
  • the terminal device further includes a third sending module, configured to send, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting;
  • the receiving module 501 is specifically configured to receive the short message key, where the short message key is determined by the server according to at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and the user setting. It is sent when the SMS sent to the terminal device is encrypted.
  • the receiving module 501 is further configured to receive algorithm indication information that is sent by the server and used to indicate an encryption algorithm.
  • the receiving module is further configured to determine the encryption algorithm indicated by the algorithm indication information.
  • the decryption module 502 is further configured to decrypt the short message according to the short message key and the encryption algorithm.
  • terminal device 500 may correspond to the terminal device in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the terminal device 500 respectively In order to implement the corresponding processes of the respective methods in FIG. 2 to FIG. 4, for brevity, details are not described herein again.
  • FIG. 6 is a schematic block diagram of an SMSC 600 in accordance with an embodiment of the present application. As shown in FIG. 6, the SMSC 600 includes:
  • the encryption module 601 is configured to encrypt the short message to be sent to the terminal device according to the short message key corresponding to the terminal device;
  • the sending module 602 is configured to send the short message encrypted by the encryption module to the terminal device.
  • the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate whether the short message is legal. Thereby reducing the impact of illegal text messages on users.
  • the SMSC 600 further includes a first receiving module, configured to receive a notification message sent by the server accessed by the terminal device, where the notification message is used to notify the SMSC to send the short message to the server.
  • An information key configured to notify the SMSC to send the short message to the server.
  • An information key configured to generate the short message key
  • the sending module 602 is further configured to send the short message key to the server.
  • the SMSC 600 further includes a second receiving module, configured to receive the short message key sent by the server accessed by the terminal device.
  • the SMSC 600 further includes a connection module, configured to establish a connection with the server.
  • the SMSC 600 further includes a third receiving module, configured to receive algorithm indication information that is sent by the server that is accessed by the terminal device to indicate an encryption algorithm, and the third receiving module further uses The encryption algorithm indicated by the algorithm indication information is determined; the encryption module 601 is further configured to encrypt the short message according to the short information key and the encryption algorithm.
  • the SMSC 600 further includes a determining module, configured to determine an encryption algorithm, where the sending module 602 is further configured to send, to the terminal device, the algorithm indication information used to indicate the encryption algorithm.
  • the encryption module 601 is further configured to encrypt the short message according to the short message key and the encryption algorithm.
  • SMSC 600 may correspond to the SMSC in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the SMSC 600 are respectively implemented to implement the respective methods in FIG. 2 to FIG. The process, for the sake of brevity, will not be described here.
  • FIG. 7 is a schematic block diagram of a server 700 in accordance with an embodiment of the present application. As shown in FIG. 7, the server 700 includes:
  • a generating module 701, configured to generate a short message key
  • the sending module 702 is configured to send the short message key to the terminal device that has accessed the server and the short message service center SMSC corresponding to the terminal device, where the short message key is used by the terminal device to receive The short message is decrypted, and the short message for the SMSC to be sent to the terminal device is encrypted.
  • the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate whether the short message is legal. Thereby reducing the impact of illegal text messages on users.
  • the terminal device when the short message key is sent to the terminal device by the server, and the short message service center can be prevented from transmitting the short message key to the terminal device, the terminal device cannot know whether the key sender is a short message service center or a fake.
  • the server 700 further includes a first determining module, configured to: according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, or according to the The encryption indication information sent by the terminal device determines whether the SMSC needs to encrypt the short message to be sent to the terminal device; the generating module 701 is specifically configured to: when determining that the SMSC needs to encrypt the short message to be sent to the terminal device, generate the Short message key.
  • a first determining module configured to: according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, or according to the The encryption indication information sent by the terminal device determines whether the SMSC needs to encrypt the short message to be sent to the terminal device; the generating module 701 is specifically configured to: when determining that the SMSC needs to encrypt the short message to be sent to the terminal device, generate the Short message key.
  • the server 700 further includes a second determining module, configured to determine the SMSC corresponding to the terminal device, and a connection module, configured to establish a new connection with the SMSC.
  • the second determining module is specifically configured to determine, according to the phone number segment uploaded by the terminal device, the SMSC corresponding to the terminal device.
  • the server 700 further includes a third determining module, configured to determine an encryption algorithm, where the encryption algorithm is used by the terminal device to decrypt the received short message according to the short message key. And an encryption algorithm required by the SMSC to encrypt the short message to be sent to the terminal device according to the short message key; the sending module 702 is further configured to send the algorithm indication information used to indicate the encryption algorithm to the terminal device And the SMSC.
  • a third determining module configured to determine an encryption algorithm, where the encryption algorithm is used by the terminal device to decrypt the received short message according to the short message key. And an encryption algorithm required by the SMSC to encrypt the short message to be sent to the terminal device according to the short message key; the sending module 702 is further configured to send the algorithm indication information used to indicate the encryption algorithm to the terminal device And the SMSC.
  • the server 700 further includes a receiving module, configured to receive algorithm indication information that is sent by the SMSC to indicate an encryption algorithm, where the algorithm indication information is used to indicate that the terminal device is according to the short The encryption algorithm used by the information key to decrypt the received short message; the sending module 702 is further configured to send the algorithm indication information to the terminal device.
  • the server 700 is a cloud server.
  • server 700 may correspond to the server in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the server 700 respectively implement the respective methods in FIG. 2 to FIG. The corresponding process, for the sake of brevity, will not be described here.
  • FIG. 8 is a schematic structural diagram of a terminal device 800 according to an embodiment of the present application.
  • the terminal device 800 includes a processor 801, a memory 802, a transceiver 803, and a bus system 804.
  • the processor 801, the memory 802, and the transceiver 803 are connected by a bus system 804, wherein the memory 802
  • the processor 801 is configured to execute instructions stored in the memory
  • the transceiver 803 is configured to receive and transmit information.
  • the transceiver 803 is configured to receive a short message key sent by a server accessed by the terminal device;
  • the processor 801 is configured to decrypt the short message according to the short message key when the receiving module receives the short message.
  • terminal device 800 may correspond to the terminal device in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the terminal device 800 are respectively implemented in FIG. 2 to FIG. 4 .
  • the corresponding processes of the various methods are not repeated here for the sake of brevity.
  • FIG. 9 is a schematic structural diagram of an SMSC 900 according to an embodiment of the present application.
  • the SMSC 900 includes a processor 901, a memory 902, a transceiver 903, and a bus system 904.
  • the processor 901, the memory 902, and the transceiver 903 are connected by a bus system 904, wherein the memory 902 is used for
  • the instructions are stored by the processor 901 for executing instructions stored in the memory, and the transceiver 903 is configured to receive and transmit information.
  • the processor 901 is configured to encrypt a short message to be sent to the terminal device according to the short information key corresponding to the terminal device;
  • the transceiver 903 is configured to send the short message encrypted by the encryption module to the terminal device.
  • SMSC 900 may correspond to the SMSC in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the SMSC 900 are respectively implemented to implement the respective methods in FIG. 2 to FIG. The process, for the sake of brevity, will not be described here.
  • FIG. 10 is a schematic structural diagram of a server 1000 according to an embodiment of the present application.
  • the server 1000 includes a processor 1001, a memory 1002, a transceiver 1003, and a bus system 1004.
  • the processor 1001, the memory 1002, and the transceiver 1003 are connected by a bus system 1004, wherein the memory 1002 is used.
  • the processor 1001 is configured to execute instructions stored in the memory
  • the transceiver 1003 is configured to receive and transmit information.
  • the processor 1001 is configured to generate a short message key
  • the transceiver 1003 is configured to send the short message key to a terminal device that has accessed the server and a short message service center corresponding to the terminal device, where the short message key is used by the terminal device to receive the The short message is decrypted, and the short message service center encrypts the short message to be sent to the terminal device.
  • server 1000 may correspond to the server in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the server 1000 respectively implement the respective methods in FIG. 2 to FIG. The corresponding process, for the sake of brevity, will not be described here.
  • the processor may be a Central Processing Unit ("CPU"), a Network Processor ("NP”), or a combination of a CPU and an NP.
  • the processor may further include a hardware chip.
  • the hardware chip may be an Application-Specific Integrated Circuit (“ASIC”), a Programmable Logic Device (PLD), or a combination thereof.
  • the PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), and a Generic Array Logic (Generic Array Logic). Referred to as "GAL” or any combination thereof.
  • the memory can be either volatile memory or non-volatile memory, or can include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, abbreviated as "ROM”), a programmable read only memory (Programmable ROM, abbreviated as "PROM”), and an erasable programmable read only memory ( Erasable PROM (abbreviated as "EPROM”), electrically erasable programmable read only memory (“EEPROM”) or flash memory.
  • ROM Read-Only Memory
  • PROM programmable read only memory
  • EPROM erasable programmable read only memory
  • EEPROM electrically erasable programmable read only memory
  • flash memory electrically erasable programmable read only memory
  • the volatile memory may be a Random Access Memory (RAM), which is used as an external cache.
  • the bus system may include a power bus, a control bus, and a status signal bus in addition to the data bus.
  • a power bus may include a power bus, a control bus, and a status signal bus in addition to the data bus.
  • a control bus may include a power bus, a control bus, and a status signal bus in addition to the data bus.
  • a status signal bus may include a power bus, a control bus, and a status signal bus in addition to the data bus.
  • only one thick line is used to indicate the bus system, but it does not mean There is only one bus or one type of bus.
  • the embodiment of the present application provides a computer readable medium for storing a computer program, where the computer program includes a communication method for performing the foregoing embodiments of the present application in FIGS. 2 to 4.
  • the readable medium may be a ROM or a RAM, which is not limited in this embodiment of the present application.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or made as a standalone product When used, it can be stored in a computer readable storage medium.
  • the technical solution of the present application which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk.

Abstract

Provided are a communication method and device. The method comprises: a terminal device receiving a short message key sent by a server accessed by the terminal device; and when the terminal device receives a short message, decrypting the short message according to the short message key. The embodiments of the present application can ensure the security of a short message received by the terminal device, and a short message sent by a short message service centre can be decrypted correctly; however, a short message sent by a pseudo base station may be decrypted into a messy code, so that the decrypted content can indicate whether the short message is legal, thereby reducing the influence of illegal short messages on users.

Description

通信方法和设备Communication method and device 技术领域Technical field
本申请涉及通信领域,并且更具体地,涉及一种通信方法和设备。The present application relates to the field of communications and, more particularly, to a communication method and apparatus.
背景技术Background technique
在全球移动通信系统(Global System for Mobile Communication,简称为“GSM”)中网络可以对终端设备进行认证,而终端设备不会对网络进行认证。在这种情况下,伪基站可以伪装成运营商的基站,强制将终端设备连接到该伪基站上,并向该终端设备发送短消息。由于伪基站发送的短消息往往包含恶意的欺骗内容,使得用户上当受骗。In the Global System for Mobile Communication (GSM), the network can authenticate the terminal device, and the terminal device does not authenticate the network. In this case, the pseudo base station can masquerade as the base station of the operator, forcibly connect the terminal device to the pseudo base station, and send a short message to the terminal device. Since the short message sent by the pseudo base station often contains malicious spoofed content, the user is deceived.
发明内容Summary of the invention
本申请实施例提供一种通信方法和设备,能够保证终端设备所接收短信的安全性。The embodiment of the present application provides a communication method and device, which can ensure the security of a short message received by the terminal device.
第一方面,本申请实施例提供了一种通信方法,包括:终端设备接收所述终端设备所接入的服务器发送的所述短信息密钥;所述终端设备在接收到短信时,根据所述短信息密钥对所述短信进行解密。In a first aspect, the embodiment of the present application provides a communication method, including: receiving, by a terminal device, the short information key sent by a server accessed by the terminal device; when receiving the short message, the terminal device according to the The short message key decrypts the short message.
因此,在本申请实施例中,所述终端设备根据服务器发送的短信息密钥对所接收的短信进行解密,从而能够保证所述终端设备所接收的短信的安全性,并且短消息服务中心发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示所述短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device decrypts the received short message according to the short message key sent by the server, so that the security of the short message received by the terminal device can be ensured, and the short message service center sends the short message service center. The short message can be decrypted correctly, and the short message sent by the pseudo base station may be decrypted into garbled, so that the content after the decryption can indicate whether the short message is legal, thereby reducing the influence of the illegal short message on the user.
另外,所述终端设备接收服务器发送的短信息密钥,能够避免由短消息服务中心给所述终端设备发送短信息密钥的情况下,所述终端设备无法获知密钥发送方是短消息服务中心的还是伪基站的问题。In addition, the terminal device receives the short message key sent by the server, and can prevent the short message service from being sent by the short message service center to the terminal device, where the terminal device cannot know that the key sender is a short message service. The center is also a problem with pseudo base stations.
在一种可选实现方式中,在所述终端设备根据所述短信息密钥对所述短信进行解密且解密失败时,所述方法还包括:所述终端设备隐藏或删除所述短信;和/或所述终端设备将所述短信发送给所述终端设备所接入的服务器。In an optional implementation manner, when the terminal device decrypts the short message according to the short message key and the decryption fails, the method further includes: the terminal device hiding or deleting the short message; / or the terminal device sends the short message to a server accessed by the terminal device.
此时,所述终端设备直接将解密失败的短信隐藏或删除,而不将所述解密失败的内容呈现给用户,能够减小所述短信对用户的干扰;另外,通过将 所述短信直接发送给服务器,使得所述服务器能够进行大数据分析,从而辅助政府部门打击伪基站的工作。At this time, the terminal device directly hides or deletes the decrypted short message without presenting the decrypted content to the user, and can reduce the interference of the short message to the user; The short message is directly sent to the server, so that the server can perform big data analysis, thereby assisting the government department in combating the work of the pseudo base station.
可选地,在本申请实施例中,所述终端设备在对所述短信进行解密且解密成功时,可以将所述短信呈现给用户。Optionally, in the embodiment of the present application, when the terminal device decrypts the short message and decrypts successfully, the terminal device may present the short message to the user.
可选地,在本申请实施例中,所述终端设备在对所述短信进行解密之后,可以将获取的内容呈现给用户,用户可以根据所述内容是否为乱码确定短信的合法性。Optionally, in the embodiment of the present application, after decrypting the short message, the terminal device may present the obtained content to the user, and the user may determine the legality of the short message according to whether the content is garbled.
在一种可选实现方式中,在所述终端设备接收所述终端设备所接入的服务器发送的所述短信息密钥之前,所述方法还包括:所述终端设备根据所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种,确定所述终端设备所对应的短消息服务中心是否需要对待发送给所述终端设备的短信进行加密;在确定所述短消息服务中心需要对待发送给所述终端设备的短信进行加密时,所述终端设备向所述服务器发送第一指示信息,所述第一指示信息用于指示所述短消息服务中心需要对待发送给所述终端设备的短信进行加密。In an optional implementation, before the terminal device receives the short message key sent by the server accessed by the terminal device, the method further includes: the terminal device according to the terminal device Determining, by the at least one of the type of the attached network, the location of the terminal device, and the user setting, whether the short message service center corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device; When the short message service center needs to encrypt the short message to be sent to the terminal device, the terminal device sends the first indication information to the server, where the first indication information is used to indicate that the short message service center needs to be sent The short message of the terminal device is encrypted.
可选地,在所述终端设备所附着网络的类型为全球移动通信系统附着类型时,所述服务器可以确定所述短消息服务中心需要对待发送给所述终端设备的短信进行加密;在所述终端设备所附着网络的类型为长期演进附着类型时,所述服务器可以确定所述短消息服务中心不需要对待发送给所述终端设备的短信进行加密。Optionally, when the type of the network to which the terminal device is attached is a global mobile communication system attachment type, the server may determine that the short message service center needs to encrypt a short message to be sent to the terminal device; When the type of the network to which the terminal device is attached is a long term evolution attachment type, the server may determine that the short message service center does not need to encrypt the short message to be sent to the terminal device.
可选地,可以将长期演进信号强度小于预设阈值的区域定义为长期演进的弱覆盖区,将长期演进信号强度大于或等于预设阈值的区域定义为长期演进的强覆盖区,在所述终端设备处于长期演进信号的弱覆盖区时,所述服务器可以确定所述短消息服务中心需要对待发送给所述终端设备的短信进行加密;在所述终端设备处于长期演进信号的强覆盖区时,所述服务器可以确定所述短消息服务中心不需要对待发送给所述终端设备的短信进行加密。Optionally, an area where the long-term evolution signal strength is less than a preset threshold may be defined as a long-term evolution weak coverage area, and an area where the long-term evolution signal strength is greater than or equal to a preset threshold is defined as a long-term evolution strong coverage area, where When the terminal device is in a weak coverage area of the long term evolution signal, the server may determine that the short message service center needs to encrypt the short message to be sent to the terminal device; when the terminal device is in a strong coverage area of the long term evolution signal The server may determine that the short message service center does not need to encrypt the short message to be sent to the terminal device.
可选地,在用户设置为需要加密时,所述服务器可以根据用户设备确定所述短消息服务中心需要对待发送给所述终端设备的短信进行加密;在用户设置为不需要加密时,所述服务器可以根据用户设备确定所述短消息服务中心不需要对待发送给所述终端设备的短信进行加密。Optionally, when the user is configured to require encryption, the server may determine, according to the user equipment, that the short message service center needs to encrypt the short message to be sent to the terminal device; when the user sets the encryption to be unnecessary, the server The server may determine, according to the user equipment, that the short message service center does not need to encrypt the short message to be sent to the terminal device.
在一种可选实现方式中,在所述终端设备接收所述终端设备所接入的服 务器发送的所述短信息密钥之前,所述方法还包括:所述终端设备向所述服务器发送所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种;In an optional implementation manner, the terminal device receives the service accessed by the terminal device Before the short message key sent by the server, the method further includes: the terminal device transmitting, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting Species
其中,所述终端设备接收所述终端设备所接入的服务器发送的所述短信息密钥,包括:所述终端设备接收所述短信息密钥,所述短信息密钥为所述服务器在根据所述终端设备所附着网络的类型、所述终端设备的位置和所述用户设置中的至少一种确定所述短消息服务中心需要对待发送给所述终端设备的短信进行加密时所发送的。The terminal device receives the short message key sent by the server accessed by the terminal device, and the terminal device receives the short message key, where the short message key is the server Determining, according to at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and the user setting, that the short message service center needs to encrypt a short message to be sent to the terminal device .
在一种可选实现方式中,所述方法还包括:所述终端设备接收所述服务器发送的用于指示加密算法的算法指示信息;所述终端设备确定所述算法指示信息所指示的所述加密算法;In an optional implementation manner, the method further includes: receiving, by the terminal device, algorithm indication information that is sent by the server to indicate an encryption algorithm; and determining, by the terminal device, the Encryption Algorithm;
其中,所述终端设备在接收到短信时,根据所述短信息密钥对所述短信进行解密,包括:所述终端设备根据所述短信息密钥和所述加密算法对所述短信进行解密。The terminal device decrypts the short message according to the short message key when receiving the short message, and the terminal device: the terminal device decrypts the short message according to the short information key and the encryption algorithm. .
可选地,所述加密算法可以是数据加密算法标准或高级加密标准。Optionally, the encryption algorithm may be a data encryption algorithm standard or an advanced encryption standard.
第二方面,本申请实施例提供了一种通信方法,包括:短消息服务中心根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密;所述短消息服务中心将加密后的所述待发送短信发送给所述终端设备。In a second aspect, the embodiment of the present application provides a communication method, including: a short message service center encrypts a short message to be sent to the terminal device according to a short information key corresponding to the terminal device; the short message service center The encrypted short message to be sent is sent to the terminal device.
因此,在本申请实施例中,所述短消息服务中心需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证所述终端设备所接收的短信的安全性,且短消息服务中心发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示所述短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the short message service center needs to encrypt the short message to be sent to the terminal device by using the short message key, thereby ensuring the security of the short message received by the terminal device, and the short message service. The short message sent by the center can be decrypted correctly, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby reducing the influence of the illegal short message on the user.
在一种可选实现方式中,所述方法还包括:所述短消息服务中心接收所述服务器发送的通知消息,所述通知消息用于通知所述短消息服务中心向所述服务器发送所述短信息密钥;所述短消息服务中心生成所述短信息密钥;所述短消息服务中心向所述服务器发送所述短信息密钥。In an optional implementation manner, the method further includes: receiving, by the short message service center, a notification message sent by the server, where the notification message is used to notify the short message service center to send the a short message key; the short message service center generates the short message key; the short message service center sends the short message key to the server.
可选地,所述短消息服务中心可以随机地生成所述短信息密钥。Optionally, the short message service center may randomly generate the short message key.
此时,短消息服务中心在生成所述短信息密钥时,可以为每个终端设备设置不同的短信息密钥,进一步提高安全性。At this time, when the short message service center generates the short message key, different short message keys can be set for each terminal device, thereby further improving security.
在一种可选实现方式中,所述方法还包括:所述短消息服务中心接收所 述服务器发送的所述短信息密钥。In an optional implementation, the method further includes: receiving, by the short message service center The short message key sent by the server.
在一种可选实现方式中,在所述短消息服务中心与所述服务器进行信息传输之前,所述方法还包括:所述短消息服务中心与所述服务器建立连接。In an optional implementation manner, before the short message service center and the server perform information transmission, the method further includes: the short message service center establishing a connection with the server.
在一种可选实现方式中,所述方法还包括:所述短消息服务中心接收所述服务器发送的用于指示加密算法的算法指示信息;所述SMSC确定所述算法指示信息所指示的所述加密算法;In an optional implementation manner, the method further includes: the short message service center receives algorithm indication information sent by the server to indicate an encryption algorithm; and the SMSC determines where the algorithm indicates information Encryption algorithm
其中,所述短消息服务中心根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密,包括:所述短消息服务中心根据所述短信息密钥和所述加密算法对所述短信进行加密。The short message service center encrypts the short message to be sent to the terminal device according to the short message key corresponding to the terminal device, including: the short message service center according to the short message key and the encryption algorithm Encrypt the short message.
在一种可选实现方式中,所述方法还包括:所述短消息服务中心确定加密算法;所述短消息服务中心将用于指示所述加密算法的算法指示信息发送给所述服务器;In an optional implementation manner, the method further includes: the short message service center determines an encryption algorithm; and the short message service center sends an algorithm indication information for indicating the encryption algorithm to the server;
其中,所述短消息服务中心根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密,包括:所述短消息服务中心根据所述短信息密钥和所述加密算法对所述短信进行加密。The short message service center encrypts the short message to be sent to the terminal device according to the short message key corresponding to the terminal device, including: the short message service center according to the short message key and the encryption algorithm Encrypt the short message.
第三方面,本申请实施例提供了一种通信方法,包括:服务器生成短信息密钥;所述服务器将所述短信息密钥发送给已接入所述服务器的终端设备和所述终端设备所对应的短消息服务中心,其中,所述短信息密钥用于所述终端设备对接收到的短信进行解密,以及用于所述短消息服务中心对待发送给所述终端设备的短信进行加密。In a third aspect, the embodiment of the present application provides a communication method, including: a server generating a short message key; the server transmitting the short message key to a terminal device and the terminal device that have accessed the server Corresponding short message service center, wherein the short message key is used by the terminal device to decrypt the received short message, and the short message service center encrypts the short message to be sent to the terminal device .
因此,在本申请实施例中,所述终端设备需要利用短信息密钥对所接收的短信进行解密,所述终端设备所对应的所述短消息服务中心需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证所述终端设备所接收的短信的安全性,且短消息服务中心发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示所述短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the short message service center corresponding to the terminal device needs to be sent to the terminal by using the short message key. The short message of the device is encrypted, so that the security of the short message received by the terminal device can be ensured, and the short message sent by the short message service center can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that after decryption The content can indicate whether the short message is legal, thereby reducing the impact of the illegal short message on the user.
另外,通过服务器发送短信息密钥给终端设备,能够避免由短消息服务中心给所述终端设备发送短信息密钥的情况下,所述终端设备无法获知密钥发送方是短消息服务中心的还是伪基站的问题;并且,所述服务器在生成所述短信息密钥时,可以为每个终端设备设置不同的短信息密钥,进一步提高安全性。 In addition, when the short message key is sent to the terminal device by the server, and the short message service center can be prevented from transmitting the short message key to the terminal device, the terminal device cannot know that the key sender is the short message service center. It is also a problem of the pseudo base station; and when the server generates the short message key, different short message keys can be set for each terminal device, thereby further improving security.
可选地,所述服务器可以随机地生成所述短信息密钥。Optionally, the server may randomly generate the short message key.
在一种可选实现方式中,在所述服务器生成短信息密钥之前,所述方法还包括:所述服务器根据所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种,或根据所述终端设备发送的加密指示信息,确定所述短消息服务中心是否需要对待发送给所述终端设备的短信进行加密;In an optional implementation, before the server generates the short message key, the method further includes: the server is configured according to a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting. Determining, according to the encryption indication information sent by the terminal device, whether the short message service center needs to encrypt the short message to be sent to the terminal device;
其中,所述服务器生成短信息密钥,包括:在确定所述短消息服务中心发送需要对待给所述终端设备的短信进行加密时,所述服务器生成所述短信息密钥。The server generates the short message key, and the server generates the short message key when it is determined that the short message service center sends the short message to be treated to the terminal device.
在一种可选实现方式中,所述服务器还可以根据终端设备所统计的用户信息以及预设规定,确定所述短消息服务中心是否需要对待发送给所述终端设备的短信进行加密。In an optional implementation manner, the server may further determine, according to the user information and the preset rule, that the short message service center needs to encrypt the short message to be sent to the terminal device.
在一种可选实现方式中,在所述服务器将所述短信息密钥发送给已接入所述服务器的终端设备和所述终端设备所对应的短消息服务中心之前,所述方法还包括:所述服务器确定与所述终端设备对应的所述短消息服务中心;所述服务器与所述短消息服务中心新建连接。In an optional implementation manner, before the server sends the short message key to a terminal device that has accessed the server and a short message service center corresponding to the terminal device, the method further includes: The server determines the short message service center corresponding to the terminal device; the server establishes a new connection with the short message service center.
在一种可选实现方式中,所述服务器确定与所述终端设备对应的所述短消息服务中心,包括:所述服务器根据所述终端设备上传的电话号码段确定与所述终端设备对应的所述短消息服务中心。In an optional implementation manner, the determining, by the server, the short message service center corresponding to the terminal device, the determining, by the server, determining, according to the phone number segment uploaded by the terminal device, the terminal device The short message service center.
在一种可选实现方式中,所述方法还包括:所述服务器确定加密算法,所述加密算法为所述终端设备在根据所述短信息密钥对接收到的短信进行解密时,以及所述短消息服务中心在根据所述短信息密钥对待发送给所述终端设备的短信进行加密时所需要的加密算法;所述服务器将用于指示所述加密算法的算法指示信息发送给所述终端设备和所述短消息服务中心。In an optional implementation manner, the method further includes: the server determining an encryption algorithm, where the encryption algorithm is when the terminal device decrypts the received short message according to the short message key, and And an encryption algorithm required by the short message service center to encrypt the short message to be sent to the terminal device according to the short message key; the server sends an algorithm indication information for indicating the encryption algorithm to the a terminal device and the short message service center.
在一种可选实现方式中,所述方法还包括:所述服务器接收所述短消息服务中心发送的用于指示加密算法的算法指示信息,所述算法指示信息用于指示所述终端设备在根据所述短信息密钥对接收到的短信进行解密时,以及所述短消息服务中心在根据所述短信息密钥对待发送给所述终端设备的短信进行加密时需要使用的加密算法;所述服务器将所述算法指示信息发送给所述终端设备。In an optional implementation manner, the method further includes: the server receiving, by the short message service center, algorithm indication information for indicating an encryption algorithm, where the algorithm indication information is used to indicate that the terminal device is And an encryption algorithm required to be used when the short message service center decrypts the received short message according to the short message key, and the short message service center encrypts the short message to be sent to the terminal device according to the short message key; The server sends the algorithm indication information to the terminal device.
在一种可选实现方式中,所述服务器为云端服务器。 In an optional implementation manner, the server is a cloud server.
第四方面,本申请实施例提供了一种终端设备,用于执行上述第一方面或第一方面的任一种可能的实现方式中的方法。具体地,所述终端设备包括用于执行上述第一方面或第一方面的任一种可能的实现方式中的方法的模块单元。In a fourth aspect, the embodiment of the present application provides a terminal device, which is used to perform the method in any of the foregoing possible implementation manners of the first aspect or the first aspect. Specifically, the terminal device includes a module unit for performing the method in any of the above possible implementation manners of the first aspect or the first aspect.
第五方面,本申请实施例提供了一种短消息服务中心,用于执行上述第二方面或第二方面的任一种可能的实现方式中的方法。具体地,所述短消息服务中心包括用于执行上述第二方面或第二方面的任一种可能的实现方式中的方法的模块单元。In a fifth aspect, the embodiment of the present application provides a short message service center, which is used to perform the method in any of the foregoing possible implementation manners of the second aspect or the second aspect. Specifically, the short message service center includes a module unit for performing the method in any of the above possible implementation manners of the second aspect or the second aspect.
第六方面,本申请实施例提供了一种服务器,用于执行上述第三方面或第三方面的任一种可能的实现方式中的方法。具体地,所述服务器包括用于执行上述第三方面或第三方面的任一种可能的实现方式中的方法的模块单元。In a sixth aspect, the embodiment of the present application provides a server, which is used to perform the method in any one of the foregoing possible implementation manners of the third aspect or the third aspect. In particular, the server comprises a modular unit for performing the method of any of the possible implementations of the third aspect or the third aspect described above.
第七方面,本申请实施例提供了一种终端设备,用于执行上述第一方面或第一方面的任一种可能的实现方式中的方法,所述终端设备包括处理器、存储器和收发器,所述处理器、所述存储器和所述收发器通过总线系统相连,其中,所述存储器用于存储指令,所述收发器用于接收和发送信息,所述处理器用于执行所述存储器存储的指令。In a seventh aspect, the embodiment of the present application provides a terminal device, where the method of any one of the foregoing first aspect or the first aspect is implemented, where the terminal device includes a processor, a memory, and a transceiver. The processor, the memory, and the transceiver are coupled by a bus system, wherein the memory is for storing instructions, the transceiver is for receiving and transmitting information, and the processor is configured to perform the memory storage instruction.
其中,所述收发器用于接收所述终端设备所接入的服务器发送的短信息密钥;The transceiver is configured to receive a short message key sent by a server accessed by the terminal device;
所述处理器用于在所述接收模块接收到短信时,根据所述短信息密钥对所述短信进行解密。The processor is configured to decrypt the short message according to the short message key when the receiving module receives the short message.
第八方面,本申请实施例提供了一种短消息服务中心,用于执行上述第二方面或第二方面的任一种可能的实现方式中的方法,所述短消息服务中心包括处理器、存储器和收发器,所述处理器、所述存储器和所述收发器通过总线系统相连,其中,所述存储器用于存储指令,所述收发器用于接收和发送信息,所述处理器用于执行所述存储器存储的指令。In an eighth aspect, the embodiment of the present application provides a short message service center, where the method of any one of the foregoing second aspect or the second aspect is implemented, where the short message service center includes a processor, a memory and a transceiver, the processor, the memory and the transceiver are connected by a bus system, wherein the memory is for storing instructions, the transceiver is for receiving and transmitting information, and the processor is configured to execute The instructions stored in the memory.
其中,所述处理器用于根据终端设备对应的短信息密钥对待发送给所述终端设备的短信进行加密;The processor is configured to encrypt a short message to be sent to the terminal device according to a short information key corresponding to the terminal device;
所述收发器用于将所述加密模块加密后的所述短信发送给所述终端设备。The transceiver is configured to send the short message encrypted by the encryption module to the terminal device.
第九方面,本申请实施例提供了一种服务器,用于执行上述第三方面或 第三方面的任一种可能的实现方式中的方法,所述服务器包括处理器、存储器和收发器,所述处理器、所述存储器和所述收发器通过总线系统相连,其中,所述存储器用于存储指令,所述收发器用于接收和发送信息,所述处理器用于执行所述存储器存储的指令。In a ninth aspect, the embodiment of the present application provides a server for performing the foregoing third aspect or A method in any one of the possible implementations of the third aspect, the server comprising a processor, a memory and a transceiver, the processor, the memory and the transceiver are connected by a bus system, wherein the memory For storing instructions, the transceiver is for receiving and transmitting information, and the processor is configured to execute the instructions stored by the memory.
其中,所述处理器用于生成短信息密钥;Wherein the processor is configured to generate a short message key;
所述收发器用于将所述短信息密钥发送给已接入所述服务器的终端设备和所述终端设备所对应的短消息服务中心,其中,所述短信息密钥用于所述终端设备对接收到的短信进行解密,以及用于所述短消息服务中心对待发送给所述终端设备的短信进行加密。The transceiver is configured to send the short message key to a terminal device that has accessed the server and a short message service center corresponding to the terminal device, where the short message key is used for the terminal device Decrypting the received short message and encrypting the short message to be sent to the terminal device by the short message service center.
第十方面,本申请实施例提供了一种计算机可读介质,用于存储计算机程序,所述计算机程序包括用于执行上述第一方面或第一方面的任一种可能的实现方式,第二方面或第二方面的任一种可能的实现方式和第三方面或第三方面的任一种可能的实现方式中的方法的指令。In a tenth aspect, the embodiment of the present application provides a computer readable medium for storing a computer program, where the computer program includes any possible implementation manner for performing the above first aspect or the first aspect, and second Aspect or any of the possible implementations of the second aspect and the instructions of the method of the third aspect or any of the possible implementations of the third aspect.
附图说明DRAWINGS
图1是根据本申请实施例的应用场景的示意图。FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application.
图2是根据本申请实施例的通信方法的示意性交互图。2 is a schematic interaction diagram of a communication method in accordance with an embodiment of the present application.
图3是根据本申请实施例的通信方法的示意性交互图。FIG. 3 is a schematic interaction diagram of a communication method according to an embodiment of the present application.
图4是根据本申请实施例的通信方法的示意性交互图。4 is a schematic interaction diagram of a communication method in accordance with an embodiment of the present application.
图5是根据本申请实施例的终端设备的示意性框图。FIG. 5 is a schematic block diagram of a terminal device according to an embodiment of the present application.
图6是根据本申请实施例的短消息服务中心的示意性框图。FIG. 6 is a schematic block diagram of a short message service center according to an embodiment of the present application.
图7是根据本申请实施例的服务器的示意性框图。FIG. 7 is a schematic block diagram of a server in accordance with an embodiment of the present application.
图8是根据本申请实施例的终端设备的示意性结构图。FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
图9是根据本申请实施例的短消息服务中心的示意性结构图。FIG. 9 is a schematic structural diagram of a short message service center according to an embodiment of the present application.
图10是根据本申请实施例的服务器的示意性结构图。FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
应理解,本申请实施例的技术方案可以应用于各种通信系统,例如:GSM系统、码分多址(Code Division Multiple Access,简称为“CDMA”)系 统、宽带码分多址(Wideband Code Division Multiple Access,简称为“WCDMA”)系统、长期演进(Long Term Evolution,简称为“LTE”)系统、LTE频分双工(Frequency Division Duplex,简称为“FDD”)系统、LTE时分双工(Time Division Duplex,简称为“TDD”)、通用移动通信系统(Universal Mobile Telecommunication System,简称为“UMTS”)、以及未来的第五代(5th-Generation,简称为“5G”)通信系统等。It should be understood that the technical solutions of the embodiments of the present application can be applied to various communication systems, such as a GSM system, Code Division Multiple Access ("CDMA") system. Wideband Code Division Multiple Access (WCDMA) system, Long Term Evolution (LTE) system, LTE Frequency Division Duplex (referred to as "Frequency Division Duplex" FDD") system, LTE Time Division Duplex ("TDD"), Universal Mobile Telecommunication System (UMTS), and the fifth generation (5th-Generation) For "5G") communication systems, etc.
本申请结合终端设备描述了各个实施例。终端设备也可以指用户设备(User Equipment,简称为“UE”)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。该终端设备具有接收短信的功能。The present application describes various embodiments in connection with a terminal device. The terminal device may also refer to a user equipment (User Equipment, referred to as "UE"), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, and a wireless communication. Device, user agent, or user device. The terminal device has a function of receiving a short message.
图1示出了本申请实施例的一种应用场景100的示意图。如图1所示,在正常的短信发送过程中,该短消息服务中心(Short Message Service Center,简称为“SMSC”)10首先将短信发送给移动交换中心(Mobile Switch Center,简称为“MSC”)20,该MSC20将该短信发送给基站30,该基站30将该短信发送给终端设备40。FIG. 1 is a schematic diagram of an application scenario 100 of an embodiment of the present application. As shown in FIG. 1 , in a normal short message sending process, the short message service center (SMSC) 10 first sends a short message to a mobile switching center (Mobile Switch Center, referred to as “MSC” for short). The MSC 20 sends the short message to the base station 30, and the base station 30 sends the short message to the terminal device 40.
伪基站50可以将该终端设备40强制连接到该伪基站50上,此时该伪基站50会向该终端设备40发送包含有欺骗内容的短信息,而终端设备40不知道该短信是由伪基站50发送的。The pseudo base station 50 can forcibly connect the terminal device 40 to the pseudo base station 50. At this time, the pseudo base station 50 sends short information including the spoofed content to the terminal device 40, and the terminal device 40 does not know that the short message is false. The base station 50 sends.
因此,为了解决该问题,本申请实施例提供了一种通信方法和设备,以下将结合图2至图4对本申请实施例的通信方法进行说明。Therefore, in order to solve the problem, the embodiment of the present application provides a communication method and device. The communication method of the embodiment of the present application will be described below with reference to FIG. 2 to FIG.
图2示出了本申请实施例的通信方法200的示意性交互图。该方法200可以应用于图1所示的场景,也可以应用于其它场景,例如,该SMSC10可以通过其它设备将短信发送给终端设备40,本申请实施例并不对此进行限定。FIG. 2 shows a schematic interaction diagram of a communication method 200 of an embodiment of the present application. The method 200 can be applied to the scenario shown in FIG. 1 and can also be applied to other scenarios. For example, the SMSC 10 can send a short message to the terminal device 40 through other devices, which is not limited in this embodiment of the present application.
在201中,该终端设备所接入的服务器获取短信息密钥。其中,该短信息密钥用于该终端设备对所接收的短信进行解密,以及用于该终端设备所对应的SMSC对待发送给该终端设备的短信进行加密。In 201, the server accessed by the terminal device acquires a short message key. The short message key is used by the terminal device to decrypt the received short message, and the short message key used by the terminal device is encrypted by the SMSC to be sent to the terminal device.
在本申请实施例中,该服务器可以通过以下方式获取该短信息密钥。In this embodiment of the present application, the server may obtain the short message key in the following manner.
在第一种实现方式中,该服务器可以生成该短信息密钥;该服务器可以将该短信息密钥发送给该终端设备所对应的SMSC。 In the first implementation manner, the server may generate the short message key; the server may send the short message key to the SMSC corresponding to the terminal device.
可选地,该服务器可以随机地生成该短信息密钥。Alternatively, the server may randomly generate the short message key.
在第二种实现方式中,该服务器可以向该终端设备所对应的SMSC发送通知消息,该通知消息用于通知该SMSC向该服务器发送该短信息密钥;该服务器可以接收该SMSC发送的该短信息密钥。In a second implementation manner, the server may send a notification message to the SMSC corresponding to the terminal device, where the notification message is used to notify the SMSC to send the short message key to the server; the server may receive the Short message key.
可选地,在本申请实施例中,该服务器在获取该短信息密钥之前,该服务器可以确定该SMSC是否需要对待发送给该终端设备的短信进行加密;在该服务器确定该SMSC需要对待发送给该终端设备的短信进行加密时,该服务器可以获取该短信息密钥。Optionally, in the embodiment of the present application, before the server obtains the short message key, the server may determine whether the SMSC needs to encrypt the short message to be sent to the terminal device; and the server determines that the SMSC needs to be sent. When the short message of the terminal device is encrypted, the server can acquire the short message key.
具体地,该服务器可以通过下面的方式确定该SMSC是否需要对待发送给该终端设备的短信进行加密。Specifically, the server may determine whether the SMSC needs to encrypt the short message sent to the terminal device in the following manner.
方式1Mode 1
该终端设备可以向该服务器发送该终端设备所附着网络的类型、该终端设备的位置和用户设置中的至少一种;该服务器可以根据该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种,确定该终端设备所对应的SMSC是否需要对待发送给该终端设备的短信进行加密。The terminal device may send, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting; the server may be based on a type of the network to which the terminal device is attached, a location of the terminal device, and At least one of the user settings determines whether the SMSC corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device.
可选地,该终端设备所附着网络的类型可以包括GSM附着类型和LTE附着类型。Optionally, the type of the network to which the terminal device is attached may include a GSM attachment type and an LTE attachment type.
可选地,该终端设备的位置可以包括该终端设备处于LTE的弱覆盖区和该终端设备处于LTE的强覆盖区,其中,可以将LTE信号强度小于预设阈值的区域定义为LTE的弱覆盖区,将LTE信号强度大于或等于预设阈值的区域定义为LTE的强覆盖区。Optionally, the location of the terminal device may include that the terminal device is in a weak coverage area of the LTE and the terminal device is in a strong coverage area of the LTE, where an area where the LTE signal strength is less than a preset threshold may be defined as a weak coverage of the LTE. The area, the area where the LTE signal strength is greater than or equal to the preset threshold is defined as a strong coverage area of LTE.
可选地,该用户设置可以包括需要加密和不需要加密,其中,用户设置为需要加密时,用于指示该SMSC需要对待发送给终端设备的短信进行加密,用户设置为不需要加密时,用于指示该SMSC不需要对待发送给终端设备的短信进行加密。Optionally, the user setting may include: requiring encryption and no encryption, wherein the user is configured to indicate that the SMSC needs to encrypt the short message to be sent to the terminal device when the user needs to be encrypted, and the user is configured to use the encryption when not required. The SMSC is instructed not to encrypt the short message to be sent to the terminal device.
例如,在该终端设备所附着网络的类型为GSM附着类型时,该服务器可以确定该SMSC需要对待发送给该终端设备的短信进行加密;在该终端设备所附着网络的类型为LTE附着类型时,该服务器可以确定该SMSC不需要对待发送给该终端设备的短信进行加密。For example, when the type of the network to which the terminal device is attached is the GSM attachment type, the server may determine that the SMSC needs to encrypt the short message to be sent to the terminal device; when the type of the network to which the terminal device is attached is the LTE attachment type, The server can determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
再例如,在该终端设备处于LTE信号的弱覆盖区时,该服务器可以确定该SMSC需要对待发送给该终端设备的短信进行加密;在该终端设备处于 LTE信号的强覆盖区时,该服务器可以确定该SMSC不需要对待发送给该终端设备的短信进行加密。For another example, when the terminal device is in a weak coverage area of the LTE signal, the server may determine that the SMSC needs to encrypt the short message to be sent to the terminal device; When the LTE signal has a strong coverage area, the server may determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
再例如,在该用户设置为需要加密时,该服务器可以根据用户设置确定该SMSC需要对待发送给该终端设备的短信进行加密;在该用户设备为不需要加密时,该服务器可以根据用户设置确定该SMSC不需要对待发送给该终端设备的短信进行加密。For another example, when the user is set to require encryption, the server may determine, according to the user setting, that the SMSC needs to encrypt the short message to be sent to the terminal device; when the user device does not need to be encrypted, the server may determine according to the user setting. The SMSC does not need to encrypt the short message to be sent to the terminal device.
可选地,该服务器可以优先根据该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的优先级最高的一项,确定该终端设备所对应的SMSC是否需要对待发送给该终端设备的短信进行加密。Optionally, the server may determine, according to the type of the network to which the terminal device is attached, the location of the terminal device, and the highest priority in the user setting, whether the SMSC corresponding to the terminal device needs to be sent to the The short message of the terminal device is encrypted.
例如,该终端设备的位置的优先级高于该终端设备所附着网络的类型,则在该终端设备所附着网络的类型为LTE附着类型,且该终端设备处于LTE信号的弱覆盖区时,该服务器可以确定该SMSC需要对待发送给该终端设备的短信进行加密。For example, the priority of the location of the terminal device is higher than the type of the network to which the terminal device is attached, and when the type of the network to which the terminal device is attached is the LTE attachment type, and the terminal device is in the weak coverage area of the LTE signal, The server may determine that the SMSC needs to encrypt the short message to be sent to the terminal device.
再例如,该用户设置的优先级高于该终端设备所附着网络的类型,则在该终端设备所附着网络的类型为GSM附着类型,且用户设置为该SMSC需要对待发送给该终端设备的短信进行加密时,该服务器可以确定该SMSC不需要对待发送给该终端设备的短信进行加密。For example, if the priority set by the user is higher than the type of the network to which the terminal device is attached, the type of the network to which the terminal device is attached is a GSM attachment type, and the user sets the SMS to be sent to the terminal device by the SMSC. When encrypting, the server can determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
再例如,该用户设置的优先级高于该终端设备所附着网络的类型以及该终端设备的位置,则在该终端设备所附着网络的类型为LTE附着类型、处于LTE信号的弱覆盖区且用户设置为该SMSC不需要对待发送给该终端设备的短信进行加密时,该服务器可以确定该SMSC不需要对待发送给该终端设备的短信进行加密。For example, if the priority set by the user is higher than the type of the network to which the terminal device is attached and the location of the terminal device, the type of the network to which the terminal device is attached is the LTE attachment type, the weak coverage area of the LTE signal, and the user. When the SMSC does not need to encrypt the short message to be sent to the terminal device, the server may determine that the SMSC does not need to encrypt the short message to be sent to the terminal device.
可选地,该终端设备可以周期性的向该服务器发送该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种。Optionally, the terminal device may periodically send, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting.
可选地,该终端设备可以在该终端设备的位置发生变化时,向该服务器发送该终端设备的位置。Optionally, the terminal device may send the location of the terminal device to the server when the location of the terminal device changes.
可选地,该终端设备可以在该用户设置发生变化时,向该服务器发送该用户设置。Optionally, the terminal device may send the user setting to the server when the user setting changes.
方式2Mode 2
该终端设备可以根据该终端设备所附着网络的类型、该终端设备的位置 和用户设置中的至少一种,确定该终端设备所对应的SMSC是否需要对待发送给该终端设备的短信进行加密;在该终端设备确定需要加密时,该终端设备可以向该服务器发送第一指示信息,该第一指示信息用于指示该SMSC需要对待发送给该终端设备的短信进行加密;该服务器可以根据该第一指示信息,确定该SMSC需要对待发送给该终端设备的短信进行加密。The terminal device can be based on the type of the network to which the terminal device is attached and the location of the terminal device. And determining, by the at least one of the user settings, whether the SMSC corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device; when the terminal device determines that the encryption is required, the terminal device may send the first indication to the server The first indication information is used to indicate that the SMSC needs to encrypt the short message to be sent to the terminal device. The server may determine, according to the first indication information, that the SMSC needs to encrypt the short message to be sent to the terminal device.
例如,在该终端设备所附着网络的类型为GSM附着类型、处于LTE的弱覆盖区或用户设置为对应的SMSC需要对待发送给该终端设备的短信进行加密时,该终端设备确定需要加密,并向该服务器发送该第一指示信息。For example, when the type of the network to which the terminal device is attached is the GSM attachment type, the weak coverage area in the LTE, or the user sets the corresponding SMSC to encrypt the short message to be sent to the terminal device, the terminal device determines that encryption is required, and Sending the first indication information to the server.
应理解,该方式2中该终端设备确定是否需要加密的情况与该方式1中该服务器确定是否需要加密的情况相类似,在此不再赘述。It should be understood that the case where the terminal device determines whether the encryption is needed in the mode 2 is similar to the case where the server determines whether the encryption is needed in the mode 1, and details are not described herein again.
可选地,在本申请实施例中,在该终端设备根据该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种确定不需要加密时,该终端设备可以向该服务器发送第二指示信息,该第二指示信息用于指示该SMSC不需要对待发送给该终端设备的短信进行加密;该服务器可以根据该第二指示信息,确定该SMSC不需要对待发送给该终端设备的短信进行加密。Optionally, in the embodiment of the present application, when the terminal device determines that encryption is not required according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting, the terminal device may The server sends the second indication information, where the second indication information is used to indicate that the SMSC does not need to encrypt the short message to be sent to the terminal device; the server may determine, according to the second indication information, that the SMSC does not need to be sent to the The short message of the terminal device is encrypted.
例如,在该终端设备所附着网络的类型为LTE附着类型时,该终端设备可以确定对应的SMSC不需要对待发送给该终端设备的短信进行加密,并向该服务器发送该第二指示信息。For example, when the type of the network to which the terminal device is attached is the LTE attachment type, the terminal device may determine that the corresponding SMSC does not need to encrypt the short message to be sent to the terminal device, and send the second indication information to the server.
可选地,在本申请实施例中,在该服务器确定该终端设备所对应的SMSC不需要对待发送给该终端设备的短信进行加密时,且该终端设备所对应的SMSC对待发送给该终端设备的短信已经启用加密的情况下,该服务器可以通知该SMSC在向该终端设备发送短信时不需要加密,以及可以通知该终端设备在接收到短信时可以不需要解密。Optionally, in the embodiment of the present application, when the server determines that the SMSC corresponding to the terminal device does not need to encrypt the short message to be sent to the terminal device, and the SMSC corresponding to the terminal device is to be sent to the terminal device. In the case where the short message has been encrypted, the server can notify the SMSC that it does not need to encrypt when sending a short message to the terminal device, and can notify the terminal device that it does not need to decrypt when receiving the short message.
可选地,在本申请实施例中,该服务器还可以根据终端设备所统计的用户信息以及预设规定,确定该SMSC是否需要对待发送给该终端设备的短信进行加密。Optionally, in the embodiment of the present application, the server may further determine, according to the user information and the preset rule that the terminal device counts, whether the SMSC needs to encrypt the short message to be sent to the terminal device.
例如,该终端设备可以将用户对短信的处理情况进行统计并发送给服务器,服务器可以确定用户对短信中链接的点击率,如果该点击率超过一定阈值,可以确定该用户属于易受骗用户,并确定该SMSC需要对待发送给该终端设备的短信进行加密。 For example, the terminal device may collect statistics on the processing of the short message by the user and send the information to the server, and the server may determine the click rate of the link in the short message, and if the click rate exceeds a certain threshold, the user may be determined to be a vulnerable user. It is determined that the SMSC needs to encrypt the short message to be sent to the terminal device.
再例如,该服务器可以确定在特定时间段内该SMSC需要对待发送给该终端设备的短信进行加密。As another example, the server can determine that the SMSC needs to encrypt the message to be sent to the terminal device during a certain time period.
可选地,在本申请实施例中,在该服务器确定该终端设备所对应的SMSC需要对待发送给该终端设备的短信进行加密时,该服务器可以确定与该终端设备所对应的SMSC。Optionally, in the embodiment of the present application, when the server determines that the SMSC corresponding to the terminal device needs to encrypt the short message to be sent to the terminal device, the server may determine the SMSC corresponding to the terminal device.
可选地,该服务器可以根据该终端设备上传的电话号码段确定与该终端设备所对应的SMSC。Optionally, the server may determine the SMSC corresponding to the terminal device according to the phone number segment uploaded by the terminal device.
例如,该服务器保存有电话号码段与SMSC的映射表,该终端设备的电话号码段为131,则该服务器可以根据映射表确定电话号码段131对应于SMSC1。For example, the server stores a mapping table of the telephone number segment and the SMSC, and the telephone number segment of the terminal device is 131, and the server can determine that the telephone number segment 131 corresponds to the SMSC1 according to the mapping table.
应理解,该服务器还可以根据终端设备的其它信息确定该终端设备所对应的SMSC,例如,还终端设备上传电话号码段的标识码,该服务器可以根据该标识码确定对应的SMSC。It should be understood that the server may further determine the SMSC corresponding to the terminal device according to other information of the terminal device, for example, the terminal device uploads the identification code of the phone number segment, and the server may determine the corresponding SMSC according to the identification code.
可选地,在本申请实施例中,在该服务器与该SMSC进行信息传输之前,该服务器可以确定与该SMSC是否已经建立连接;如果没有建立连接,则该服务器与该SMSC新建连接。Optionally, in the embodiment of the present application, before the information transmission between the server and the SMSC, the server may determine whether a connection has been established with the SMSC; if the connection is not established, the server establishes a new connection with the SMSC.
例如,该服务器可以向该SMSC发送连接建立请求消息,用于请求与该SMSC建立连接;该SMSC在接收到该连接建立请求消息之后,可以与该服务器建立连接;连接建立完成之后,该服务器可以向该SMSC反馈连接建立完成消息。For example, the server may send a connection establishment request message to the SMSC for requesting to establish a connection with the SMSC; after receiving the connection establishment request message, the SMSC may establish a connection with the server; after the connection establishment is completed, the server may A connection establishment complete message is fed back to the SMSC.
可选地,在本申请实施例中,该服务器可以确定加密算法,并将用于指示加密算法的算法指示信息发送给该终端设备和该SMSC;或该服务器可以接收SMSC发送的用于指示加密算法的算法指示信息,并将用于指示加密算法的算法指示信息发送给该终端设备。Optionally, in the embodiment of the present application, the server may determine an encryption algorithm, and send algorithm indication information for indicating the encryption algorithm to the terminal device and the SMSC; or the server may receive the identifier sent by the SMSC for indicating encryption. The algorithm of the algorithm indicates information, and the algorithm indication information used to indicate the encryption algorithm is sent to the terminal device.
可选地,该加密算法可以是数据加密算法标准(Data Encryption Standard,简称为“DES”)或高级加密标准(Advanced Encryption Standard,简称为“AES”)。Optionally, the encryption algorithm may be a Data Encryption Standard ("DES") or an Advanced Encryption Standard ("AES").
在202中,该服务器将该短信息密钥发送给所接入的终端设备。In 202, the server sends the short message key to the accessed terminal device.
在203中,该终端设备接收该短信息密钥。In 203, the terminal device receives the short message key.
可选地,在本申请实施例中,该服务器可以是云端服务器,还可以是其它服务器。 Optionally, in the embodiment of the present application, the server may be a cloud server, or may be another server.
可选地,该终端设备在向云端服务器发送信息之前接入该云端服务器,且在接收该短信息密钥之后与该云端服务器断开连接;该终端设备还可以一直接入该云端服务器。Optionally, the terminal device accesses the cloud server before sending the information to the cloud server, and disconnects from the cloud server after receiving the short message key; the terminal device may also access the cloud server all the time.
可选地,该终端设备可以接收该服务器发送的用于指示加密算法的算法指示信息。Optionally, the terminal device may receive algorithm indication information sent by the server to indicate an encryption algorithm.
在204中,该SMSC获取该短信密钥。At 204, the SMSC obtains the short message key.
在一种实现方式中,该SMSC可以接收该服务器发送的该短信息密钥。In an implementation, the SMSC can receive the short message key sent by the server.
在另一种实现方式中,该SMSC可以接收该服务器发送的通知信息,该通知消息用于通知该SMSC向该服务器发送该短信息密钥;该SMSC生成该短信息密钥;该SMSC将该短信息密钥发送给该服务器。In another implementation manner, the SMSC may receive the notification information sent by the server, where the notification message is used to notify the SMSC to send the short message key to the server; the SMSC generates the short message key; the SMSC will The short message key is sent to the server.
可选地,该SMSC可以随机地生成该短信息密钥。Optionally, the SMSC can randomly generate the short message key.
可选地,在本申请实施例中,该SMSC可以确定加密算法,并将用于指示加密算法的算法指示信息发送给该服务器;或该SMSC接收服务器发送的用于指示加密算法的算法指示信息。Optionally, in the embodiment of the present application, the SMSC may determine an encryption algorithm, and send the algorithm indication information used to indicate the encryption algorithm to the server; or the SMSC receives an algorithm indication information sent by the server to indicate the encryption algorithm. .
在205中,该SMSC在需要向该终端设备发送短信时,该SMSC可以根据该短信息密钥对该短信进行加密。In 205, when the SMSC needs to send a short message to the terminal device, the SMSC can encrypt the short message according to the short message key.
可选地,在已指定加密算法的情况下,该SMSC可以根据该加密算法和该短信息密钥对该短信息进行加密。Optionally, if the encryption algorithm is specified, the SMSC may encrypt the short message according to the encryption algorithm and the short message key.
在206中,该SMSC将该加密后的短信发送给该终端设备。In 206, the SMSC sends the encrypted short message to the terminal device.
在207中,该终端设备接收短信。In 207, the terminal device receives the short message.
可选地,该短信可以是该SMSC发送的加密后的短信,还可以是伪基站发送的短信。Optionally, the short message may be an encrypted short message sent by the SMSC, or may be a short message sent by the pseudo base station.
在208中,该终端设备可以根据该短信息密钥对所接收的短信进行解密。In 208, the terminal device can decrypt the received short message according to the short message key.
可选地,在本申请实施例中,在该终端设备对该短信进行解密且解密成功时,则该终端设备可以将该短信呈现给用户。Optionally, in the embodiment of the present application, when the terminal device decrypts the short message and the decryption succeeds, the terminal device may present the short message to the user.
例如,在解密之后该终端设备获得的信息内容为“您的银行账户发生扣款”,则该终端设备可以确定该短信为合法短信,并将该信息内容呈现给用户,使得用户可以获知短信内容。For example, after the decryption, the information content obtained by the terminal device is “debitage occurs in your bank account”, the terminal device may determine that the short message is a legitimate short message, and present the information content to the user, so that the user can learn the short message content. .
可选地,在本申请实施例中,在该终端设备对该短信进行解密且解密失败时,该终端设备可以将该短信隐藏或者删除。Optionally, in the embodiment of the present application, when the terminal device decrypts the short message and the decryption fails, the terminal device may hide or delete the short message.
可选地,在本申请实施例中,解密失败是指解密后所获得的内容对于用 户而言可能不具备可读性,即解密失败的内容为一些没有意义的乱码。Optionally, in the embodiment of the present application, the decryption failure refers to that the content obtained after decryption is used for The user may not be readable, that is, the content that failed to decrypt is some garbled meaningless.
例如,在解密之后该终端设备获得的信息内容为“*&#@!!UU”,即乱码时,则该终端设备能够确定该短信为非法短信,且可以不呈现给用户,则直接将该短信删除或隐藏。For example, after the decryption, the information content obtained by the terminal device is “*&#@!!UU”, that is, when the garbled code is obtained, the terminal device can determine that the short message is an illegal short message, and may not present the short message to the user, SMS deletion or hiding.
可选地,在本申请实施例中,该终端设备在对该短信进行解密且解密失败时,可以将该短信发送给服务器,使得该服务器能够进行大数据分析,从而辅助政府部门打击伪基站的工作。Optionally, in the embodiment of the present application, when the terminal device decrypts the short message and fails to decrypt, the terminal device may send the short message to the server, so that the server can perform big data analysis, thereby assisting the government department to attack the pseudo base station. jobs.
例如,在解密之后该终端设备获得的信息内容为乱码时,则该终端设备能够确定该短信为非法短信,则可以将该短信发送给服务器,还可以在发送之后将该短信删除。For example, when the information content obtained by the terminal device is garbled after decryption, the terminal device can determine that the short message is an illegal short message, and the short message can be sent to the server, and the short message can be deleted after being sent.
可选地,在本申请实施例中,在该终端设备对该短信进行解密且解密失败时,该终端设备还可以提示用户该短信解密失败。Optionally, in the embodiment of the present application, when the terminal device decrypts the short message and the decryption fails, the terminal device may further prompt the user that the short message decryption fails.
可选地,在本申请实施例中,该终端设备在对该短信进行解密之后,可以将获取的内容呈现给用户,由于在解密失败时所获得的内容对于用户不具备可读性,因此用户可以根据该内容是否具有可读性确定短信的合法性。Optionally, in the embodiment of the present application, after decrypting the short message, the terminal device may present the obtained content to the user, because the content obtained when the decryption fails is not readable by the user, so the user The legitimacy of the short message can be determined based on whether the content is readable.
可选地,在已指定加密算法的情况下,该终端设备可以根据该加密算法和该短信息密钥对所接收的短信进行解密。Optionally, if the encryption algorithm is specified, the terminal device may decrypt the received short message according to the encryption algorithm and the short message key.
因此,在本申请实施例中,该终端设备需要利用短信息密钥对所接收的短信进行解密,该终端设备所对应的该SMSC需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证该终端设备所接收的短信的安全性,且SMSC发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示该短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into a garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby Reduce the impact of illegal SMS on users.
另外,通过服务器发送短信息密钥给终端设备,能够避免由SMSC给该终端设备发送短信息密钥的情况下,该终端设备无法获知密钥发送方是SMSC的还是伪基站的问题;并且,该服务器或者SMSC在生成该短信息密钥时,可以为每个终端设备设置不同的短信息密钥,进一步提高安全性。In addition, when the short message key is sent to the terminal device by the server, it is possible to avoid the problem that the terminal device cannot know whether the key sender is the SMSC or the pseudo base station when the SMSC sends the short message key to the terminal device; When the server or the SMSC generates the short message key, different short message keys can be set for each terminal device, thereby further improving security.
为了便于更清楚地理解本申请,以下将结合图3所示的方法300以及图4所示的方法400对本申请实施例的通信方法进行说明。In order to facilitate a clearer understanding of the present application, the communication method of the embodiment of the present application will be described below in conjunction with the method 300 shown in FIG. 3 and the method 400 shown in FIG.
图3是根据本申请实施例的通信方法300的示意性交互图。该通信方法300中以服务器为云端服务器进行说明。 FIG. 3 is a schematic interaction diagram of a communication method 300 in accordance with an embodiment of the present application. In the communication method 300, the server is described as a cloud server.
在301中,该终端设备可以向该云端服务器发送该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种。In 301, the terminal device may send, to the cloud server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting.
在302中,该云端服务器可以根据该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种,确定该终端设备所对应的SMSC需要对待发送给该终端设备的短信进行加密。In 302, the cloud server may determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting, that the SMSC corresponding to the terminal device needs to send a message to the terminal device. Encrypt.
可选地,该云端服务器可以确定与该终端设备所对应的SMSC。Optionally, the cloud server may determine an SMSC corresponding to the terminal device.
可选地,该云端服务器可以确定是否与该终端设备所对应的SMSC建立了连接;如果没有建立连接,则该云端服务器可以与该SMSC新建连接。Optionally, the cloud server may determine whether a connection is established with the SMSC corresponding to the terminal device; if the connection is not established, the cloud server may newly establish a connection with the SMSC.
在303中,该云端服务器可以生成短信息密钥。In 303, the cloud server can generate a short message key.
可选地,该云端服务器可以指定加密算法。Optionally, the cloud server can specify an encryption algorithm.
在304中,该云端服务器可以将该短信息密钥发送给该终端设备。In 304, the cloud server can send the short message key to the terminal device.
可选地,在该云端服务器指定加密算法时,该云端服务器可以向该终端设备发送用于指示加密算法的算法指示信息。Optionally, when the cloud server specifies an encryption algorithm, the cloud server may send algorithm indication information for indicating an encryption algorithm to the terminal device.
在305中,该云端服务器可以将该短信息密钥发送给该终端设备对应的SMSC。In 305, the cloud server may send the short message key to the SMSC corresponding to the terminal device.
可选地,在该云端服务器指定加密算法时,该云端服务器可以向该SMSC发送用于指示加密算法的算法指示信息。Optionally, when the cloud server specifies an encryption algorithm, the cloud server may send algorithm indication information for indicating an encryption algorithm to the SMSC.
在306中,该SMSC需要发送短信给该终端设备时,可以根据该短信息密钥对待发送短信进行加密,获得第一短信。In 306, when the SMSC needs to send a short message to the terminal device, the SMS message may be encrypted according to the short message key to obtain the first short message.
可选地,在已指定加密算法的情况下,该SMSC可以根据该加密算法和该短信息密钥对该短信息进行加密。Optionally, if the encryption algorithm is specified, the SMSC may encrypt the short message according to the encryption algorithm and the short message key.
在307中,该SMSC将该第一短信发送给该终端设备。In 307, the SMSC sends the first short message to the terminal device.
在308中,该终端设备根据该短信息密钥对该第一短信进行解密。In 308, the terminal device decrypts the first short message according to the short message key.
可选地,在已指定加密算法的情况下,该终端设备可以根据该加密算法和该短信息密钥对该第一短信进行解密。Optionally, if the encryption algorithm is specified, the terminal device may decrypt the first short message according to the encryption algorithm and the short message key.
由于该第一短信是由该终端设备所对应的SMSC发送的短信,因此能够正确解密,使得用户能够获知短信内容。Since the first short message is a short message sent by the SMSC corresponding to the terminal device, the first short message can be decrypted correctly, so that the user can know the short message content.
在309中,该伪基站向该终端设备发送第二短信。In 309, the pseudo base station sends a second short message to the terminal device.
在310中,该终端设备根据该短信息密钥对该第二短信进行解密。In 310, the terminal device decrypts the second short message according to the short message key.
由于该第二短信是由伪基站发送的短信,无法正常解密,使得用户不能够获知短信内容,从而用户能够避免受到伪基站所发送短信的影响。 Since the second short message is a short message sent by the pseudo base station, the user cannot be decrypted normally, so that the user cannot know the short message content, so that the user can avoid being affected by the short message sent by the pseudo base station.
应理解,在本申请实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in the embodiments of the present application, the size of the sequence numbers of the foregoing processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be implemented in the embodiment of the present application. Form any limit.
还应理解,图3中根据本申请实施例的通信方法300中各步骤的实现方式可以参考图2中根据本申请实施例的通信方法200中的具体描述,为了简洁,在此不再赘述。It should be understood that the implementation of the steps in the communication method 300 in the embodiment of the present application in FIG. 3 may refer to the specific description in the communication method 200 according to the embodiment of the present application in FIG. 2, and details are not described herein for brevity.
因此,在本申请实施例中,该终端设备需要利用短信息密钥对所接收的短信进行解密,该终端设备所对应的该SMSC需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证该终端设备所接收的短信的安全性,且SMSC发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示该短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into a garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby Reduce the impact of illegal SMS on users.
另外,由该云端服务器生成短信息密钥,能够减轻该SMSC的负担。In addition, the generation of the short message key by the cloud server can reduce the burden on the SMSC.
图4是根据本申请实施例的通信方法400的示意性交互图。该通信方法400中以服务器为云端服务器进行说明。4 is a schematic interaction diagram of a communication method 400 in accordance with an embodiment of the present application. In the communication method 400, the server is described as a cloud server.
在401中,该终端设备可以根据该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种,确定该终端设备所对应的SMSC需要对待发送给该终端设备的短信进行加密。In 401, the terminal device may determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting, that the SMSC corresponding to the terminal device needs to send a short message to the terminal device. Encrypt.
在402中,该终端设备可以向该云端服务器发送第一指示信息,该第一指示信息用于指示该SMSC需要对待发送给该终端设备的短信进行加密。In 402, the terminal device may send first indication information to the cloud server, where the first indication information is used to indicate that the SMSC needs to encrypt the short message to be sent to the terminal device.
在403中,该云端服务器可以根据该第一指示信息,确定该SMSC需要对待发送给该终端设备的短信进行加密。In 403, the cloud server may determine, according to the first indication information, that the SMSC needs to encrypt the short message to be sent to the terminal device.
可选地,该云端服务器可以确定与该终端设备所对应的SMSC。Optionally, the cloud server may determine an SMSC corresponding to the terminal device.
可选地,该云端服务器可以确定是否与该终端设备所对应的SMSC建立了连接;如果没有建立连接,则该云端服务器可以与该SMSC新建连接。Optionally, the cloud server may determine whether a connection is established with the SMSC corresponding to the terminal device; if the connection is not established, the cloud server may newly establish a connection with the SMSC.
在404中,该云端服务器可以向该终端设备所对应的SMSC发送通知消息,该通知消息用于通知该SMSC向该云端服务器发送该短信息密钥。In 404, the cloud server may send a notification message to the SMSC corresponding to the terminal device, where the notification message is used to notify the SMSC to send the short message key to the cloud server.
在405中,该SMSC可以生成短信息密钥。In 405, the SMSC can generate a short message key.
可选地,该SMSC可以指定加密算法。Optionally, the SMSC can specify an encryption algorithm.
在406中,该SMSC可以将该短信息密钥发送给该云端服务器。In 406, the SMSC can send the short message key to the cloud server.
可选地,在该SMSC指定加密算法时,该SMSC可以向该云端服务器 发送用于指示加密算法的算法指示信息。Optionally, when the SMSC specifies an encryption algorithm, the SMSC may send the cloud server to the cloud server. An algorithm indication information for indicating an encryption algorithm is sent.
在407中,该云端服务器可以将该短信息密钥发送给该终端设备。In 407, the cloud server can send the short message key to the terminal device.
可选地,在该云端服务器接收到算法指示信息时,该云端服务器可以向该终端设备发送该算法指示信息。Optionally, when the cloud server receives the algorithm indication information, the cloud server may send the algorithm indication information to the terminal device.
408至412的执行过程与图3所示的通信方法300中306至310的执行过程相同,在此不再赘述。The execution process of 408 to 412 is the same as the execution process of 306 to 310 in the communication method 300 shown in FIG. 3, and details are not described herein again.
应理解,在本申请实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in the embodiments of the present application, the size of the sequence numbers of the foregoing processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be implemented in the embodiment of the present application. Form any limit.
还应理解,图4中根据本申请实施例的通信方法400中各步骤的实现方式可以参考图2中根据本申请实施例的通信方法200中的具体描述,为了简洁,在此不再赘述。It should be understood that the implementation of the steps in the communication method 400 in the embodiment of the present application in FIG. 4 may be referred to the specific description in the communication method 200 according to the embodiment of the present application in FIG. 2, and details are not described herein for brevity.
还应理解,图3中根据本申请实施例的通信方法300和图4中根据本申请实施例的通信方法400并不是完全独立的,属于不同方法直接的特征之间可以相互组合。It should also be understood that the communication method 300 according to the embodiment of the present application in FIG. 3 and the communication method 400 according to the embodiment of the present application in FIG. 4 are not completely independent, and features directly belonging to different methods may be combined with each other.
因此,在本申请实施例中,该终端设备需要利用短信息密钥对所接收的短信进行解密,该终端设备所对应的该SMSC需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证该终端设备所接收的短信的安全性,且SMSC发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示该短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into a garbled code, so that the content after the decryption can indicate whether the short message is legal, thereby Reduce the impact of illegal SMS on users.
另外,由该SMSC生成短信息密钥,能够给予该SMSC分配该短信息密钥的自由。In addition, generating a short message key by the SMSC can give the SMSC the freedom to allocate the short message key.
上文中结合图2至图4,详细描述了根据本申请实施例的通信方法,下面将结合图5至图10,详细描述根据本申请实施例的终端设备、SMSC和服务器。The communication method according to the embodiment of the present application is described in detail above with reference to FIG. 2 to FIG. 4, and the terminal device, the SMSC, and the server according to the embodiment of the present application will be described in detail below with reference to FIG. 5 to FIG.
图5是根据本申请实施例的终端设备500的示意性框图。如图5所示,该终端设备500包括:FIG. 5 is a schematic block diagram of a terminal device 500 according to an embodiment of the present application. As shown in FIG. 5, the terminal device 500 includes:
接收模块501,用于接收该终端设备所接入的服务器发送的短信息密钥;The receiving module 501 is configured to receive a short message key sent by a server accessed by the terminal device;
解密模块502,用于在该接收模块接收到短信时,根据该短信息密钥对该短信进行解密。 The decryption module 502 is configured to decrypt the short message according to the short message key when the receiving module receives the short message.
因此,在本申请实施例中,该终端设备需要利用短信息密钥对所接收的短信进行解密,该终端设备所对应的该SMSC需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证该终端设备所接收的短信的安全性,且该SMSC短消息服务中心发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示该短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC short message service center can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate the Whether the SMS is legal, thus reducing the impact of illegal SMS on the user.
另外,该终端设备接收服务器发送的短信息密钥,能够避免由短消息服务中心给该终端设备发送短信息密钥的情况下,该终端设备无法获知密钥发送方是短消息服务中心的还是伪基站的问题。In addition, the terminal device receives the short message key sent by the server, and can prevent the short message service center from sending the short message key to the terminal device, and the terminal device cannot know whether the key sender is the short message service center or The problem with the pseudo base station.
可选地,在本申请实施例中,该终端设备还包括处理模块,用于隐藏或删除该短信;和/或第一发送模块,用于将该短信发送给该服务器。Optionally, in the embodiment of the present application, the terminal device further includes a processing module, configured to hide or delete the short message; and/or a first sending module, configured to send the short message to the server.
可选地,在本申请实施例中,该终端设备还包括确定模块,用于根据该终端设备所附着网络的类型、该终端设备的位置和用户设置中的至少一种,确定该终端设备所对应的SMSC是否需要对待发送给该终端设备的短信进行加密;Optionally, in the embodiment of the present application, the terminal device further includes a determining module, configured to determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, the terminal device Whether the corresponding SMSC needs to encrypt the short message sent to the terminal device;
第二发送模块,用于在确定该SMSC需要对待发送给该终端设备的短信进行加密时,向该服务器发送第一指示信息,该第一指示信息用于指示该SMSC需要对待发送给该终端设备的短信进行加密。a second sending module, configured to send, to the server, first indication information, when the SMSC needs to encrypt the short message to be sent to the terminal device, where the first indication information is used to indicate that the SMSC needs to be sent to the terminal device The text message is encrypted.
可选地,在本申请实施例中,该终端设备还包括第三发送模块,用于向该服务器发送该终端设备所附着网络的类型、该终端设备的位置和用户设置中的至少一种;Optionally, in the embodiment of the present application, the terminal device further includes a third sending module, configured to send, to the server, at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting;
该接收模块501具体用于接收该短信息密钥,该短信息密钥为该服务器在根据该终端设备所附着网络的类型、该终端设备的位置和该用户设置中的至少一种确定该SMSC需要对待发送给该终端设备的短信进行加密时所发送的。The receiving module 501 is specifically configured to receive the short message key, where the short message key is determined by the server according to at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and the user setting. It is sent when the SMS sent to the terminal device is encrypted.
可选地,在本申请实施例中,该接收模块501还用于接收该服务器发送的用于指示加密算法的算法指示信息;该接收模块还用于确定该算法指示信息所指示的该加密算法;该解密模块502还用于根据该短信息密钥和该加密算法对该短信进行解密。Optionally, in the embodiment of the present application, the receiving module 501 is further configured to receive algorithm indication information that is sent by the server and used to indicate an encryption algorithm. The receiving module is further configured to determine the encryption algorithm indicated by the algorithm indication information. The decryption module 502 is further configured to decrypt the short message according to the short message key and the encryption algorithm.
应理解,根据本申请实施例的终端设备500可对应于本申请实施例中的终端设备,并且终端设备500中的各个模块的上述和其它操作和/或功能分别 为了实现图2至图4中的各个方法的相应流程,为了简洁,在此不再赘述。It should be understood that the terminal device 500 according to the embodiment of the present application may correspond to the terminal device in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the terminal device 500 respectively In order to implement the corresponding processes of the respective methods in FIG. 2 to FIG. 4, for brevity, details are not described herein again.
图6是根据本申请实施例的SMSC600的示意性框图。如图6所示,该SMSC600包括:FIG. 6 is a schematic block diagram of an SMSC 600 in accordance with an embodiment of the present application. As shown in FIG. 6, the SMSC 600 includes:
加密模块601,用于根据终端设备所对应的短信息密钥对待发送给该终端设备的短信进行加密;The encryption module 601 is configured to encrypt the short message to be sent to the terminal device according to the short message key corresponding to the terminal device;
发送模块602,用于将该加密模块加密后的该短信发送给该终端设备。The sending module 602 is configured to send the short message encrypted by the encryption module to the terminal device.
因此,在本申请实施例中,该终端设备需要利用短信息密钥对所接收的短信进行解密,该终端设备所对应的该SMSC需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证该终端设备所接收的短信的安全性,且该SMSC发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示该短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate whether the short message is legal. Thereby reducing the impact of illegal text messages on users.
可选地,在本申请实施例中,该SMSC600还包括第一接收模块,用于接收该终端设备所接入的服务器发送的通知消息,该通知消息用于通知该SMSC向该服务器发送该短信息密钥;生成模块,用于生成该短信息密钥;该发送模块602还用于向该服务器发送该短信息密钥。Optionally, in the embodiment of the present application, the SMSC 600 further includes a first receiving module, configured to receive a notification message sent by the server accessed by the terminal device, where the notification message is used to notify the SMSC to send the short message to the server. An information key; a generating module, configured to generate the short message key; the sending module 602 is further configured to send the short message key to the server.
可选地,在本申请实施例中,该SMSC600还包括第二接收模块,用于接收该终端设备所接入的服务器发送的该短信息密钥。Optionally, in the embodiment of the present application, the SMSC 600 further includes a second receiving module, configured to receive the short message key sent by the server accessed by the terminal device.
可选地,在本申请实施例中,该SMSC600还包括连接模块,用于与该服务器建立连接。Optionally, in the embodiment of the present application, the SMSC 600 further includes a connection module, configured to establish a connection with the server.
可选地,在本申请实施例中,该SMSC600还包括第三接收模块,用于接收该终端设备所接入的服务器发送的用于指示加密算法的算法指示信息;该第三接收模块还用于确定该算法指示信息所指示的加密算法;该加密模块601还用于根据该短信息密钥和该加密算法对该短信进行加密。Optionally, in the embodiment of the present application, the SMSC 600 further includes a third receiving module, configured to receive algorithm indication information that is sent by the server that is accessed by the terminal device to indicate an encryption algorithm, and the third receiving module further uses The encryption algorithm indicated by the algorithm indication information is determined; the encryption module 601 is further configured to encrypt the short message according to the short information key and the encryption algorithm.
可选地,在本申请实施例中,该SMSC600还包括确定模块,用于确定加密算法;该发送模块602还用于将用于指示该加密算法的算法指示信息发送给该终端设备所接入的服务器;该加密模块601还用于根据该短信息密钥和该加密算法对该短信进行加密。Optionally, in the embodiment of the present application, the SMSC 600 further includes a determining module, configured to determine an encryption algorithm, where the sending module 602 is further configured to send, to the terminal device, the algorithm indication information used to indicate the encryption algorithm. The encryption module 601 is further configured to encrypt the short message according to the short message key and the encryption algorithm.
应理解,根据本申请实施例的SMSC600可对应于本申请实施例中的SMSC,并且SMSC600中的各个模块的上述和其它操作和/或功能分别为了实现图2至图4中的各个方法的相应流程,为了简洁,在此不再赘述。 It should be understood that the SMSC 600 according to the embodiment of the present application may correspond to the SMSC in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the SMSC 600 are respectively implemented to implement the respective methods in FIG. 2 to FIG. The process, for the sake of brevity, will not be described here.
图7是根据本申请实施例的服务器700的示意性框图。如图7所示,该服务器700包括:FIG. 7 is a schematic block diagram of a server 700 in accordance with an embodiment of the present application. As shown in FIG. 7, the server 700 includes:
生成模块701,用于生成短信息密钥;a generating module 701, configured to generate a short message key;
发送模块702,用于将该短信息密钥发送给已接入该服务器的终端设备和该终端设备所对应的短消息服务中心SMSC,其中,该短信息密钥用于该终端设备对接收到的短信进行解密,以及用于该SMSC对待发送给该终端设备的短信进行加密。The sending module 702 is configured to send the short message key to the terminal device that has accessed the server and the short message service center SMSC corresponding to the terminal device, where the short message key is used by the terminal device to receive The short message is decrypted, and the short message for the SMSC to be sent to the terminal device is encrypted.
因此,在本申请实施例中,该终端设备需要利用短信息密钥对所接收的短信进行解密,该终端设备所对应的该SMSC需要利用短消息密钥对待发送给终端设备的短信进行加密,从而能够保证该终端设备所接收的短信的安全性,且该SMSC发送的短信可以被正确解密,而伪基站发送的短信则可能被解密成乱码,使得解密之后的内容能够指示该短信是否合法,从而减小非法短信对用户的影响。Therefore, in the embodiment of the present application, the terminal device needs to decrypt the received short message by using the short message key, and the SMSC corresponding to the terminal device needs to use the short message key to encrypt the short message to be sent to the terminal device. Therefore, the security of the short message received by the terminal device can be ensured, and the short message sent by the SMSC can be correctly decrypted, and the short message sent by the pseudo base station may be decrypted into garbled code, so that the content after the decryption can indicate whether the short message is legal. Thereby reducing the impact of illegal text messages on users.
另外,通过服务器发送短信息密钥给终端设备,能够避免由短消息服务中心给该终端设备发送短信息密钥的情况下,该终端设备无法获知密钥发送方是短消息服务中心的还是伪基站的问题;并且,该服务器在生成该短信息密钥时,可以为每个终端设备设置不同的短信息密钥,进一步提高安全性。In addition, when the short message key is sent to the terminal device by the server, and the short message service center can be prevented from transmitting the short message key to the terminal device, the terminal device cannot know whether the key sender is a short message service center or a fake. The problem of the base station; and, when the server generates the short message key, a different short message key can be set for each terminal device, thereby further improving security.
可选地,在本申请实施例中,该服务器700还包括第一确定模块,用于根据该终端设备所附着网络的类型、该终端设备的位置和用户设置中的至少一种,或根据该终端设备发送的加密指示信息,确定该SMSC是否需要对待发送给该终端设备的短信进行加密;该生成模块701具体用于在确定该SMSC需要对待发送给该终端设备的短信进行加密时,生成该短信息密钥。Optionally, in the embodiment of the present application, the server 700 further includes a first determining module, configured to: according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, or according to the The encryption indication information sent by the terminal device determines whether the SMSC needs to encrypt the short message to be sent to the terminal device; the generating module 701 is specifically configured to: when determining that the SMSC needs to encrypt the short message to be sent to the terminal device, generate the Short message key.
可选地,在本申请实施例中,该服务器700还包括第二确定模块,用于确定与该终端设备对应的该SMSC;连接模块,用于与该SMSC新建连接。Optionally, in the embodiment of the present application, the server 700 further includes a second determining module, configured to determine the SMSC corresponding to the terminal device, and a connection module, configured to establish a new connection with the SMSC.
可选地,该第二确定模块具体用于根据该终端设备上传的电话号码段确定与该终端设备对应的该SMSC。Optionally, the second determining module is specifically configured to determine, according to the phone number segment uploaded by the terminal device, the SMSC corresponding to the terminal device.
可选地,在本申请实施例中,该服务器700还包括第三确定模块,用于确定加密算法,该加密算法为该终端设备在根据该短信息密钥对接收到的短信进行解密时,以及该SMSC在根据该短信息密钥对待发送给该终端设备的短信进行加密时所需要的加密算法;该发送模块702还用于将用于指示该加密算法的算法指示信息发送给该终端设备和该SMSC。 Optionally, in the embodiment of the present application, the server 700 further includes a third determining module, configured to determine an encryption algorithm, where the encryption algorithm is used by the terminal device to decrypt the received short message according to the short message key. And an encryption algorithm required by the SMSC to encrypt the short message to be sent to the terminal device according to the short message key; the sending module 702 is further configured to send the algorithm indication information used to indicate the encryption algorithm to the terminal device And the SMSC.
可选地,在本申请实施例中,该服务器700还包括接收模块,用于接收该SMSC发送的用于指示加密算法的算法指示信息,该算法指示信息用于指示该终端设备在根据该短信息密钥对接收到的短信进行解密时需要使用的加密算法;该发送模块702还用于将该算法指示信息发送给该终端设备。Optionally, in the embodiment of the present application, the server 700 further includes a receiving module, configured to receive algorithm indication information that is sent by the SMSC to indicate an encryption algorithm, where the algorithm indication information is used to indicate that the terminal device is according to the short The encryption algorithm used by the information key to decrypt the received short message; the sending module 702 is further configured to send the algorithm indication information to the terminal device.
可选地,在本申请实施例中,该服务器700为云端服务器。Optionally, in the embodiment of the present application, the server 700 is a cloud server.
应理解,根据本申请实施例的服务器700可对应于本申请实施例中的服务器,并且服务器700中的各个模块的上述和其它操作和/或功能分别为了实现图2至图4中的各个方法的相应流程,为了简洁,在此不再赘述。It should be understood that the server 700 according to the embodiment of the present application may correspond to the server in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the server 700 respectively implement the respective methods in FIG. 2 to FIG. The corresponding process, for the sake of brevity, will not be described here.
图8是根据本申请实施例的终端设备800的结构示意图。如图8所示,该终端设备800包括处理器801、存储器802、收发器803和总线系统804,该处理器801、该存储器802和该收发器803通过总线系统804相连,其中,该存储器802用于存储指令,该处理器801用于执行该存储器存储的指令,该收发器803用于接收和发送信息。FIG. 8 is a schematic structural diagram of a terminal device 800 according to an embodiment of the present application. As shown in FIG. 8, the terminal device 800 includes a processor 801, a memory 802, a transceiver 803, and a bus system 804. The processor 801, the memory 802, and the transceiver 803 are connected by a bus system 804, wherein the memory 802 For storing instructions, the processor 801 is configured to execute instructions stored in the memory, and the transceiver 803 is configured to receive and transmit information.
其中,该收发器803用于接收该终端设备所接入的服务器发送的短信息密钥;The transceiver 803 is configured to receive a short message key sent by a server accessed by the terminal device;
该处理器801用于在该接收模块接收到短信时,根据该短信息密钥对该短信进行解密。The processor 801 is configured to decrypt the short message according to the short message key when the receiving module receives the short message.
应理解,根据本申请实施例的终端设备800可对应于本申请实施例中的终端设备,并且终端设备800中的各个模块的上述和其它操作和/或功能分别为了实现图2至图4中的各个方法的相应流程,为了简洁,在此不再赘述。It should be understood that the terminal device 800 according to the embodiment of the present application may correspond to the terminal device in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the terminal device 800 are respectively implemented in FIG. 2 to FIG. 4 . The corresponding processes of the various methods are not repeated here for the sake of brevity.
图9是根据本申请实施例的SMSC900的结构示意图。如图9所示,该SMSC900包括处理器901、存储器902、收发器903和总线系统904,该处理器901、该存储器902和该收发器903通过总线系统904相连,其中,该存储器902用于存储指令,该处理器901用于执行该存储器存储的指令,该收发器903用于接收和发送信息。FIG. 9 is a schematic structural diagram of an SMSC 900 according to an embodiment of the present application. As shown in FIG. 9, the SMSC 900 includes a processor 901, a memory 902, a transceiver 903, and a bus system 904. The processor 901, the memory 902, and the transceiver 903 are connected by a bus system 904, wherein the memory 902 is used for The instructions are stored by the processor 901 for executing instructions stored in the memory, and the transceiver 903 is configured to receive and transmit information.
其中,该处理器901用于根据终端设备对应的短信息密钥对待发送给该终端设备的短信进行加密;The processor 901 is configured to encrypt a short message to be sent to the terminal device according to the short information key corresponding to the terminal device;
该收发器903用于将该加密模块加密后的该短信发送给该终端设备。The transceiver 903 is configured to send the short message encrypted by the encryption module to the terminal device.
应理解,根据本申请实施例的SMSC900可对应于本申请实施例中的SMSC,并且SMSC900中的各个模块的上述和其它操作和/或功能分别为了实现图2至图4中的各个方法的相应流程,为了简洁,在此不再赘述。 It should be understood that the SMSC 900 according to the embodiment of the present application may correspond to the SMSC in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the SMSC 900 are respectively implemented to implement the respective methods in FIG. 2 to FIG. The process, for the sake of brevity, will not be described here.
图10是根据本申请实施例的服务器1000的结构示意图。如图10所示,该服务器1000包括处理器1001、存储器1002、收发器1003和总线系统1004,该处理器1001、该存储器1002和该收发器1003通过总线系统1004相连,其中,该存储器1002用于存储指令,该处理器1001用于执行该存储器存储的指令,该收发器1003用于接收和发送信息。FIG. 10 is a schematic structural diagram of a server 1000 according to an embodiment of the present application. As shown in FIG. 10, the server 1000 includes a processor 1001, a memory 1002, a transceiver 1003, and a bus system 1004. The processor 1001, the memory 1002, and the transceiver 1003 are connected by a bus system 1004, wherein the memory 1002 is used. For storing instructions, the processor 1001 is configured to execute instructions stored in the memory, and the transceiver 1003 is configured to receive and transmit information.
其中,该处理器1001用于生成短信息密钥;The processor 1001 is configured to generate a short message key;
该收发器1003用于将该短信息密钥发送给已接入该服务器的终端设备和该终端设备所对应的短消息服务中心,其中,该短信息密钥用于该终端设备对接收到的短信进行解密,以及用于该短消息服务中心对待发送给该终端设备的短信进行加密。The transceiver 1003 is configured to send the short message key to a terminal device that has accessed the server and a short message service center corresponding to the terminal device, where the short message key is used by the terminal device to receive the The short message is decrypted, and the short message service center encrypts the short message to be sent to the terminal device.
应理解,根据本申请实施例的服务器1000可对应于本申请实施例中的服务器,并且服务器1000中的各个模块的上述和其它操作和/或功能分别为了实现图2至图4中的各个方法的相应流程,为了简洁,在此不再赘述。It should be understood that the server 1000 according to the embodiment of the present application may correspond to the server in the embodiment of the present application, and the foregoing and other operations and/or functions of the respective modules in the server 1000 respectively implement the respective methods in FIG. 2 to FIG. The corresponding process, for the sake of brevity, will not be described here.
在本申请实施例中,处理器可以是中央处理器(Central Processing Unit,简称为“CPU”),网络处理器(Network Processor,简称为“NP”)或者CPU和NP的组合。处理器还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(Application-Specific Integrated Circuit,简称为“ASIC”),可编程逻辑器件(Programmable Logic Device,简称为“PLD”)或其组合。上述PLD可以是复杂可编程逻辑器件(Complex Programmable Logic Device,简称为“CPLD”),现场可编程逻辑门阵列(Field-Programmable Gate Array,简称为“FPGA”),通用阵列逻辑(Generic Array Logic,简称为“GAL”)或其任意组合。In this embodiment, the processor may be a Central Processing Unit ("CPU"), a Network Processor ("NP"), or a combination of a CPU and an NP. The processor may further include a hardware chip. The hardware chip may be an Application-Specific Integrated Circuit ("ASIC"), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), and a Generic Array Logic (Generic Array Logic). Referred to as "GAL" or any combination thereof.
该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,简称为“ROM”)、可编程只读存储器(Programmable ROM,简称为“PROM”)、可擦除可编程只读存储器(Erasable PROM,简称为“EPROM”)、电可擦除可编程只读存储器(Electrically EPROM,简称为“EEPROM”)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,简称为“RAM”),其用作外部高速缓存。The memory can be either volatile memory or non-volatile memory, or can include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (Read-Only Memory, abbreviated as "ROM"), a programmable read only memory (Programmable ROM, abbreviated as "PROM"), and an erasable programmable read only memory ( Erasable PROM (abbreviated as "EPROM"), electrically erasable programmable read only memory ("EEPROM") or flash memory. The volatile memory may be a Random Access Memory (RAM), which is used as an external cache.
该总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。为便于表示,图中仅用一条粗线表示总线系统,但并不表示 仅有一根总线或一种类型的总线。The bus system may include a power bus, a control bus, and a status signal bus in addition to the data bus. For the sake of convenience, only one thick line is used to indicate the bus system, but it does not mean There is only one bus or one type of bus.
本申请实施例提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行上述图2至图4中本申请实施例的通信方法。该可读介质可以是ROM或RAM,本申请实施例对此不做限制。The embodiment of the present application provides a computer readable medium for storing a computer program, where the computer program includes a communication method for performing the foregoing embodiments of the present application in FIGS. 2 to 4. The readable medium may be a ROM or a RAM, which is not limited in this embodiment of the present application.
应理解,本文中术语“和/或”以及“A或B中的至少一种”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the terms "and/or" and "at least one of A or B" herein are merely an association describing the associated object, indicating that there may be three relationships, for example, A and/or B, Representation: There are three cases where A exists separately, A and B exist at the same time, and B exists separately. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。The function is implemented in the form of a software functional unit and sold or made as a standalone product When used, it can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application. It should be covered by the scope of protection of this application. Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (36)

  1. 一种通信方法,其特征在于,包括:A communication method, comprising:
    终端设备接收所述终端设备所接入的服务器发送的短信息密钥;Receiving, by the terminal device, a short message key sent by a server accessed by the terminal device;
    所述终端设备在接收到短信时,根据所述短信息密钥对所述短信进行解密。When receiving the short message, the terminal device decrypts the short message according to the short message key.
  2. 根据权利要求1所述的方法,其特征在于,在所述终端设备根据所述短信息密钥对所述短信进行解密且解密失败时,所述方法还包括:The method according to claim 1, wherein when the terminal device decrypts the short message according to the short message key and the decryption fails, the method further includes:
    所述终端设备隐藏或删除所述短信;和/或The terminal device hides or deletes the short message; and/or
    所述终端设备将所述短信发送给所述服务器。The terminal device sends the short message to the server.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述终端设备接收所述终端设备所接入的服务器发送的所述短信息密钥之前,所述方法还包括:The method according to claim 1 or 2, wherein before the terminal device receives the short message key sent by the server accessed by the terminal device, the method further includes:
    所述终端设备根据所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种,确定所述终端设备所对应的短消息服务中心SMSC是否需要对待发送给所述终端设备的短信进行加密;Determining, by the terminal device, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, whether the short message service center SMSC corresponding to the terminal device needs to be sent to the The short message of the terminal device is encrypted;
    在确定所述SMSC需要对待发送给所述终端设备的短信进行加密时,所述终端设备向所述服务器发送第一指示信息,所述第一指示信息用于指示所述SMSC需要对待发送给所述终端设备的短信进行加密。When determining that the SMSC needs to encrypt the short message to be sent to the terminal device, the terminal device sends the first indication information to the server, where the first indication information is used to indicate that the SMSC needs to be sent to the The short message of the terminal device is encrypted.
  4. 根据权利要求1或2所述的方法,其特征在于,在所述终端设备接收所述终端设备所接入的服务器发送的所述短信息密钥之前,所述方法还包括:The method according to claim 1 or 2, wherein before the terminal device receives the short message key sent by the server accessed by the terminal device, the method further includes:
    所述终端设备向所述服务器发送所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种;Transmitting, by the terminal device, at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and a user setting to the server;
    其中,所述终端设备接收所述终端设备所接入的服务器发送的所述短信息密钥,包括:The terminal device receives the short message key sent by the server accessed by the terminal device, including:
    所述终端设备接收所述短信息密钥,所述短信息密钥为所述服务器在根据所述终端设备所附着网络的类型、所述终端设备的位置和所述用户设置中的至少一种确定所述SMSC需要对待发送给所述终端设备的短信进行加密时所发送的。Receiving, by the terminal device, the short message key, where the short message key is at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and the user setting. Determining that the SMSC needs to be encrypted when the short message to be sent to the terminal device is encrypted.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括: The method according to any one of claims 1 to 4, further comprising:
    所述终端设备接收所述服务器发送的用于指示加密算法的算法指示信息;Receiving, by the terminal device, algorithm indication information that is sent by the server and used to indicate an encryption algorithm;
    所述终端设备确定所述算法指示信息所指示的所述加密算法;Determining, by the terminal device, the encryption algorithm indicated by the algorithm indication information;
    其中,所述终端设备在接收到短信时,根据所述短信息密钥对所述短信进行解密,包括:The terminal device decrypts the short message according to the short message key when receiving the short message, including:
    所述终端设备根据所述短信息密钥和所述加密算法对所述短信进行解密。The terminal device decrypts the short message according to the short message key and the encryption algorithm.
  6. 一种通信方法,其特征在于,包括:A communication method, comprising:
    短消息服务中心SMSC根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密;The short message service center SMSC encrypts the short message to be sent to the terminal device according to the short message key corresponding to the terminal device;
    所述SMSC将加密后的所述短信发送给所述终端设备。The SMSC sends the encrypted short message to the terminal device.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6 wherein the method further comprises:
    所述SMSC接收所述终端设备所接入的服务器发送的通知消息,所述通知消息用于通知所述SMSC向所述服务器发送所述短信息密钥;Receiving, by the SMSC, a notification message sent by the server that is accessed by the terminal device, where the notification message is used to notify the SMSC to send the short message key to the server;
    所述SMSC生成所述短信息密钥;The SMSC generates the short message key;
    所述SMSC向所述服务器发送所述短信息密钥。The SMSC sends the short message key to the server.
  8. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6 wherein the method further comprises:
    所述SMSC接收所述终端设备所接入的服务器发送的所述短信息密钥。The SMSC receives the short message key sent by a server accessed by the terminal device.
  9. 根据权利要求7或8所述的方法,其特征在于,在所述SMSC与所述服务器进行信息传输之前,所述方法还包括:The method according to claim 7 or 8, wherein before the information transmission between the SMSC and the server, the method further comprises:
    所述SMSC与所述服务器建立连接。The SMSC establishes a connection with the server.
  10. 根据权利要求6至9中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6 to 9, wherein the method further comprises:
    所述SMSC接收所述终端设备所接入的服务器发送的用于指示加密算法的算法指示信息;The SMSC receives algorithm indication information sent by a server accessed by the terminal device to indicate an encryption algorithm;
    所述SMSC确定所述算法指示信息所指示的所述加密算法;The SMSC determines the encryption algorithm indicated by the algorithm indication information;
    其中,所述SMSC根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密,包括:The SMSC encrypts the short message to be sent to the terminal device according to the short information key corresponding to the terminal device, including:
    所述SMSC根据所述短信息密钥和所述加密算法对所述短信进行加密。The SMSC encrypts the short message according to the short message key and the encryption algorithm.
  11. 根据权利要求6至9中任一项所述的方法,其特征在于,所述方法还包括: The method according to any one of claims 6 to 9, wherein the method further comprises:
    所述SMSC确定加密算法;The SMSC determines an encryption algorithm;
    所述SMSC将用于指示所述加密算法的算法指示信息发送给所述服务器;The SMSC sends algorithm indication information for indicating the encryption algorithm to the server;
    其中,所述SMSC根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密,包括:The SMSC encrypts the short message to be sent to the terminal device according to the short information key corresponding to the terminal device, including:
    所述SMSC根据所述短信息密钥和所述加密算法对所述短信进行加密。The SMSC encrypts the short message according to the short message key and the encryption algorithm.
  12. 一种通信方法,其特征在于,包括:A communication method, comprising:
    服务器生成短信息密钥;The server generates a short message key;
    所述服务器将所述短信息密钥发送给已接入所述服务器的终端设备和所述终端设备所对应的短消息服务中心SMSC,其中,所述短信息密钥用于所述终端设备对接收到的短信进行解密,以及用于所述SMSC对待发送给所述终端设备的短信进行加密。Sending, by the server, the short message key to the terminal device that has accessed the server and the short message service center SMSC corresponding to the terminal device, where the short message key is used by the terminal device pair The received short message is decrypted, and the short message for the SMSC to be sent to the terminal device is encrypted.
  13. 根据权利要求12所述的方法,其特征在于,在所述服务器生成短信息密钥之前,所述方法还包括:The method according to claim 12, wherein before the server generates the short message key, the method further comprises:
    所述服务器根据所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种,或根据所述终端设备发送的加密指示信息,确定所述SMSC是否需要对待发送给所述终端设备的短信进行加密;Determining, by the server, whether the SMSC needs to be sent to the SMSC according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, or according to the encryption indication information sent by the terminal device. The short message of the terminal device is encrypted;
    其中,所述服务器生成短信息密钥,包括:The server generates a short message key, including:
    在确定所述SMSC需要对待发送给所述终端设备的短信进行加密时,所述服务器生成所述短信息密钥。The server generates the short message key when it is determined that the SMSC needs to encrypt the short message to be sent to the terminal device.
  14. 根据权利要求12或13所述的方法,其特征在于,在所述服务器将所述短信息密钥发送给已接入所述服务器的终端设备和所述终端设备所对应的SMSC之前,所述方法还包括:The method according to claim 12 or 13, wherein before the server sends the short message key to the terminal device that has accessed the server and the SMSC corresponding to the terminal device, The method also includes:
    所述服务器确定与所述终端设备对应的所述SMSC;The server determines the SMSC corresponding to the terminal device;
    所述服务器与所述SMSC新建连接。The server newly establishes a connection with the SMSC.
  15. 根据权利要求14所述的方法,其特征在于,所述服务器确定与所述终端设备对应的所述SMSC,包括:The method according to claim 14, wherein the determining, by the server, the SMSC corresponding to the terminal device comprises:
    所述服务器根据所述终端设备上传的电话号码段确定与所述终端设备对应的所述SMSC。The server determines, according to the phone number segment uploaded by the terminal device, the SMSC corresponding to the terminal device.
  16. 根据权利要求12至15中任一项所述的方法,其特征在于,所述方法还包括: The method according to any one of claims 12 to 15, wherein the method further comprises:
    所述服务器确定加密算法,所述加密算法为所述终端设备在根据所述短信息密钥对接收到的短信进行解密时,以及所述SMSC在根据所述短信息密钥对待发送给所述终端设备的短信进行加密时所需要的加密算法;Determining, by the server, an encryption algorithm, when the terminal device decrypts the received short message according to the short information key, and the SMSC is to be sent according to the short information key to the The encryption algorithm required for the short message of the terminal device to be encrypted;
    所述服务器将用于指示所述加密算法的算法指示信息发送给所述终端设备和所述SMSC。The server sends algorithm indication information for indicating the encryption algorithm to the terminal device and the SMSC.
  17. 根据权利要求12至15中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 12 to 15, wherein the method further comprises:
    所述服务器接收所述SMSC发送的用于指示加密算法的算法指示信息,所述算法指示信息用于指示所述终端设备在根据所述短信息密钥对接收到的短信进行解密时需要使用的加密算法;The server receives the algorithm indication information that is sent by the SMSC to indicate an encryption algorithm, where the algorithm indication information is used to indicate that the terminal device needs to use the decryption of the received short message according to the short information key. Encryption Algorithm;
    所述服务器将所述算法指示信息发送给所述终端设备。The server sends the algorithm indication information to the terminal device.
  18. 根据权利要求12至17中任一项所述的方法,其特征在于,所述服务器为云端服务器。The method according to any one of claims 12 to 17, wherein the server is a cloud server.
  19. 一种终端设备,其特征在于,包括:A terminal device, comprising:
    接收模块,用于接收所述终端设备所接入的服务器发送的短信息密钥;a receiving module, configured to receive a short message key sent by a server accessed by the terminal device;
    解密模块,用于在所述接收模块接收到短信时,根据所述短信息密钥对所述短信进行解密。And a decryption module, configured to decrypt the short message according to the short message key when the receiving module receives the short message.
  20. 根据权利要求19所述的终端设备,其特征在于,所述终端设备还包括:The terminal device according to claim 19, wherein the terminal device further comprises:
    处理模块,用于隐藏或删除所述短信;和/或a processing module for hiding or deleting the short message; and/or
    第一发送模块,用于将所述短信发送给所述服务器。The first sending module is configured to send the short message to the server.
  21. 根据权利要求19或20所述的终端设备,其特征在于,所述终端设备还包括:The terminal device according to claim 19 or 20, wherein the terminal device further comprises:
    确定模块,用于根据所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种,确定所述终端设备所对应的短消息服务中心SMSC是否需要对待发送给所述终端设备的短信进行要加密;a determining module, configured to determine, according to at least one of a type of the network to which the terminal device is attached, a location of the terminal device, and a user setting, whether the short message service center SMSC corresponding to the terminal device needs to be sent to the office The short message of the terminal device is to be encrypted;
    第二发送模块,用于在确定所述SMSC需要对待发送给所述终端设备的短信进行加密时,向所述服务器发送第一指示信息,所述第一指示信息用于指示所述SMSC需要对待发送给所述终端设备的短信进行加密。a second sending module, configured to send, to the server, first indication information, when the SMSC needs to encrypt the short message to be sent to the terminal device, where the first indication information is used to indicate that the SMSC needs to be treated The short message sent to the terminal device is encrypted.
  22. 根据权利要求19或20所述的终端设备,其特征在于,所述终端设备还包括: The terminal device according to claim 19 or 20, wherein the terminal device further comprises:
    第三发送模块,用于向所述服务器发送所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种;a third sending module, configured to send, to the server, at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and a user setting;
    所述接收模块具体用于接收所述短信息密钥,所述短信息密钥为所述服务器在根据所述终端设备所附着网络的类型、所述终端设备的位置和所述用户设置中的至少一种确定所述SMSC需要对待发送给所述终端设备的短信进行加密时所发送的。The receiving module is specifically configured to receive the short information key, where the short information key is in a type according to a network to which the terminal device is attached, a location of the terminal device, and the user setting. At least one of determining that the SMSC needs to encrypt a short message to be sent to the terminal device.
  23. 根据权利要求19至22中任一项所述的终端设备,其特征在于,所述接收模块还用于接收所述服务器发送的用于指示加密算法的算法指示信息;The terminal device according to any one of claims 19 to 22, wherein the receiving module is further configured to receive algorithm indication information sent by the server for indicating an encryption algorithm;
    所述接收模块还用于确定所述算法指示信息所指示的所述加密算法;The receiving module is further configured to determine the encryption algorithm indicated by the algorithm indication information;
    所述解密模块还用于根据所述短信息密钥和所述加密算法对所述短信进行解密。The decryption module is further configured to decrypt the short message according to the short message key and the encryption algorithm.
  24. 一种短消息服务中心SMSC,其特征在于,包括:A short message service center SMSC, comprising:
    加密模块,用于根据终端设备所对应的短信息密钥对待发送给所述终端设备的短信进行加密;The encryption module is configured to encrypt the short message to be sent to the terminal device according to the short message key corresponding to the terminal device;
    发送模块,用于将所述加密模块加密后的所述短信发送给所述终端设备。And a sending module, configured to send the short message encrypted by the encryption module to the terminal device.
  25. 根据权利要求24所述的SMSC,其特征在于,所述SMSC还包括:The SMSC according to claim 24, wherein the SMSC further comprises:
    第一接收模块,用于接收所述终端设备所接入的服务器发送的通知消息,所述通知消息用于通知所述SMSC向所述服务器发送所述短信息密钥;a first receiving module, configured to receive a notification message sent by a server that is accessed by the terminal device, where the notification message is used to notify the SMSC to send the short message key to the server;
    生成模块,用于生成所述短信息密钥;Generating a module, configured to generate the short message key;
    所述发送模块还用于向所述服务器发送所述短信息密钥。The sending module is further configured to send the short message key to the server.
  26. 根据权利要求24所述的SMSC,其特征在于,所述SMSC还包括:The SMSC according to claim 24, wherein the SMSC further comprises:
    第二接收模块,用于接收所述终端设备所接入的服务器发送的所述短信息密钥。The second receiving module is configured to receive the short message key sent by the server accessed by the terminal device.
  27. 根据权利要求25或26所述的SMSC,其特征在于,所述SMSC还包括:The SMSC according to claim 25 or 26, wherein the SMSC further comprises:
    连接模块,用于与所述服务器建立连接。a connection module for establishing a connection with the server.
  28. 根据权利要求24至27中任一项所述的SMSC,其特征在于,所述SMSC还包括:The SMSC according to any one of claims 24 to 27, wherein the SMSC further comprises:
    第三接收模块,用于接收所述终端设备所接入的服务器发送的用于指示 加密算法的算法指示信息;a third receiving module, configured to receive, by the server accessed by the terminal device, an indication Algorithm indicating information of the encryption algorithm;
    所述第三接收模块还用于确定所述算法指示信息所指示的所述加密算法;The third receiving module is further configured to determine the encryption algorithm indicated by the algorithm indication information;
    所述加密模块还用于根据所述短信息密钥和所述加密算法对所述短信进行加密。The encryption module is further configured to encrypt the short message according to the short message key and the encryption algorithm.
  29. 根据权利要求24至27中任一项所述的SMSC,其特征在于,所述SMSC还包括:The SMSC according to any one of claims 24 to 27, wherein the SMSC further comprises:
    确定模块,用于确定加密算法;a determining module for determining an encryption algorithm;
    所述发送模块还用于将用于指示所述加密算法的算法指示信息发送给所述终端设备所接入的服务器;The sending module is further configured to send algorithm indication information used to indicate the encryption algorithm to a server accessed by the terminal device;
    所述加密模块还用于根据所述短信息密钥和所述加密算法对所述短信进行加密。The encryption module is further configured to encrypt the short message according to the short message key and the encryption algorithm.
  30. 一种服务器,其特征在于,包括:A server, comprising:
    生成模块,用于生成短信息密钥;a generating module for generating a short message key;
    发送模块,用于将所述短信息密钥发送给已接入所述服务器的终端设备和所述终端设备所对应的短消息服务中心SMSC,其中,所述短信息密钥用于所述终端设备对接收到的短信进行解密,以及用于所述SMSC对待发送给所述终端设备的短信进行加密。a sending module, configured to send the short message key to a terminal device that has accessed the server and a short message service center SMSC corresponding to the terminal device, where the short message key is used for the terminal The device decrypts the received short message and encrypts the short message to be sent to the terminal device by the SMSC.
  31. 根据权利要求30所述的服务器,其特征在于,所述服务器还包括:The server according to claim 30, wherein the server further comprises:
    第一确定模块,用于根据所述终端设备所附着网络的类型、所述终端设备的位置和用户设置中的至少一种,或根据所述终端设备发送的加密指示信息,确定所述SMSC是否需要对待发送给所述终端设备的短信进行加密;a first determining module, configured to determine, according to at least one of a type of a network to which the terminal device is attached, a location of the terminal device, and a user setting, or according to the encryption indication information sent by the terminal device, whether the SMSC is The message to be sent to the terminal device needs to be encrypted;
    所述生成模块具体用于在确定所述SMSC需要对待发送给所述终端设备的短信进行加密时,生成所述短信息密钥。The generating module is specifically configured to generate the short message key when determining that the SMSC needs to encrypt the short message to be sent to the terminal device.
  32. 根据权利要求30或31所述的服务器,其特征在于,所述服务器还包括:The server according to claim 30 or 31, wherein the server further comprises:
    第二确定模块,用于确定与所述终端设备对应的所述SMSC;a second determining module, configured to determine the SMSC corresponding to the terminal device;
    连接模块,用于与所述SMSC新建连接。a connection module, configured to newly establish a connection with the SMSC.
  33. 根据权利要求32所述的服务器,其特征在于,所述第二确定模块具体用于根据所述终端设备上传的电话号码段确定与所述终端设备对应的所述SMSC。 The server according to claim 32, wherein the second determining module is specifically configured to determine the SMSC corresponding to the terminal device according to a phone number segment uploaded by the terminal device.
  34. 根据权利要求30至33中任一项所述的服务器,其特征在于,所述服务器还包括:The server according to any one of claims 30 to 33, wherein the server further comprises:
    第三确定模块,用于确定加密算法,所述加密算法为所述终端设备在根据所述短信息密钥对接收到的短信进行解密时,以及所述SMSC在根据所述短信息密钥对待发送给所述终端设备的短信进行加密时所需要的加密算法;a third determining module, configured to determine an encryption algorithm, when the terminal device decrypts the received short message according to the short information key, and the SMSC is treated according to the short information key An encryption algorithm required for encrypting a short message sent to the terminal device;
    所述发送模块还用于将用于指示所述加密算法的算法指示信息发送给所述终端设备和所述SMSC。The sending module is further configured to send algorithm indication information for indicating the encryption algorithm to the terminal device and the SMSC.
  35. 根据权利要求30至33中任一项所述的服务器,其特征在于,所述服务器还包括:The server according to any one of claims 30 to 33, wherein the server further comprises:
    接收模块,用于接收所述SMSC发送的用于指示加密算法的算法指示信息,所述算法指示信息用于指示所述终端设备在根据所述短信息密钥对接收到的短信进行解密时需要使用的加密算法;a receiving module, configured to receive algorithm indication information that is sent by the SMSC to indicate an encryption algorithm, where the algorithm indication information is used to indicate that the terminal device needs to decrypt the received short message according to the short information key. The encryption algorithm used;
    所述发送模块还用于将所述算法指示信息发送给所述终端设备。The sending module is further configured to send the algorithm indication information to the terminal device.
  36. 根据权利要求30至35中任一项所述的服务器,其特征在于,所述服务器为云端服务器。 The server according to any one of claims 30 to 35, wherein the server is a cloud server.
PCT/CN2016/106885 2016-11-23 2016-11-23 Communication method and device WO2018094594A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/106885 WO2018094594A1 (en) 2016-11-23 2016-11-23 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/106885 WO2018094594A1 (en) 2016-11-23 2016-11-23 Communication method and device

Publications (1)

Publication Number Publication Date
WO2018094594A1 true WO2018094594A1 (en) 2018-05-31

Family

ID=62195676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/106885 WO2018094594A1 (en) 2016-11-23 2016-11-23 Communication method and device

Country Status (1)

Country Link
WO (1) WO2018094594A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039801A (en) * 2022-01-11 2022-02-11 深圳魔方网络科技有限公司 Short link generation method, short link analysis system, short link analysis equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1867094A (en) * 2005-11-03 2006-11-22 华为技术有限公司 Short message encryption protection realizing method and system
CN101014150A (en) * 2007-02-08 2007-08-08 侯万春 System and method for realizing point-to-point short message encryption and message screening
CN101478733A (en) * 2008-12-30 2009-07-08 华为技术有限公司 Method, network device, mobile terminal and network system for short message transmission

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1867094A (en) * 2005-11-03 2006-11-22 华为技术有限公司 Short message encryption protection realizing method and system
CN101014150A (en) * 2007-02-08 2007-08-08 侯万春 System and method for realizing point-to-point short message encryption and message screening
CN101478733A (en) * 2008-12-30 2009-07-08 华为技术有限公司 Method, network device, mobile terminal and network system for short message transmission

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039801A (en) * 2022-01-11 2022-02-11 深圳魔方网络科技有限公司 Short link generation method, short link analysis system, short link analysis equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103166958B (en) A kind of guard method of file and system
EP3565210B1 (en) Method, relevant device and system for processing network key
US8811609B2 (en) Information protection system and method
EP3122144A1 (en) Device and method for accessing wireless network
CN105634737B (en) Data transmission method, terminal and system
US11108548B2 (en) Authentication method, server, terminal, and gateway
US10021562B2 (en) Mobile trusted module (MTM)-based short message service security system and method thereof
WO2018054220A1 (en) Slice network security isolation method and device
US20180083935A1 (en) Method and system for secure sms communications
CN111355575A (en) Communication encryption method, electronic device and readable storage medium
CN112866981B (en) Method and device for managing subscription data
WO2017132947A1 (en) Method for acquiring security parameters of to-be-transmitted service, signalling management network element, security function node and transmitting terminal
CN105656870A (en) Data transmission method, device and system
CN108141353A (en) The method and apparatus of cryptographic algorithm upgrading
WO2019085659A1 (en) Information interaction method and device
CN111756698B (en) Message transmission method, device, equipment and computer readable storage medium
WO2018094594A1 (en) Communication method and device
CN105516083A (en) Data security management method, apparatus, and system
WO2018137617A1 (en) Secure small data transmission method and device utilized in mobile network
CN110830421A (en) Data transmission method and device
US10542426B2 (en) System and method for transmitting a secure message over a signaling network
CN104363584B (en) A kind of method, apparatus and terminal of short message Encrypt and Decrypt
EP3163929B1 (en) Preventing messaging attacks
CN112688989A (en) Document transmission method and system
CN104955037A (en) Communication encryption method and device for GSM (global system for mobile communications) mobile phones

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16922320

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16922320

Country of ref document: EP

Kind code of ref document: A1