A data packet transmission method and device, electronic equipment and storage medium

By determining the target data and message type in the receiving device and sending the corresponding second data message, the problem of response mismatch in inter-device interaction is solved, and the effectiveness of certificate exchange and key negotiation is realized.

CN116073993BActive Publication Date: 2026-03-03CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

When devices interact, the receiving end cannot receive a response corresponding to the request from the sending end, which reduces the effectiveness of the interaction.

Method used

The receiving device determines the target data and the message type of the second data message based on the message type of the first data message, and sends the corresponding second data message to ensure that the sending device can receive the relevant response, thereby realizing certificate exchange and key negotiation.

Benefits of technology

It improves the effectiveness of interactions between devices, ensuring the smooth exchange of certificates and key negotiation between the sending and receiving ends.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116073993B_ABST
    Figure CN116073993B_ABST
Patent Text Reader

Abstract

The application provides a data message transmission method and device, electronic equipment and storage medium, relates to the technical field of Internet, and solves the technical problem that a device cannot receive a response corresponding to a request sent by the device. The method comprises the following steps: receiving a first data message sent by a sending end device, wherein the first data message comprises a message type of the first data message, and the message type of the first data message is a certificate acquisition message, a signature sending message, a first numerical value sending message or a target parameter acquisition message; determining target data and a message type of a second data message based on the message type of the first data message, wherein the message type of the second data message is a certificate delivery message, a signature verification message, an interactive numerical value acquisition message or a data encryption message; and sending the second data message to the sending end, wherein the second data message comprises the message type of the second data message and the target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a data message transmission method, apparatus, electronic device and storage medium. Background Technology

[0002] Currently, when one device sends a request to another device, that device can receive a response from the other device.

[0003] However, in the above method, the response received by one device from the other device may be unrelated to the request sent by the first device to the other device, which may cause the first device to be unable to receive the response corresponding to the request sent by the first device, thus reducing the effectiveness of the interaction between devices. Summary of the Invention

[0004] This application provides a data message transmission method, apparatus, electronic device, and storage medium, which solves the technical problem in the related art that the device cannot receive the response corresponding to the request sent by the device.

[0005] In a first aspect, this application provides a data packet transmission method, comprising: receiving a first data packet sent by a sending device, the first data packet including a packet type, wherein the packet type is a certificate acquisition packet, a signature transmission packet, a first value transmission packet, or a target parameter acquisition packet, wherein the certificate acquisition packet is used to acquire a certificate of the receiving device, the signature transmission packet is used to transmit a first signature, the first signature being a signature of the sending device, the first value transmission packet is used to transmit a first value, the first value being one of a plurality of values ​​stored in the sending device, and the target parameter acquisition packet is used to acquire a target parameter; and determining a target parameter based on the packet type of the first data packet. According to the message type of the second data message, which is a certificate delivery message, a signature verification message, an interactive value acquisition message, or a data encryption message, the certificate delivery message is used to send the certificate of the receiving device, the signature verification message is used to characterize the correctness of the first signature, the interactive value acquisition message is used to acquire the interactive value, the interactive value is used to generate the target parameter, and the data encryption message is used to send the target parameter and instruct the sending device to generate an encryption key based on the target parameter; the second data message is sent to the sending device, and the second data message includes the message type of the second data message and the target data, which has a corresponding relationship with the message type of the second data message.

[0006] Optionally, determining the target data and the message type of the second data message based on the message type of the first data message specifically includes: when the type of the first data message is the target parameter acquisition message, determining the message type of the second data message to be the data encryption message; when the interactive value sent by the sending end is received, generating the target parameter based on the interactive value, and determining the target data as the target parameter, wherein the interactive value is generated by the sending end device based on the first value and the second value, and the second value is one of multiple values ​​stored in the receiving end device.

[0007] Optionally, the above-mentioned determination of the target data and the message type of the second data message based on the message type of the first data message further includes: if the message type of the first data message is the signature sending message, determining that the message type of the second data message is the signature verification message; generating a second signature based on a third value and a fourth value, wherein the third value is a value other than the first value among a plurality of values ​​stored in the sending device, and the fourth value is a value other than the second value among a plurality of values ​​stored in the receiving device; and determining that the target data is used to indicate that the first signature verification was successful if the first signature is the same as the second signature.

[0008] Optionally, the above-mentioned determination of the target data and the message type of the second data message based on the message type of the first data message further includes: if the message type of the first data message is the certificate acquisition message, determining that the message type of the second data message is the certificate transmission message; if the certificate length of the first certificate is greater than or equal to a length threshold, splitting the first certificate to obtain multiple text messages, wherein the first certificate is the certificate of the receiving device; determining that the target data includes the multiple text messages, and that the target data is used to indicate the arrangement order of the multiple text messages.

[0009] Optionally, after sending the second data packet to the sending end, the data packet transmission method further includes: issuing an alarm message if the first signature is not obtained within a preset time period.

[0010] Secondly, this application provides a data packet transmission apparatus, comprising: a receiving module, a determining module, and a sending module; the receiving module is configured to receive a first data packet sent by a sending device, the first data packet including a message type, which is a certificate acquisition message, a signature sending message, a first value sending message, or a target parameter acquisition message; the certificate acquisition message is used to acquire the certificate of the receiving device; the signature sending message is used to send a first signature, which is the signature of the sending device; the first value sending message is used to send a first value, which is one of a plurality of values ​​stored in the sending device; and the target parameter acquisition message is used to acquire a target parameter; the determining module is configured to determine the first data packet based on the first data packet... The message type of the second data message is determined, including the target data and the message type of the second data message. The message type of the second data message is a certificate delivery message, a signature verification message, an interactive value acquisition message, or a data encryption message. The certificate delivery message is used to send the certificate of the receiving device. The signature verification message is used to characterize the correctness of the first signature. The interactive value acquisition message is used to acquire an interactive value, which is used to generate the target parameter. The data encryption message is used to send the target parameter and instruct the sending device to generate an encryption key based on the target parameter. The sending module is used to send the second data message to the sending device. The second data message includes the message type of the second data message and the target data. The target data and the message type of the second data message have a corresponding relationship.

