A message verification method and a message verification device

By adding the identification of the target terminal device to the target message and determining whether the message has passed the verification based on the identification and the target information summary, the problem of inflexible message verification in the prior art is solved, and the accuracy of message verification is improved.

CN119788299APending Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311289748.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The message verification method in the prior art is inflexible, which may lead to the permanent message verification failure, reducing the accuracy of message verification.

Method used

By adding an identity of the target terminal device to the target message, and determining whether the message passes verification based on the identification and the target information summary, to determine whether a connection is established with the server and a service session is executed.

Benefits of technology

Improve the accuracy of target message verification, avoiding the problem of misjudging message verification failure based on the target information digest only.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788299A_ABST
    Figure CN119788299A_ABST
Patent Text Reader

Abstract

The present application provides a message verification method and a message verification device, which are applied to a terminal device and improve the verification accuracy of a target message. The method comprises: receiving a target message from a server, wherein the target message contains a target information summary and an identifier of a target terminal device, and the target message is used to establish a connection between the target terminal device and the server to perform a business session; and judging whether the target message has passed the verification based on the target information summary and the identifier of the target terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message verification method and a message verification device. Background Art

[0002] At present, most terminal devices can accept unsolicited messages, sometimes also called "notifications". For example, a server can send the above notification to a terminal device to guide the user of the terminal device to establish a connection to the server through the terminal device. The notification contains the authentication information of the server sending the notification, so that the terminal device receiving the notification can establish a connection with the server and perform a session interaction when it confirms that the above notification has been authenticated based on the authentication information, that is, the server is an authorized server of the terminal device.

[0003] However, the above message verification method is not flexible and may cause the problem of permanent message verification failure, resulting in low accuracy of message verification. Summary of the invention

[0004] The present application provides a message verification method and a message verification device, which improve the accuracy of target message verification.

[0005] In a first aspect, a message verification method is provided, which is applied to a terminal device, and the method includes: receiving a target message from a server, the target message containing a target information summary and an identifier of a target terminal device, the target message being used to establish a connection between the target terminal device and the server to execute a business session; and judging whether the target message has passed verification based on the target information summary and the identifier of the target terminal device.

[0006] In the present application, the terminal device can receive a target message from the server, and determine whether the target message has passed the verification based on the target information digest in the target message and the identification of the target terminal device, so as to determine whether to establish a connection with the server and execute a business session. In other words, the target message in the present application adds the identification of the target terminal device, avoiding the problem of misjudging the permanent verification failure of the target message based only on the target information digest, and improving the accuracy of the verification of the target message.

[0007] In a second aspect, a terminal device is provided, comprising: a transceiver module and a processing module, wherein the transceiver module is used to receive a target message from a server, the target message containing a target information summary and an identifier of a target terminal device, and the target message is used to establish a connection between the target terminal device and the server to execute a business session; the processing module is used to determine whether the target message has passed verification based on the target information summary and the identifier of the target terminal device.

[0008] In a third aspect, a message verification device is provided, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect. Optionally, the device also includes a memory. Optionally, the device also includes a communication interface, and the processor is coupled to the communication interface.

[0009] In a fourth aspect, a processor is provided, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect.

[0010] In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0011] In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.

[0012] Optionally, there are one or more processors and one or more memories.

[0013] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0014] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0015] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0016] The processing device in the fifth aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0017] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect.

[0018] In a seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0020] Figure 2 It is a flow chart of the message verification method provided by this application;

[0021] Figure 3 is a schematic diagram of the system architecture of a terminal device provided in an embodiment of the present application;

[0022] Figure 4 It is a flow chart of a message verification method provided by an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of a target message provided in an embodiment of the present application;

[0024] Figure 6 is a flowchart of a first specific example of a message verification method provided by an embodiment of the present application;

[0025] Figure 7 is a flowchart of a second specific example of the message verification method provided by an embodiment of the present application;

[0026] Figure 8 is a flowchart of a third specific example of the message verification method provided in an embodiment of the present application;

[0027] Fig. 9 This is a structural block diagram of an example of a message verification device provided in an embodiment of the present application;

[0028] Fig.10 It is a structural diagram of another example of the message verification device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0030] Figure 1 Schematic diagram of application scenario 100 provided in an embodiment of the present application. Figure 1 As shown, the application scenario 100 includes a terminal device 101 and a server 102. The server 102 can send a notification to the terminal device 101. Correspondingly, the terminal device 101 can receive a notification from the server 102. The notification is an unsolicited message, and the server 102 can use the notification to guide the user of the terminal device 101 to establish a connection to the server 102 through the terminal device 101. The notification includes the authentication information of the server 102 that sends the notification, so that the terminal device 101 that receives the notification can establish a connection with the server 102 and perform a session interaction when it confirms that the above notification has been authenticated based on the authentication information, that is, the server 102 is an authorized server of the terminal device 101.

