WO2018107398A1 - Method for verifying validity of message and server - Google Patents

Method for verifying validity of message and server Download PDF

Info

Publication number
WO2018107398A1
WO2018107398A1 PCT/CN2016/109937 CN2016109937W WO2018107398A1 WO 2018107398 A1 WO2018107398 A1 WO 2018107398A1 CN 2016109937 W CN2016109937 W CN 2016109937W WO 2018107398 A1 WO2018107398 A1 WO 2018107398A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
terminal device
information
message
verification
Prior art date
Application number
PCT/CN2016/109937
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/109937 priority Critical patent/WO2018107398A1/en
Priority to CN201680084702.XA priority patent/CN109076317A/en
Publication of WO2018107398A1 publication Critical patent/WO2018107398A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/128Anti-malware arrangements, e.g. protection against SMS fraud or mobile malware
    • 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

  • Embodiments of the present application relate to the field of communication technologies, and more specifically to a method and server for verifying the legitimacy of a message.
  • the "pseudo base station” device is mainly composed of a host computer and a notebook computer, and can search for mobile phone information within a certain radius within a certain radius by means of a short message group sender, a short message sender, and the like, and arbitrarily pretend to be a carrier base station, and arbitrarily Use other people's mobile phone numbers to force short messages such as fraud and advertising to the user's mobile phone.
  • the identification of the illegal short message is implemented in the user terminal, and the identification method mainly identifies the short message based on the short message content, the blacklist or the whitelist, that is, by identifying the risk content in the short message content and determining that the short message number belongs to the blacklist. Or a whitelist to comprehensively identify received text messages.
  • the existing short message identification method is likely to be regarded as a white list because the forged SMS number belongs to a public service organization, or is considered to be a legitimate short message because the content of the fraudulent short message is very close to the content of the legitimate short message, and thus cannot be effective.
  • the identification of fraudulent text messages is likely to be regarded as a white list because the forged SMS number belongs to a public service organization, or is considered to be a legitimate short message because the content of the fraudulent short message is very close to the content of the legitimate short message, and thus cannot be effective.
  • the identification of fraudulent text messages is likely to be regarded as a white list because the forged SMS number belongs to a public service organization, or is considered to be a legitimate short message because the content of the fraudulent short message is very close to the content of the legitimate short message, and thus cannot be effective.
  • the identification of fraudulent text messages is likely to be regarded as a white list because the forged SMS number belongs to a public service organization, or is considered to be a legitimate short message because the content of the fraudulent
  • the present application provides a method and a server for verifying the validity of a message, so that the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
  • the first aspect provides a method for verifying the validity of a message, including: determining, by the terminal device, summary information corresponding to the received message; the terminal device generating verification information, where the verification information is And including the summary information and the identifier information, where the identifier information is used to identify the terminal device; the terminal device sends the verification information to a first server, where the first server sends the a server of the message; the terminal device receives the verification result determined by the first server according to the verification information, and the verification result is used to indicate whether the message is legal.
  • the terminal device After receiving the message, the terminal device generates verification information related to the message, and sends the verification information to the server that sends the message determined by the terminal device, so that the server verifies the message according to the verification information. Whether it is legal and sends the verification result to the terminal device.
  • the user can accurately determine whether the message is legal, prevent the user from being blinded by illegal messages, and improve the user experience.
  • the sending, by the terminal device, the verification information to the first server includes: sending, by the terminal device, the verification information to a second server, to facilitate the The second server sends the verification information to the first server.
  • the second server encrypts the verification information by using the public key of the first server.
  • the first server decrypts the received verification information by using its own private key.
  • the terminal device and the first server can interact through the second server, the interaction between the terminal device and the first server can be simplified, and the implementation of the terminal device is simplified.
  • the terminal device receives the verification result that is determined by the first server and is determined according to the verification information, and includes: receiving, by the terminal device The verification result forwarded by the first server by the second server.
  • the method before the sending, by the terminal device, the verification information to the second server, the method further includes: Encrypting the verification information, wherein the first key corresponds to a second key, and the second key is used by the second server to decrypt the encrypted by the first key The key of the verification information.
  • the first key is a public key of the second server
  • the second key is a private key of the second server.
  • the method further includes: the terminal device, according to the verification result, indicating whether the message is legal.
  • the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device The sending time of the message and the account information of the user.
  • the account information of the user may be the account information of the user logging in to the second server through the terminal device, or may be the user ID used by the user to log in to the payment application.
  • the summary information is a hash value.
  • the method before the terminal device determines the digest information of the message, the method further includes: the terminal device determining the message For the target class message, the target class message is a message related to the privacy and/or property of the user.
  • the target class message is a payment short message, a transfer short message or an advertisement short message.
  • the second aspect provides a method for verifying the validity of a message, where the second server receives the verification information sent by the terminal device, where the verification information includes summary information and identification information, and the summary information is related to the terminal.
  • the identifier information is used to identify the terminal device; the second server sends the verification information to the first server, where the first server is a sending station determined by the second server The server of the message, so that the first server determines whether the message is legal according to the verification information, and sends a verification result to the terminal device to indicate whether the message is legal.
  • the first server after the first server receives the verification information sent by the terminal device, the first server sends the verification information to the first server that is sent by the first server to send the message, so that the first server is configured according to the first server. After verifying the validity of the information verification message, the verification result is sent to the terminal device. Therefore, the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
  • the method before the sending, by the second server, the verification information to the first server, the method further includes: determining, by the second server, that the terminal device is A terminal device authenticated by the second server.
  • the second server determines that the terminal device is a terminal device that has been authenticated by the second server, and may also be understood that the second server determines that the terminal device is a legal terminal device.
  • the method further includes: the second server receiving the verification result sent by the first server; The second server sends the verification result to the terminal device.
  • the first key is a public key of the second server
  • the second key is a private key of the second server.
  • the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device The sending time of the message and the account information of the user.
  • the third aspect provides a method for verifying the validity of a message, including: the first server receives the verification information sent by the terminal device, where the verification information includes the digest information and the identifier information, where the digest information is received by the terminal device. Corresponding to the message, the identifier information is used to identify the terminal device; the first server determines, according to the verification information, whether a message is sent to the terminal device; The terminal device sends the result of the message to determine whether the message is legal. The first server sends a verification result to the terminal device, where the verification result is used to indicate whether the message is legal.
  • the server receives the verification information sent by the terminal device, and after verifying whether the message is legal according to the verification information, sends the verification result to the terminal device. This enables the user to accurately determine whether the message is legal, to prevent the user from being blinded by illegal messages, and to enhance the user experience.
  • the receiving, by the first server, the verification information that is sent by the terminal device includes: the first server receiving the verification that the terminal device forwards by using the second server information.
  • the sending, by the first server, the verification result to the terminal device includes: sending, by the first server, the second server The verification result is such that the second server forwards the verification result to the terminal device.
  • the first server determines, according to the verification information, whether to send the cancellation to the terminal device
  • the information includes: when the first server determines to send a message to the terminal device according to the identifier information, the first server determines summary information corresponding to the message sent by the terminal device; When the first server determines that the digest information corresponding to the message sent by the terminal device matches the digest information included in the verification information, the first server determines to send the message to the terminal device.
  • the first server determines, according to the identification information, that no message has been sent to the terminal device, the first server determines that the message received by the terminal device is illegal.
  • the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device , the time when the information is sent, and the account information of the user.
  • the summary information is a hash value.
  • a terminal device for performing the method of any of the above first aspect or any of the possible implementations of the first aspect.
  • the terminal device comprises means for performing the method of any of the above-described first aspect or any of the possible implementations of the first aspect.
  • a server for performing the method of any of the above-described second aspect or any of the possible implementations of the second aspect.
  • the server comprises means for performing the method of any of the above-described second aspect or any of the possible implementations of the second aspect.
  • a server for performing the method of any of the above-described third aspect or any of the possible implementations of the third aspect.
  • the server comprises means for performing the method of any of the above mentioned third or third aspects of the third aspect.
  • a terminal device includes a processor, a memory, a receiver, and a transmitter, the processor, the memory, the receiver, and the transmitter are connected by a bus system, and the memory is configured to store an instruction, where The receiver receives information according to the control of the processor, and the transmitter transmits information according to the control of the processor, and the processor is configured to invoke the instruction stored in the memory to perform any of the foregoing first aspect or the first aspect.
  • a server including a processor, a memory, a receiver, and a transmitter, the processor, the memory, the receiver, and the transmitter are connected by a bus system, and the memory is configured to store an instruction, the receiving Receiving information according to control of the processor, the transmitter transmitting information according to control of the processor, the processor for invoking instructions stored in the memory, performing any possible implementation of the second aspect or the second aspect The method in the way.
  • a server including a processor, a memory, a receiver, and a transmitter, the processor, the memory, the receiver, and the transmitter are connected by a bus system, and the memory is configured to store an instruction, the receiving Receiving information according to control of the processor, the transmitter transmitting information according to control of the processor, the processor for invoking instructions stored in the memory, performing any of the foregoing third aspect or any possible implementation of the third aspect The method in the way.
  • a tenth aspect a computer readable medium for storing a computer program, the computer program comprising instructions for performing the method of any of the first aspect or the first aspect of the first aspect.
  • a computer readable medium for storing a computer program, the computer program comprising instructions for performing any of the possible implementations of the second or second aspect described above.
  • a computer readable medium for storing a computer program comprising instructions for performing any of the possible implementations of the third or third aspect above.
  • FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for verifying the legitimacy of a message according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of a method for verifying the legitimacy of a message according to another embodiment of the present application.
  • FIG. 5 is a schematic block diagram of a terminal device according to another embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a server according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a server according to another embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a terminal device according to still another embodiment of the present application.
  • FIG. 9 is a schematic block diagram of a server according to still another embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a server according to still another embodiment of the present application.
  • a terminal device may also be referred to as a user device (User Device), a mobile station (Mobile Station, referred to as "MS”), a mobile terminal (Mobile Terminal), and a client (Station).
  • the terminal device can communicate with one or more core networks via a radio access network (Radio Access Network, hereinafter referred to as "RAN”).
  • RAN Radio Access Network
  • the terminal device can be a mobile phone (or “Cellular" telephone, computer with mobile terminal, etc., for example, portable, pocket, handheld, computer built-in or in-vehicle mobile devices, and terminal devices in future 5G networks or in future evolved PLMN networks Terminal equipment, etc.
  • the base station may be a base station (Base Transceiver Station, abbreviated as "BTS”) in the GSM system or CDMA, or a base station (NodeB, abbreviated as “NB”) in the WCDMA system, or may be An evolved base station (Evolutional Node B, referred to as “eNB” or “eNodeB”) in the LTE system, or the base station may be a network device in a future 5G network or a network device in a future evolved PLMN network.
  • BTS Base Transceiver Station
  • NodeB base station
  • eNB evolved Node B
  • eNodeB evolved Node B
  • FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application.
  • the communication system shown in FIG. 1 includes a base station, a terminal device, a first server, and a second server.
  • the first server can exchange information between the base station and the terminal device, and the interaction between the terminal device and the first server can be simplified by the second server.
  • the criminals usually use a "pseudo base station" composed of a host computer and a laptop computer to disguise themselves as a carrier base station, and arbitrarily use other people's numbers to send information such as fraud, advertising, and the like to the user's mobile phone. Therefore, it is necessary to provide a method for verifying the legitimacy of a message, which prevents the user from being blinded by the illegal message and improves the user experience.
  • FIG. 2 is a block diagram showing a part of the structure of a terminal device related to an embodiment of the present application.
  • the terminal device 100 includes a radio frequency (Radio Frequency, abbreviated as "RF") circuit 110, an input unit 120, a display unit 130, a sensor 140, an audio circuit 150, a memory 160, a processor 170, and a power source 180. These components communicate over one or more communication buses or signal lines.
  • RF Radio Frequency
  • FIG. 2 does not constitute a limitation to the terminal device, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • the components of the terminal device 100 will be specifically described below with reference to FIG. 2:
  • the RF circuit 110 can be used for receiving and transmitting signals during transmission and reception or during a call, in particular, after receiving the downlink information of the base station, and processing it to the processor 170; Send to the base station.
  • the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the network is, for example, the Internet (also known as the World Wide Web (WWW)), an intranet, and/or a wireless network (such as a cellular telephone network, a wireless local area network (Wireless Local Area Network, WLAN for short). ”) and / or Metropolitan Area Network (“MAN").
  • WWW World Wide Web
  • WLAN Wireless Local Area Network
  • MAN Metropolitan Area Network
  • Wireless communication can use any of a variety of communication standards, protocols and technologies, including but not limited to GSM systems, enhanced data GSM environment (EDGE ), High Speed Downlink Packet Access (HSDPA), High Speed Uplink Packet Access (HSUPA), WCDMA, CDMA, Time Division Multiple Access (TDMA), LTE, Bluetooth, WiFi (eg, IEEE 802.11a, IEEE 802.11b) , IEEE 802.11g and/or IEEE 802.11n), Voice over Internet Protocol (VoIP), Wi-MAX, email protocols (eg, Internet Message Access Protocol (IMAP) and/or Post Office Protocol (POP)), instant messaging (eg , Extensible Messaging Processing Site Protocol (XMPP), Session Initiation Protocol (SIMPLE) for Instant Messaging and Field Utilization Extensions, Instant Messaging and Presence Service (IMPS), and/or Short Message Service (SMS), or whatever appropriate Communication protocols, including the submission date has not yet developed a communication protocol in this application.
  • GSM Global System for Mobile Communications
  • the memory 160 can be used to store software programs and modules, and the processor 170 executes various functional applications and data processing of the terminal devices by running software programs and modules stored in the memory 160.
  • the memory 160 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of wireless communication devices (such as audio data, phone books, etc.).
  • memory 160 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 120 can be configured to receive input gesture information, digital or character information, and generate key signal input related to user settings and function control of the terminal device 100.
  • the input unit 120 can include a touch screen as well as other input devices.
  • the touch screen can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch screen or near the touch screen), and drive the corresponding connection according to a preset program. Device.
  • the input unit 120 may also include other input devices.
  • other input devices include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), tracks One or more of a ball, a mouse, a lever, and the like.
  • the display unit 130 can be used to display information input by the user or information provided to the user as well as various menus of the wireless communication device.
  • the display unit 130 may include a display screen.
  • the display screen may be configured in the form of a liquid crystal display (“LCD”) or an organic light emitting diode (OLED).
  • LCD liquid crystal display
  • OLED organic light emitting diode
  • FIG. 2 the touch screen and the display screen are two separate components to implement the input and input functions of the wireless communication device, in some embodiments, the input of the wireless communication device can be implemented by integrating the touch screen with the display screen. And output function.
  • the terminal device 100 may also include at least one type of sensor 140, such as a capacitive sensor, a light sensor, a motion sensor, and other sensors.
  • the light sensor can include an ambient light sensor and a proximity sensor.
  • Proximity sensors can be used to detect if an object is in proximity to the wireless communication device.
  • Capacitive sensors can be used to detect if an object (such as a human or animal) capable of causing a change in capacitance value is in proximity to the wireless communication device.
  • the audio circuit 150, the speaker, and the microphone can provide an audio interface between the user and the terminal device.
  • the audio circuit 150 can transmit the converted electrical signal of the received audio data to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 150 and then converted.
  • the audio data is processed by the audio data output processor 170, transmitted via the RF circuit 110 to, for example, another wireless communication device, or the audio data is output to the memory 170 for further processing.
  • the processor 170 is a control center of the terminal device that connects various portions of the entire wireless communication device using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 160, and recalling stored in the memory 160.
  • the data performing various functions and processing data of the wireless communication device, thereby performing overall monitoring of the wireless communication device.
  • the processor 170 includes an application processor (Application Processer) and a modem processor (Modem Processer).
  • the application processor mainly processes an operating system, a user interface, an application, and the like, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor and modem processor can be integrated into the same processor, or can be separate and independent processors.
  • the processor 170 can be a central processing unit (“CPU"), and can also be other general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), and off-the-shelf programmable gate arrays ( FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
  • the general purpose processor may be a microprocessor or the processor may also be Any conventional processor, etc. It can be understood that the foregoing processor 170 and the memory 160 may be integrated in the same chip, or may be separate and independent chips.
  • the terminal device 100 further includes a power source 180 (such as a battery) for supplying power to the various components.
  • a power source 180 such as a battery
  • the power source can be logically connected to the processor 170 through the power management system to manage functions such as charging, discharging, and power management through the power management system. .
  • the terminal device 100 may further include a camera, a GPS communication module, a Bluetooth communication module, and the like, and details are not described herein.
  • the message received by the terminal device in the embodiment of the present application includes, but is not limited to, a message received by a short message and a chat type software (for example, WeChat, QQ).
  • a method for verifying the legitimacy of a message according to an embodiment of the present application will be described below with the message as a short message as an example. As shown in FIG. 3, method 200 includes:
  • the terminal device determines summary information corresponding to the received short message.
  • the RF circuit 110 of the terminal device After receiving the short message, the RF circuit 110 of the terminal device delivers the short message to the processor 170, and the processor 170 determines the summary information of the short message.
  • the summary information refers to a fixed length value that uniquely corresponds to the short message.
  • it is generated by a one-way hash function that acts on the short message.
  • the one-way hash function is used to "snap" the plaintext that needs to be encrypted into a string of 128-bit ciphertext.
  • This ciphertext is also called a fingerprint (Finger Print), which has a fixed length, and different plaintexts are ciphered. The results are always different, and the same plain text must have the same summary.
  • This summary can be used as a "fingerprint" to verify that the plaintext is "real”. So if the text message changes on the way, the receiver can know whether the text message has changed by comparing the new digest received with the original digest with the original digest. Therefore, the summary of the SMS guarantees the integrity of the SMS.
  • the processor 170 performs hash processing on the short message and obtains a hash value of 1 by hash calculation.
  • the terminal device receives the short message sent by the base station through the RF circuit 110.
  • the base station here may be a carrier base station, or may be a “pseudo base station”, and the short messages received by the RF circuit 110 may be classified into multiple types.
  • the short message may be classified into a communication rumor type message, a promotion service type message, and a pastime.
  • the processor 170 determines whether the short message is a target type short message, where the target type short message refers to the short message content and the user's privacy and/or property related short message, that is, the above Similar to the user's privacy and/or property related text messages, for example, goals
  • the class message may be, for example, a payment text message, a transfer message, an advertisement message, or the like.
  • the processor 170 parses the short message content. When it is determined that the short message includes a Uniform Resource Locator ("URL") and/or a preset keyword, the processor 170 Make sure the SMS is the target class SMS.
  • URL Uniform Resource Locator
  • the content of the short message is "Your credit card with a tail number of 1234 on the 11th, 23:11 consumption of 1000 yuan, 100 yuan repayment, hand slow no ⁇ cmbtcn / mZm", because the message contains URL, the processor 170 Make sure the text message is a suspected illegal text message.
  • the short message content includes a transfer, payment, transaction, xx far, download, verification code equal to a user's property security and privacy security related to a higher risk of the preset keyword, the processor 170 determines that the short message is the target type of short message.
  • the content of the target class SMS is "You pass the credit card with the ending number "2356" to Zhang**, the transfer bank's tail number 4567 card fails to transfer, and the transfer amount will be returned to your account within one hour. Call 95533 for details.”
  • the processor 170 determines that the sender number of the short message is a special service number, the processor 170 determines that the short message is a target type short message.
  • the special service number refers to a number or a non-private number that provides a special service, and may be a business consulting number, an after-sales service number, a service consultation number, etc. of the company or institution.
  • the sender number of the short message is 95555, and the processor 170 determines that the short message is a target type short message.
  • the memory 160 in the terminal device stores a list of special service numbers in advance.
  • the processor 170 may determine whether the number of the short message sender is a special service number through a local query.
  • the processor 170 may also obtain a special service number directory or a rule in advance, and perform local inquiry through the obtained special service number directory or rule to determine whether the number of the short message sender is a special service number.
  • the processor 170 can also control the RF circuit 110 to interact with the cloud server to determine whether the number of the sender of the short message is a special service number.
  • the processor 170 determines that the sender number of the short message is not the mobile phone number of the common contact. Specifically, the processor 170 acquires a list of frequently used contact numbers (address book) stored in the memory 160. If the processor 170 determines that the sender number of the short message is not in the list of frequently used contacts, the processor 170 determines that the short message is a target type of short message.
  • the processor 170 acquires a list of frequently used contact numbers (address book) stored in the memory 160. If the processor 170 determines that the sender number of the short message is not in the list of frequently used contacts, the processor 170 determines that the short message is a target type of short message.
  • the terminal device generates the verification information, where the verification information includes the summary information and the identifier information, where the identifier information is used to identify the terminal device;
  • the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the short message, and account information of the user.
  • the account information of the user may be the account information of the user logging in to the server through the terminal device, or the account information of the user may be the user ID of the user logging in to the payment application.
  • the terminal device sends the verification information to the first server, where the first server is the server that sends the message that is determined by the terminal device.
  • the processor 170 transmits the verification information to the first server via the RF circuit 110.
  • the first server identifies the short message sent to the terminal according to the identification information in the verification information, and calculates the hash value 2 of the short message.
  • the first party server determines that the short message received by the terminal device originates from the first server, that is, the terminal device receives The incoming SMS is a legitimate SMS.
  • the first server is a sending server of the message that the terminal device considers, but in fact, the first server may be the sending server of the message, or may not be the sending server of the message. For example, in the case where the message is transmitted by the pseudo base station to the terminal device, the first server is not the transmitting server of the message.
  • the first server may refer to a background server related to user privacy and/or property, for example, the first server is a background server corresponding to the payment application, a background server of the bank, a background server of the operator, a background server of the financial platform, and the like. .
  • the processor 170 in the terminal device determines the first server by parsing the short message content, and then sends the verification information to the first server.
  • the content of the text message received by the terminal device is "We will help you on the way forward, and you will be able to apply for the "Lightning Loan” application for the amount of 11000.00 yuan (whether or not the loan is subject to final approval). As low as 1.80, it is valid until December 31. [China Merchants Bank].
  • the processor 170 parses the content of the short message and finds that the short message includes “China Merchants Bank”, and the processor 170 determines that the first server should be the background server of the China Merchants Bank, and the terminal device sends the short message to the background server of the China Merchants Bank through the RF circuit 110. Verify the package.
  • the processor 170 determines the first server based on the short message sender number.
  • the content of the short message received by the terminal device is “You pass the bank card with the tail number 3578”, and the bank transfer of the agricultural bank with the tail number of 1346 fails. The transfer amount will be returned within one hour. For your account, you can call 95599 for details, and the processor 170 determines the short The sender's number of the letter is the customer service number of the Agricultural Bank. Therefore, the processor 170 determines that the first server is the background server of the Agricultural Bank, and the terminal device sends the SMS verification packet to the background server of the Agricultural Bank through the RF circuit 110.
  • the terminal device receives the verification result that is determined by the first server according to the verification information, and the verification result is used to indicate whether the short message is legal.
  • the processor 170 performs a marking process on the short message. For example, when the short message is displayed on the display unit 130, the short message is displayed at the same time as illegal or illegal. For example, when the processor 170 determines that the short message is an illegal short message according to the short message verification result, the prompt information of the “received short message is a spam message from the pseudo base station” is displayed on the display unit 130, so that the user can clearly know the short message.
  • the source, and thus the corresponding processing to ensure the information security of the terminal device, to avoid the user being defrauded.
  • the processor 170 determines that the short message is invalid according to the verification result, when the short message is displayed on the display unit 130, only the short message content is displayed, and the identifier of the short message sender is not displayed.
  • FIG. 4 illustrates a method for verifying the legitimacy of a message according to another embodiment of the present application. As shown in FIG. 4, the method 300 includes:
  • S301 The terminal device performs key agreement with the second server, and the second server performs key negotiation with the first server.
  • the second server refers to a server of the terminal device manufacturer.
  • the terminal device is a Huawei mobile phone
  • the second server is a Huawei server.
  • the process of performing key agreement between the terminal device and the second server may include the following steps:
  • the terminal device transmits the identity of the terminal device to the second server through the RF circuit 110.
  • the second server sends the public parameter used in the key negotiation process and the second server identifier to the terminal device, where the public parameter refers to the key negotiation process, and the backup is retained on the terminal device and the second server, and
  • the parameters with the same value in the backups retained by the two include system feature values, coefficient bases, and hash functions.
  • the processor 170 of the terminal device calculates the private key of the terminal device according to the public parameter and the identifier of the terminal device, calculates the second server public key according to the public parameter and the second server identifier, and passes the encrypted second server public key to the RF circuit 110.
  • the second server calculates the second server private key according to the public parameter and the second server identifier, calculates the terminal device public key according to the public parameter and the identifier of the terminal device, and sends the encrypted terminal device public key to the terminal device.
  • the processor 170 of the terminal device calculates the terminal device verification value according to the encrypted terminal device public key and the pseudo random code of the terminal device by bilinear mapping, where the terminal device verification value is equal to the encrypted terminal device public key. And the product of the mapping value obtained by performing the two-line mapping of the terminal device private key and the pseudo random code of the terminal device.
  • the second server calculates a second server verification value according to the encrypted second server public key and the second server pseudo random code through a bilinear mapping, wherein the second server verification value is equal to the encrypted second server public key And the product of the mapping value obtained by bilinear mapping of the second server private key and the pseudo random code of the second server.
  • the processor 170 of the terminal device determines the accuracy of the key agreement by comparing the terminal device verification value with the second server verification value.
  • the second server determines the accuracy of the key negotiation by comparing the terminal device verification value with the second server verification value.
  • the key agreement process is accurate when the processor 170 and the second server of the terminal device determine that the terminal device verification value is the same as the second server verification value.
  • the terminal device communicates with the second server, the information is encrypted by using the key calculated in the above key negotiation process. For example, the terminal device encrypts the information to be sent to the second server by using the public key of the second server.
  • the second server decrypts the information sent by the terminal device by using its own private key.
  • the key negotiation between the second server and the first server may be the same as the method for the key negotiation between the terminal device and the second server.
  • the second server encrypts the information to be sent to the first server by using the public key of the first server, and correspondingly, the first server uses the private key of the first server to receive the second server. The information sent is decrypted.
  • the terminal device receives the short message.
  • the terminal device performs hash processing on the received short message.
  • the processor 170 of the terminal device performs a hash calculation on the short message and obtains a hash value of one.
  • the processor 170 may perform a hash calculation on the short message directly, and the processor 170 may first determine whether the short message is a target type short message, and when the short message is determined to be a target type short message, the short message is hashed.
  • the method for the processor 170 to determine whether the short message is the target type of the short message is the same as the implementation method of the method S200 in the method 200. For brevity, details are not described herein again.
  • S304 The terminal device acquires the identifier information, and generates the verification information, where the verification information includes the identifier information and the hash value obtained in S303.
  • the identification information may be any information that can be uniquely indexed to the terminal device and to a particular user.
  • the identification information includes the ID of the terminal device, the current mobile phone number, the sending time of the short message, or the account information of the user.
  • the account information of the user may be the account information of the user logging in to the second server through the terminal device, or the account information of the user may be the user ID of the user logging in to the payment application.
  • the terminal device encrypts the verification information, and sends the verification information to the second server.
  • the processor 170 of the terminal device encrypts the authentication information by using the public key of the second server generated in the key negotiation process in S301, and then transmits the verification information to the second server through the RF circuit 110.
  • the second server decrypts the received verification information, confirms that the verification information is from a legal terminal device, and encrypts the verification information.
  • the second server decrypts the verification information by using its own private key. If the decryption is successful, the second server determines that the terminal device is a legitimate terminal device. Or the second server can successfully decrypt the verification information, and the verification information has a specific format, and the second server determines that the terminal device is a legitimate terminal device.
  • the terminal device is legally understood as a terminal device that is authenticated by the second server.
  • the second server sends the encrypted verification information and the signature of the second server to the first server.
  • the second server determines, according to the sender number of the short message, that the server that sends the short message is the first server, and uses the public key of the first server determined according to the key negotiation process in S301 to encrypt the verification information and join the signature of the second server. Sent to the first server.
  • the signature of the second server is sent to the first server for informing the sender of the first server to verify the information and the verification information has been verified by the second server to originate from the legal terminal device.
  • the first server is the sending server of the message that the second server considers, but in fact, the first server may be the sending server of the message, or may not be the sending server of the message.
  • the first server is not the transmitting server of the message.
  • the first server decrypts the received verification information.
  • the first server decrypts using the received verification information sent by the second server corresponding to its own private key.
  • the first server verifies whether the short message is legal according to the verification information.
  • the first server determines, according to the identification information in the verification information, whether there is a short message sent to the terminal device, and when the third-party server determines that the short message is not sent to the terminal device, the first The server can directly determine that the short message received by the terminal device is illegal.
  • the first server determines that there is a short message sent to the terminal device according to the identification information
  • the first server performs a hash calculation on the short message to obtain a hash value of 2. After that, the first server compares the hash value 2 with the hash value 1. If the hash value 2 matches the hash value 1, it is confirmed that the short message received by the terminal device is indeed from the first server, that is, the terminal.
  • the SMS received by the device is a legitimate SMS.
  • the first server sends the verification result to the second server.
  • the second server sends the verification result to the terminal device.
  • the terminal device receives the verification result sent by the second server.
  • the terminal device performs marking processing on the short message according to the verification result.
  • the processor 170 performs a marking process on the short message. For example, when the short message is displayed on the display unit 130, the short-time legal or illegal display is simultaneously displayed. For example, when the processor 170 determines that the short message is an illegal short message according to the verification result, the prompt information of “the received short message is a spam message from the pseudo base station” is displayed on the display unit 130, so that the user can clearly know the short message.
  • the source, and thus the corresponding processing to ensure the information security of the terminal device, to avoid the user being defrauded.
  • the processor 170 determines that the short message is invalid according to the verification result, when the short message is displayed on the display unit 130, only the short message content is displayed, and the identifier of the short message sender is not displayed.
  • FIG. 5 is a schematic block diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 10 includes: a transceiver module 11 and a processing module 12;
  • the processing module 12 is configured to determine summary information of the message received by the transceiver module
  • the processing module 12 is further configured to generate the verification information, where the verification information includes the summary information and the identifier information, where the identifier information is used to identify the terminal device;
  • the transceiver module 11 is configured to send the verification information to the first server, where the first server is a server that is sent by the processing module 12 to send the message;
  • the transceiver module 11 is further configured to receive a verification result that is sent by the first server according to the verification information, where the verification result is used to indicate whether the message is legal.
  • the terminal device After receiving the message, the terminal device according to the embodiment of the present application generates verification information related to the message, and sends the verification information to the server that sends the message determined by the terminal device, so that the server verifies whether the message is legal according to the verification information. And send the verification result to the terminal device.
  • the user can accurately determine whether the message is legal, prevent the user from being blinded by illegal messages, and improve the user experience.
  • the transceiver module 11 is specifically configured to: send the verification information to the second server, so that the second server sends the verification information to the first server.
  • the transceiver module 11 is specifically configured to: receive the verification result that is forwarded by the first server by using the second server.
  • the processing module 12 is further configured to: before the sending and receiving module 11 sends the verification information to the second server, encrypt the verification information by using a first key, where The first key corresponds to a second key, and the second key is a key used by the second server to decrypt the verification information encrypted by using the first key.
  • the processing module 12 is further configured to: according to the verification result, indicate whether the message is legal.
  • the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the message, and an account of the user. information.
  • the summary information is a hash value.
  • the processing module 12 is further configured to: determine that the message is a target class message, and the target class message is Content related to the user's privacy and/or property.
  • the terminal device 10 herein is embodied in the form of a functional module.
  • module may refer to an application specific integrated circuit ("ASIC"), an electronic circuit, a processor for executing one or more software or firmware programs (eg, a shared processor, a proprietary A processor or group processor, etc.) and memory, merge logic, and/or other suitable components that support the functions described.
  • ASIC application specific integrated circuit
  • the terminal device 10 may be used to perform various processes and/or steps in the method 200 or 300 in the foregoing method embodiments. To avoid repetition, details are not described herein again.
  • FIG. 6 shows a server according to an embodiment of the present application.
  • the server 20 includes Transceiver module 21, processing module 22;
  • the transceiver module 21 is configured to receive the verification information sent by the terminal device, where the verification information includes digest information and identifier information, where the digest information corresponds to the message received by the terminal device, The identification information is used to identify the terminal device;
  • the transceiver module 21 is further configured to send the verification information to the first server, where the first server is a server that is sent by the server to send the message, so that the first server determines according to the verification information. After the message is legal, the terminal device sends a verification result indicating whether the message is legal.
  • the server according to the embodiment of the present application sends the verification information to the first server that is sent by the first server to send the message according to the received verification information sent by the terminal device, so that the first server verifies the message according to the verification information.
  • the verification result is sent to the terminal device. Therefore, the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
  • the processing module 22 is configured to: determine that the terminal device is a terminal that has been authenticated by the server. device.
  • the transceiver module 21 is further configured to: receive the verification result sent by the first server; and send the verification result to the terminal device.
  • the transceiver module 21 is specifically configured to: receive the verification information that is encrypted by the terminal device by using a first key;
  • the processing module 22 is further configured to: determine, by using the second key, the verification information that is encrypted by using the first key, to determine whether the terminal device is a terminal device that has been authenticated by the server, The second key corresponds to the first key.
  • the first identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the message, and a user. Account information.
  • the server 20 herein is embodied in the form of a functional module.
  • module may refer to an application specific integrated circuit (“ASIC"), an electronic circuit, a processor for executing one or more software or firmware programs (eg, a shared processor, a proprietary A processor or group processor, etc.) and memory, merge logic, and/or other suitable components that support the functions described.
  • ASIC application specific integrated circuit
  • the server 20 may be used to perform various processes and/or steps in the method 200 or 300 in the foregoing method embodiments. To avoid repetition, details are not described herein again.
  • FIG. 7 is a schematic block diagram of a server according to another embodiment of the present application. As shown in FIG. 7, the server 30 includes:
  • the transceiver module 31 is configured to receive the verification information sent by the terminal device, where the verification information includes the digest information and the identifier information, where the digest information is corresponding to the message received by the terminal device, where the identifier information is used to identify the Terminal device
  • the processing module 32 is configured to determine, according to the verification information, whether the message is sent to the terminal device;
  • the processing module 32 is further configured to determine whether the message is legal according to the determined result of whether the message is sent to the terminal device.
  • the transceiver module 31 is further configured to send a verification result to the terminal device, where the verification result is used to indicate whether the message is legal.
  • the server receives the verification information sent by the terminal device, and after verifying whether the message is legal according to the verification information, sends the verification result to the terminal device. This enables the user to accurately determine whether the message is legal, to prevent the user from being blinded by illegal messages, and to enhance the user experience.
  • the transceiver module 31 is specifically configured to:
  • the transceiver module 31 is specifically configured to:
  • the processing module 32 is specifically configured to: when determining to send a message to the terminal device according to the identifier information, determining, corresponding to the message sent to the terminal device, The summary information is determined to be sent to the terminal device when it is determined that the digest information corresponding to the message sent to the terminal device matches the digest information included in the verification information.
  • the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the message, and an account of the user. information.
  • the summary information is a hash value.
  • the server 30 herein is embodied in the form of functional modules.
  • module here May refer to an Application Specific Integrated Circuit (“ASIC"), an electronic circuit, a processor (eg, a shared processor, a proprietary processor, or a group processor) for executing one or more software or firmware programs. And memory, merge logic, and/or other suitable components that support the described functionality.
  • ASIC Application Specific Integrated Circuit
  • processor eg, a shared processor, a proprietary processor, or a group processor
  • memory merge logic, and/or other suitable components that support the described functionality.
  • the server 30 may be used to perform various processes and/or steps in the method 200 or 300 in the foregoing method embodiments. To avoid repetition, details are not described herein again.
  • FIG. 8 is a schematic block diagram of a terminal device according to still another embodiment of the present application.
  • the terminal device 1000 shown in FIG. 8 includes a receiver 1100, a transmitter 1200, a processor 1300, and a memory 1400.
  • the processor 1300 controls the operation of the terminal device 1000 and can be used to process signals.
  • Memory 1400 can include read only memory and random access memory and provides instructions and data to processor 1300.
  • the various components of terminal device 1000 are coupled together by a bus system 1500, which in addition to the data bus includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 1500 in the figure.
  • the processor 1300 is configured to determine summary information corresponding to the message received by the receiver 1100.
  • the processor 1300 is further configured to generate verification information, where the verification information includes the summary information and Identification information, the identifier information is used to identify the terminal device, and the sender 1200 is configured to send the verification information to the first server, where the first server sends the message determined by the processor 1300.
  • the server 1100 is configured to receive a verification result that is sent by the first server and is determined according to the verification information, where the verification result is used to indicate whether the message is legal.
  • terminal device 1000 may correspond to the terminal device 10 of the embodiment of the present application, and each unit and module in the terminal device 1000 and the other operations and/or functions described above are respectively implemented to implement the method 200 or 300.
  • the corresponding process for the sake of brevity, will not be described here.
  • the terminal device After receiving the message, the terminal device according to the embodiment of the present application generates verification information related to the message, and sends the verification information to the server that sends the message determined by the terminal device, so that the server verifies whether the message is legal according to the verification information. And send the verification result to the terminal device.
  • the user can accurately determine whether the message is legal, prevent the user from being blinded by illegal messages, and improve the user experience.
  • FIG. 9 is a schematic block diagram of a server according to still another embodiment of the present application.
  • the server 2000 shown in FIG. 9 includes a receiver 2100, a transmitter 2200, a processor 2300, and a memory 2400.
  • Processor The 2300 controls the operation of the server 2000 and can be used to process signals.
  • Memory 2400 can include read only memory and random access memory and provides instructions and data to processor 2300.
  • the various components of server 2000 are coupled together by a bus system 2500, which in addition to the data bus includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 2500 in the figure.
  • the receiver 2100 is configured to receive the verification information sent by the terminal device, where the verification information includes digest information and identification information, where the digest information corresponds to the message received by the terminal device, where The identifier information is used to identify the terminal device;
  • the sender 2200 is configured to send the verification information to the first server, where the first server is a server that is sent by the server to send the message, so as to facilitate After determining whether the message is legal according to the verification information, the first server sends a verification result to the terminal device to indicate whether the message is legal.
  • server 2000 may correspond to the server 20 in the embodiment of the present application, and each unit and module in the server 2000 and the other operations and/or functions described above are respectively implemented to implement the method 200 or 300.
  • the corresponding process for the sake of brevity, will not be described here.
  • the server according to the embodiment of the present application sends the verification information to the first server that is sent by the first server to send the message according to the received verification information sent by the terminal device, so that the first server verifies the message according to the verification information.
  • the verification result is sent to the terminal device. Therefore, the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
  • FIG. 10 is a schematic block diagram of a server according to still another embodiment of the present application.
  • the server 3000 shown in FIG. 10 includes a receiver 3100, a transmitter 3200, a processor 3300, and a memory 3400.
  • the processor 3300 controls the operation of the server 3000 and can be used to process signals.
  • Memory 3400 can include read only memory and random access memory and provides instructions and data to processor 3300.
  • the various components of server 3000 are coupled together by a bus system 3500 that includes, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 3500 in the figure.
  • the receiver 3100 receives the verification information sent by the terminal device, where the verification information includes summary information and identification information, where the summary information corresponds to the message received by the terminal device, and the identifier information is used by the identifier information.
  • the processor 3300 is configured to determine, according to the verification information, whether the message is sent to the terminal device; the processor 3300, And a method for determining whether the message is legal according to the determined result of whether the message is sent to the terminal device; the sender 3200 is configured to send a verification result to the terminal device, where the verification result is used for Indicates whether the message is legal.
  • server 3000 may correspond to the server 30 in the embodiment of the present application, and the units and modules in the server 3000 and the other operations and/or functions described above are respectively implemented to implement the method 200 or 300.
  • the corresponding process for the sake of brevity, will not be described here.
  • the server receives the verification information sent by the terminal device, and after verifying whether the message is legal according to the verification information, sends the verification result to the terminal device. This enables the user to accurately determine whether the message is legal, to prevent the user from being blinded by illegal messages, and to enhance the user experience.
  • the processor may be a central processing unit (“CPU"), and the processor may also be other general-purpose processors, digital signal processors (DSPs), and dedicated integration. Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory can include read only memory and random access memory and provides instructions and data to the processor.
  • a portion of the memory may also include a non-volatile random access memory.
  • the memory can also store information of the device type.
  • each step of the above method may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
  • 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 functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • 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: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

Provided by the present application are a method for verifying the validity of a message and a server, the method comprising: a terminal device determines summary information corresponding to a received message; the terminal devices generates verification information, the verification information comprising the summary information and identification information, the identification information being used for identifying the terminal device; the terminal device sends the verification information to a first server, the first server being a server determined by the terminal device for sending the message; and the terminal device receives a verification result sent by the first server that is determined according to the verification information, the verification result being used for indicating whether the message is valid. The present invention may help a user avoid being deceived by an invalid message and improve user experience.

Description

验证消息合法性的方法和服务器Method and server for verifying the legitimacy of a message 技术领域Technical field
本申请实施例涉及通信技术领域,并且更具体地涉及验证消息合法性的方法和服务器。Embodiments of the present application relate to the field of communication technologies, and more specifically to a method and server for verifying the legitimacy of a message.
背景技术Background technique
近年来,伪基站短信诈骗及盗取个人信息风违法行为日益猖獗,已得到政府相关管理部门和电信运行商(如移动、联通、电信等公司)的重视。“伪基站”设备主要由主机和笔记本电脑组成,通过短信群发器、短信发信机等相关设备能够搜取以其为中心、一定半径范围内的手机信息,通过伪装成运营商基站,任意冒用他人手机号码强行向用户手机发送诈骗、广告推销等短信息。例如,冒用银行或运营商等合法机构的号码在银行、商场等人流密集的地方,以各种汇款名义向一定范围内的手机发送诈骗短信息;或者,筛选出“尾数较好”的手机号,以这个号码的名义发送短信息,在其亲朋好友、同事等熟人中实施定向诈骗。对于用户来说,是很难识别出这些诈骗短信是否真的来自对应银行、运营商以及互联网服务商的短信服务器。In recent years, pseudo-base station SMS fraud and theft of personal information have become increasingly rampant, and have received the attention of relevant government management departments and telecom operators (such as mobile, China Unicom, and telecommunications companies). The "pseudo base station" device is mainly composed of a host computer and a notebook computer, and can search for mobile phone information within a certain radius within a certain radius by means of a short message group sender, a short message sender, and the like, and arbitrarily pretend to be a carrier base station, and arbitrarily Use other people's mobile phone numbers to force short messages such as fraud and advertising to the user's mobile phone. For example, fraudulent use of the number of a legitimate institution such as a bank or an operator in a crowded place such as a bank or a shopping mall, in the name of various remittances, to send a short message to a certain range of mobile phones; or, to filter out a mobile phone with a better "mantissa" No., send short messages in the name of this number, and implement targeted fraud in their acquaintances such as friends, family, and colleagues. For the user, it is difficult to identify whether these fraudulent SMS messages are actually from the SMS servers of the corresponding banks, operators and Internet service providers.
目前,对非法短信的识别是在用户终端实现的,识别方法主要是基于短信内容、黑名单或白名单等对短信进行识别,即通过识别短信内容中的风险内容以及判断短信号码是属于黑名单或者白名单,来综合地对接收到的短信进行识别。At present, the identification of the illegal short message is implemented in the user terminal, and the identification method mainly identifies the short message based on the short message content, the blacklist or the whitelist, that is, by identifying the risk content in the short message content and determining that the short message number belongs to the blacklist. Or a whitelist to comprehensively identify received text messages.
但是,现有的短信识别方法很有可能因为伪造的短信号码属于公共服务机构而被认为是白名单,或者由于诈骗短信的内容与合法短信的内容很接近而被认为是合法短信,从而无法有效的识别出诈骗短信。However, the existing short message identification method is likely to be regarded as a white list because the forged SMS number belongs to a public service organization, or is considered to be a legitimate short message because the content of the fraudulent short message is very close to the content of the legitimate short message, and thus cannot be effective. The identification of fraudulent text messages.
因此,急需一种有效的验证消息合法性的方法,避免用户被非法消息蒙蔽。Therefore, an effective method for verifying the legitimacy of messages is urgently needed to prevent users from being blinded by illegal messages.
发明内容Summary of the invention
本申请提供一种验证消息合法性的方法和服务器,使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。The present application provides a method and a server for verifying the validity of a message, so that the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
第一方面,提供了一种验证消息合法性的方法,包括:终端设备确定接收到的消息对应的摘要信息;所述终端设备生成验证信息,所述验证信息中 包括所述摘要信息和标识信息,所述标识信息用于标识所述终端设备;所述终端设备向第一服务器发送所述验证信息,所述第一服务器为所述终端设备确定的发送所述消息的服务器;所述终端设备接收所述第一服务器发送的根据所述验证信息确定的验证结果,所述验证结果用于指示所述消息是否合法。The first aspect provides a method for verifying the validity of a message, including: determining, by the terminal device, summary information corresponding to the received message; the terminal device generating verification information, where the verification information is And including the summary information and the identifier information, where the identifier information is used to identify the terminal device; the terminal device sends the verification information to a first server, where the first server sends the a server of the message; the terminal device receives the verification result determined by the first server according to the verification information, and the verification result is used to indicate whether the message is legal.
根据本申请的验证消息合法性的方法,终端设备接收到消息后,生成与消息相关的验证信息,并将验证信息发送给终端设备确定的发送所述消息的服务器,使得服务器根据验证信息验证消息是否合法,并将验证结果发送给终端设备。使得用户能够准确的判断消息的是否合法,避免用户被非法消息蒙蔽,提升用户的体验。According to the method for verifying the validity of a message according to the present application, after receiving the message, the terminal device generates verification information related to the message, and sends the verification information to the server that sends the message determined by the terminal device, so that the server verifies the message according to the verification information. Whether it is legal and sends the verification result to the terminal device. The user can accurately determine whether the message is legal, prevent the user from being blinded by illegal messages, and improve the user experience.
结合第一方面,在第一方面的一种实现方式中,所述终端设备向第一服务器发送所述验证信息,包括:所述终端设备向第二服务器发送所述验证信息,以便于所述第二服务器向所述第一服务器发送所述验证信息。With reference to the first aspect, in an implementation manner of the first aspect, the sending, by the terminal device, the verification information to the first server, includes: sending, by the terminal device, the verification information to a second server, to facilitate the The second server sends the verification information to the first server.
可选地,第二服务器采用第一服务器的公钥对验证信息进行加密,相对应的,第一服务器采用自己的私钥对接收到的验证信息进行解密。Optionally, the second server encrypts the verification information by using the public key of the first server. Correspondingly, the first server decrypts the received verification information by using its own private key.
由于终端设备与第一服务器可以通过第二服务器进行交互,能够简化终端设备与第一服务器之间的交互,简化终端设备的实现。Since the terminal device and the first server can interact through the second server, the interaction between the terminal device and the first server can be simplified, and the implementation of the terminal device is simplified.
结合第一方面及上述实现方式,在第一方面的另一种实现方式中,所述终端设备接收所述第一服务器发送的根据所述验证信息确定的验证结果,包括:所述终端设备接收所述第一服务器通过所述第二服务器转发的所述验证结果。With reference to the first aspect and the foregoing implementation manner, in another implementation manner of the first aspect, the terminal device receives the verification result that is determined by the first server and is determined according to the verification information, and includes: receiving, by the terminal device The verification result forwarded by the first server by the second server.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,在所述终端设备向第二服务器发送所述验证信息之前,所述方法还包括:所述终端设备采用第一密钥加密所述验证信息,其中,所述第一密钥与第二密钥相对应,所述第二密钥为所述第二服务器用于解密采用所述第一密钥加密后的所述验证信息的密钥。In conjunction with the first aspect and the foregoing implementation manner, in another implementation manner of the first aspect, before the sending, by the terminal device, the verification information to the second server, the method further includes: Encrypting the verification information, wherein the first key corresponds to a second key, and the second key is used by the second server to decrypt the encrypted by the first key The key of the verification information.
可选地,第一密钥为第二服务器的公钥,第二密钥为第二服务器的私钥。Optionally, the first key is a public key of the second server, and the second key is a private key of the second server.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述方法还包括:所述终端设备根据所述验证结果,标示所述消息是否合法。In conjunction with the first aspect and the foregoing implementation manner, in another implementation manner of the first aspect, the method further includes: the terminal device, according to the verification result, indicating whether the message is legal.
通过对消息的合法性进行标示,使得用户能够直观的识别出消息的合法性,提升用户的体验。 By marking the legality of the message, the user can intuitively recognize the legitimacy of the message and enhance the user experience.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。In combination with the first aspect and the foregoing implementation manner, in another implementation manner of the first aspect, the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device The sending time of the message and the account information of the user.
其中,用户的账户信息可以为用户通过终端设备登录第二服务器的账号信息,或者可以为用户登录支付类应用所使用的用户ID。The account information of the user may be the account information of the user logging in to the second server through the terminal device, or may be the user ID used by the user to log in to the payment application.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,所述摘要信息为的哈希值。In conjunction with the first aspect and the foregoing implementation manner, in another implementation manner of the first aspect, the summary information is a hash value.
结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,在所述终端设备确定所述消息的摘要信息之前,所述方法还包括:所述终端设备确定所述消息为目标类消息,所述目标类消息为内容与用户的隐私和/或财产相关的消息。In combination with the first aspect and the foregoing implementation manner, in another implementation manner of the first aspect, before the terminal device determines the digest information of the message, the method further includes: the terminal device determining the message For the target class message, the target class message is a message related to the privacy and/or property of the user.
可选地,目标类消息为支付短信、转账短信或广告短信。Optionally, the target class message is a payment short message, a transfer short message or an advertisement short message.
第二方面,提供了一种验证消息合法性的方法,包括:第二服务器接收终端设备发送的验证信息,其中,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;所述第二服务器向第一服务器发送所述验证信息,所述第一服务器为所述第二服务器确定的发送所述消息的服务器,以便于所述第一服务器根据所述验证信息确定所述消息是否合法之后,向所述终端设备发送用于指示所述消息是否合法的验证结果。The second aspect provides a method for verifying the validity of a message, where the second server receives the verification information sent by the terminal device, where the verification information includes summary information and identification information, and the summary information is related to the terminal. Corresponding to the message received by the device, the identifier information is used to identify the terminal device; the second server sends the verification information to the first server, where the first server is a sending station determined by the second server The server of the message, so that the first server determines whether the message is legal according to the verification information, and sends a verification result to the terminal device to indicate whether the message is legal.
根据本申请的验证消息合法性的方法,第一服务器根据接收到的终端设备发送的验证信息后,将验证信息发送给第一服务器确定的发送所述消息的第一服务器,使得第一服务器根据验证信息验证消息的合法性之后,将验证结果发送给终端设备。由此,使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。According to the method for verifying the validity of the message according to the present application, after the first server receives the verification information sent by the terminal device, the first server sends the verification information to the first server that is sent by the first server to send the message, so that the first server is configured according to the first server. After verifying the validity of the information verification message, the verification result is sent to the terminal device. Therefore, the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
结合第二方面,在第二方面的一种实现方式中,在所述第二服务器向第一服务器发送所述验证信息之前,所述方法还包括:所述第二服务器确定所述终端设备为经过所述第二服务器认证过的终端设备。With reference to the second aspect, in an implementation manner of the second aspect, before the sending, by the second server, the verification information to the first server, the method further includes: determining, by the second server, that the terminal device is A terminal device authenticated by the second server.
可选地,第二服务器确定所述终端设备为经过所述第二服务器认证过的终端设备,也可以理解为,第二服务器确定所述终端设备为合法的终端设备。Optionally, the second server determines that the terminal device is a terminal device that has been authenticated by the second server, and may also be understood that the second server determines that the terminal device is a legal terminal device.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述方法还包括:所述第二服务器接收所述第一服务器发送的所述验证结果; 所述第二服务器向所述终端设备发送所述验证结果。With reference to the second aspect and the foregoing implementation manner, in another implementation manner of the second aspect, the method further includes: the second server receiving the verification result sent by the first server; The second server sends the verification result to the terminal device.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述第二服务器接收所述终端设备发送的验证信息,包括:所述第二服务器接收所述终端设备采用第一密钥加密后的所述验证信息;其中,所述方法还包括:所述第二服务器根据采用第二密钥解密所述采用第一密钥加密后的所述验证信息的结果,确定所述终端设备是否为经过所述第二服务器认证过的终端设备,所述第二密钥与所述第一密钥相对应。With reference to the second aspect and the foregoing implementation manner, in another implementation manner of the second aspect, the receiving, by the second server, the verification information that is sent by the terminal device, The verification information after the first key is encrypted; wherein the method further comprises: determining, by the second server, the result of decrypting the verification information encrypted by using the first key, using the second key Whether the terminal device is a terminal device that has been authenticated by the second server, and the second key corresponds to the first key.
可选地,第一密钥为第二服务器的公钥,第二密钥为第二服务器的私钥。Optionally, the first key is a public key of the second server, and the second key is a private key of the second server.
结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。With reference to the second aspect and the foregoing implementation manner, in another implementation manner of the second aspect, the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device The sending time of the message and the account information of the user.
第三方面,提供一种验证消息合法性的方法,包括:第一服务器接收终端设备发送的验证信息,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;所述第一服务器根据所述验证信息,确定是否向所述终端设备发送过消息;所述第一服务器根据确定的是否向所述终端设备发送过所述消息的结果,确定所述消息是否合法;所述第一服务器向所述终端设备发送验证结果,所述验证结果用于指示所述消息是否合法。The third aspect provides a method for verifying the validity of a message, including: the first server receives the verification information sent by the terminal device, where the verification information includes the digest information and the identifier information, where the digest information is received by the terminal device. Corresponding to the message, the identifier information is used to identify the terminal device; the first server determines, according to the verification information, whether a message is sent to the terminal device; The terminal device sends the result of the message to determine whether the message is legal. The first server sends a verification result to the terminal device, where the verification result is used to indicate whether the message is legal.
根据本申请的验证消息合法性的方法,服务器接收终端设备发送的验证信息,并在根据验证信息验证消息是否合法之后,将验证结果发送给终端设备。使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。According to the method for verifying the legitimacy of the message according to the present application, the server receives the verification information sent by the terminal device, and after verifying whether the message is legal according to the verification information, sends the verification result to the terminal device. This enables the user to accurately determine whether the message is legal, to prevent the user from being blinded by illegal messages, and to enhance the user experience.
结合第三方面,在第三方面的一种实现方式中,所述第一服务器接收终端设备发送的验证信息,包括:所述第一服务器接收所述终端设备通过第二服务器转发的所述验证信息。With reference to the third aspect, in an implementation manner of the third aspect, the receiving, by the first server, the verification information that is sent by the terminal device, includes: the first server receiving the verification that the terminal device forwards by using the second server information.
结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,所述第一服务器向所述终端设备发送验证结果,包括:所述第一服务器向所述第二服务器发送所述验证结果,以便于所述第二服务器向所述终端设备转发所述验证结果。With the third aspect and the foregoing implementation manner, in another implementation manner of the third aspect, the sending, by the first server, the verification result to the terminal device, includes: sending, by the first server, the second server The verification result is such that the second server forwards the verification result to the terminal device.
结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,所述第一服务器根据所述验证信息,确定是否向所述终端设备发送过所述消 息,包括:当所述第一服务器根据所述标识信息,确定向所述终端设备发送过消息时,所述第一服务器确定向所述终端设备发送过的消息对应的摘要信息;当所述第一服务器确定向所述终端设备发送过的消息对应的摘要信息与所述验证信息中包括的摘要信息匹配时,所述第一服务器确定向所述终端设备发送过所述消息。With reference to the third aspect and the foregoing implementation manner, in another implementation manner of the third aspect, the first server determines, according to the verification information, whether to send the cancellation to the terminal device The information includes: when the first server determines to send a message to the terminal device according to the identifier information, the first server determines summary information corresponding to the message sent by the terminal device; When the first server determines that the digest information corresponding to the message sent by the terminal device matches the digest information included in the verification information, the first server determines to send the message to the terminal device.
可选地,当第一服务器根据标识信息确定没有向终端设备发送过任何消息时,第一服务器确定终端设备接收到的消息是不合法的。Optionally, when the first server determines, according to the identification information, that no message has been sent to the terminal device, the first server determines that the message received by the terminal device is illegal.
结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述信息的发送时间和用户的账户信息。With reference to the third aspect and the foregoing implementation manner, in another implementation manner of the third aspect, the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device , the time when the information is sent, and the account information of the user.
结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,所述摘要信息为哈希值。In conjunction with the third aspect and the foregoing implementation manner, in another implementation manner of the third aspect, the summary information is a hash value.
第四方面,提供了一种终端设备,用于执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该终端设备包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的单元。In a fourth aspect, a terminal device is provided for performing the method of any of the above first aspect or any of the possible implementations of the first aspect. In particular, the terminal device comprises means for performing the method of any of the above-described first aspect or any of the possible implementations of the first aspect.
第五方面,提供了一种服务器,用于执行上述第二方面或第二方面的任意可能的实现方式中的方法。具体地,该服务器包括用于执行上述第二方面或第二方面的任意可能的实现方式中的方法的单元。In a fifth aspect, a server is provided for performing the method of any of the above-described second aspect or any of the possible implementations of the second aspect. In particular, the server comprises means for performing the method of any of the above-described second aspect or any of the possible implementations of the second aspect.
第六方面,提供了一种服务器,用于执行上述第三方面或第三方面的任意可能的实现方式中的方法。具体地,该服务器包括用于执行上述第三方面或第三方面的任意可能的实现方式中的方法的单元。In a sixth aspect, a server is provided for performing the method of any of the above-described third aspect or any of the possible implementations of the third aspect. In particular, the server comprises means for performing the method of any of the above mentioned third or third aspects of the third aspect.
第七方面,提供了一种终端设备,包括处理器、存储器、接收器和发送器,该处理器、该存储器、该接收器和该发送器通过总线系统相连,该存储器用于存储指令,该接收器根据该处理器的控制进行接收信息,该发送器根据该处理器的控制进行发送信息,该处理器用于调用该存储器中存储的指令,执行上述第一方面或第一方面的任意可能的实现方式中的方法。According to a seventh aspect, a terminal device includes a processor, a memory, a receiver, and a transmitter, the processor, the memory, the receiver, and the transmitter are connected by a bus system, and the memory is configured to store an instruction, where The receiver receives information according to the control of the processor, and the transmitter transmits information according to the control of the processor, and the processor is configured to invoke the instruction stored in the memory to perform any of the foregoing first aspect or the first aspect. The method in the implementation.
第八方面,提供了一种服务器,包括处理器、存储器、接收器和发送器,该处理器、该存储器、该接收器和该发送器通过总线系统相连,该存储器用于存储指令,该接收器根据该处理器的控制进行接收信息,该发送器根据该处理器的控制进行发送信息,该处理器用于调用该存储器中存储的指令,执行上述第二方面或第二方面的任意可能的实现方式中的方法。 In an eighth aspect, a server is provided, including a processor, a memory, a receiver, and a transmitter, the processor, the memory, the receiver, and the transmitter are connected by a bus system, and the memory is configured to store an instruction, the receiving Receiving information according to control of the processor, the transmitter transmitting information according to control of the processor, the processor for invoking instructions stored in the memory, performing any possible implementation of the second aspect or the second aspect The method in the way.
第九方面,提供了一种服务器,包括处理器、存储器、接收器和发送器,该处理器、该存储器、该接收器和该发送器通过总线系统相连,该存储器用于存储指令,该接收器根据该处理器的控制进行接收信息,该发送器根据该处理器的控制进行发送信息,该处理器用于调用该存储器中存储的指令,执行上述第三方面或第三方面的任意可能的实现方式中的方法。In a ninth aspect, a server is provided, including a processor, a memory, a receiver, and a transmitter, the processor, the memory, the receiver, and the transmitter are connected by a bus system, and the memory is configured to store an instruction, the receiving Receiving information according to control of the processor, the transmitter transmitting information according to control of the processor, the processor for invoking instructions stored in the memory, performing any of the foregoing third aspect or any possible implementation of the third aspect The method in the way.
第十方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的指令。A tenth aspect, a computer readable medium for storing a computer program, the computer program comprising instructions for performing the method of any of the first aspect or the first aspect of the first aspect.
第十一方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行上述第二方面或第二方面的任意可能的实现方式中的指令。In an eleventh aspect, a computer readable medium is provided for storing a computer program, the computer program comprising instructions for performing any of the possible implementations of the second or second aspect described above.
第十二方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行上述第三方面或第三方面的任意可能的实现方式中的指令。According to a twelfth aspect, there is provided a computer readable medium for storing a computer program comprising instructions for performing any of the possible implementations of the third or third aspect above.
附图说明DRAWINGS
图1是本申请实施例的应用场景的示意图;FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application;
图2是根据本申请实施例的终端设备的示意性结构图;2 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
图3是根据本申请实施例的验证消息合法性的方法的示意性流程;FIG. 3 is a schematic flowchart of a method for verifying the legitimacy of a message according to an embodiment of the present application; FIG.
图4是根据本申请另一实施例的验证消息合法性的方法的示意性流程图;4 is a schematic flowchart of a method for verifying the legitimacy of a message according to another embodiment of the present application;
图5是根据本申请另一实施例的终端设备的示意性框图;FIG. 5 is a schematic block diagram of a terminal device according to another embodiment of the present application; FIG.
图6是根据本申请实施例的服务器的示意性框图;6 is a schematic block diagram of a server according to an embodiment of the present application;
图7是根据本申请另一实施例的服务器的示意性框图;FIG. 7 is a schematic block diagram of a server according to another embodiment of the present application; FIG.
图8是根据本申请再一实施例的终端设备的示意性框图;FIG. 8 is a schematic block diagram of a terminal device according to still another embodiment of the present application; FIG.
图9是根据本申请再一实施例的服务器的示意性框图;FIG. 9 is a schematic block diagram of a server according to still another embodiment of the present application; FIG.
图10是根据本申请再一实施例的服务器的示意性框图。FIG. 10 is a schematic block diagram of a server according to still another embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。 The technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments.
在本申请实施例中,终端设备(Terminal Device)也可称之为用户设备(User Device)、移动台(Mobile Station,简称为“MS”)、移动终端(Mobile Terminal)、客户端(Station,简称为“STA”)等,该终端设备可以经无线接入网(Radio Access Network,简称为“RAN”)与一个或多个核心网进行通信,例如,终端设备可以是移动电话(或称为“蜂窝”电话)、具有移动终端的计算机等,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,以及未来5G网络中的终端设备或者未来演进的PLMN网络中的终端设备等。In the embodiment of the present application, a terminal device (Terminal Device) may also be referred to as a user device (User Device), a mobile station (Mobile Station, referred to as "MS"), a mobile terminal (Mobile Terminal), and a client (Station). The terminal device can communicate with one or more core networks via a radio access network (Radio Access Network, hereinafter referred to as "RAN"). For example, the terminal device can be a mobile phone (or "Cellular" telephone, computer with mobile terminal, etc., for example, portable, pocket, handheld, computer built-in or in-vehicle mobile devices, and terminal devices in future 5G networks or in future evolved PLMN networks Terminal equipment, etc.
在本申请实施例中,基站可以是GSM系统或CDMA中的基站(Base Transceiver Station,简称为“BTS”),也可以是WCDMA系统中的基站(NodeB,简称为“NB”),还可以是LTE系统中的演进型基站(Evolutional Node B,简称为“eNB”或“eNodeB”),或者该基站可以未来5G网络中的网络设备或未来演进的PLMN网络中的网络设备等。In this embodiment, the base station may be a base station (Base Transceiver Station, abbreviated as "BTS") in the GSM system or CDMA, or a base station (NodeB, abbreviated as "NB") in the WCDMA system, or may be An evolved base station (Evolutional Node B, referred to as "eNB" or "eNodeB") in the LTE system, or the base station may be a network device in a future 5G network or a network device in a future evolved PLMN network.
图1是本申请实施例的应用场景的示意图。图1中所示的通信系统中包括基站、终端设备、第一服务器和第二服务器。第一服务器可以通过基站与终端设备之间进行信息的交互,并且终端设备与第一服务器之间可以通过第二服务器简化两者之间的交互。FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application. The communication system shown in FIG. 1 includes a base station, a terminal device, a first server, and a second server. The first server can exchange information between the base station and the terminal device, and the interaction between the terminal device and the first server can be simplified by the second server.
目前,如图1所示的,不法分子通常采用由主机和笔记本电脑组成的“伪基站”伪装成运营商基站,任意冒用他人号码向用户手机发送诈骗、广告推销等信息。由此,需要提供一种验证消息合法性的方法,避免用户被非法消息蒙蔽,提升用户的体验。At present, as shown in Figure 1, the criminals usually use a "pseudo base station" composed of a host computer and a laptop computer to disguise themselves as a carrier base station, and arbitrarily use other people's numbers to send information such as fraud, advertising, and the like to the user's mobile phone. Therefore, it is necessary to provide a method for verifying the legitimacy of a message, which prevents the user from being blinded by the illegal message and improves the user experience.
图2示出了与本申请实施例相关的终端设备的部分结构的框图。参考图2,终端设备100包括射频(Radio Frequency,简称为“RF”)电路110、输入单元120、显示单元130、传感器140、音频电路150、存储器160、处理器170以及电源180等部件。这些部件通过一条或多条通信总线或信号线进行通信。本领域技术人员可以理解,图2中示出的设备结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 2 is a block diagram showing a part of the structure of a terminal device related to an embodiment of the present application. Referring to FIG. 2, the terminal device 100 includes a radio frequency (Radio Frequency, abbreviated as "RF") circuit 110, an input unit 120, a display unit 130, a sensor 140, an audio circuit 150, a memory 160, a processor 170, and a power source 180. These components communicate over one or more communication buses or signal lines. It will be understood by those skilled in the art that the device structure shown in FIG. 2 does not constitute a limitation to the terminal device, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
下面结合图2对终端设备100的各个构成部件进行具体的介绍:The components of the terminal device 100 will be specifically described below with reference to FIG. 2:
RF电路110可用于收发信息或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,给处理器170处理;另外,将涉及上行的数据发 送给基站。通常,RF电路110包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,简称为“LNA”)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。The RF circuit 110 can be used for receiving and transmitting signals during transmission and reception or during a call, in particular, after receiving the downlink information of the base station, and processing it to the processor 170; Send to the base station. Generally, the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 110 can also communicate with the network and other devices via wireless communication.
其中,网络诸如是互联网(也被称为万维网(World Wide Web,简称为“WWW”))、内联网和/或无线网络(诸如蜂窝电话网络、无线局域网(Wireless Local Area Network,简称为“WLAN”)和/或城域网(Metropolitan Area Network,简称为“MAN”)。无线通信可使用多种通信标准、协议和技术中的任何类型,包括但不限于GSM系统、增强数据GSM环境(EDGE)、高速下行链路分组接入(HSDPA)、高速上行链路分组接入(HSUPA)、WCDMA、CDMA、时分多址(TDMA)、LTE、蓝牙、WiFi(例如,IEEE 802.11a、IEEE 802.11b、IEEE 802.11g和/或IEEE 802.11n)、因特网语音协议(VoIP)、Wi-MAX、电子邮件协议(例如,因特网消息访问协议(IMAP)和/或邮局协议(POP))、即时消息(例如,可扩展消息处理现场协议(XMPP)、用于即时消息和现场利用扩展的会话发起协议(SIMPLE)、即时消息和到场服务(IMPS))、和/或短消息服务(SMS)、或者其他任何适当的通信协议,包括在本申请提交日还未开发出的通信协议。The network is, for example, the Internet (also known as the World Wide Web (WWW)), an intranet, and/or a wireless network (such as a cellular telephone network, a wireless local area network (Wireless Local Area Network, WLAN for short). ") and / or Metropolitan Area Network ("MAN"). Wireless communication can use any of a variety of communication standards, protocols and technologies, including but not limited to GSM systems, enhanced data GSM environment (EDGE ), High Speed Downlink Packet Access (HSDPA), High Speed Uplink Packet Access (HSUPA), WCDMA, CDMA, Time Division Multiple Access (TDMA), LTE, Bluetooth, WiFi (eg, IEEE 802.11a, IEEE 802.11b) , IEEE 802.11g and/or IEEE 802.11n), Voice over Internet Protocol (VoIP), Wi-MAX, email protocols (eg, Internet Message Access Protocol (IMAP) and/or Post Office Protocol (POP)), instant messaging (eg , Extensible Messaging Processing Site Protocol (XMPP), Session Initiation Protocol (SIMPLE) for Instant Messaging and Field Utilization Extensions, Instant Messaging and Presence Service (IMPS), and/or Short Message Service (SMS), or whatever appropriate Communication protocols, including the submission date has not yet developed a communication protocol in this application.
存储器160可用于存储软件程序以及模块,处理器170通过运行存储在存储器160的软件程序以及模块,从而执行终端设备的各种功能应用以及数据处理。存储器160可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据无线通信设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器160可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 160 can be used to store software programs and modules, and the processor 170 executes various functional applications and data processing of the terminal devices by running software programs and modules stored in the memory 160. The memory 160 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of wireless communication devices (such as audio data, phone books, etc.). Moreover, memory 160 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元120可用于接收输入的手势信息、数字或字符信息,以及产生与终端设备100的用户设置以及功能控制有关的键信号输入。具体地,输入单元120可包括触摸屏以及其他输入设备。触摸屏可收集用户在其上或附近的触控操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏上或在触摸屏附近的操作),并根据预先设定的程式驱动相应的连接装置。除了触摸屏,输入单元120还可以包括其他输入设备。具体地,其他输入设备包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹 球、鼠标、操作杆等中的一种或多种。The input unit 120 can be configured to receive input gesture information, digital or character information, and generate key signal input related to user settings and function control of the terminal device 100. In particular, the input unit 120 can include a touch screen as well as other input devices. The touch screen can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch screen or near the touch screen), and drive the corresponding connection according to a preset program. Device. In addition to the touch screen, the input unit 120 may also include other input devices. Specifically, other input devices include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), tracks One or more of a ball, a mouse, a lever, and the like.
显示单元130可用于显示由用户输入的信息或提供给用户的信息以及无线通信设备的各种菜单。显示单元130可包括显示屏,可选的,可以采用液晶显示器(Liquid Crystal Display,简称为“LCD”)、有机发光二极管(Organic Light Emitting Diode,简称为“OLED”)等形式来配置显示屏。虽然在图2中,触摸屏与显示屏是作为两个独立的部件来实现无线通信设备的输入和输入功能,但是在某些实施例中,可以将触摸屏与显示屏集成而实现无线通信设备的输入和输出功能。The display unit 130 can be used to display information input by the user or information provided to the user as well as various menus of the wireless communication device. The display unit 130 may include a display screen. Alternatively, the display screen may be configured in the form of a liquid crystal display ("LCD") or an organic light emitting diode (OLED). Although in FIG. 2, the touch screen and the display screen are two separate components to implement the input and input functions of the wireless communication device, in some embodiments, the input of the wireless communication device can be implemented by integrating the touch screen with the display screen. And output function.
终端设备100还可包括至少一种传感器140,比如电容式传感器、光传感器、运动传感器以及其他传感器。光传感器可包括环境光传感器及接近传感器。接近传感器可用于检测是否有物体接近无线通信设备。电容式传感器可用于检测是否有能够引起电容值改变的物体(例如人体或动物)接近无线通信设备。The terminal device 100 may also include at least one type of sensor 140, such as a capacitive sensor, a light sensor, a motion sensor, and other sensors. The light sensor can include an ambient light sensor and a proximity sensor. Proximity sensors can be used to detect if an object is in proximity to the wireless communication device. Capacitive sensors can be used to detect if an object (such as a human or animal) capable of causing a change in capacitance value is in proximity to the wireless communication device.
音频电路150、扬声器以及传声器可提供用户与终端设备之间的音频接口。音频电路150可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路150接收后转换为音频数据,再将音频数据输出处理器170处理后,经RF电路110以发送给比如另一无线通信设备,或者将音频数据输出至存储器170以便进一步处理。The audio circuit 150, the speaker, and the microphone can provide an audio interface between the user and the terminal device. The audio circuit 150 can transmit the converted electrical signal of the received audio data to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 150 and then converted. The audio data is processed by the audio data output processor 170, transmitted via the RF circuit 110 to, for example, another wireless communication device, or the audio data is output to the memory 170 for further processing.
处理器170是终端设备的控制中心,利用各种接口和线路连接整个无线通信设备的各个部分,通过运行或执行存储在存储器160内的软件程序和/或模块,以及调用存储在存储器160内的数据,执行无线通信设备的各种功能和处理数据,从而对无线通信设备进行整体监控。可选的,处理器170包括应用处理器(Application Processer)和调制解调处理器(Modem Processer)。其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器和调制解调处理器可以集成为同一处理器,也可以是分离的相互独立的处理器。该处理器170可以是中央处理单元(Central Processing Unit,简称为“CPU”),还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是 任何常规的处理器等。可以理解的是,上述处理器170和存储器160可以集成在同一芯片中,也可以是分离的相互独立的芯片。The processor 170 is a control center of the terminal device that connects various portions of the entire wireless communication device using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 160, and recalling stored in the memory 160. The data, performing various functions and processing data of the wireless communication device, thereby performing overall monitoring of the wireless communication device. Optionally, the processor 170 includes an application processor (Application Processer) and a modem processor (Modem Processer). The application processor mainly processes an operating system, a user interface, an application, and the like, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor and modem processor can be integrated into the same processor, or can be separate and independent processors. The processor 170 can be a central processing unit ("CPU"), and can also be other general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), and off-the-shelf programmable gate arrays ( FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general purpose processor may be a microprocessor or the processor may also be Any conventional processor, etc. It can be understood that the foregoing processor 170 and the memory 160 may be integrated in the same chip, or may be separate and independent chips.
终端设备100还包括给各个部件供电的电源180(比如电池),优选的,电源可以通过电源管理系统与处理器170逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The terminal device 100 further includes a power source 180 (such as a battery) for supplying power to the various components. Preferably, the power source can be logically connected to the processor 170 through the power management system to manage functions such as charging, discharging, and power management through the power management system. .
尽管未示出,终端设备100还可以包括摄像头、GPS通信模块、蓝牙通信模块等,在此不再赘述。Although not shown, the terminal device 100 may further include a camera, a GPS communication module, a Bluetooth communication module, and the like, and details are not described herein.
需要说明的是,本申请实施例中终端设备接收到的消息包括但不限于短信和聊天类软件(例如,微信,QQ)收到的消息。下面将以消息为短信为例,结合图2中示出的终端设备100描述根据本申请实施例的验证消息合法性的方法。如图3所示,方法200包括:It should be noted that the message received by the terminal device in the embodiment of the present application includes, but is not limited to, a message received by a short message and a chat type software (for example, WeChat, QQ). A method for verifying the legitimacy of a message according to an embodiment of the present application will be described below with the message as a short message as an example. As shown in FIG. 3, method 200 includes:
S210,终端设备确定接收到的短信对应的摘要信息;S210. The terminal device determines summary information corresponding to the received short message.
终端设备的RF电路110接收到短信后,将短信交给处理器170,由处理器170确定短信的摘要信息。After receiving the short message, the RF circuit 110 of the terminal device delivers the short message to the processor 170, and the processor 170 determines the summary information of the short message.
需要说明的是,摘要信息或者简称为“摘要”指的是一个唯一对应这个短信的固定长度的值。可选地,它是由一个单向哈希(Hash)加密函数对短信进行作用而产生。采用单向Hash函数将需要加密的明文“摘要”成一串128bit的密文,这一串密文也称为数字指纹(Finger Print),它有固定的长度,且不同的明文摘要成密文,其结果总是不同的,而同样的明文其摘要必定一致。这样摘要便可以成为验证明文是否是“真身”的“指纹”了。所以如果短信在途中改变了,接收者通过对接收到短信的新摘要与原摘要进行比较,就可以知道短信是否改变了。因此短信的摘要保证了短信的完整性。It should be noted that the summary information or simply “summary” refers to a fixed length value that uniquely corresponds to the short message. Optionally, it is generated by a one-way hash function that acts on the short message. The one-way hash function is used to "snap" the plaintext that needs to be encrypted into a string of 128-bit ciphertext. This ciphertext is also called a fingerprint (Finger Print), which has a fixed length, and different plaintexts are ciphered. The results are always different, and the same plain text must have the same summary. This summary can be used as a "fingerprint" to verify that the plaintext is "real". So if the text message changes on the way, the receiver can know whether the text message has changed by comparing the new digest received with the original digest with the original digest. Therefore, the summary of the SMS guarantees the integrity of the SMS.
具体地,在一些实施例中,处理器170对短信进行Hash处理,通过哈希计算得到哈希值1。Specifically, in some embodiments, the processor 170 performs hash processing on the short message and obtains a hash value of 1 by hash calculation.
可以理解的是,终端设备通过RF电路110接收到基站发送的短信。这里的基站可能是运营商基站,也有可能是“伪基站”,并且RF电路110接收到的短信可以分为多种类型,例如,可以将短信分为通讯传言类短信、宣传服务类短信、消遣娱乐类短信、与用户的隐私和/或财产相关类短信等。It can be understood that the terminal device receives the short message sent by the base station through the RF circuit 110. The base station here may be a carrier base station, or may be a “pseudo base station”, and the short messages received by the RF circuit 110 may be classified into multiple types. For example, the short message may be classified into a communication rumor type message, a promotion service type message, and a pastime. Entertainment text messages, text messages related to users' privacy and/or property, etc.
可选地,RF电路110接收到一条短信后,处理器170判断短信是否为目标类短信,这里目标类短信指的是短信的内容与用户的隐私和/或财产相关的短信,也即上文中的与用户的隐私和/或财产相关类短信,举例来说,目标 类短信例如可以是支付短信、转账短信、广告短信等。当处理器170判断短信为目标类短信时,执行方法200的步骤。Optionally, after the RF circuit 110 receives a short message, the processor 170 determines whether the short message is a target type short message, where the target type short message refers to the short message content and the user's privacy and/or property related short message, that is, the above Similar to the user's privacy and/or property related text messages, for example, goals The class message may be, for example, a payment text message, a transfer message, an advertisement message, or the like. When the processor 170 determines that the short message is a target type short message, the steps of the method 200 are performed.
具体地,在一些实施例中,处理器170对短信内容进行解析,当确定短信中包括统一资源定位符(Uniform Resource Locator,简称为“URL”)和/或预设关键字时,处理器170确定短信为目标类短信。Specifically, in some embodiments, the processor 170 parses the short message content. When it is determined that the short message includes a Uniform Resource Locator ("URL") and/or a preset keyword, the processor 170 Make sure the SMS is the target class SMS.
例如,短信的内容为“您尾号为1234的信用卡11日23:11消费人民币1000元,领100元还款金,手慢无→cmbtcn/mZm”,由于短信内容中包含URL,所以处理器170确定短信为疑似不合法短信。或者,短信内容中包括转账、支付、交易、xx远、下载、验证码等于用户财产安全和隐私安全相关的风险较高的预设关键字时,处理器170确定短信为目标类短信。例如,目标类短信的内容为“您通过尾号为“2356”的信用卡向张**,建设银行的尾号为4567的卡转账失败,转账金额会在一个小时内返还到您的账户,可致电95533了解详情”。For example, the content of the short message is "Your credit card with a tail number of 1234 on the 11th, 23:11 consumption of 1000 yuan, 100 yuan repayment, hand slow no → cmbtcn / mZm", because the message contains URL, the processor 170 Make sure the text message is a suspected illegal text message. Alternatively, when the short message content includes a transfer, payment, transaction, xx far, download, verification code equal to a user's property security and privacy security related to a higher risk of the preset keyword, the processor 170 determines that the short message is the target type of short message. For example, the content of the target class SMS is "You pass the credit card with the ending number "2356" to Zhang**, the transfer bank's tail number 4567 card fails to transfer, and the transfer amount will be returned to your account within one hour. Call 95533 for details."
或者,处理器170确定短信的发送方号码为特服号码时,处理器170确定短信为目标类短信。Alternatively, when the processor 170 determines that the sender number of the short message is a special service number, the processor 170 determines that the short message is a target type short message.
特服号码指的是提供特殊服务的号码或者非私人号码,可以是公司或机构的业务咨询号码、售后服务号码、服务咨询号码等。例如,中国移动服务号码10086,中国电信服务号码10000,建设银行服务号码95533。例如,短信的发送方号码为95555,处理器170确定短信为目标类短信。The special service number refers to a number or a non-private number that provides a special service, and may be a business consulting number, an after-sales service number, a service consultation number, etc. of the company or institution. For example, China Mobile Service Number 10086, China Telecom Service Number 10000, Construction Bank Service Number 95533. For example, the sender number of the short message is 95555, and the processor 170 determines that the short message is a target type short message.
可选地,终端设备中的存储器160中事先存储有特服号码的列表,在RF电路110接收到短信后,处理器170可以通过本地查询确定短信发送方的号码是否为特服号码。处理器170还可以事先获取特服类号码目录或者规则,通过获取到的特服类号码目录或者规则在本地进行查询,确定短信发送方的号码是否为特服号码。处理器170还可以控制RF电路110与云端服务器进行交互,确定短信发送方的号码是否为特服号码。Optionally, the memory 160 in the terminal device stores a list of special service numbers in advance. After the RF circuit 110 receives the short message, the processor 170 may determine whether the number of the short message sender is a special service number through a local query. The processor 170 may also obtain a special service number directory or a rule in advance, and perform local inquiry through the obtained special service number directory or rule to determine whether the number of the short message sender is a special service number. The processor 170 can also control the RF circuit 110 to interact with the cloud server to determine whether the number of the sender of the short message is a special service number.
或者,处理器170确定短信的发送方号码不是常用联系人的手机号码时,确定短信为目标类短信。具体地,处理器170获取存储器160中存储的常用联系人号码列表(通讯录),如果处理器170确定短信的发送方号码不在常用联系人号码列表中,处理器170确定短信为目标类短信。Alternatively, when the processor 170 determines that the sender number of the short message is not the mobile phone number of the common contact, the processor determines that the short message is the target type short message. Specifically, the processor 170 acquires a list of frequently used contact numbers (address book) stored in the memory 160. If the processor 170 determines that the sender number of the short message is not in the list of frequently used contacts, the processor 170 determines that the short message is a target type of short message.
S220,终端设备生成验证信息,验证信息中包括摘要信息和标识信息,标识信息用于标识该终端设备; S220, the terminal device generates the verification information, where the verification information includes the summary information and the identifier information, where the identifier information is used to identify the terminal device;
可选地,作为一个例子,标识信息包括下列信息中的至少一种:终端设备的标识ID、终端设备的手机号码、短信的发送时间和用户的账号信息等信息。Optionally, as an example, the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the short message, and account information of the user.
上述的用户的账号信息可以为用户通过终端设备登录服务器的账号信息,或者上述的用户的账号信息可以为用户登录支付类应用的用户ID。The account information of the user may be the account information of the user logging in to the server through the terminal device, or the account information of the user may be the user ID of the user logging in to the payment application.
S230,终端设备向第一服务器发送验证信息,第一服务器为终端设备确定的发送所述消息的服务器;S230: The terminal device sends the verification information to the first server, where the first server is the server that sends the message that is determined by the terminal device.
具体地,在一些实施例中,处理器170将验证信息通过RF电路110发送给第一服务器。第一服务器根据验证信息中的标识信息识别出发送给终端的短信,计算短信的哈希值2。当第一服务器计算出的哈希值2与S210中计算出的哈希值1相匹配时,第一方服务器确定终端设备接收到的短信来源于该第一服务器,也就是说,终端设备接收到的短信是合法的短信。Specifically, in some embodiments, the processor 170 transmits the verification information to the first server via the RF circuit 110. The first server identifies the short message sent to the terminal according to the identification information in the verification information, and calculates the hash value 2 of the short message. When the hash value 2 calculated by the first server matches the hash value 1 calculated in S210, the first party server determines that the short message received by the terminal device originates from the first server, that is, the terminal device receives The incoming SMS is a legitimate SMS.
可以理解的是,第一服务器是终端设备认为的所述消息的发送服务器,但实际上第一服务器可能是所述消息的发送服务器,也可能不是所述消息的发送服务器。例如,在所述消息是由伪基站发送给终端设备的情况下,第一服务器不是所述消息的发送服务器。It can be understood that the first server is a sending server of the message that the terminal device considers, but in fact, the first server may be the sending server of the message, or may not be the sending server of the message. For example, in the case where the message is transmitted by the pseudo base station to the terminal device, the first server is not the transmitting server of the message.
上述的第一服务器可以是指与用户隐私和/或财产相关的后台服务器,例如,第一服务器为支付应用对应的后台服务器、银行的后台服务器、运营商的后台服务器、金融平台的后台服务器等。The first server may refer to a background server related to user privacy and/or property, for example, the first server is a background server corresponding to the payment application, a background server of the bank, a background server of the operator, a background server of the financial platform, and the like. .
可选地,作为一个例子,终端设备中的处理器170通过对短信内容进行解析,确定第一服务器,之后将验证信息发送给该第一服务器。Optionally, as an example, the processor 170 in the terminal device determines the first server by parsing the short message content, and then sends the verification information to the first server.
举例来说,终端设备接收到的短信的内容为“您前进路上我们助您一臂之力,特为您配置金额为11000.00元的“闪电贷”申请资格(是否获贷以最终审批为准),日息低至万分之1.80,有效期至12月31日。[招商银行]”。处理器170通过对短信内容进行解析,发现短信中包括“招商银行”,则处理器170确定第一服务器应该为招商银行的后台服务器,则终端设备通过RF电路110向招商银行的后台服务器发送短信验证包。For example, the content of the text message received by the terminal device is "We will help you on the way forward, and you will be able to apply for the "Lightning Loan" application for the amount of 11000.00 yuan (whether or not the loan is subject to final approval). As low as 1.80, it is valid until December 31. [China Merchants Bank]. The processor 170 parses the content of the short message and finds that the short message includes “China Merchants Bank”, and the processor 170 determines that the first server should be the background server of the China Merchants Bank, and the terminal device sends the short message to the background server of the China Merchants Bank through the RF circuit 110. Verify the package.
或者,处理器170根据短信发送方号码,确定第一服务器。Alternatively, the processor 170 determines the first server based on the short message sender number.
举例来说,终端设备接收到的短信的内容为“您通过尾号为3578”的银行卡向张**,农业银行的尾号为1346的卡转账失败,转账金额会在一个小时内返还到您的账户,可致电95599了解详情”,并且处理器170确定出短 信的发送方号码为农业银行的客服号码。因此,处理器170确定第一服务器为农业银行的后台服务器,则终端设备通过RF电路110向农业银行的后台服务器发送短信验证包。For example, the content of the short message received by the terminal device is “You pass the bank card with the tail number 3578”, and the bank transfer of the agricultural bank with the tail number of 1346 fails. The transfer amount will be returned within one hour. For your account, you can call 95599 for details, and the processor 170 determines the short The sender's number of the letter is the customer service number of the Agricultural Bank. Therefore, the processor 170 determines that the first server is the background server of the Agricultural Bank, and the terminal device sends the SMS verification packet to the background server of the Agricultural Bank through the RF circuit 110.
S240,终端设备接收第一服务器发送的根据验证信息确定的验证结果,验证结果用于指示短信是否合法。S240. The terminal device receives the verification result that is determined by the first server according to the verification information, and the verification result is used to indicate whether the short message is legal.
可选地,终端设备通过RF电路110接收到第一服务器发送的验证结果之后,处理器170对短信进行打标处理。例如,在显示单元130上显示短信时同时显示短信合法或非法。举例来说,当处理器170根据短信验证结果确定短信为非法短信时,在显示单元130上显示“接收到的短信为来自伪基站的垃圾短信”的提示信息,这样使得用户可以清楚的获知短信的来源,从而进行相应的处理,保证终端设备的信息安全,避免用户被欺诈。Optionally, after the terminal device receives the verification result sent by the first server by using the RF circuit 110, the processor 170 performs a marking process on the short message. For example, when the short message is displayed on the display unit 130, the short message is displayed at the same time as illegal or illegal. For example, when the processor 170 determines that the short message is an illegal short message according to the short message verification result, the prompt information of the “received short message is a spam message from the pseudo base station” is displayed on the display unit 130, so that the user can clearly know the short message. The source, and thus the corresponding processing, to ensure the information security of the terminal device, to avoid the user being defrauded.
或者,当处理器170根据验证结果,确定短信不合法时,在显示单元130上显示短信时,只显示短信内容,不显示短信发送者的标识。Alternatively, when the processor 170 determines that the short message is invalid according to the verification result, when the short message is displayed on the display unit 130, only the short message content is displayed, and the identifier of the short message sender is not displayed.
图4示出了根据本申请另一实施例的验证消息合法性的方法,如图4所示,方法300包括:FIG. 4 illustrates a method for verifying the legitimacy of a message according to another embodiment of the present application. As shown in FIG. 4, the method 300 includes:
S301,终端设备与第二服务器进行密钥协商,第二服务器与第一服务器进行密钥协商;S301: The terminal device performs key agreement with the second server, and the second server performs key negotiation with the first server.
可选地,第二服务器指的是终端设备制造商的服务器。例如,终端设备为华为手机,则第二服务器为华为服务器。Optionally, the second server refers to a server of the terminal device manufacturer. For example, if the terminal device is a Huawei mobile phone, the second server is a Huawei server.
可选地,终端设备与第二服务器进行密钥协商的过程可以包括以下步骤:Optionally, the process of performing key agreement between the terminal device and the second server may include the following steps:
终端设备通过RF电路110将终端设备的标识发送给第二服务器。第二服务器将密钥协商过程中使用的公开参数,以及第二服务器标识发送给终端设备,这里的公开参数指的是密钥协商过程中,终端设备与第二服务器上均留存有备份,并且两者留存的备份中取值相同的参数,包括系统特征值、系数基数及哈希函数。终端设备的处理器170根据公开参数和终端设备的标识计算终端设备的私钥,根据公开参数和第二服务器标识计算第二服务器公钥,并将加密后的第二服务器公钥通过RF电路110发送给第二服务器。第二服务器根据公开参数及第二服务器标识计算第二服务器私钥,根据公开参数与终端设备的标识计算终端设备公钥,并将加密后的终端设备公钥发送给终端设备。 The terminal device transmits the identity of the terminal device to the second server through the RF circuit 110. The second server sends the public parameter used in the key negotiation process and the second server identifier to the terminal device, where the public parameter refers to the key negotiation process, and the backup is retained on the terminal device and the second server, and The parameters with the same value in the backups retained by the two include system feature values, coefficient bases, and hash functions. The processor 170 of the terminal device calculates the private key of the terminal device according to the public parameter and the identifier of the terminal device, calculates the second server public key according to the public parameter and the second server identifier, and passes the encrypted second server public key to the RF circuit 110. Send to the second server. The second server calculates the second server private key according to the public parameter and the second server identifier, calculates the terminal device public key according to the public parameter and the identifier of the terminal device, and sends the encrypted terminal device public key to the terminal device.
之后,终端设备的处理器170通过双线性映射,根据加密后的终端设备公钥以及终端设备的伪随机码计算终端设备验证值,其中,终端设备验证值等于对加密后的终端设备公钥以及终端设备私钥进行双线映射得到的映射值与终端设备的伪随机码的乘积。第二服务器通过双线性映射,根据加密后的第二服务器公钥以及第二服务器的伪随机码计算第二服务器验证值,其中,第二服务器验证值等于对加密后的第二服务器公钥及第二服务器私钥进行双线性映射得到的映射值与第二服务器的伪随机码的乘积。Afterwards, the processor 170 of the terminal device calculates the terminal device verification value according to the encrypted terminal device public key and the pseudo random code of the terminal device by bilinear mapping, where the terminal device verification value is equal to the encrypted terminal device public key. And the product of the mapping value obtained by performing the two-line mapping of the terminal device private key and the pseudo random code of the terminal device. The second server calculates a second server verification value according to the encrypted second server public key and the second server pseudo random code through a bilinear mapping, wherein the second server verification value is equal to the encrypted second server public key And the product of the mapping value obtained by bilinear mapping of the second server private key and the pseudo random code of the second server.
最后,终端设备的处理器170通过比对终端设备验证值与第二服务器验证值,判断密钥协商的准确性。第二服务器通过比对终端设备验证值与第二服务器验证值,判定密钥协商的准确性。当终端设备的处理器170和第二服务器确定终端设备验证值与第二服务器验证值相同时,密钥协商过程是准确的。之后,终端设备和第二服务器进行通信时采用上文密钥协商过程中计算出的密钥对信息进行加密。例如,终端设备采用第二服务器的公钥对要发送给第二服务器的信息进行加密,相对应的,第二服务器用自己的私钥对接收到终端设备发送过来的信息进行解密。Finally, the processor 170 of the terminal device determines the accuracy of the key agreement by comparing the terminal device verification value with the second server verification value. The second server determines the accuracy of the key negotiation by comparing the terminal device verification value with the second server verification value. The key agreement process is accurate when the processor 170 and the second server of the terminal device determine that the terminal device verification value is the same as the second server verification value. Then, when the terminal device communicates with the second server, the information is encrypted by using the key calculated in the above key negotiation process. For example, the terminal device encrypts the information to be sent to the second server by using the public key of the second server. Correspondingly, the second server decrypts the information sent by the terminal device by using its own private key.
可选地,第二服务器与第一服务器之间密钥协商可以采用与上述的终端设备与第二服务器之间密钥协商的方法相同的方法,为了简洁,在此不再赘述。同样地,密钥协商成功后,第二服务器采用第一服务器的公钥对要发送给第一服务器的信息进行加密,相对应的,第一服务器用自己的私钥对接收到的第二服务器发送过来的信息进行解密。Optionally, the key negotiation between the second server and the first server may be the same as the method for the key negotiation between the terminal device and the second server. For brevity, details are not described herein again. Similarly, after the key negotiation succeeds, the second server encrypts the information to be sent to the first server by using the public key of the first server, and correspondingly, the first server uses the private key of the first server to receive the second server. The information sent is decrypted.
需要说明的是,上述密钥协商的方法仅仅是一种示例,任何能够进行密钥协商的方法均可适用于本申请实施例。It should be noted that the foregoing method for key negotiation is only an example, and any method capable of performing key agreement can be applied to the embodiment of the present application.
S302,终端设备接收到短信;S302. The terminal device receives the short message.
S303,终端设备对接收到的短信进行哈希处理;S303. The terminal device performs hash processing on the received short message.
终端设备的处理器170对短信进行哈希计算并得到哈希值1。The processor 170 of the terminal device performs a hash calculation on the short message and obtains a hash value of one.
可选地,处理器170可以直接对短信进行哈希计算,处理器170还可以先判断短信是否是目标类短信,当确定短信为目标类短信时,再对短信进行哈希处理。处理器170判断短信是否为目标类短信的方法与方法200中的S210中的实现方法相同,为了简洁,在此不再赘述。Optionally, the processor 170 may perform a hash calculation on the short message directly, and the processor 170 may first determine whether the short message is a target type short message, and when the short message is determined to be a target type short message, the short message is hashed. The method for the processor 170 to determine whether the short message is the target type of the short message is the same as the implementation method of the method S200 in the method 200. For brevity, details are not described herein again.
S304,终端设备获取标识信息,并生成验证信息,验证信息包括标识信息与S303中得到的哈希值; S304: The terminal device acquires the identifier information, and generates the verification information, where the verification information includes the identifier information and the hash value obtained in S303.
可选地,标识信息可以是能够唯一索引到终端设备及特定用户的任何信息。例如,标识信息包括终端设备的ID、当前手机号、短信的发送时间或用户的账号信息。用户的账号信息可以为用户通过终端设备登录第二服务器的账号信息,或者用户的账号信息可以为用户登录支付类应用的用户ID。Alternatively, the identification information may be any information that can be uniquely indexed to the terminal device and to a particular user. For example, the identification information includes the ID of the terminal device, the current mobile phone number, the sending time of the short message, or the account information of the user. The account information of the user may be the account information of the user logging in to the second server through the terminal device, or the account information of the user may be the user ID of the user logging in to the payment application.
S305,终端设备对验证信息进行加密后,发送给第二服务器;S305. The terminal device encrypts the verification information, and sends the verification information to the second server.
具体地,在一些实施例中,终端设备的处理器170采用S301中密钥协商过程中生成的第二服务器的公钥对验证信息进行加密,之后通过RF电路110发送给第二服务器。Specifically, in some embodiments, the processor 170 of the terminal device encrypts the authentication information by using the public key of the second server generated in the key negotiation process in S301, and then transmits the verification information to the second server through the RF circuit 110.
S306,第二服务器解密接收到的验证信息,确认验证信息来源于合法的终端设备,对验证信息进行加密;S306. The second server decrypts the received verification information, confirms that the verification information is from a legal terminal device, and encrypts the verification information.
具体地,在一些实施例中,第二服务器接收到验证信息后,采用自己的私钥对验证信息进行解密。如果能够解密成功,第二服务器确定该终端设备为合法的终端设备。或者第二服务器能够成功解密验证信息,并且验证信息具有特定的格式,则第二服务器确定该终端设备为合法的终端设备。Specifically, in some embodiments, after receiving the verification information, the second server decrypts the verification information by using its own private key. If the decryption is successful, the second server determines that the terminal device is a legitimate terminal device. Or the second server can successfully decrypt the verification information, and the verification information has a specific format, and the second server determines that the terminal device is a legitimate terminal device.
在本申请实施例中,终端设备合法可以理解为终端设备是经过第二服务器认证过的终端设备。In the embodiment of the present application, the terminal device is legally understood as a terminal device that is authenticated by the second server.
S307,第二服务器将加密后的验证信息和第二服务器的签名发送给第一服务器;S307. The second server sends the encrypted verification information and the signature of the second server to the first server.
第二服务器根据短信的发送方号码确定发送所述短信的服务器为第一服务器,并采用根据S301中密钥协商过程中确定的第一服务器的公钥加密验证信息并连带第二服务器的签名一起发送给第一服务器。这里向第一服务器发送第二服务器的签名用于告知第一服务器验证信息的发送方以及验证信息已经经过该第二服务器验证来源于合法的终端设备。The second server determines, according to the sender number of the short message, that the server that sends the short message is the first server, and uses the public key of the first server determined according to the key negotiation process in S301 to encrypt the verification information and join the signature of the second server. Sent to the first server. Here, the signature of the second server is sent to the first server for informing the sender of the first server to verify the information and the verification information has been verified by the second server to originate from the legal terminal device.
可以理解的是,第一服务器是第二服务器认为的所述消息的发送服务器,但实际上第一服务器可能是所述消息的发送服务器,也可能不是所述消息的发送服务器。例如,在所述消息是由伪基站发送给终端设备的情况下,第一服务器不是所述消息的发送服务器。It can be understood that the first server is the sending server of the message that the second server considers, but in fact, the first server may be the sending server of the message, or may not be the sending server of the message. For example, in the case where the message is transmitted by the pseudo base station to the terminal device, the first server is not the transmitting server of the message.
S308,第一服务器解密接收到的验证信息;S308. The first server decrypts the received verification information.
第一服务器采用自己的私钥对应的接收到的第二服务器发送的验证信息进行解密。The first server decrypts using the received verification information sent by the second server corresponding to its own private key.
S309,第一服务器根据验证信息,验证短信的是否合法; S309. The first server verifies whether the short message is legal according to the verification information.
具体地,在一些实施例中,第一服务器根据验证信息中的标识信息,确定出是否有发送给该终端设备的短信,当第三方服务器确定出没有给该终端设备发送过短信时,第一服务器可以直接确定终端设备接收到的短信是不合法的。当第一服务器根据标识信息确定出有发送给该终端设备的短信时,第一服务器对该短信进行哈希计算得到哈希值2。之后,第一服务器将哈希值2与哈希值1进行比对,如果哈希值2与哈希值1相匹配,则确认终端设备收到的短信确实来源于该第一服务器,即终端设备接收到的短信是合法短信。Specifically, in some embodiments, the first server determines, according to the identification information in the verification information, whether there is a short message sent to the terminal device, and when the third-party server determines that the short message is not sent to the terminal device, the first The server can directly determine that the short message received by the terminal device is illegal. When the first server determines that there is a short message sent to the terminal device according to the identification information, the first server performs a hash calculation on the short message to obtain a hash value of 2. After that, the first server compares the hash value 2 with the hash value 1. If the hash value 2 matches the hash value 1, it is confirmed that the short message received by the terminal device is indeed from the first server, that is, the terminal. The SMS received by the device is a legitimate SMS.
S310,第一服务器向第二服务器发送验证结果;S310. The first server sends the verification result to the second server.
S311,第二服务器将验证结果发送给终端设备;S311. The second server sends the verification result to the terminal device.
S312,终端设备接收到由第二服务器发送的验证结果;S312. The terminal device receives the verification result sent by the second server.
S313,终端设备根据验证结果对短信进行打标处理。S313. The terminal device performs marking processing on the short message according to the verification result.
可选地,终端设备通过RF电路110接收到第二服务器发送的验证结果之后,处理器170对短信进行打标处理。例如,在显示单元130上显示短信时同时显示短时合法或非法。举例来说,当处理器170根据验证结果确定短信为非法短信时,在显示单元130上显示“接收到的短信为来自伪基站的垃圾短信”的提示信息,这样使得用户可以清楚的获知短信的来源,从而进行相应的处理,保证终端设备的信息安全,避免用户被欺诈。Optionally, after the terminal device receives the verification result sent by the second server by using the RF circuit 110, the processor 170 performs a marking process on the short message. For example, when the short message is displayed on the display unit 130, the short-time legal or illegal display is simultaneously displayed. For example, when the processor 170 determines that the short message is an illegal short message according to the verification result, the prompt information of “the received short message is a spam message from the pseudo base station” is displayed on the display unit 130, so that the user can clearly know the short message. The source, and thus the corresponding processing, to ensure the information security of the terminal device, to avoid the user being defrauded.
或者,当处理器170根据验证结果,确定短信不合法时,在显示单元130上显示短信时,只显示短信内容,不显示短信发送者的标识。Alternatively, when the processor 170 determines that the short message is invalid according to the verification result, when the short message is displayed on the display unit 130, only the short message content is displayed, and the identifier of the short message sender is not displayed.
以上结合图3和图4详细描述了根据本申请实施例的验证消息合法性的方法,下面将结合图5详细描述根据本申请实施例的终端设备。The method for verifying the legitimacy of a message according to an embodiment of the present application is described in detail above with reference to FIG. 3 and FIG. 4. The terminal device according to the embodiment of the present application will be described in detail below with reference to FIG.
图5示出了根据本申请实施例的终端设备的示意性框图,如图5所示,终端设备10包括:收发模块11和处理模块12;FIG. 5 is a schematic block diagram of a terminal device according to an embodiment of the present application. As shown in FIG. 5, the terminal device 10 includes: a transceiver module 11 and a processing module 12;
处理模块12,用于确定所述收发模块接收到的消息的摘要信息;The processing module 12 is configured to determine summary information of the message received by the transceiver module;
所述处理模块12,还用于生成验证信息,所述验证信息中包括所述摘要信息和标识信息,所述标识信息用于标识所述终端设备;The processing module 12 is further configured to generate the verification information, where the verification information includes the summary information and the identifier information, where the identifier information is used to identify the terminal device;
所述收发模块11,用于向第一服务器发送所述验证信息,所述第一服务器为所述处理模块12确定的发送所述消息的服务器;The transceiver module 11 is configured to send the verification information to the first server, where the first server is a server that is sent by the processing module 12 to send the message;
所述收发模块11,还还用于接收所述第一服务器发送的根据所述验证信息确定的验证结果,所述验证结果用于指示所述消息是否合法。 The transceiver module 11 is further configured to receive a verification result that is sent by the first server according to the verification information, where the verification result is used to indicate whether the message is legal.
因此,根据本申请实施例的终端设备接收到消息后,生成与消息相关的验证信息,并将验证信息发送给终端设备确定的发送所述消息的服务器,使得服务器根据验证信息验证消息是否合法,并将验证结果发送给终端设备。使得用户能够准确的判断消息的是否合法,避免用户被非法消息蒙蔽,提升用户的体验。Therefore, after receiving the message, the terminal device according to the embodiment of the present application generates verification information related to the message, and sends the verification information to the server that sends the message determined by the terminal device, so that the server verifies whether the message is legal according to the verification information. And send the verification result to the terminal device. The user can accurately determine whether the message is legal, prevent the user from being blinded by illegal messages, and improve the user experience.
在本申请实施例中,可选地,所述收发模块11具体用于:向第二服务器发送所述验证信息,以便于所述第二服务器向所述第一服务器发送所述验证信息。In the embodiment of the present application, the transceiver module 11 is specifically configured to: send the verification information to the second server, so that the second server sends the verification information to the first server.
在本申请实施例中,可选地,所述收发模块11具体用于:接收所述第一服务器通过所述第二服务器转发的所述验证结果。In the embodiment of the present application, the transceiver module 11 is specifically configured to: receive the verification result that is forwarded by the first server by using the second server.
在本申请实施例中,可选地,所述处理模块12还用于:在所述收发模块11向第二服务器发送所述验证信息之前,采用第一密钥加密所述验证信息,其中,所述第一密钥与第二密钥相对应,所述第二密钥为所述第二服务器用于解密采用所述第一密钥加密后的所述验证信息的密钥。In the embodiment of the present application, the processing module 12 is further configured to: before the sending and receiving module 11 sends the verification information to the second server, encrypt the verification information by using a first key, where The first key corresponds to a second key, and the second key is a key used by the second server to decrypt the verification information encrypted by using the first key.
在本申请实施例中,可选地,所述处理模块12还用于:根据所述验证结果,标示所述消息是否合法。In the embodiment of the present application, the processing module 12 is further configured to: according to the verification result, indicate whether the message is legal.
在本申请实施例中,可选地,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。In the embodiment of the present application, optionally, the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the message, and an account of the user. information.
在本申请实施例中,可选地,所述摘要信息为哈希值。In the embodiment of the present application, optionally, the summary information is a hash value.
在本申请实施例中,可选地,在所述处理模块12确定所述消息的摘要信息之前,所述处理模块12还用于:确定所述消息为目标类消息,所述目标类消息为内容与用户的隐私和/或财产相关的消息。In the embodiment of the present application, optionally, before the processing module 12 determines the summary information of the message, the processing module 12 is further configured to: determine that the message is a target class message, and the target class message is Content related to the user's privacy and/or property.
应理解,这里的终端设备10以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(Application Specific Integrated Circuit,简称为“ASIC”)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,终端设备10可以用于执行上述方法实施例中方法200或300中的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the terminal device 10 herein is embodied in the form of a functional module. The term "module" as used herein may refer to an application specific integrated circuit ("ASIC"), an electronic circuit, a processor for executing one or more software or firmware programs (eg, a shared processor, a proprietary A processor or group processor, etc.) and memory, merge logic, and/or other suitable components that support the functions described. In an alternative example, those skilled in the art may understand that the terminal device 10 may be used to perform various processes and/or steps in the method 200 or 300 in the foregoing method embodiments. To avoid repetition, details are not described herein again.
图6示出了根据本申请实施例的服务器,如图6所示,服务器20包括 收发模块21、处理模块22;FIG. 6 shows a server according to an embodiment of the present application. As shown in FIG. 6, the server 20 includes Transceiver module 21, processing module 22;
其中,所述收发模块21,用于接收终端设备发送的验证信息,其中,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;The transceiver module 21 is configured to receive the verification information sent by the terminal device, where the verification information includes digest information and identifier information, where the digest information corresponds to the message received by the terminal device, The identification information is used to identify the terminal device;
所述收发模块21,还用于向第一服务器发送所述验证信息,所述第一服务器为所述服务器确定的发送所述消息的服务器,以便于所述第一服务器根据所述验证信息确定所述消息是否合法之后,向所述终端设备发送用于指示所述消息是否合法的验证结果。The transceiver module 21 is further configured to send the verification information to the first server, where the first server is a server that is sent by the server to send the message, so that the first server determines according to the verification information. After the message is legal, the terminal device sends a verification result indicating whether the message is legal.
因此,根据本申请实施例的服务器根据接收到的终端设备发送的验证信息后,将验证信息发送给第一服务器确定的发送所述消息的第一服务器,使得第一服务器根据验证信息验证消息的合法性之后,将验证结果发送给终端设备。由此,使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。Therefore, the server according to the embodiment of the present application sends the verification information to the first server that is sent by the first server to send the message according to the received verification information sent by the terminal device, so that the first server verifies the message according to the verification information. After the legality, the verification result is sent to the terminal device. Therefore, the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
在本申请实施例中,可选地,在所述收发模块21向第一服务器发送所述验证信息之前,所述处理模块22用于:确定所述终端设备为经过所述服务器认证过的终端设备。In the embodiment of the present application, before the sending and receiving module 21 sends the verification information to the first server, the processing module 22 is configured to: determine that the terminal device is a terminal that has been authenticated by the server. device.
在本申请实施例中,可选地,所述收发模块21还用于:接收所述第一服务器发送的所述验证结果;向所述终端设备发送所述验证结果。In the embodiment of the present application, the transceiver module 21 is further configured to: receive the verification result sent by the first server; and send the verification result to the terminal device.
在本申请实施例中,可选地,所述收发模块21具体用于:接收所述终端设备采用第一密钥加密后的所述验证信息;In the embodiment of the present application, the transceiver module 21 is specifically configured to: receive the verification information that is encrypted by the terminal device by using a first key;
其中,所述处理模块22还用于:根据采用第二密钥解密所述采用第一密钥加密后的所述验证信息,确定所述终端设备是否为经过所述服务器认证过的终端设备,所述第二密钥与所述第一密钥相对应。The processing module 22 is further configured to: determine, by using the second key, the verification information that is encrypted by using the first key, to determine whether the terminal device is a terminal device that has been authenticated by the server, The second key corresponds to the first key.
在本申请实施例中,可选地,所述第一标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。In the embodiment of the present application, optionally, the first identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the message, and a user. Account information.
应理解,这里的服务器20以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(Application Specific Integrated Circuit,简称为“ASIC”)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理 解,服务器20可以用于执行上述方法实施例中方法200或300中的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the server 20 herein is embodied in the form of a functional module. The term "module" as used herein may refer to an application specific integrated circuit ("ASIC"), an electronic circuit, a processor for executing one or more software or firmware programs (eg, a shared processor, a proprietary A processor or group processor, etc.) and memory, merge logic, and/or other suitable components that support the functions described. In an alternative example, those skilled in the art can For example, the server 20 may be used to perform various processes and/or steps in the method 200 or 300 in the foregoing method embodiments. To avoid repetition, details are not described herein again.
图7是根据本申请另一实施例的服务器的示意性框图。如图7所示,服务器30包括:FIG. 7 is a schematic block diagram of a server according to another embodiment of the present application. As shown in FIG. 7, the server 30 includes:
收发模块31,用于接收终端设备发送的验证信息,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;The transceiver module 31 is configured to receive the verification information sent by the terminal device, where the verification information includes the digest information and the identifier information, where the digest information is corresponding to the message received by the terminal device, where the identifier information is used to identify the Terminal device
处理模块32,用于根据所述验证信息,确定是否向所述终端设备发送过所述消息;The processing module 32 is configured to determine, according to the verification information, whether the message is sent to the terminal device;
所述处理模块32,还用于根据确定的是否向所述终端设备发送过所述消息的结果,确定所述消息是否合法;The processing module 32 is further configured to determine whether the message is legal according to the determined result of whether the message is sent to the terminal device.
所述收发模块31,还用于向所述终端设备发送验证结果,所述验证结果用于指示所述消息是否合法。The transceiver module 31 is further configured to send a verification result to the terminal device, where the verification result is used to indicate whether the message is legal.
因此,根据本申请的服务器接收终端设备发送的验证信息,并在根据验证信息验证消息是否合法之后,将验证结果发送给终端设备。使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。Therefore, the server according to the present application receives the verification information sent by the terminal device, and after verifying whether the message is legal according to the verification information, sends the verification result to the terminal device. This enables the user to accurately determine whether the message is legal, to prevent the user from being blinded by illegal messages, and to enhance the user experience.
在本申请实施例中,可选地,所述收发模块31具体用于:In the embodiment of the present application, optionally, the transceiver module 31 is specifically configured to:
接收所述终端设备通过第二服务器转发的所述验证信息。Receiving the verification information that is forwarded by the terminal device through the second server.
在本申请实施例中,可选地,所述收发模块31具体用于:In the embodiment of the present application, optionally, the transceiver module 31 is specifically configured to:
向所述第二服务器发送所述验证结果,以便于所述第二服务器向所述终端设备转发所述验证结果。Sending the verification result to the second server, so that the second server forwards the verification result to the terminal device.
在本申请实施例中,可选地,所述处理模块32具体用于:当根据所述标识信息,确定向所述终端设备发送过消息时,确定向所述终端设备发送过的消息对应的摘要信息;当确定向所述终端设备发送过的消息对应的摘要信息与所述验证信息中包括的摘要信息匹配时,确定向所述终端设备发送过所述消息。In the embodiment of the present application, the processing module 32 is specifically configured to: when determining to send a message to the terminal device according to the identifier information, determining, corresponding to the message sent to the terminal device, The summary information is determined to be sent to the terminal device when it is determined that the digest information corresponding to the message sent to the terminal device matches the digest information included in the verification information.
在本申请实施例中,可选地,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。In the embodiment of the present application, optionally, the identifier information includes at least one of the following information: an identifier ID of the terminal device, a mobile phone number of the terminal device, a sending time of the message, and an account of the user. information.
在本申请实施例中,可选地,所述摘要信息为哈希值。In the embodiment of the present application, optionally, the summary information is a hash value.
应理解,这里的服务器30以功能模块的形式体现。这里的术语“模块” 可以指应用特有集成电路(Application Specific Integrated Circuit,简称为“ASIC”)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,服务器30可以用于执行上述方法实施例中方法200或300中的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the server 30 herein is embodied in the form of functional modules. The term "module" here May refer to an Application Specific Integrated Circuit ("ASIC"), an electronic circuit, a processor (eg, a shared processor, a proprietary processor, or a group processor) for executing one or more software or firmware programs. And memory, merge logic, and/or other suitable components that support the described functionality. In an alternative example, those skilled in the art may understand that the server 30 may be used to perform various processes and/or steps in the method 200 or 300 in the foregoing method embodiments. To avoid repetition, details are not described herein again.
图8是本申请再一实施例的终端设备的示意性框图。图8所示的终端设备1000包括接收器1100、发送器1200、处理器1300和存储器1400。处理器1300控制终端设备1000的操作,并可用于处理信号。存储器1400可以包括只读存储器和随机存取存储器,并向处理器1300提供指令和数据。终端设备1000的各个组件通过总线系统1500耦合在一起,其中总线系统1500除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为总线系统1500。FIG. 8 is a schematic block diagram of a terminal device according to still another embodiment of the present application. The terminal device 1000 shown in FIG. 8 includes a receiver 1100, a transmitter 1200, a processor 1300, and a memory 1400. The processor 1300 controls the operation of the terminal device 1000 and can be used to process signals. Memory 1400 can include read only memory and random access memory and provides instructions and data to processor 1300. The various components of terminal device 1000 are coupled together by a bus system 1500, which in addition to the data bus includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 1500 in the figure.
具体地,所述处理器1300,用于确定所述接收器1100接收到的消息对应的摘要信息;所述处理器1300,还用于生成验信息,所述验证信息中包括所述摘要信息和标识信息,所述标识信息用于标识所述终端设备;所述发送器1200,用于向第一服务器发送所述验证信息所述第一服务器为所述处理器1300确定的发送所述消息的服务器;所述接收器1100,用于接收所述第一服务器发送的根据所述验证信息确定的验证结果,所述验证结果用于指示所述消息是否合法。Specifically, the processor 1300 is configured to determine summary information corresponding to the message received by the receiver 1100. The processor 1300 is further configured to generate verification information, where the verification information includes the summary information and Identification information, the identifier information is used to identify the terminal device, and the sender 1200 is configured to send the verification information to the first server, where the first server sends the message determined by the processor 1300. The server 1100 is configured to receive a verification result that is sent by the first server and is determined according to the verification information, where the verification result is used to indicate whether the message is legal.
应理解,根据本申请实施例的终端设备1000可对应于本申请实施例的终端设备10,并且,终端设备1000中的各单元及模块和上述其他操作和/或功能分别为了实现方法200或300的相应流程,为了简洁,在此不再赘述。It should be understood that the terminal device 1000 according to the embodiment of the present application may correspond to the terminal device 10 of the embodiment of the present application, and each unit and module in the terminal device 1000 and the other operations and/or functions described above are respectively implemented to implement the method 200 or 300. The corresponding process, for the sake of brevity, will not be described here.
因此,根据本申请实施例的终端设备接收到消息后,生成与消息相关的验证信息,并将验证信息发送给终端设备确定的发送所述消息的服务器,使得服务器根据验证信息验证消息是否合法,并将验证结果发送给终端设备。使得用户能够准确的判断消息的是否合法,避免用户被非法消息蒙蔽,提升用户的体验。Therefore, after receiving the message, the terminal device according to the embodiment of the present application generates verification information related to the message, and sends the verification information to the server that sends the message determined by the terminal device, so that the server verifies whether the message is legal according to the verification information. And send the verification result to the terminal device. The user can accurately determine whether the message is legal, prevent the user from being blinded by illegal messages, and improve the user experience.
图9是本申请再一实施例的服务器的示意性框图。图9所示的服务器2000包括接收器2100、发送器2200、处理器2300和存储器2400。处理器 2300控制服务器2000的操作,并可用于处理信号。存储器2400可以包括只读存储器和随机存取存储器,并向处理器2300提供指令和数据。服务器2000的各个组件通过总线系统2500耦合在一起,其中总线系统2500除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为总线系统2500。FIG. 9 is a schematic block diagram of a server according to still another embodiment of the present application. The server 2000 shown in FIG. 9 includes a receiver 2100, a transmitter 2200, a processor 2300, and a memory 2400. Processor The 2300 controls the operation of the server 2000 and can be used to process signals. Memory 2400 can include read only memory and random access memory and provides instructions and data to processor 2300. The various components of server 2000 are coupled together by a bus system 2500, which in addition to the data bus includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 2500 in the figure.
具体地,所述接收器2100,用于接收终端设备发送的验证信息,其中,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;所述发送器2200,用于向第一服务器发送所述验证信息,所述第一服务器为所述服务器确定的发送所述消息的服务器,以便于所述第一服务器根据所述验证信息确定所述消息是否合法之后,向所述终端设备发送用于指示所述消息是否合法的验证结果。Specifically, the receiver 2100 is configured to receive the verification information sent by the terminal device, where the verification information includes digest information and identification information, where the digest information corresponds to the message received by the terminal device, where The identifier information is used to identify the terminal device; the sender 2200 is configured to send the verification information to the first server, where the first server is a server that is sent by the server to send the message, so as to facilitate After determining whether the message is legal according to the verification information, the first server sends a verification result to the terminal device to indicate whether the message is legal.
应理解,根据本申请实施例的服务器2000可对应于本申请实施例的中的服务器20,并且,服务器2000中的各单元及模块和上述其他操作和/或功能分别为了实现方法200或300的相应流程,为了简洁,在此不再赘述。It should be understood that the server 2000 according to the embodiment of the present application may correspond to the server 20 in the embodiment of the present application, and each unit and module in the server 2000 and the other operations and/or functions described above are respectively implemented to implement the method 200 or 300. The corresponding process, for the sake of brevity, will not be described here.
因此,根据本申请实施例的服务器根据接收到的终端设备发送的验证信息后,将验证信息发送给第一服务器确定的发送所述消息的第一服务器,使得第一服务器根据验证信息验证消息的合法性之后,将验证结果发送给终端设备。由此,使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。Therefore, the server according to the embodiment of the present application sends the verification information to the first server that is sent by the first server to send the message according to the received verification information sent by the terminal device, so that the first server verifies the message according to the verification information. After the legality, the verification result is sent to the terminal device. Therefore, the user can accurately determine whether the message is legal, and prevent the user from being blinded by the illegal message, thereby improving the user experience.
图10是本申请再一实施例的服务器的示意性框图。图10所示的服务器3000包括接收器3100、发送器3200、处理器3300和存储器3400。处理器3300控制服务器3000的操作,并可用于处理信号。存储器3400可以包括只读存储器和随机存取存储器,并向处理器3300提供指令和数据。服务器3000的各个组件通过总线系统3500耦合在一起,其中总线系统3500除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为总线系统3500。FIG. 10 is a schematic block diagram of a server according to still another embodiment of the present application. The server 3000 shown in FIG. 10 includes a receiver 3100, a transmitter 3200, a processor 3300, and a memory 3400. The processor 3300 controls the operation of the server 3000 and can be used to process signals. Memory 3400 can include read only memory and random access memory and provides instructions and data to processor 3300. The various components of server 3000 are coupled together by a bus system 3500 that includes, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 3500 in the figure.
具体地,所述接收器3100,接收终端设备发送的验证信息,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;所述处理器3300,用于根据所述验证信息,确定是否向所述终端设备发送过所述消息;所述处理器3300, 还用于根据确定的是否向所述终端设备发送过所述消息的结果,确定所述消息是否合法;所述发送器3200,用于向所述终端设备发送验证结果,所述验证结果用于指示所述消息是否合法。Specifically, the receiver 3100 receives the verification information sent by the terminal device, where the verification information includes summary information and identification information, where the summary information corresponds to the message received by the terminal device, and the identifier information is used by the identifier information. The processor 3300 is configured to determine, according to the verification information, whether the message is sent to the terminal device; the processor 3300, And a method for determining whether the message is legal according to the determined result of whether the message is sent to the terminal device; the sender 3200 is configured to send a verification result to the terminal device, where the verification result is used for Indicates whether the message is legal.
应理解,根据本申请实施例的服务器3000可对应于本申请实施例的中的服务器30,并且,服务器3000中的各单元及模块和上述其他操作和/或功能分别为了实现方法200或300的相应流程,为了简洁,在此不再赘述。It should be understood that the server 3000 according to the embodiment of the present application may correspond to the server 30 in the embodiment of the present application, and the units and modules in the server 3000 and the other operations and/or functions described above are respectively implemented to implement the method 200 or 300. The corresponding process, for the sake of brevity, will not be described here.
因此,根据本申请实施例的服务器接收终端设备发送的验证信息,并在根据验证信息验证消息是否合法之后,将验证结果发送给终端设备。使得用户能够准确的判断消息是否合法,避免用户被非法消息蒙蔽,提升用户的体验。Therefore, the server according to the embodiment of the present application receives the verification information sent by the terminal device, and after verifying whether the message is legal according to the verification information, sends the verification result to the terminal device. This enables the user to accurately determine whether the message is legal, to prevent the user from being blinded by illegal messages, and to enhance the user experience.
应理解,在本申请上述实施例中,处理器可以是中央处理单元(Central Processing Unit,简称为“CPU”),处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the foregoing embodiment of the present application, the processor may be a central processing unit ("CPU"), and the processor may also be other general-purpose processors, digital signal processors (DSPs), and dedicated integration. Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。The memory can include read only memory and random access memory and provides instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory can also store information of the device type.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software. The steps of the method disclosed in the embodiments of the present application may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor. The software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。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.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描 述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It will be apparent to those skilled in the art that the above description is convenient and concise for the description. For the specific working process of the system, the device and the unit, reference may be made 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盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. 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: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。 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 (38)

  1. 一种验证消息合法性的方法,其特征在于,包括:A method for verifying the legitimacy of a message, comprising:
    终端设备确定接收到的消息对应的摘要信息;The terminal device determines summary information corresponding to the received message;
    所述终端设备生成验证信息,所述验证信息中包括所述摘要信息和标识信息,所述标识信息用于标识所述终端设备;The terminal device generates the verification information, where the verification information includes the summary information and the identifier information, where the identifier information is used to identify the terminal device;
    所述终端设备向第一服务器发送所述验证信息,所述第一服务器为所述终端设备确定的发送所述消息的服务器;Transmitting, by the terminal device, the verification information to a first server, where the first server is a server that is sent by the terminal device to send the message;
    所述终端设备接收所述第一服务器发送的根据所述验证信息确定的验证结果,所述验证结果用于指示所述消息是否合法。The terminal device receives the verification result determined by the first server according to the verification information, and the verification result is used to indicate whether the message is legal.
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备向第一服务器发送所述验证信息,包括:The method according to claim 1, wherein the transmitting, by the terminal device, the verification information to the first server comprises:
    所述终端设备向第二服务器发送所述验证信息,以便于所述第二服务器向所述第三方服务器发送所述验证信息。The terminal device sends the verification information to the second server, so that the second server sends the verification information to the third-party server.
  3. 根据权利要求2所述的方法,其特征在于,所述终端设备接收所述第一服务器发送的根据所述验证信息确定的验证结果,包括:The method according to claim 2, wherein the receiving, by the terminal device, the verification result determined by the first server according to the verification information comprises:
    所述终端设备接收所述第一服务器通过所述第二服务器转发的所述验证结果。The terminal device receives the verification result forwarded by the first server by using the second server.
  4. 根据权利要求2或3所述的方法,其特征在于,在所述终端设备向第二服务器发送所述验证信息之前,所述方法还包括:The method according to claim 2 or 3, wherein before the sending, by the terminal device, the verification information to the second server, the method further comprises:
    所述终端设备采用第一密钥加密所述验证信息,其中,所述第一密钥与第二密钥相对应,所述第二密钥为所述第二服务器用于解密采用所述第一密钥加密后的所述验证信息的密钥。The terminal device encrypts the verification information by using a first key, where the first key corresponds to a second key, and the second key is used by the second server to decrypt The key of the verification information after a key is encrypted.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, further comprising:
    所述终端设备根据所述验证结果,标示所述消息是否合法。The terminal device indicates, according to the verification result, whether the message is legal.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。The method according to any one of claims 1 to 5, wherein the identification information comprises at least one of the following information: an identification ID of the terminal device, a mobile phone number of the terminal device, the The time the message was sent and the account information of the user.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述摘要信息为哈希值。The method according to any one of claims 1 to 6, wherein the summary information is a hash value.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,在所述终 端设备确定所述消息的摘要信息之前,所述方法还包括:Method according to any one of claims 1 to 7, characterized in that at the end Before the end device determines the summary information of the message, the method further includes:
    所述终端设备确定所述消息为目标类消息,所述目标类消息为内容与用户的隐私和/或财产相关的消息。The terminal device determines that the message is a target class message, and the target class message is a message related to content privacy and/or property of the user.
  9. 一种验证消息合法性的方法,其特征在于,包括:A method for verifying the legitimacy of a message, comprising:
    第二服务器接收终端设备发送的验证信息,其中,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;The second server receives the verification information sent by the terminal device, where the verification information includes summary information and identification information, where the summary information corresponds to the message received by the terminal device, and the identifier information is used to identify the Terminal Equipment;
    所述第二服务器向第一服务器发送所述验证信息,所述第一服务器为所述第二服务器确定的发送所述消息的服务器,以便于所述第一服务器根据所述验证信息确定所述消息是否合法之后,向所述终端设备发送用于指示所述消息是否合法的验证结果。Sending, by the second server, the verification information to the first server, where the first server is a server that is sent by the second server to send the message, so that the first server determines the After the message is legal, a verification result indicating whether the message is legal is sent to the terminal device.
  10. 根据权利要求9所述的方法,其特征在于,在所述第二服务器向第一服务器发送所述验证信息之前,所述方法还包括:The method according to claim 9, wherein before the sending, by the second server, the verification information to the first server, the method further comprises:
    所述第二服务器确定所述终端设备为经过所述第二服务器认证过的终端设备。The second server determines that the terminal device is a terminal device that has been authenticated by the second server.
  11. 根据权利要求9或10所述的方法,其特征在于,所述方法还包括:The method according to claim 9 or 10, wherein the method further comprises:
    所述第二服务器接收所述第一服务器发送的所述验证结果;The second server receives the verification result sent by the first server;
    所述第二服务器向所述终端设备发送所述验证结果。The second server sends the verification result to the terminal device.
  12. 根据权利要求9所述的方法,其特征在于,所述第二服务器接收所述终端设备发送的验证信息,包括:The method according to claim 9, wherein the receiving, by the second server, the verification information sent by the terminal device comprises:
    所述第二服务器接收所述终端设备采用第一密钥加密后的所述验证信息;The second server receives the verification information that is encrypted by the terminal device by using a first key;
    其中,所述方法还包括:The method further includes:
    所述第二服务器根据采用第二密钥解密所述采用第一密钥加密后的所述验证信息的结果,确定所述终端设备是否为经过所述第二服务器认证过的终端设备,所述第二密钥与所述第一密钥相对应。Determining, by the second server, whether the terminal device is a terminal device that has been authenticated by the second server, according to a result of decrypting the verification information encrypted by using the first key by using a second key, The second key corresponds to the first key.
  13. 根据权利要求9至12中任一项所述的方法,其特征在于,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述信息的发送时间和用户的账户信息。The method according to any one of claims 9 to 12, wherein the identification information comprises at least one of the following information: an identification ID of the terminal device, a mobile phone number of the terminal device, the The time when the message was sent and the account information of the user.
  14. 一种验证消息合法性的方法,其特征在于,包括:A method for verifying the legitimacy of a message, comprising:
    第一服务器接收终端设备发送的验证信息,所述验证信息中包括摘要信 息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;The first server receives the verification information sent by the terminal device, where the verification information includes a digest message Information and identifier information, the summary information corresponding to the message received by the terminal device, the identifier information being used to identify the terminal device;
    所述第一服务器根据所述验证信息,确定是否向所述终端设备发送过所述消息;Determining, by the first server, whether the message is sent to the terminal device according to the verification information;
    所述第一服务器根据确定的是否向所述终端设备发送过所述消息的结果,确定所述消息是否合法;Determining, by the first server, whether the message is legal according to the determined result of whether the message is sent to the terminal device;
    所述第一服务器向所述终端设备发送验证结果,所述验证结果用于指示所述消息是否合法。The first server sends a verification result to the terminal device, where the verification result is used to indicate whether the message is legal.
  15. 根据权利要求14所述的方法,其特征在于,所述第一服务器接收终端设备发送的验证信息,包括:The method according to claim 14, wherein the receiving, by the first server, the verification information sent by the terminal device comprises:
    所述第一服务器接收所述终端设备通过第二服务器转发的所述验证信息。The first server receives the verification information that is forwarded by the terminal device by using a second server.
  16. 根据权利要求15所述的方法,其特征在于,所述第一服务器向所述终端设备发送验证信息,包括:The method according to claim 15, wherein the sending, by the first server, the verification information to the terminal device comprises:
    所述第一服务器向所述第二服务器发送所述验证结果,以便于所述第二服务器向所述终端设备转发所述验证结果。The first server sends the verification result to the second server, so that the second server forwards the verification result to the terminal device.
  17. 根据权利要求13至15中任一项所述的方法,其特征在于,所述第一服务器根据所述验证信息,确定是否向所述终端设备发送过所述消息,包括:The method according to any one of claims 13 to 15, wherein the first server determines whether to send the message to the terminal device according to the verification information, including:
    当所述第一服务器根据所述标识信息,确定向所述终端设备发送过消息时,所述第一服务器确定向所述终端设备发送过的消息对应的摘要信息;When the first server determines to send a message to the terminal device according to the identifier information, the first server determines summary information corresponding to the message that is sent to the terminal device;
    当所述第一服务器确定向所述终端设备发送过的消息对应的摘要信息与所述验证信息中包括的摘要信息匹配时,所述第一服务器确定向所述终端设备发送过所述消息。When the first server determines that the digest information corresponding to the message sent to the terminal device matches the digest information included in the verification information, the first server determines to send the message to the terminal device.
  18. 根据权利要求13至17中任一项所述的方法,其特征在于,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。The method according to any one of claims 13 to 17, wherein the identification information comprises at least one of the following: an identification ID of the terminal device, a mobile phone number of the terminal device, the The time the message was sent and the account information of the user.
  19. 根据权利要求13至18中任一项所述的方法,其特征在于,所述摘要信息为哈希值。The method according to any one of claims 13 to 18, wherein the summary information is a hash value.
  20. 一种终端设备,其特征在于,包括:接收器、发送器和处理器;A terminal device, comprising: a receiver, a transmitter, and a processor;
    其中,所述处理器,用于确定所述接收器接收到的消息对应的摘要信息; The processor is configured to determine summary information corresponding to the message received by the receiver;
    所述处理器,还用于生成验证信息,所述验证信息中包括所述摘要信息和标识信息,所述标识信息用于标识所述终端设备;The processor is further configured to generate the verification information, where the verification information includes the summary information and the identifier information, where the identifier information is used to identify the terminal device;
    所述发送器,用于向第一服务器发送所述验证信息,所述第一服务器为所述处理器确定的发送所述消息的服务器;The transmitter is configured to send the verification information to a first server, where the first server is a server that is sent by the processor to send the message;
    所述接收器,用于接收所述第一服务器发送的根据所述验证信息确定的验证结果,所述验证结果用于指示所述消息是否合法。The receiver is configured to receive a verification result that is sent by the first server and that is determined according to the verification information, where the verification result is used to indicate whether the message is legal.
  21. 根据权利要求20所述的终端设备,其特征在于,所述发送器具体用于:The terminal device according to claim 20, wherein the transmitter is specifically configured to:
    向第二服务器发送所述验证信息,以便于所述第二服务器向所述第一服务器发送所述验证信息。Sending the verification information to the second server, so that the second server sends the verification information to the first server.
  22. 根据权利要求21所述的终端设备,其特征在于,所述接收器具体用于:The terminal device according to claim 21, wherein the receiver is specifically configured to:
    接收所述第一服务器通过所述第二服务器转发的所述验证结果。Receiving the verification result forwarded by the first server by the second server.
  23. 根据权利要求21或22所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to claim 21 or 22, wherein the processor is further configured to:
    在所述发送器向第二服务器发送所述验证信息之前,采用第一密钥加密所述验证信息,其中,所述第一密钥与第二密钥相对应,所述第二密钥为所述第二服务器用于解密采用所述第一密钥加密后的所述验证信息的密钥。Before the sender sends the verification information to the second server, encrypting the verification information by using a first key, where the first key corresponds to a second key, and the second key is The second server is configured to decrypt a key of the verification information encrypted by using the first key.
  24. 根据权利要求20至23中任一项所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to any one of claims 20 to 23, wherein the processor is further configured to:
    根据所述验证结果,标示所述消息是否合法。According to the verification result, it is indicated whether the message is legal.
  25. 根据权利要求20至24中任一项所述的终端设备,其特征在于,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。The terminal device according to any one of claims 20 to 24, wherein the identification information comprises at least one of the following information: an identification ID of the terminal device, a mobile phone number of the terminal device, and a location The sending time of the message and the account information of the user.
  26. 根据权利要求20至25中任一项所述的终端设备,其特征在于,所述摘要信息为哈希值。The terminal device according to any one of claims 20 to 25, wherein the summary information is a hash value.
  27. 根据权利要求20至26中任一项所述的终端设备,其特征在于,在所述处理器确定所述消息的摘要信息之前,所述处理器还用于:The terminal device according to any one of claims 20 to 26, wherein before the processor determines the digest information of the message, the processor is further configured to:
    确定所述消息为目标类消息,所述目标类消息为内容与用户的隐私和/或财产相关的消息。The message is determined to be a target class message, which is a message related to the privacy and/or property of the user.
  28. 一种服务器,其特征在于,包括:接收器、发送器和处理器; A server, comprising: a receiver, a transmitter, and a processor;
    其中,所述接收器,用于接收终端设备发送的验证信息,其中,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;The receiver is configured to receive the verification information sent by the terminal device, where the verification information includes digest information and identification information, where the digest information corresponds to the message received by the terminal device, where the identifier is The information is used to identify the terminal device;
    所述发送器,用于向第一服务器发送所述验证信息,所述第一服务器为所述服务器确定的发送所述消息的服务器,以便于所述第一服务器根据所述验证信息确定所述消息是否合法之后,向所述终端设备发送用于指示所述消息是否合法的验证结果。The sender is configured to send the verification information to a first server, where the first server is a server that is sent by the server to send the message, so that the first server determines the After the message is legal, a verification result indicating whether the message is legal is sent to the terminal device.
  29. 根据权利要求28所述的服务器,其特征在于,在所述发送器向第一服务器发送所述验证信息之前,所述处理器用于:The server according to claim 28, wherein before the transmitter transmits the verification information to the first server, the processor is configured to:
    确定所述终端设备为经过所述服务器认证过的终端设备。Determining that the terminal device is a terminal device that has been authenticated by the server.
  30. 根据权利要求28或29所述的服务器,其特征在于,所述接收器还用于:The server according to claim 28 or 29, wherein the receiver is further configured to:
    接收所述第一服务器发送的所述验证结果;Receiving the verification result sent by the first server;
    其中,所述发送器具体用于:向所述终端设备发送所述验证结果。The transmitter is specifically configured to: send the verification result to the terminal device.
  31. 根据权利要求29所述的服务器,其特征在于,所述接收器具体用于:The server according to claim 29, wherein the receiver is specifically configured to:
    接收所述终端设备采用第一密钥加密后的所述验证信息;Receiving the verification information that is encrypted by the terminal device by using a first key;
    其中,所述处理器还用于:Wherein, the processor is further configured to:
    根据采用第二密钥解密所述采用第一密钥加密后的所述验证信息的结果,确定所述终端设备是否为经过所述服务器认证过的终端设备,所述第二密钥与所述第一密钥相对应。Determining, according to a result of decrypting the verification information that is encrypted by using the first key, using the second key, determining whether the terminal device is a terminal device that has been authenticated by the server, the second key and the The first key corresponds.
  32. 根据权利要求28至31中任一项所述的服务器,其特征在于,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。The server according to any one of claims 28 to 31, wherein the identification information comprises at least one of the following: an identification ID of the terminal device, a mobile phone number of the terminal device, the The time the message was sent and the account information of the user.
  33. 一种服务器,其特征在于,包括接收器、发送器和处理器;A server, comprising: a receiver, a transmitter, and a processor;
    其中,所述接收器,用于接收终端设备发送的验证信息,所述验证信息中包括摘要信息和标识信息,所述摘要信息与所述终端设备接收到的消息相对应,所述标识信息用于标识所述终端设备;The receiver is configured to receive the verification information sent by the terminal device, where the verification information includes summary information and identification information, where the summary information corresponds to the message received by the terminal device, and the identifier information is used by the identifier information. Identifying the terminal device;
    所述处理器,用于根据所述验证信息,确定是否向所述终端设备发送过所述消息;The processor is configured to determine, according to the verification information, whether the message is sent to the terminal device;
    所述处理器,还用于根据确定的是否向所述终端设备发送过所述消息的 结果,确定所述消息是否合法;The processor is further configured to: according to the determined whether the message is sent to the terminal device As a result, it is determined whether the message is legal;
    所述发送器,用于向所述终端设备发送验证结果,所述验证结果用于指示所述消息是否合法。The sender is configured to send a verification result to the terminal device, where the verification result is used to indicate whether the message is legal.
  34. 根据权利要求33所述的服务器,其特征在于,所述接收器具体用于:The server according to claim 33, wherein the receiver is specifically configured to:
    接收所述终端设备通过第二服务器转发的所述验证信息。Receiving the verification information that is forwarded by the terminal device through the second server.
  35. 根据权利要求34所述的服务器,其特征在于,所述发送器具体用于:The server according to claim 34, wherein the transmitter is specifically configured to:
    向所述第二服务器发送所述验证结果,以便于所述第二服务器向所述终端设备转发所述验证结果。Sending the verification result to the second server, so that the second server forwards the verification result to the terminal device.
  36. 根据权利要求33至35中任一项所述的服务器,其特征在于,所述处理器具体用于:The server according to any one of claims 33 to 35, wherein the processor is specifically configured to:
    当根据所述标识信息,确定向所述终端设备发送过消息时,确定向所述终端设备发送过的消息对应的摘要信息;Determining, according to the identifier information, when the message is sent to the terminal device, the summary information corresponding to the message sent to the terminal device;
    当确定向所述终端设备发送过的消息对应的摘要信息与所述验证信息中包括的摘要信息匹配时,确定向所述终端设备发送过所述消息。When it is determined that the digest information corresponding to the message sent to the terminal device matches the digest information included in the verification information, it is determined that the message is sent to the terminal device.
  37. 根据权利要求32至36中任一项所述的服务器,其特征在于,所述标识信息包括下列信息中的至少一种:所述终端设备的标识ID、所述终端设备的手机号码、所述消息的发送时间和用户的账户信息。The server according to any one of claims 32 to 36, wherein the identification information comprises at least one of the following: an identification ID of the terminal device, a mobile phone number of the terminal device, the The time the message was sent and the account information of the user.
  38. 根据权利要求32至37中任一项所述的服务器,其特征在于,所述摘要信息为哈希值。 The server according to any one of claims 32 to 37, wherein the summary information is a hash value.
PCT/CN2016/109937 2016-12-14 2016-12-14 Method for verifying validity of message and server WO2018107398A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/109937 WO2018107398A1 (en) 2016-12-14 2016-12-14 Method for verifying validity of message and server
CN201680084702.XA CN109076317A (en) 2016-12-14 2016-12-14 Verify the method and server of message legitimacy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/109937 WO2018107398A1 (en) 2016-12-14 2016-12-14 Method for verifying validity of message and server

Publications (1)

Publication Number Publication Date
WO2018107398A1 true WO2018107398A1 (en) 2018-06-21

Family

ID=62557804

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/109937 WO2018107398A1 (en) 2016-12-14 2016-12-14 Method for verifying validity of message and server

Country Status (2)

Country Link
CN (1) CN109076317A (en)
WO (1) WO2018107398A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112020065A (en) * 2020-08-04 2020-12-01 深圳传音控股股份有限公司 Information processing method, terminal equipment, server and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111246479B (en) * 2020-01-06 2023-08-01 上海闻泰电子科技有限公司 Method, device, terminal equipment and storage medium for resisting counterfeit operator attack

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096703A (en) * 2010-12-29 2011-06-15 北京新媒传信科技有限公司 Filtering method and equipment of short messages
US20140380052A1 (en) * 2012-02-17 2014-12-25 Zte Corporation Message filtering method and system
CN105933876A (en) * 2015-09-24 2016-09-07 中国银联股份有限公司 Counterfeit short message identification method, mobile phone terminal, server, and system
CN106231572A (en) * 2016-07-29 2016-12-14 宇龙计算机通信科技(深圳)有限公司 Pseudo-base station refuse messages discrimination method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096703A (en) * 2010-12-29 2011-06-15 北京新媒传信科技有限公司 Filtering method and equipment of short messages
US20140380052A1 (en) * 2012-02-17 2014-12-25 Zte Corporation Message filtering method and system
CN105933876A (en) * 2015-09-24 2016-09-07 中国银联股份有限公司 Counterfeit short message identification method, mobile phone terminal, server, and system
CN106231572A (en) * 2016-07-29 2016-12-14 宇龙计算机通信科技(深圳)有限公司 Pseudo-base station refuse messages discrimination method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112020065A (en) * 2020-08-04 2020-12-01 深圳传音控股股份有限公司 Information processing method, terminal equipment, server and storage medium

Also Published As

Publication number Publication date
CN109076317A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
EP3605989B1 (en) Information sending method, information receiving method, apparatus, and system
US9344882B2 (en) Apparatus and methods for preventing information disclosure
EP2657871B1 (en) Secure configuration of mobile application
AU2015298224B2 (en) Apparatus and method for sharing a hardware security module interface in a collaborative network
US7426382B2 (en) Contact validation and trusted contact updating in mobile wireless communications devices
JP4570626B2 (en) System and method for generating reproducible session keys
US20140171024A1 (en) Modified messaging server call flow for secured mobile-to-mobile messaging
US11658963B2 (en) Cooperative communication validation
US9331995B2 (en) Secure configuration of mobile application
MX2007009790A (en) Context limited shared secret.
US9300654B2 (en) Method of handling a certification request
CN104579668A (en) User identity verification method, password protection device and verification system
US8826007B2 (en) System and method for validating certificate issuance notification messages
KR101633965B1 (en) User security authentication system in internet and method thereof
WO2018107802A1 (en) Method for sending network data, and mobile terminal
WO2018107398A1 (en) Method for verifying validity of message and server
US9854444B2 (en) Apparatus and methods for preventing information disclosure
CN1905449B (en) Method and apparatus for processing digitally signed messages to determine address mismatches
US9648495B2 (en) Method and device for transmitting a verification request to an identification module
US9191401B2 (en) Signed response to an abusive email account owner and provider systems and methods
WO2021136511A1 (en) Communication method and apparatus
US20210073365A1 (en) Securing user inputs in mobile device
WO2016003310A1 (en) Bootstrapping a device to a wireless network
CN107318148B (en) Wireless local area network access information storage method and device
CA2697096C (en) System and method for validating certificate issuance notification messages

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: 16924106

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: 16924106

Country of ref document: EP

Kind code of ref document: A1