[0011] Optionally, the determining module is specifically configured to determine the message type of the second data message as the data encryption message when the type of the first data message is the target parameter acquisition message; the determining module is further configured to generate the target parameter based on the interaction value sent by the sending end when the interaction value is received, and determine the target data as the target parameter, wherein the interaction value is generated by the sending end device based on the first value and the second value, and the second value is one of a plurality of values ​​stored in the receiving end device.

[0012] Optionally, the data packet transmission device further includes a processing module; the determining module is specifically configured to determine that the message type of the second data packet is the signature verification message when the message type of the first data packet is the signature transmission message; the processing module is configured to generate a second signature based on a third value and a fourth value, wherein the third value is a value other than the first value among a plurality of values ​​stored in the sending device, and the fourth value is a value other than the second value among a plurality of values ​​stored in the receiving device; the determining module is specifically configured to determine that the target data is used to indicate that the first signature verification was successful when the first signature and the second signature are the same.

[0013] Optionally, the data packet transmission device further includes a processing module; the determining module is specifically configured to determine that the message type of the second data packet is the certificate transmission message when the message type of the first data packet is the certificate acquisition message; the processing module is configured to split the first certificate to obtain multiple text information when the certificate length of the first certificate is greater than or equal to a length threshold, wherein the first certificate is the certificate of the receiving device; the determining module is specifically configured to determine that the target data includes the multiple text information, and the target data is used to indicate the arrangement order of the multiple text information.

[0014] Optionally, the data packet transmission device further includes an alarm module; the alarm module is used to issue an alarm message if the first signature is not obtained within a preset time period.

[0015] Thirdly, this application provides an electronic device, including: a processor and a memory configured to store processor-executable instructions; wherein the processor is configured to execute the instructions to implement any of the optional data packet transmission methods described in the first aspect above.

[0016] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed by an electronic device, enable the electronic device to perform any of the optional data packet transmission methods described in the first aspect.

[0017] The data packet transmission method, apparatus, electronic device, and storage medium provided in this application allow a receiving device to receive a first data packet sent by a sending device. The first data packet includes a message type. Based on the message type of the first data packet, the receiving device can determine the target data and the message type of a second data packet. Then, the receiving device can send the second data packet to the sending device. In this application, because there is a correspondence between the message type of the first data packet and the message type of the second data packet, and also a correspondence between the target data and the message type of the second data packet, the receiving device can determine the message type of the second data packet and the target data based on the message type of the first data packet. Then, the receiving device sends the second data packet to the sending device, ensuring that the sending device can receive the second data packet related to the first data packet, thus improving the communication efficiency between the sending and receiving devices. The validity of the mutual exchange is ensured. Since the message type of the first data message is a certificate acquisition message, signature transmission message, first value transmission message, or target parameter acquisition message, and the message type of the second data message is a certificate transmission message, signature verification message, interactive value acquisition message, or data encryption message, the sending end device can effectively realize certificate exchange and key negotiation between the sending end device and the receiving end device by sending the first data message to the receiving end device and the receiving end device sending the second data message to the sending end device. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0019] Figure 1 A schematic diagram of the network architecture of the data packet transmission system provided in the embodiments of this application;

[0020] Figure 2 A flowchart illustrating a data packet transmission method provided in an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of the structure of a second data packet provided in an embodiment of this application;

[0022] Figure 4 A flowchart illustrating another data packet transmission method provided in an embodiment of this application;

[0023] Figure 5 A flowchart illustrating another data packet transmission method provided in an embodiment of this application;

[0024] Figure 6A flowchart illustrating another data packet transmission method provided in an embodiment of this application;

[0025] Figure 7 A flowchart illustrating another data packet transmission method provided in an embodiment of this application;

[0026] Figure 8 A flowchart illustrating another data packet transmission method provided in an embodiment of this application;

[0027] Figure 9 A schematic diagram of the structure of a data packet transmission device provided in an embodiment of this application;

[0028] Figure 10 This is a schematic diagram of another data packet transmission device provided in an embodiment of this application. Detailed Implementation

[0029] The data packet transmission method, apparatus, electronic device, and storage medium provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0030] The terms "first" and "second," etc., in the specification and drawings of this application are used to distinguish different objects, rather than to describe a specific order of objects. For example, "first data packet" and "second data packet," etc., are used to distinguish different data packets, rather than to describe a specific order of data packets.

[0031] Furthermore, the terms “comprising” and “having”, and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0032] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0033] The term "and / or" as used in this application includes using either one of two methods or using both methods simultaneously.

[0034] In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0035] As described in the background art, in related technologies, devices cannot receive responses corresponding to requests sent by the device. Therefore, embodiments of this application provide a data packet transmission method, apparatus, electronic device, and storage medium. Since there is a correspondence between the packet type of the first data packet and the packet type of the second data packet, and a correspondence between the target data and the packet type of the second data packet, the receiving device can determine the packet type of the second data packet and the target data based on the packet type of the first data packet. Then, the receiving device sends the second data packet to the sending device, ensuring that the sending device can receive the second data packet related to the first data packet, thus improving the efficiency of data transmission. The effectiveness of the interaction between the sending device and the receiving device is ensured. Since the message type of the first data packet is a certificate acquisition message, a signature transmission message, a first value transmission message, or a target parameter acquisition message, and the message type of the second data packet is a certificate transmission message, a signature verification message, an interactive value acquisition message, or a data encryption message, the sending device to the receiving device and the receiving device sending the second data packet can effectively realize certificate exchange and key negotiation between the sending device and the receiving device.

[0036] The data packet transmission method, apparatus, electronic device, and storage medium provided in this application embodiment can be applied to a data packet transmission system, such as... Figure 1 As shown, the data packet transmission system includes device 101 and device 102. Typically, in practical applications, the connection between these devices can be wireless. To facilitate a clear and intuitive representation of the connection relationships between the devices, Figure 1 Solid lines are used to represent the meaning.