[0031] However, the above message verification method is not flexible and may cause the problem of permanent message verification failure, resulting in low accuracy of message verification. For details, see the following Figure 2 Description.

[0032] Figure 2 FIG. 2 is a flow chart of a message verification method 200. Figure 2 As shown, the method 200 includes the following steps:

[0033] S201, the terminal device receives a target message, and the target message contains a target information summary.

[0034] S202, the terminal device determines whether the target message passes the verification based on the non-default message verification parameters and the above-mentioned target information summary.

[0035] It should be understood that the non-default message authentication parameter may also be referred to as a local message authentication parameter.

[0036] Exemplarily, the terminal device may compare the second information digest determined based on the non-default parameters with the target information digest, and determine that the target message has passed the verification if it is determined that the target information digest is the same as the second information digest. Alternatively, if it is determined that the target information digest is not the same as the second information digest, determine that the target message has not passed the verification.

[0037] S203: When it is determined that the target message passes the verification, the terminal device may perform a formal conversation interaction.

[0038] Optionally, when it is determined that the target message has not passed the verification based on the non-default message verification parameter and the above-mentioned target information summary, the terminal device can also perform verification of the target message through another message verification parameter (also referred to as the default message verification parameter), that is, S204.

[0039] S204, the terminal device determines whether the target message passes the verification based on the default message verification parameters and the above target information summary.

[0040] Exemplarily, the terminal device may obtain the first information digest based on the default message verification parameter, and compare the target information digest with the first information digest, and if it is determined that the target information digest is the same as the first information digest, determine that the target message has passed the verification, and execute S203. Alternatively, if it is determined that the target information digest is different from the first information digest, determine that the target message has not passed the verification, and ignore the target message.

[0041] However, when the message verification parameters on the terminal device side are inconsistent with the message verification parameters on the server side, there may be a problem of permanent verification failure of the target message, resulting in the terminal device being unable to perform normal session interaction.

[0042] In view of this, the embodiment of the present application provides a message verification method and a message verification device, whereby a terminal device can receive a target message from a server, and judge whether the target message has passed verification based on the target information digest and the identification of the target terminal device in the target message, so as to determine whether to establish a connection with the server and execute a business session. In other words, the target message in the present application adds the identification of the target terminal device, avoiding the problem of misjudging the permanent verification failure of the target message based only on the target information digest, and improving the accuracy of the verification of the target message.

[0043] It should also be understood that the terminal device in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc. The terminal device involved in the embodiments of the present application may be a device that provides voice / data connectivity to a user, for example, a handheld device with a wireless connection function, a vehicle-mounted device, etc. At present, some examples of terminals are: mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public land mobile communication networks) Mobile network, PLMN) and the like, the embodiments of the present application are not limited to this.

[0044] As an example but not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0045] In addition, in the embodiments of the present application, the terminal device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing human-machine interconnection and intelligent network of things-to-things interconnection. The terminal device of the present application can also be a vehicle-mounted unit, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip or a vehicle-mounted unit built into the vehicle as one or more components or units. The vehicle can implement the method of the present application through the built-in vehicle-mounted unit, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit. Therefore, the embodiments of the present application can be applied to vehicle networking, such as vehicle to everything (V2X), long-term evolution-vehicle (LTE-V), vehicle-to-vehicle (V2V), etc.

[0046] For example, Figure 3 A schematic diagram of the system architecture of a terminal device provided in an embodiment of the present application.

[0047] like Figure 3 As shown, the terminal device includes a processor 310, a transceiver 320 and a display unit 370. The display unit 370 may include a display screen.

[0048] Optionally, the terminal device may further include a memory 330. The processor 310, the transceiver 320 and the memory 330 may communicate with each other through an internal connection path to transfer data. The memory 330 is used to store a computer program, and the processor 310 is used to call and run the computer program from the memory 330.

[0049] The processor 310 and the memory 330 may be combined into a processing device, or more commonly, they are independent components, and the processor 310 is used to execute the program code stored in the memory 330 to implement the above functions. In specific implementation, the memory 330 may also be integrated into the processor 310, or may be independent of the processor 310.

[0050] In addition, in order to make the functions of the terminal device more complete, the terminal device may further include one or more of an input unit 360 , an audio circuit 380 , and a sensor 301 .

[0051] Optionally, the terminal device may further include a power supply 350 for providing power to various devices or circuits in the terminal device.

[0052] Understandably, Figure 3 The operations and / or functions of each module in the terminal device shown are respectively for implementing the corresponding processes in the following method embodiments. For details, please refer to the description in the following method embodiments. To avoid repetition, detailed description is appropriately omitted here.

[0053] Understandably, Figure 3 The processor 310 in the terminal device shown may include one or more processing units, for example: the processor 310 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0054] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0055] In some embodiments, the processor 310 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0056] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device. In other embodiments of the present application, the terminal device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0057] Understandably, Figure 3 The power supply 350 shown is used to supply power to the processor 310 , the memory 330 , the display unit 370 , the input unit 360 , the transceiver 320 , and the like.

[0058] The transceiver 330 can provide wireless communication solutions for terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 320 can be one or more devices integrating at least one communication processing module.

[0059] The terminal device implements the display function through a GPU, a display unit 370, and an application processor. The GPU is a microprocessor for image processing, connecting the display unit 370 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs that execute program instructions to generate or change display information.

[0060] The display unit 370 is used to display images, videos, etc. The display unit 370 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc.

[0061] The memory 330 can be used to store computer executable program codes, which include instructions. The memory 330 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device, etc. In addition, the memory 330 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 310 executes various functional applications and data processing of the terminal device by running instructions stored in the memory 330 and / or instructions stored in a memory provided in the processor.

[0062] The terminal device can realize audio functions such as music playing and recording through the audio circuit 380 and the application processor.

[0063] The embodiments of the present application involve network devices, which may include access and mobile management function (AMF) devices, transmission reception points (TRPs), and may also be evolved NodeBs (eNBs or eNodeBs) in LTE systems, or may also be home base stations (for example, home evolved NodeBs, or home Node Bs, HNBs), base band units (BBUs), or may be wireless controllers in cloud radio access networks (CRAN) scenarios, or the access network devices may be relay stations, access points, vehicle-mounted devices, wearable devices, and access network devices in 5G networks or access network devices in future evolved PLMN networks, etc., may be access points (APs) in WLANs, may be gNBs in new radio (NR) systems, may be satellite base stations in satellite communication systems, etc., and the embodiments of the present application are not limited.

[0064] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0065] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0066] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0067] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0068] In order to make the purpose and technical solution of the present application clearer and more intuitive, a message verification method and a message verification device provided by the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0069] Figure 4 is a schematic flow chart of a message verification method 400 provided in an embodiment of the present application. The method 400 can be applied to the above Figure 1 The application scenario 100 shown in the figure can also be applied to other scenarios, which are not limited in the present embodiment. Figure 4 As shown, the method 400 may include the following steps:

[0070] S401, a terminal device receives a target message from a server. The target message contains a target information digest and an identifier of a target terminal device. The target message is used to establish a connection between the target terminal device and the server to execute a service session.

[0071] It should be understood that the terminal device can accept unsolicited information (such as the above-mentioned target message). Correspondingly, the above-mentioned server can use the above-mentioned target message to guide the user to establish a connection to the server through the terminal device to perform a service session.

[0072] Exemplarily, in the present application, the target message may be a service message or a push message (Wap Push SMS).

[0073] S402: The terminal device determines whether the target message has passed the verification based on the target information summary and the identifier of the target terminal device.

[0074] It should be understood that the above-mentioned target message contains the authentication information of the above-mentioned server (such as the target information summary and the identification of the target terminal device), so that when the terminal device receives the target message, it can determine whether to establish a connection with the server and perform session interaction through the server's authentication information.

[0075] Exemplarily, the above target message can be represented by Package#0.

[0076] Figure 5 The target message provided by this application is shown, namely the above-mentioned Package#0. Figure 5 As shown, the Package#0 has a target information digest (digest), a target message header (trigger-hdr) and a target message body (trigger-body). Among them, the trigger-hdr includes the identifier of the above-mentioned target terminal device (i.e., user-identifier), that is, the user identifier or the target terminal device identifier. In addition, the trigger-hdr also includes a version number (version), that is, a server version number, an interaction mode (ui-mode), a session initiator device (initiator), a management reserved field (future-use), a session identifier (sessionId), a server identifier length (length-identifier) ​​and the above-mentioned server identifier (server-identifier). The trigger-body includes vendor-specific message content (vendor-specifi).

[0077] Exemplarily, the target information digest and the target terminal device identifier user-identifier in Package#0 in this application can be used as the verification information of the above server. The terminal device can determine whether the target message is authenticated based on the target information digest and the target terminal device identifier user-identifier to determine whether the above server is an authorized server of the terminal device.

[0078] In the present application, the terminal device can receive a target message from the server, and determine whether the target message has passed the verification based on the target information digest and the target terminal device identifier in the target message, so as to determine whether to establish a connection with the server and execute a business session. In other words, the target message in the present application adds the identifier of the target terminal device, avoiding the problem of misjudging the permanent verification failure of the target message based only on the target information digest, and improving the accuracy of the verification of the target message.