[0037] Device 101 can send a first data packet to device 102. Device 102 can determine the target data and the message type of the second data packet based on the message type of the first data packet, and send the second data packet to device 101.

[0038] For example, the receiving device executing the embodiments of this application can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc. This application does not impose special limitations on the specific form of the receiving device. It can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device.

[0039] For example, the receiving device executing the embodiments of this application can also be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) services, and big data and artificial intelligence platforms.

[0040] The data packet transmission method, apparatus, electronic device, and storage medium provided in this application embodiment are applied in the scenario of data packet transmission. After the receiving device receives the first data packet sent by the sending device, it can determine the target data and the message type of the second data packet based on the message type of the first data packet, and then send the second data packet to the sending device.

[0041] like Figure 2 As shown, the data packet transmission method provided in this application embodiment may include S101-S103.

[0042] S101, The receiving device receives the first data packet sent by the sending device.

[0043] The first data packet includes a message type, which may be a certificate acquisition message, a signature transmission message, a first value transmission message, or a target parameter acquisition message. The certificate acquisition message is used to acquire the certificate of the receiving device. The signature transmission message is used to send a first signature, which is the signature of the sending device. The first value transmission message is used to send a first value, which is one of a plurality of values ​​stored in the sending device. The target parameter acquisition message is used to acquire a target parameter.

[0044] It is understandable that the sending device can send a first data packet to the receiving device, and then the receiving device can receive the first data packet.

[0045] In this embodiment of the application, the message type of the first data packet can also be understood as the interaction state between the sending device and the receiving device. For example, when the message type of the first data packet is a certificate acquisition message, it can also be understood that the interaction between the sending device and the receiving device is in the certificate acquisition state, indicating that the sending device requests to acquire the certificate of the receiving device. At this time, the receiving device can send the certificate of the receiving device to the sending device.

[0046] It is understandable that the signature sending message is used to send the first signature. When the message type of the first data message is a signature sending message, the first data message may also include the signature of the sending device.

[0047] It should be understood that the first value transmission message is used to transmit a first value. When the message type of the first value transmission message is a first value transmission message, the first data message may also include a first value, which is one of multiple values ​​stored in the sending device.

[0048] Optionally, the multiple values ​​are random numbers stored in the transmitting device, and the transmitting device can generate the multiple values ​​based on the rand function.

[0049] It is understood that the first data packet may also include a destination address, a source address, and a protocol type. The destination address is the media access control address (MAC) address of the receiving device, the source address is the MAC address of the sending device, and the protocol type is the protocol type used in the format of the first data packet.

[0050] Optionally, the protocol type of the first data message can be a slow protocol type.

[0051] Optionally, the first data packet may also use an identifier to characterize the slow protocol type, for example, using 0x8809 to identify the slow protocol type.

[0052] Optionally, the first data packet may further include a sub-protocol type, which is a certificate exchange and key negotiation protocol type. The sending device and the receiving device can exchange certificates and negotiate keys through the interaction between data packets of the certificate exchange and key negotiation protocol type.

[0053] Optionally, the first data packet may also use an identifier to represent a subtype of the slow protocol type, such as using 0x02 to represent the certificate exchange and key negotiation protocol.

[0054] Optionally, the first data packet may further include a frame type, which is a certificate exchange type or a key negotiation protocol type. Specifically, when the message type of the first data packet is a certificate acquisition message or a signature transmission message, the frame type of the first data packet is a certificate exchange type. When the message type of the first data packet is a first value transmission message or a target parameter acquisition message, the frame type of the first data packet is a key negotiation protocol type.

[0055] Optionally, the first data message may also use an identifier to represent the certificate exchange protocol frame and an identifier to identify the key exchange protocol frame, for example, using 0x00 to identify the certificate exchange protocol frame and 0x01 to identify the key exchange protocol frame.

[0056] S102. The receiving device determines the target data and the message type of the second data message based on the message type of the first data message.

[0057] The second data message can be a certificate delivery message, a signature verification message, an interactive value acquisition message, or a data encryption message. The certificate delivery message is used to send the certificate of the receiving device, the signature verification message is used to verify the correctness of the first signature, the interactive value acquisition message is used to acquire the interactive value, the interactive value is used to generate the target parameter, and the data encryption message is used to send the target parameter and instruct the sending device to generate an encryption key based on the target parameter.

[0058] It should be understood that the receiving device can determine the message type of the second data packet based on the message type of the first data packet, and there is a correspondence between the message type of the first data packet and the message type of the second data packet.

[0059] Specifically, when the first data packet is a certificate acquisition packet, the receiving device can determine that the message type of the second data packet is a certificate delivery packet; when the first data packet is a signature transmission packet, the receiving device can determine that the message type of the second data packet is a signature verification packet; when the message type of the first data packet is a first value transmission packet, the receiving device can determine that the message type of the second data packet is an interactive value acquisition packet; when the message type of the first data packet is a target parameter acquisition packet, the receiving device can determine that the message type of the second data packet is a data encryption packet.

[0060] It is understandable that there is a correspondence between the message type of the second data message and the target data. After the receiving device determines the message type of the second data message, it can determine the target data based on the message type of the second data message.

[0061] For example, assuming the message type of the second data message is a certificate delivery message, the receiving device can determine that the target data is the certificate of the receiving device.

[0062] In one implementation of this application, when the message type of the first data message is a first value sending message, the first value sending message is used to send a first value. The first data message also includes the first value. At this time, the receiving device can determine that the message type of the second data message is an interactive value acquisition message. Since the sending device needs to generate based on the first value and the second value, the receiving device can determine the second value from multiple values ​​stored in the receiving device, and then determine the second value as the target data, so that the sending device can generate an interactive value based on the first value and the second value.

[0063] It should be noted that the second value is one of a plurality of values ​​stored in the receiving device. These plurality of values ​​are random values, and the receiving device can generate these plurality of values ​​based on the rand function.

[0064] In this embodiment of the application, when the message type of the first data message is a first value transmission message, the first data message also includes the field size of the first value. After receiving the first data message, the receiving device can determine the field size of the field as the first value based on the field size of the first value.