[0079] It should be understood that, corresponding to the above S402, the terminal device can first determine whether the Package#0 has passed the verification based on the target information digest in the above Package#0. And if it is determined that the target information digest does not meet the conditions, then determine whether the Package#0 has passed the verification based on the identifier user-identifier of the target terminal device in the above Package#0. For details, please refer to the following Figure 6 Description.

[0080] Figure 6 600 is a schematic flow chart of a message verification method 600 provided in an embodiment of the present application. Figure 6 As shown, the method 600 may include the following steps:

[0081] S601, the terminal device receives Package#0 from the server.

[0082] It should be understood that Package#0 can be used to establish a connection between the target terminal device and the server to execute a service session.

[0083] It should also be understood that the Package#0 is sent by the server without requesting the terminal device, such as the Package#0 may be a Wap Push message. The format of the Package#0 may refer to the above description of the Package#0. Figure 5 To avoid repetition, the description will not be repeated here.

[0084] S602, the terminal device obtains a reference information summary based on a message verification parameter, where the message verification parameter is determined through interaction with a target server.

[0085] It should be understood that the target server here can be understood as a server that the terminal device has authorized.

[0086] Exemplarily, the message verification parameter may be a hash value composed of numbers and characters, which can only be used once and has a life cycle. It may also be called nonce, which is an abbreviation of (number used once, nonce).

[0087] Exemplarily, the reference information summary may be calculated using the following formula:

[0088] D=H(B(H(si:p)):n:B(H(t))),

[0089] Wherein, D is the above-mentioned reference information summary, H is the hash algorithm, B is the encryption algorithm, si is the above-mentioned target server identifier, p is the above-mentioned target server password, n is the above-mentioned message verification parameter, namely nonce, and t is the target message message.

[0090] It should be understood that the above hash algorithm may be an MD5 hash algorithm, and the above encryption algorithm may be a Base64 encryption algorithm.

[0091] It should also be understood that the above formula is merely exemplary and is not limited to this application.

[0092] S603, the terminal device determines whether the reference information summary is the same as the target information summary.

[0093] Exemplarily, the terminal device may compare the calculated reference information digest with the target information digest to determine whether the reference information digest is the same as the target information digest.

[0094] It should be understood that the reference information digest in S603 can be the first reference information digest obtained by the terminal device based on the default message authentication parameters. And in this case, the above S602 to S607 can be executed when the terminal device determines that the second reference information digest is not the same as the above target reference information digest. In other words, before S602, the terminal device can obtain the second reference information digest based on the non-default message authentication parameters, and determine whether the second information digest is the same as the above target information digest, and execute the above S602 to S607 when it is determined that the second reference information digest is the same as the target information digest.

[0095] Exemplarily, the above default message verification parameter may be “0x00000000”, which is not limited in this application.

[0096] It should also be understood that the calculation priority of the non-default message authentication parameter is higher than the priority of the above-mentioned default message authentication parameter.

[0097] S604: When the reference information digest is different from the target information digest, the terminal device obtains an identifier of the terminal device.

[0098] Exemplarily, the terminal device can calculate the identification of the terminal device by using the SHA256 hash algorithm.

[0099] It should be understood that the identifier of the terminal device may be an International Mobile Equipment Identity (IMEI).

[0100] S605: The terminal device determines whether the terminal device identifier is the same as the target terminal device identifier in Package#0.

[0101] Exemplarily, the terminal device may compare the calculated terminal device identifier with the identifier of the target terminal device to determine whether the terminal device identifier is the same as the identifier of the target terminal device.

[0102] As above, the identifier of the target terminal device may also be IMEI.

[0103] S606: When the identifier of the terminal device is the same as the identifier of the target terminal device, the terminal device determines that Package#0 has passed the verification.

[0104] It should be understood that when the terminal device identifier is the same as the target terminal device identifier, the terminal device determines that the Package#0 has passed the verification, which means that the server is an authorized server of the terminal device.

[0105] Optionally, following S605, when the identifier of the terminal device is different from the identifier of the target terminal device, the terminal device may further execute S607 to determine that Package#0 has not passed the verification and ignore Package#0.

[0106] It should be understood that when the terminal device identifier is different from the target terminal device identifier, the terminal device determines that the Package#0 has not passed the verification, which means that the server is not an authorized server of the terminal device.

[0107] Optionally, following S603, when the reference information digest is identical to the target information digest, the terminal device may also determine that Package#0 has passed the verification.

[0108] It should be understood that, following the above S606, when the target message passes the verification, the terminal device can determine that the above server is the target server, that is, the server authorized by the terminal device, and update the message verification parameters to perform session interaction.