[0065] S103. The receiving device sends a second data packet to the sending device.

[0066] The second data message includes the message type and target data, and the target data corresponds to the message type of the second data message.

[0067] It is understandable that after the receiving device determines the target data and the message type of the second data packet, it can send the second data packet to the sending device, and then the sending device can receive the second data packet.

[0068] It should be understood that when the message type of the second data message is an interactive value acquisition message, the second data message may also include the field size of the second value. After receiving the second data message, the sending device can determine the field size of the field as the second value based on the field size of the second value.

[0069] Optionally, the field size of the second value can be 2 bytes.

[0070] In one implementation of this application, after receiving the second data packet, the sending device can determine the message type of the third data packet and the target data included in the third data packet based on the message type of the second data packet, and then send the third data packet to the receiving device.

[0071] For example, assuming the message type of the second data packet is an interactive value acquisition message, the sending device can determine that the message type of the third data packet is a target parameter acquisition message, and the target data is the interactive value. Then the sending device can send the third data packet to the receiving device.

[0072] Optionally, the second data packet may also include a source address, a destination address, a protocol type, a sub-protocol type, and a frame type. The source address is the MAC address of the receiving device, the destination address is the destination address of the sending device, the protocol type is a slow protocol type, the sub-protocol type is a certificate exchange and key negotiation protocol type, and the frame type is a certificate exchange type or a key negotiation protocol type. Specifically, when the message type of the second data packet is a certificate delivery message or a signature verification message, the frame type of the second data packet is a certificate exchange type. When the message type of the second data packet is an interactive value acquisition message or a data encryption message, the frame type of the second data packet is a key negotiation protocol type.

[0073] For example, such as Figure 3As shown, assuming the second data packet is an interactive value acquisition packet, it includes fields 201, 202, 203, 204, 205, 206, and 207. Field 201 contains address 1, which is the MAC address of the receiving device, and its size is 6 bytes. Field 202 contains address 2, which is the MAC address of the sending device, and its size is also 6 bytes. Field 203 contains 0x8809, which indicates that the protocol type of the first data packet is a slow protocol, and its size is 2 bytes. Field 204 contains 0x10, which indicates that the first data packet... The sub-protocol type of the message is Certificate Exchange and Key Negotiation Protocol type, and the field size of field 204 is 1 byte; the content of field 205 is 0x00, which is used to indicate that the frame type of the first data message is Certificate Exchange Protocol frame, and the field size of field 205 is 1 byte; the content of field 206 is 0x00, which is used to indicate that the message type of the first data message is Interactive Value Acquisition Message, and the field size of field 206 is 1 byte; the value of field 207 is 1, which is the second value, and the field size of field 207 is 2 bytes.

[0074] The technical solutions provided by the above embodiments can bring at least the following beneficial effects: As shown in S101-S103, the receiving device can receive a first data packet sent by the sending end. The first data packet includes the message type of the first data packet. The receiving device can determine the target data and the message type of the second data packet based on the message type of the first data packet. Then, the receiving device can send the second data packet to the sending end device. In this application, since there is a correspondence between the message type of the first data packet and the message type of the second data packet, and there is a correspondence between the target data and the message type of the second data packet, the receiving device can determine the message type of the second data packet and the target data based on the message type of the first data packet. Then, the receiving device sends the second data packet to the sending end device, which can ensure that the sending end device can receive the second data packet related to the first data packet, thereby improving the communication between the sending end device and the receiving device. The validity of the mutual exchange is ensured. Since the message type of the first data message is a certificate acquisition message, signature transmission message, first value transmission message, or target parameter acquisition message, and the message type of the second data message is a certificate transmission message, signature verification message, interactive value acquisition message, or data encryption message, the sending end device can effectively realize certificate exchange and key negotiation between the sending end device and the receiving end device by sending the first data message to the receiving end device and the receiving end device sending the second data message to the sending end device.

[0075] Combination Figure 2 ,like Figure 4 As shown, the receiving device determines the target data and the message type of the second data message based on the message type of the first data message, which may specifically include S1021-S1022.

[0076] S1021. If the type of the first data packet is a target parameter acquisition packet, the receiving device determines that the packet type of the second data packet is a data encryption packet.

[0077] It is understandable that when the type of the first data packet is a target parameter acquisition packet, it means that the receiving device requests to acquire the target parameter. Since the target parameter is used to generate an encryption key, and the encryption key is used to encrypt business data, the receiving device can determine that the packet type of the second data packet is a data encryption packet. The data encryption packet is used to instruct the sending device to generate the encryption key based on the target parameter.

[0078] In one optional implementation, there is a correspondence between the message type of the first data message and the message type of the second data message. When the type of the first data message is a target parameter acquisition message, the receiving device can determine that the message type of the second data message is a data encryption message.

[0079] S1022. When the receiving device receives the interactive value sent by the sending end, it generates the target parameter based on the interactive value and determines the target data as the target parameter.

[0080] The interactive value is generated by the sending device based on the first value and the second value, and the second value is one of a plurality of values ​​stored in the receiving device.

[0081] It is understandable that if the receiving end receives the interactive value sent by the sending end, it means that the first data packet includes the interactive parameter. At this time, the receiving end device can generate the target parameter based on the interactive parameter.

[0082] Optionally, the receiving device can generate the target parameter based on the SM4 algorithm and the interaction value.

[0083] Optionally, the target parameter can be represented by "CM".

[0084] Optionally, the interaction value may include a first interaction value and a second interaction value. The sending device may generate the first interaction value based on the first value and generate the second interaction parameter based on the second value.

[0085] Optionally, the transmitting device can generate a first interaction parameter based on the Kyber algorithm and the first value, and generate a second interaction value based on the Kyber algorithm and the second value. For example, the first interaction parameter can be represented by "C" and the second interaction parameter can be represented by "C'".

[0086] In one alternative implementation, if the receiving device determines that the message type of the second data packet is a data encryption packet, the receiving device can continuously send three of the second data packets to the sending device, wherein each second data packet includes a sequence number of the second data packet. Then, after the sending device receives three second data packets, the sending device can determine to encrypt the next service data.