[0109] In one possible case, corresponding to the above S606, when the target message passes the verification, the terminal device can update the message verification parameters to obtain new message verification parameters by executing a session challenge with the server to perform a formal session interaction. For details, see Figure 7 .

[0110] Figure 7 is a schematic flow chart of a message verification method 700 provided in an embodiment of the present application. Figure 7 As shown, the method 700 may include the following steps:

[0111] S701, the terminal device receives Package#0 from the server.

[0112] It should be understood that Package#0 can be used to establish a connection between the target terminal device and the server to execute a service session.

[0113] It should also be understood that the Package#0 may be sent by the server without requesting the terminal device, such as the Package#0 may be a Wap Push message. The format of the Package#0 may refer to the above description of Figure 5 To avoid repetition, the description will not be repeated here.

[0114] S702: When the identifier of the terminal device is the same as the identifier of the target terminal device, the terminal device determines that Package#0 has passed the verification.

[0115] It should be understood that before S702, the terminal device can also obtain a reference information digest based on the message verification parameters, and determine whether the above reference information digest is the same as the above target information digest, and if the above reference information digest is not the same as the above target information digest, obtain the terminal device identifier to execute the above S702.

[0116] As above, the message verification parameter can be a hash value composed of numbers and characters, and can also be called a nonce. In addition, the above-mentioned reference information digest can be a first reference information digest obtained by the terminal device based on the default message verification parameter, and is executed when the terminal device determines that the second reference information digest is not the same as the above-mentioned target reference information digest. In other words, the terminal device can obtain a second reference information digest based on a non-default message verification parameter, and determine whether the second information digest is the same as the above-mentioned target information digest, and when it is determined that the second reference information digest is the same as the target information digest, obtain the first reference information digest based on the default message verification parameter, and determine whether the first reference information digest is the same as the target information digest. Among them, the calculation priority of the non-default message verification parameter is higher than the priority of the above-mentioned default message verification parameter.

[0117] S703, the terminal device sends Package#1 to the server. Correspondingly, the server receives Package#1 from the terminal device.

[0118] S704, the server verifies that Package#1 passes, and when it is determined that Package#1 is empty, determines the first state information, and calculates and obtains new message verification parameters corresponding to the terminal device.

[0119] S705, the server sends Package#2 to the terminal device. Correspondingly, the terminal device receives Package#2 from the server, and the Package#2 carries the first state information and the new message verification parameter corresponding to the terminal device calculated by the server.

[0120] Exemplarily, the first status information carried by Package#2 may be "407", indicating that the server initiates an authentication challenge to the terminal device.

[0121] S706: When the terminal device fails to verify Package#2, the first status information is determined, and a new message verification parameter corresponding to the server is calculated.

[0122] In one possible case, the terminal device can verify whether Package#2 passes based on the message verification parameters corresponding to the server stored locally.

[0123] Exemplarily, the terminal device may determine that Package#2 has not passed the authentication when it is determined that the information digest calculated based on the locally stored server message authentication parameters is different from the second target information digest in the above-mentioned Package#2, wherein the second target information digest in the Package#2 is determined by the server.

[0124] In another possible case, the terminal device may also execute the above S706 when it is determined that the message verification parameter corresponding to the server stored locally is empty.

[0125] S707, the terminal device sends Package#3 to the server. Correspondingly, the server receives Package#3 from the terminal device, where Package#3 carries the first state information and the new message verification parameter corresponding to the server obtained by the terminal device.

[0126] Exemplarily, the first status information carried by Package#3 may be "407", indicating that the terminal device receives the challenge authentication initiated by the server.

[0127] S708, when the server verifies that Package#3 passes, the server determines the second status information and updates the message verification parameters of the terminal device stored locally.

[0128] In a possible implementation, the server may determine whether Package#3 passes the verification based on the new message verification parameters corresponding to the terminal device carried in Package#2.

[0129] Exemplarily, when the server determines that the information digest calculated based on the new message verification parameters corresponding to the terminal device carried by Package#2 is the same as the third target information digest in Package#3, it can determine that Package#3 has passed the authentication, and can update the locally stored message verification parameters of the terminal device to the new message verification parameters corresponding to the terminal device carried by the above Package#2. The third target information digest is calculated and determined by the terminal device.

[0130] S709, the server sends Package#4 to the terminal device. Correspondingly, the terminal device receives Package#4 from the server, and the Package#4 carries the second status information.

[0131] Exemplarily, the second status message may be "212", which indicates that the Package#3 from the terminal device has passed the verification.

[0132] S710, when the terminal device verifies Package#4 successfully, it determines the second status information and updates the locally stored message verification parameters.

[0133] In a possible implementation, the terminal device may determine whether the Package#4 passes the verification based on the new message verification parameters corresponding to the server carried by the Package#3.

[0134] Exemplarily, when it is determined that the information digest calculated based on the new message verification parameters corresponding to the server carried by the above-mentioned Package#3 is the same as the fourth target information digest in the above-mentioned Package#4, the terminal device can determine that Package#4 has passed the authentication, and can update the message verification parameters corresponding to the server stored this time to the new message verification parameters corresponding to the server carried by the above-mentioned Package#3.

[0135] Exemplarily, the terminal device may update the locally stored message authentication parameters of the terminal device to new message authentication parameters corresponding to the terminal device carried by the above-mentioned Package#2 based on the second status information in Package#4.

[0136] S711, the terminal device sends Package#5 to the server. Correspondingly, the server receives Package#5 from the terminal device, and the Package#5 carries the second status information.

[0137] S712, when the server verifies Package#5 successfully, the third state information is determined, and the message verification parameters corresponding to the server stored locally are updated.

[0138] In a possible implementation, the server may determine whether the Package#5 has passed the verification based on the new message verification parameter corresponding to the terminal device carried by the Package#3.

[0139] Exemplarily, the server may determine that Package#5 has passed the authentication when it is determined that the information digest calculated based on the new message authentication parameters corresponding to the server carried by the Package#3 is the same as the fifth target information digest in the Package#5.

[0140] Exemplarily, the server may update the locally stored message authentication parameters of the server to the new message authentication parameters corresponding to the server carried by the above-mentioned Package#3 based on the second status information in Package#5.

[0141] Exemplarily, the third status information may be "200", which is used to indicate that the message authentication parameter update is complete.

[0142] S713, the server sends Package#6 to the terminal device. Correspondingly, the terminal device receives Package#6 from the server, and the Package#6 carries the third status information.

[0143] Exemplarily, when determining that Package#6 has passed the authentication, the terminal device may obtain the third state information, and learn that the message authentication parameter update is complete based on the third state information, so as to initiate a formal session interaction with the server.

[0144] In another possible case, following the above S603, when it is determined that the reference information digest is the same as the target information digest and the target message passes the verification, the terminal device can also update the non-default message verification parameters based on the default message verification parameters to obtain new message verification parameters to perform formal session interaction. For details, see Figure 8 .

[0145] Figure 8 800 is a schematic flow chart of a message verification method 800 provided in an embodiment of the present application. Figure 8 As shown, the method 800 may include the following steps:

[0146] S801, the terminal device receives Package#0 from the server.

[0147] S802: When the reference information digest is identical to the target information digest, the terminal device determines that Package#0 has passed the verification.

[0148] S803, the terminal device sends Package#1 to the server. Correspondingly, the server receives Package#1 from the terminal device, and the Package#1 carries the message verification parameter indicating that the terminal device successfully verifies Package#0.

[0149] Exemplarily, corresponding to the above embodiment, the message verification parameter carried by Package#1 for the terminal device to successfully verify Package#0 may be the above default message verification parameter.

[0150] S804, when the server verifies Package#1 based on the default message verification parameters and finds out that the new message verification parameters corresponding to the terminal device are passed, the server calculates and obtains the new message verification parameters corresponding to the terminal device.

[0151] Exemplarily, the server may calculate and obtain the first information digest by using the default message authentication parameter, and when it is determined that the first information digest is the same as the first target information digest in Package#1, it is determined that Package#1 passes the authentication.

[0152] S805, the server sends Package#2 to the terminal device. Correspondingly, the terminal device receives Package#2 from the server, and the Package#2 carries the new message verification parameter corresponding to the terminal device calculated by the server.

[0153] S806, when the terminal device passes the verification of Package#2 based on the default message verification parameters, the message verification parameters corresponding to the local terminal device are updated, and new message verification parameters corresponding to the server are calculated and obtained.

[0154] Exemplarily, the terminal device can obtain a first information digest through default message verification parameter calculation. When it is determined that the first information digest is the same as the second target information digest in Package#2, the terminal device determines that Package#2 has passed the authentication, and can update the locally stored message verification parameters of the terminal device to new message verification parameters corresponding to the terminal device calculated by the server carried in the above Package#2.

[0155] S807, the terminal device sends Package#3 to the server. Correspondingly, the server receives Package#3 from the terminal device, and the Package#3 carries the new message verification parameter corresponding to the server calculated by the terminal device.

[0156] S808, when the server verifies Package#3 based on the default message verification parameters and it passes, it updates the corresponding message verification parameters of the local server.