[0087] In this embodiment, when the message type of the first data packet is a target parameter acquisition packet, the receiving device determines that the message type of the second data packet is a data encryption packet. This allows for accurate determination of the message type of the second data packet. Furthermore, since the target parameter is used to generate an encryption key, which is used to encrypt business data, the receiving device generates the target parameter based on the interaction value and determines the target data as the target parameter. This enables the sending device to generate an encryption key based on the target parameter, thereby improving the security of the encryption key determination.

[0088] Combination Figure 2 ,like Figure 5 As shown, the receiving device determines the target data and the message type of the second data message based on the message type of the first data message, which may specifically include S1023-S1025.

[0089] S1023. If the message type of the first data message is a signature transmission message, the receiving device determines that the message type of the second data message is a signature verification message.

[0090] It should be understood that when the type of the first data packet is a signed transmission packet, the first data packet also includes the signature of the sending device. At this time, the receiving device can verify the signature of the sending device and then send the verification result to the sending device. Since the second data packet includes the verification result, the receiving device can determine that the packet type of the second data packet is a signature verification packet and that the signature verification packet includes the verification result.

[0091] S1024. The receiving device generates a second signature based on the third and fourth values.

[0092] The third value is a value other than the first value among the multiple values ​​stored in the transmitting device, and the fourth value is a value other than the second value among the multiple values ​​stored in the receiving device.

[0093] It is understandable that the third value can be a random number generated by the sending device, and the fourth value can be a random number generated by the receiving device.

[0094] S1025. If the first signature and the second signature are the same, the receiving device determines the target data to indicate that the first signature verification was successful.

[0095] It should be understood that if the first signature is the same as the second signature, it means that the first signature was generated by the sending device based on the third and fourth values. In this case, the receiving device can determine that the first signature was successfully verified.

[0096] It should be understood that the fourth value is sent by the receiving device to the sending device before receiving the first data packet, and the third value is sent by the sending device to the receiving device before sending the first data packet to the receiving device. Therefore, the sending device can generate the first signature based on the third value and the fourth value, and the receiving device can also generate the second signature based on the third value and the fourth value.

[0097] In one optional implementation, the second data packet (or the first data packet) may further include a status verification result, which may be that the peer certificate is incomplete, the peer signature is incomplete, the signature verification is successful, the signature verification is incorrect, or the encryption negotiation process is not completed. If the first signature is the same as the second signature, the status verification result included in the second data packet is that the signature verification is successful.

[0098] In this embodiment of the application, since the message type of the second data message is a signature verification message, the receiving device can verify the first signature. Since the first signature is generated by the sending device based on the third value and the fourth value, the electronic device also generates the second signature based on the third value and the fourth value. When the first signature and the second signature are the same, the target data is determined to indicate that the first signature verification is successful, which can improve the accuracy of the signature verification.

[0099] Combination Figure 2 ,like Figure 6 As shown, the receiving device determines the target data and the message type of the second data message based on the message type of the first data message, which may specifically include S1026-S1028.

[0100] S1026. If the message type of the first data packet is a certificate acquisition message, the receiving device determines that the message type of the second data packet is a certificate transmission message.

[0101] It is understandable that if the message type of the first data packet is a certificate retrieval message, it means that the first data packet is used to retrieve the certificate of the receiving device. At this time, the receiving device can send its certificate to the sending device. Since the second data packet is used to send the certificate of the receiving device, the receiving device can determine that the message type of the second data packet is a certificate delivery message.

[0102] S1027. If the certificate length of the first certificate is greater than or equal to the length threshold, the receiving device splits the first certificate to obtain multiple text messages.

[0103] The first certificate is the certificate of the receiving device.

[0104] It should be understood that if the certificate length of the first certificate is greater than or equal to the length threshold, it indicates that the certificate length of the first certificate is too long, and the second data packet may not include the complete first certificate. In this case, the receiving device can split the first certificate to obtain multiple text messages.

[0105] It is understandable that the length of each text message in these multiple text messages is less than the length threshold.

[0106] Optionally, the length threshold can be 1518 bytes.

[0107] S1028. The receiving device determines that the target data includes multiple text messages, and the target data is used to indicate the order of the multiple text messages.

[0108] It is understandable that since the multiple text messages are obtained by the receiving device through splitting the first certificate, the multiple text messages can be combined to obtain the first certificate. The receiving device can identify the multiple text messages as the target data and then send the multiple text messages to the sending device.

[0109] Specifically, the receiving device can send multiple data packets to the sending device, each of which includes a text message.

[0110] It should be understood that each data packet also includes a number of text information included in each data packet. The number of text information is used to characterize the order in which the text information is arranged when forming the first certificate. The sending device can determine the order of the text information included in each data packet based on the number included in each data packet, and then obtain the first certificate based on the order of arrangement.

[0111] Optionally, the second data message may also include the length of each text message and the total number of the multiple text messages.

[0112] Optionally, the second data message may also include a third value, so that the sending device can generate a first signature based on the third value.

[0113] In one optional implementation, after the sending device sends the first data packet to the receiving device, it can synchronously set a timer and set a time threshold. If the second data packet is not received within the time threshold, the sending device can resend the first data packet of type certificate acquisition to the receiving device. If the second data packet is not received three times in a row, the sending device can issue an alarm message.

[0114] In another alternative implementation, if the number of multiple text messages received by the sending device is different from the total number of the multiple text messages, the sending device may send a fourth data message to the receiving device. The status verification result of the fourth data message is that the peer certificate is incomplete. The fourth data message is used to notify the receiving device to resend the first certificate.

[0115] In this embodiment, if the certificate length of the first certificate is too long, the receiving device can split the first certificate into multiple text messages and then determine the multiple text messages as target data. This can improve the integrity of the first certificate transmission. Since the target data is used to indicate the arrangement order of the multiple text messages, the receiving device can send the second data message to the sending device to ensure that the sending device accurately obtains the first certificate based on the arrangement order.

[0116] Combination Figure 2 ,like Figure 7 As shown, after the receiving device sends the second data packet to the sending device, the data packet transmission method provided in this application embodiment further includes S104.

[0117] S104. If the first signature is not obtained within the preset time period, the receiving device issues an alarm message.

[0118] It is understandable that after the receiving device sends a second data message of type certificate transmission to the sending device, the receiving device can synchronously set a timer and a preset duration. If the first signature is not obtained within the preset duration, the receiving device can issue an alarm message.

[0119] In one alternative implementation, the length of the first signature may be greater than or equal to a length threshold. If the first signature is greater than or equal to the length threshold, the receiving device may receive multiple signature information and then combine the multiple signature information to obtain the first signature. If the signature information of the multiple signatures cannot be combined to form the first signature, the receiving device may also issue an alarm message.

[0120] In this embodiment of the application, if the receiving device fails to obtain the first signature within a preset time period, it issues an alarm message, which can improve the accuracy of the data message interaction and provide timely feedback in the event of a failure in the message interaction.

[0121] like Figure 8 As shown, when the data packet transmission method is applied to the interaction process between device 101 and device 102, the data packet transmission method may include S201-S227.

[0122] S201, The sending device sends data packet 1 to the receiving device.

[0123] Among them, the message type of data message 1 is a certificate acquisition message, and data message 1 is used to acquire the certificate of the receiving device.

[0124] S202, The receiving device receives the data packet 1 sent by the sending device.

[0125] S203, The receiving device sends data packet 2 to the sending device.

[0126] The data packet 2 includes a first certificate and a fourth value. The data packet 2 is a certificate delivery message. The data packet 2 is used to send the certificate of the receiving device. The first certificate is the certificate of the receiving device.

[0127] It should be understood that the fourth value is one of a plurality of values ​​stored in the receiving device.

[0128] S204. The receiving device sends data packet 3 to the sending device.

[0129] Among them, the message type of data message 3 is a certificate acquisition message, and data message 3 is used to acquire the certificate of the sending device.

[0130] It should be noted that the execution order of S203 and S1204 in this application embodiment is not limited. For example, S203 can be executed first and then S204 can be executed, or S204 can be executed first and then S203 can be executed, or S203 and S204 can be executed simultaneously.

[0131] S205, The sending device receives data packet 2 and data packet 3.

[0132] It should be understood that the sending device can obtain the fourth value and the first certificate.

[0133] S206. The sending device sends data packet 4 to the receiving device.

[0134] The data packet 4 includes a second certificate and a third value. The data packet 2 is a certificate delivery message and is used to send the certificate of the sending device.

[0135] S207. The receiving device receives the data packet 4 sent by the sending device.

[0136] It is understandable that the receiving device can obtain the third value and the second certificate.

[0137] S208. The sending device generates a first signature based on the third and fourth values.

[0138] It should be understood that the first signature is the signature of the sending device.

[0139] S209. The sending device sends data packet 5 to the receiving device.

[0140] Among them, the message type of data message 5 is a signature sending message, the data message 5 includes the first signature, and the data message 5 is used to send the first signature.

[0141] S210, The receiving device receives the data packet 5 sent by the sending device.

[0142] Understandably, the receiving device can obtain this first signature.

[0143] S211. The receiving device generates a second signature based on the third and fourth values.

[0144] It should be understood that the second signature is the signature of the receiving device.

[0145] S212, The receiving device sends data packet 6 to the sending device.

[0146] The data message 6 is a signature sending message, which includes the second signature and is used to send the second signature.

[0147] S213. If the first signature and the second signature are the same, the sending device sends data packet 7 to the receiving device.

[0148] Among them, the message type of data message 7 is a signature verification message, and data message 7 is used to indicate that the second signature verification is successful.

[0149] S214. If the first signature and the second signature are the same, the receiving device sends data packet 8 to the sending device.

[0150] Among them, the message type of data message 8 is a signature verification message, and data message 8 is used to indicate that the first signature verification was successful.

[0151] S215. The receiving device receives the data packet 7 sent by the sending device.

[0152] S216. The sending device receives the data packet sent by the receiving device.

[0153] S217. The sending device sends data packet 9 to the receiving device.

[0154] The data message 9 is a first value transmission message, which includes a first value and is used to transmit the first value.

[0155] S218. The receiving device receives the data packet 9 sent by the sending device.

[0156] S219. The receiving device sends data packet 10 to the sending device.

[0157] The data message 10 is of type interactive value acquisition, and includes a second value. The data message 10 is used to acquire interactive values.

[0158] S220, The sending device receives the data packet 10 sent by the receiving device.

[0159] S221. The sending device generates an interactive value based on the first value and the second value.

[0160] S222, The sending device sends data packet 11 to the receiving device.

[0161] The data message 11 is a target parameter acquisition message, and the data message 11 includes the interactive value. The data message 11 is used to acquire the target parameter.

[0162] S223, The receiving device receives the data packet 11 sent by the sending device.

[0163] S224. The receiving device generates target parameters based on the interactive values.

[0164] S225. The receiving device sends data packet 12 to the sending device.

[0165] The data message 12 is a data encryption message, and the data message 12 includes the target parameter. The data message 12 is used to send the target parameter.

[0166] S226. The sending device receives data packet 12 sent by the receiving device.

[0167] It should be understood that the sending device can obtain this target parameter.

[0168] S227. The sending device generates a target key based on the target parameters.

[0169] It should be understood that the sending device can encrypt subsequent business data based on the target key to obtain target encrypted data, and then send the target encrypted data to the receiving device.

[0170] In this embodiment of the application, since there is a correspondence between the first data packet and the second data packet, and there is also a correspondence between the target data and the second data packet, the receiving device and the sending device can send packets to each other based on the packet type of the received packet, ensuring the accuracy and continuity of packet transmission, and can automatically complete the exchange of certificates and the negotiation of keys, thereby improving the efficiency of certificate exchange and key negotiation between devices.