[0157] Exemplarily, the server can obtain the first information digest through the default message verification parameter calculation. When it is determined that the first information digest is the same as the third target information digest in Package#3, the server determines that Package#3 has passed the authentication, updates the locally stored message verification parameters of the server to the new message verification parameters corresponding to the server calculated by the terminal device carried in the above Package#3, and determines the status information to indicate that the message verification parameter update is complete.

[0158] S806, the server sends Package#4 to the terminal device. Correspondingly, the terminal device receives Package#4 from the server, and the Package#4 carries status information indicating that the message verification parameter update is completed.

[0159] Exemplarily, the terminal device can verify that Package#4 has passed, determine that the message verification parameter update is complete, and can initiate a formal business session interaction to the server.

[0160] It should be understood that in the above embodiment, the Packages other than Package#0 are requested information, that is, messages sent when the terminal device and the server are connected.

[0161] It should also be understood that the above embodiments may be coupled to each other, and this application does not limit this. Moreover, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0162] Combined with the above Figures 1 to 8 , describes in detail the message verification method of the embodiment of the present application, and will now be combined with Figures 9 and 10 , describe in detail the message verification device of an embodiment of the present application.

[0163] Fig. 9 A message verification device 900 provided in an embodiment of the present application is shown. The message verification device 900 includes: a transceiver module 901 and a processing module 902 .

[0164] Among them, the transceiver module 901 is used to: receive a target message from the server, which contains a target information summary and an identifier of a target terminal device, and the target message is used to establish a connection between the above-mentioned target terminal device and the server to execute a business session; the processing module 902 is used to: determine whether the above-mentioned target message has passed verification based on the target information summary and the identifier of the target terminal device.

[0165] Optionally, the processing module 902 is used to: obtain a reference information summary based on a message verification parameter, where the message verification parameter is determined through interaction with a target server; and when it is determined that the reference information summary is different from the target information summary, determine whether the target message has passed verification based on an identifier of the target terminal device.

[0166] Optionally, the processing module 902 is used to: obtain the identification of the terminal device; and determine whether the target message passes the verification by comparing the identification of the terminal device with the identification of the target terminal device.

[0167] Optionally, the processing module 902 is used to: determine that the target message has passed the verification when the identification of the terminal device is the same as the identification of the target terminal device; or determine that the target message has not passed the verification when the identification of the terminal device is different from the identification of the target terminal device.

[0168] Optionally, the processing module 902 is used to: determine that the server is the target server when the target message passes the verification; and update the message verification parameters to obtain new message verification parameters by executing a session challenge with the server.

[0169] Optionally, the processing module 902 is used to: calculate and obtain a first information digest based on a default message authentication parameter; compare the first information digest with the target information digest to determine that the reference information digest is different from the target information digest.

[0170] Optionally, the processing module 902 is used to: obtain a second information digest based on non-default message verification parameters, the calculation priority of the non-default message verification parameters being higher than the priority of the default message verification parameters; and, when the second information digest is different from the target information digest, obtain the first information digest based on the default message verification parameters.

[0171] Optionally, the reference information summary is calculated by the following formula: D=H(B(H(si:p)):n:B(H(t))), wherein D is the reference information summary, H is the hash algorithm, B is the encryption algorithm, si is the identifier of the target server, p is the password of the target server, n is the message verification parameter, and t is the target message.

[0172] Optionally, the processing module 902 is used to: when the first information digest is the same as the target information digest, determine that the target message passes the verification; and update the non-default message verification parameters based on the default message verification parameters.

[0173] Optionally, the processing module 902 is used to: create a session to interact with the server based on the new message verification parameter.

[0174] Optionally, the processing module 902 is used to: ignore the target message if it is determined that the target message fails to pass the verification.

[0175] It should be understood that the message verification device 900 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the message verification device 900 may be specifically a terminal device in the above-mentioned embodiment, or the functions of the terminal device in the above-mentioned embodiment may be integrated in the message verification device 900, and the message verification device 900 may be used to execute the various processes and / or steps corresponding to the terminal device in the above-mentioned method embodiment, and to avoid repetition, it will not be repeated here.

[0176] The message verification device 900 has the function of implementing the corresponding steps performed by the terminal device in the above method; the above functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In the embodiment of the present application, Fig. 9 The message verification device 900 may also be a chip or a chip system, such as a system on chip (SoC).

[0177] Fig.10 Another message verification device 1000 provided by an embodiment of the present application is shown. The message verification device 1000 includes: a processor 1001 and a memory 1002, a communication interface 1003 and a bus 1004. Among them, the memory 1002 is used to store instructions, and the processor 1001 is used to execute the instructions stored in the memory 1002. The processor 1001, the memory 1002 and the communication interface 1003 are connected to each other through the bus 1004.