[0171] This application embodiment can divide the receiving device and other components into functional modules according to the above method examples. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0172] When dividing each function into modules according to its corresponding function. Figure 9 A possible structural schematic diagram of the data packet transmission device involved in the above embodiments is shown, such as... Figure 9 As shown, the data packet transmission device 30 may include: a receiving module 301, a determining module 302, and a sending module 303.

[0173] The receiving module 301 is used to receive a first data packet sent by the sending device. The first data packet includes a message type, which is a certificate acquisition message, a signature sending message, a first value sending message, or a target parameter acquisition message. The certificate acquisition message is used to acquire the certificate of the receiving device. The signature sending message is used to send a first signature, which is the signature of the sending device. The first value acquisition message is used to send a first value, which is one of a plurality of values ​​stored in the sending device. The target parameter acquisition message is used to acquire a target parameter.

[0174] The determining module 302 is used to determine the target data and the message type of the second data message based on the message type of the first data message. The message type of the second data message is a certificate delivery message, a signature verification message, an interactive value acquisition message, or a data encryption message. The certificate delivery message is used to send the certificate of the receiving device. The signature verification message is used to characterize the correctness of the first signature. The interactive value acquisition message is used to acquire an interactive value. The interactive value is used to generate the target parameter. The data encryption message is used to send the target parameter and instruct the sending device to generate an encryption key based on the target parameter.

[0175] The sending module 303 is used to send the second data packet to the sending end. The second data packet includes the message type of the second data packet and target data. The target data has a corresponding relationship with the message type of the second data packet.

[0176] Optionally, the determining module 302 is specifically used to determine the message type of the second data message as the data encryption message when the type of the first data message is the target parameter acquisition message.

[0177] The determining module 302 is further configured to, upon receiving the interactive value sent by the sending end, generate the target parameter based on the interactive value, and determine the target data as the target parameter. The interactive value is generated by the sending end device based on the first value and the second value, and the second value is one of a plurality of values ​​stored in the receiving end device.

[0178] Optionally, the data packet transmission device 30 described above further includes a processing module 304.

[0179] The determining module 302 is further configured to determine the message type of the second data message as the signature verification message when the message type of the first data message is the signature sending message.

[0180] The processing module 304 is used to generate a second signature based on a third value and a fourth value, wherein the third value is a value other than the first value among a plurality of values ​​stored in the sending device, and the fourth value is a value other than the second value among a plurality of values ​​stored in the receiving device.

[0181] The determination module 302 is further configured to determine, when the first signature is the same as the second signature, the target data is used to indicate that the first signature verification was successful.

[0182] Optionally, the determining module 302 is further configured to determine the message type of the second data packet as the certificate transmission message when the message type of the first data packet is the certificate acquisition message.

[0183] The processing module 304 is used to split the first certificate into multiple text messages when the certificate length of the first certificate is greater than or equal to a length threshold. The first certificate is the certificate of the receiving device.

[0184] The determining module 302 is further configured to determine that the target data includes the plurality of text information, and that the target data is used to indicate the arrangement order of the plurality of text information.

[0185] Optionally, the data packet transmission device 30 described above also includes an alarm module 305.

[0186] The alarm module 305 is used to issue an alarm message if the first signature is not obtained within a preset time period.

[0187] When using integrated units, Figure 10 A possible structural schematic diagram of the data packet transmission apparatus involved in the above embodiments is shown. For example... Figure 10 As shown, the data packet transmission device 40 may include a processing module 401 and a communication module 402. The processing module 401 can be used to control and manage the operation of the data packet transmission device 40. The communication module 402 can be used to support communication between the data packet transmission device 40 and other entities. Optionally, as... Figure 10 As shown, the data packet transmission device 40 may further include a storage module 403 for storing the program code and data of the data packet transmission device 40.

[0188] The processing module 401 can be a processor or a controller. The communication module 402 can be a transceiver, transceiver circuit, or communication interface, etc. The storage module 403 can be a memory.

[0189] In this configuration, when the processing module 401 is a processor, the communication module 402 is a transceiver, and the storage module 403 is a memory, the processor, transceiver, and memory can be connected via a bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc.

[0190] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply 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.

[0191] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

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

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

[0194] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0195] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data packet transmission method, characterized in that, Applied to a receiving device, the method includes: The receiver receives a first data packet sent by a sending device. The first data packet includes a message type, which may be a certificate acquisition message, a signature transmission message, a first value transmission message, or a target parameter acquisition message. The certificate acquisition message is used to acquire the certificate of the receiving device. The signature transmission message is used to send a first signature, which is the signature of the sending device. The first value transmission message is used to send a first value, which is one of multiple values ​​stored in the sending device. The target parameter acquisition message is used to acquire a target parameter. The first data packet includes a sub-protocol type and a frame class. The sub-protocol type is a certificate exchange and key negotiation protocol type; the interaction between data packets of the certificate exchange and key negotiation protocol type is used to realize certificate exchange and key negotiation between the receiving device and the sending device; the frame type is a certificate exchange type or a key negotiation protocol type; when the message type of the first data packet is a certificate acquisition message or a signature transmission message, the frame type of the first data packet is the certificate exchange type; when the message type of the first data packet is a first value transmission message or a target parameter acquisition message, the frame type of the first data packet is the key negotiation protocol type. Based on the message type of the first data packet, the message types of the target data and the second data packet are determined. The message type of the second data packet is a certificate delivery message, a signature verification message, an interactive value acquisition message, or a data encryption message. The certificate delivery message is used to send the certificate of the receiving device. The signature verification message is used to characterize the correctness of the first signature. The interactive value acquisition message is used to acquire an interactive value. The interactive value is used to generate the target parameter. The data encryption message is used to send the target parameter and instruct the sending device to generate an encryption key based on the target parameter. The target parameter is a parameter generated based on the interactive value and the SM4 algorithm. The interactive value includes a first interactive value and a second interactive value. The first interactive value is a value generated based on the first value and the Kyber algorithm. The second interactive value is a value generated based on the second value and the Kyber algorithm. The second value is one of multiple values ​​stored in the receiving device. The second data packet is sent to the sending end. The second data packet includes the message type of the second data packet and target data. The target data corresponds to the message type of the second data packet.