[0178] Among them, processor 1001 is used to: receive a target message from a server, in which the target message contains a target information summary and an identifier of a target terminal device, and the target message is used to establish a connection between the above-mentioned target terminal device and the server to execute a business session; and, based on the target information summary and the identifier of the target terminal device, determine whether the above-mentioned target message has passed verification.

[0179] It should be understood that the message verification device 1000 can be specifically the terminal device in the above embodiment, the functions of the terminal device in the above embodiment can be integrated into the message verification device 1000, and the message verification device 1000 can be used to execute the various steps and / or processes corresponding to the terminal device in the above method embodiment.

[0180] Optionally, the memory 1002 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1001. A portion of the memory 1002 may also include a non-volatile random access memory. For example, the memory 1002 may also store information about the device type. The processor 1001 may be used to execute the instructions stored in the memory, and when the processor executes the instructions, the processor 1001 may execute the various steps and / or processes corresponding to the terminal device in the above method embodiment.

[0181] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0182] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0183] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction 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 technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0184] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0185] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0186] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0187] 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.

[0188] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or terminal device, etc.) to perform all or part of the steps of the above methods in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0189] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the above claims.

Claims

1. A message verification method, characterized in that: Applied to a terminal device, the method comprises: receiving a target message from a server, wherein the target message contains a target information digest and an identifier of a target terminal device, and the target message is used to establish a connection between the target terminal device and the server to perform a service session; Whether the target message passes verification is determined based on the target information digest and the identification of the target terminal device.

2. The method according to claim 1, characterized in that: The determining whether the target message passes verification based on the target information digest and the identifier of the target terminal device includes: Obtaining a reference information digest based on a message authentication parameter, wherein the message authentication parameter is determined interactively with a target server; When it is determined that the reference information digest is different from the target information digest, whether the target message passes the verification is determined based on the identifier of the target terminal device.

3. The method according to claim 2, characterized in that The determining whether the target message passes verification based on the identifier of the target terminal device includes: Obtaining an identification of the terminal device; By comparing the identification of the terminal device and the identification of the target terminal device, it is determined whether the target message passes the verification.

4. The method according to claim 2 or 3, characterized in that: The method further comprises: In the case where the identification of the terminal device is the same as the identification of the target terminal device, determining that the target message passes the verification; or, In a case where the identification of the terminal device is different from the identification of the target terminal device, it is determined that the target message fails to pass the verification.

5. The method according to claim 4, characterized in that The method further comprises: In the case where the target message passes the verification, determining that the server is the target server; By performing a session challenge with the server, the message authentication parameter is updated to obtain a new message authentication parameter.

6. The method according to claim 2, characterized in that The obtaining of a reference information digest based on a message verification parameter includes: Obtaining a first information digest based on a default message authentication parameter calculation; The determining that the reference information digest is different from the target information digest includes: The first information digest is compared with the target information digest to determine that the reference information digest is different from the target information digest.

7. The method according to claim 6, characterized in that Before obtaining the first information digest based on the default message authentication parameter, the method further includes: Obtaining a second information digest based on a non-default message authentication parameter calculation, wherein the calculation priority of the non-default message authentication parameter is higher than the priority of the default message authentication parameter; The step of calculating and obtaining a first information digest based on a default message authentication parameter includes: In a case where the second information digest is different from the target information digest, the first information digest is obtained by calculation based on the default message authentication parameter.

8. The method according to claim 2, characterized in that: The reference information summary is calculated by the following formula: D=H(B(H(si:p)):n:B(H(t))) Among them, D is the reference information summary, H is the hash algorithm, B is the encryption algorithm, si is the identifier of the target server, p is the password of the target server, n is the message verification parameter, and t is the message of the target message.

9. The method according to claim 6, characterized in that The method further comprises: If the first information digest is the same as the target information digest, determining that the target message passes the verification; The non-default message authentication parameters are updated based on the default message authentication parameters.

10. The method according to claim 5, characterized in that The method further comprises: Based on the new message authentication parameter, a session is created to interact with the server.

11. The method according to claim 4, characterized in that The method further comprises: In the case where it is determined that the target message fails the authentication, the target message is ignored.

12. A terminal device, characterized in that: include: A transceiver module, used for receiving a target message from a server, wherein the target message contains a target information summary and an identifier of a target terminal device, and the target message is used for establishing a connection between the target terminal device and the server to execute a service session; A processing module is used to determine whether the target message passes the verification based on the target information summary and the identifier of the target terminal device.

13. A message verification device, characterized in that: The system comprises a processor, a memory and a transceiver, wherein the memory is used to store code instructions, the processor is used to execute the code instructions, and the transceiver is used to send and receive information, so as to execute the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 11.

15. A computer program product, comprising computer program code, characterized in that: When the computer program code is executed on a computer, the computer is caused to implement the method according to any one of claims 1 to 11.