2. The data packet transmission method according to claim 1, characterized in that, The step of determining the message types of the target data and the second data message based on the message type of the first data message includes: If the type of the first data packet is the target parameter acquisition packet, then the packet type of the second data packet is determined to be the data encryption packet; Upon receiving the interactive value sent by the sending end, the target parameter is generated based on the interactive value, and the target data is determined as the target parameter. The interactive value is generated by the sending end device based on the first value and the second value, and the second value is one of a plurality of values ​​stored in the receiving end device.

3. The data packet transmission method according to claim 1, characterized in that, The step of determining the message types of the target data and the second data message based on the message type of the first data message includes: If the message type of the first data message is the signature sending message, then the message type of the second data message is determined to be the signature verification message; A second signature is generated based on the third and fourth values, wherein the third value is a value other than the first value among a plurality of values ​​stored in the sending device, and the fourth value is a value other than the second value among a plurality of values ​​stored in the receiving device. If the first signature and the second signature are the same, the target data is determined to indicate that the first signature verification was successful.

4. The data packet transmission method according to claim 1, characterized in that, The step of determining the message types of the target data and the second data message based on the message type of the first data message includes: If the message type of the first data packet is the certificate acquisition message, then the message type of the second data packet is determined to be the certificate delivery message; If the certificate length of the first certificate is greater than or equal to the length threshold, the first certificate is split to obtain multiple text information, where the first certificate is the certificate of the receiving device. The target data is determined to include the plurality of text information, and the target data is used to indicate the arrangement order of the plurality of text information.

5. The data packet transmission method according to claim 4, characterized in that, After sending the second data packet to the sending end, the method further includes: If the first signature is not obtained within a preset time period, an alarm message will be issued.

6. A data message transmission device, characterized in that, include: The module consists of a receiving module, a determining module, and a sending module; The receiving module is configured to receive a first data packet sent by the sending device. The first data packet includes a message type, which may be a certificate acquisition message, a signature transmission message, a first value transmission message, or a target parameter acquisition message. The certificate acquisition message is used to acquire the certificate of the receiving device. The signature transmission message is used to send a first signature, which is the signature of the sending device. The first value transmission message is used to send a first value, which is one of multiple values ​​stored in the sending device. The target parameter acquisition message is used to acquire a target parameter. The first data packet includes a sub-protocol type and a frame type. The sub-protocol type is a certificate exchange and key negotiation protocol type. The interaction between data packets of the certificate exchange and key negotiation protocol type is used to implement certificate exchange and key negotiation between the receiving device and the sending device. The frame type is either a certificate exchange type or a key negotiation protocol type; When the message type of the first data message is the certificate acquisition message or the signature sending message, the frame type of the first data message is the certificate exchange type; When the message type of the first data message is the first value sending message or the target parameter acquisition message, the frame type of the first data message is the key negotiation protocol type; The determining module is used to determine the target data and the message type of the second data packet based on the message type of the first data packet. The message type of the second data packet is a certificate delivery message, a signature verification message, an interactive value acquisition message, or a data encryption message. The certificate delivery message is used to send the certificate of the receiving device. The signature verification message is used to characterize the correctness of the first signature. The interactive value acquisition message is used to acquire an interactive value. The interactive value is used to generate the target parameter. The data encryption message is used to send the target parameter and instruct the sending device to generate an encryption key based on the target parameter. The target parameters are parameters generated based on the interaction values ​​and the SM4 algorithm; The interactive value includes a first interactive value and a second interactive value; the first interactive value is a value generated based on the first value and the Kyber algorithm. The second interactive value is a value generated based on the second value and the Kyber algorithm; The second value is one of a plurality of values ​​stored in the receiving device; The sending module is used to send the second data packet to the sending end. The second data packet includes the message type of the second data packet and target data. The target data has a corresponding relationship with the message type of the second data packet.

7. The data packet transmission apparatus according to claim 6, characterized in that, The determining module is specifically used to determine that the message type of the second data message is the data encryption message when the type of the first data message is the target parameter acquisition message; The determining module is further configured to, upon receiving the interaction value sent by the sending end, generate the target parameter based on the interaction value, and determine the target data as the target parameter, wherein the interaction value is generated by the sending end device based on the first value and the second value, and the second value is one of a plurality of values ​​stored in the receiving end device.

8. The data packet transmission apparatus according to claim 6, characterized in that, The data packet transmission device further includes a processing module; The determining module is further configured to determine that the message type of the second data message is the signature verification message when the message type of the first data message is the signature sending message; The processing module is used to generate a second signature based on a third value and a fourth value, wherein the third value is a value other than the first value among a plurality of values ​​stored in the sending device, and the fourth value is a value other than the second value among a plurality of values ​​stored in the receiving device. The determining module is further configured to determine, when the first signature and the second signature are the same, that the target data is used to indicate that the first signature verification was successful.

9. The data packet transmission apparatus according to claim 6, characterized in that, The data packet transmission device further includes a processing module; The determining module is further configured to determine that the message type of the second data packet is the certificate delivery message when the message type of the first data packet is the certificate acquisition message; The processing module is used to split the first certificate into multiple text messages when the certificate length of the first certificate is greater than or equal to a length threshold, wherein the first certificate is the certificate of the receiving device. The determining module is further configured to determine that the target data includes the plurality of text information, and that the target data is used to indicate the arrangement order of the plurality of text information.

10. The data packet transmission apparatus according to claim 9, characterized in that, The data packet transmission device also includes an alarm module; The alarm module is used to issue an alarm message if the first signature is not obtained within a preset time period.

11. An electronic device, characterized in that, The electronic device includes: processor; A memory configured to store processor-executable instructions; The processor is configured to execute the instructions to implement the data packet transmission method as described in any one of claims 1-5.

12. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions in the computer-readable storage medium are executed by an electronic device, the electronic device is able to perform the data packet transmission method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Data message transmission method and device and core network equipment

    CN114070893A

  • Message conversion method and device based on service type, equipment and storage medium

    CN115118777A