Data transmission method and system in Internet of Things environment and storage medium
By embedding a session control field and marking the session connection during the handshake phase of the data packet transport layer security protocol in IoT devices, the problems of data packet ordering errors and loss in IoT devices are solved, enabling data transmission across session connections and improving the accuracy and reliability of data transmission.
Patent Information
- Application Number
- CN202510982122.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-11-11
AI Technical Summary
IoT devices cannot use the Transmission Control Protocol (TCP) due to hardware limitations, and UDP-based protocols cannot solve the problems of packet reordering and loss, and existing protocols cannot support data recovery across connections.
In the handshake phase of the data packet transport layer security protocol, a session control field is embedded. A preset identifier field marks the session connection to which the data belongs. The session identifier is used for cross-session connection transmission. The acknowledgment character and the reserved identifier are combined to ensure the order and integrity of data packets.
It enables data transmission across sessions in an IoT environment, improving the accuracy and reliability of data transmission and ensuring that data is not lost in the event of network instability.
Smart Images

Figure CN120935210A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a data transmission method, system, and storage medium in an Internet of Things (IoT) environment. Background Technology
[0002] Currently, many IoT devices use transmission protocols that are higher-layer protocols than the Transmission Control Protocol (TCP), such as Message Queuing Telemetry Transport (MQTT). However, some devices cannot use TCP due to hardware limitations.
[0003] Some protocols based on the User Datagram Protocol (UDP) do not address the issues of packet out-of-order delivery and data loss. While some protocols, such as CoAP and the lightweight IoT device management protocol LwM2M, can be implemented on top of UDP, data lost during a connection will not be retransmitted in subsequent connections.
[0004] Commonly used protocols in the Internet of Things (IoT) environment, whether TCP or CoAP based on UDP, only care about the data in the current connection and cannot support data recovery across connections. Summary of the Invention
[0005] The purpose of this invention is to provide a data transmission method, system, and storage medium in an Internet of Things (IoT) environment. The specific technical solution adopted is as follows:
[0006] In a first aspect, embodiments of the present invention provide a data transmission method in an Internet of Things (IoT) environment, the method comprising:
[0007] During the handshake phase of data transmission based on the Packet Transport Layer Security (PTS) protocol, a session control field is embedded in the data to be transmitted.
[0008] Based on the session control field, the session identifier of the current session connection to which the data to be transmitted belongs is marked using a preset identifier field to obtain the marked data;
[0009] Based on the control header of the tagged data and the session identifier, the tagged data is transmitted across sessions.
[0010] Secondly, embodiments of the present invention provide a data transmission system in an Internet of Things (IoT) environment, the system comprising:
[0011] An embedding module is used to embed the session control field of the data to be transmitted during the handshake phase of the data transmission process based on the Packet Transport Layer Security protocol.
[0012] The marking module is used to mark the session identifier of the current session connection to which the data to be transmitted belongs based on the session control field and using a preset identifier field, so as to obtain the marked data;
[0013] The transmission module is used to transmit the tagged data across sessions based on the control header of the tagged data and the session identifier.
[0014] Thirdly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect.
[0015] Fourthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the method described in the first aspect.
[0016] This invention offers the following advantages: After determining the handshake phase of the data transmission process, the session control field of the data to be transmitted is embedded in this handshake phase as an identifier for the current session connection. Then, based on the session control field, a preset identifier field is used to mark the session identifier of the current session connection to which the data to be transmitted belongs, resulting in marked data. Finally, based on the control header of the marked data and the session identifier, the marked data is transmitted across session connections. Thus, in each transmitted data, the session identifier of the current session connection to which the data to be transmitted belongs is marked using a preset identifier field, thereby enabling the transmission of data from previous session connections within the current session connection. Furthermore, through the session identifier and the control header of the marked data, cross-session connection data transmission of the marked data is achieved, improving the accuracy of cross-session connection data transmission. Attached Figure Description
[0017] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram illustrating the implementation process of a data transmission method in an Internet of Things (IoT) environment provided by an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram illustrating another implementation process of a data transmission method in an Internet of Things (IoT) environment provided by an embodiment of the present invention.
[0020] Figure 3 This is a schematic diagram illustrating another implementation process of a data transmission method in an Internet of Things environment provided by an embodiment of the present invention;
[0021] Figure 4 This is a schematic diagram of the composition structure of a data transmission system in an Internet of Things (IoT) environment provided by an embodiment of the present invention;
[0022] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0023] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a data transmission method in an Internet of Things (IoT) environment proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined from any suitable form.
[0024] In the description of the embodiments of the present invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" means two or more.
[0025] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0027] To enhance unstable data transmission in IoT environments and ensure data integrity across connections, this invention presents a novel protocol to address data transmission issues in unstable network environments. This protocol is based on the DTLS (Digital Transmission Protocol) pre-shared key (PSK) encryption method and its main functions include: UDP-based support, connection session support, cross-connection message persistence, message order guarantee, message loss retransmission, and scalable message types.
[0028] The specific solution of a data transmission method in an Internet of Things (IoT) environment provided by the present invention will be described in detail below with reference to the accompanying drawings. Please refer to... Figure 1 It illustrates a schematic diagram of the implementation process of a data transmission method in an Internet of Things (IoT) environment according to an embodiment of the present invention. The method includes:
[0029] 101. In the handshake phase of data transmission based on the Packet Transport Layer Security (PTS) protocol, a session control field is embedded in the data to be transmitted.
[0030] Here, the session control field includes at least a session identifier. In some possible implementations, the session identifier is embedded in the transmission process by establishing a pre-shared key encrypted transmission procedure, thereby facilitating cross-connection data transmission; that is, step 101 above can be achieved through... Figure 2 The steps shown are to be implemented as follows:
[0031] 201. Establish pre-shared key encrypted transmission based on the data packet transport layer security protocol.
[0032] Here, according to the definition of PSK encryption: a symmetric key-based encryption authentication method where both communicating parties share a key before establishing a connection for authentication and data encryption. The first message in the handshake process (ClientHello) contains "PSK identity," a field used to identify the client's information, and then the relevant PSK key is found for the handshake. In this protocol, in addition to the above function, the protocol's SessionId is also embedded in this field. For example, it can be embedded like this: "{client id}|{SessionId}"; using "|" as the separator, the first part is the general PSK id, and the second part is the required SessionId. Note that all "SessionId" mentioned in this embodiment refers to the session identifier defined by the protocol provided in this embodiment, not the SessionId in the DTLS protocol.
[0033] 202. During the encrypted transmission of the pre-shared key, a handshake phase corresponding to the data to be transmitted is established.
[0034] Here, during the DTLS connection handshake phase, a transport guarantee mechanism is implemented. During the handshake, some control fields are embedded within it as configuration for this connection. Here, the PSK's Identity string (i.e., the identifier string) is defined to include the current connection's SessionId.
[0035] 203. During the handshake phase, the session identifier of the data to be transmitted is embedded.
[0036] The session control field includes a session identifier. By determining the identity identifier corresponding to the data to be transmitted during the handshake phase, and embedding the session identifier of the data to be transmitted into the identity identifier corresponding to the handshake phase, cross-connection data transmission can be achieved by determining the session identifier of the handshake phase of the established current connection and setting the session identifier within the identity identifier corresponding to the handshake phase.
[0037] In some possible implementations, the handshake phase can embed several control fields. In the protocol of this embodiment, only one control field is embedded, namely, the SessionId (session identifier). In other implementations of this embodiment, the timeout period for the current connection can also be embedded.
[0038] 102. Based on the session control field, a preset identifier field is used to mark the session identifier of the current session connection to which the data to be transmitted belongs, so as to obtain the marked data.
[0039] Here, for each piece of data to be transmitted, a preset identifier field is used to mark the session identifier to which the data belongs, thereby obtaining the marked data. That is, firstly, each piece of data to be transmitted in the current session connection is determined; then, the preset identifier field is used to identify the session identifier of each piece of data to be transmitted in the current session connection, so that the current session connection can transmit data transmitted in historical session connections.
[0040] Here, a preset identification field is used, including: message session identifier (MsgSessionId) or a field similar to MsgSessionId. In each piece of data to be transmitted, a field similar to MsgSessionId identifies the SessionId of the session connection to which the data belongs, thus enabling the transmission of data from previous sessions within the current session connection. In a specific example, within a session connection (e.g., SessionId = 456), two messages are received:
[0041] MsgSessionId:123,FrameIndex:0
[0042] MsgSessionId:456,FrameIndex:0
[0043] Based on this, we can conclude that the message MsgSessionId:123,FrameIndex:0 is not a message from the current session connection, but belongs to the previous session connection with SessionId 123.
[0044] 103. Based on the control header of the tagged data and the session identifier, the tagged data is transmitted across sessions.
[0045] In some possible implementations, the transmission of tagged data across session connections is achieved through acknowledgment characters and reservation flags in the control header. That is, step 103 above can be achieved through... Figure 3 The steps shown are to be implemented as follows:
[0046] 301. In the control header of the marked data, determine the confirmation character and the reservation identifier.
[0047] Here, the data packet format for the data to be transmitted (i.e., the data packet format for the tagged data) includes: a 15-byte control header and multiple bytes of data; wherein: the 15-byte control header, as shown in Table 1, includes:
[0048] Information session identifier, used to represent the session identifier of the data to be transmitted;
[0049] A frame index is used to indicate the frame sequence number of the data frame to which the information session identifier belongs;
[0050] The types of data frames include: empty packet type, transmitted data type, and acknowledgment data type.
[0051] The terminator is used to indicate whether this is the last data frame sent;
[0052] The confirmation character indicates whether a confirmation message is required.
[0053] Reserved identifiers are used to indicate whether data packets will be sent over different connections;
[0054] Data length and data segment.
[0055] Table 1. Control header and multiple bytes of data to be transmitted
[0056]
[0057]
[0058] Table 2 Data Frame Types
[0059]
[0060]
[0061] The MsgSessionId and FrameIndex define a unique identifier for a message across all sessions; the Type identifies different data frame types, distinguishing whether it is an acknowledgment packet. This definition of the data packet format for transmission is more compact, saves network bandwidth, and is more advantageous in an IoT environment.
[0062] 302. Based on the confirmation character, the reservation identifier, and the session identifier, the marked data is transmitted across sessions.
[0063] Here, by analyzing the values of the confirmation character and the reserved identifier, the tagged data is transmitted across sessions according to the matching method of the values.
[0064] In some possible implementations, data transmission quality is guaranteed by analyzing the values of the acknowledgment character and the retain flag. If the acknowledgment character is 0 and the retain flag is 1, the marked data is sent only once; for example, if ACK is 0 and Retain is 0, the data message is sent only once, and no quality guarantee is made.
[0065] If the confirmation character is 1 and the reservation identifier is 0, the marked data corresponding to the current session connection is sent according to the preset time interval and the session identifier until a confirmation message is received from the receiving end within the preset session connection duration; if no confirmation message is received from the receiving end within the preset session connection duration, the sending of the marked data is stopped.
[0066] Here, if ACK is 1 and Retain is 0, it ensures that the data for the current connection can be delivered.
[0067] For every data packet sent by the sending end, the receiving end needs to reply with an ACK. If the sending end does not receive an ACK data packet in response, it will retransmit the packet several times at intervals of several seconds within the connection time.
[0068] When ACK is 1, either end receiving a message must reply with an ACK. This reply does not indicate acceptance or processing; it only confirms receipt and prevents the sender from continuously retransmitting. The receiver must deduplicate messages based on ${MsgSessionId}.${FrameIndex}. If the connection times out, the sender will stop sending.
[0069] If the confirmation character is 1 and the reservation identifier is 1, the marked data is sent in the current session connection; if no confirmation message is received from the receiving end within the preset session connection duration, the marked data is sent in the next session connection.
[0070] Here, if ACK is 1 and Retain is 1, it ensures that data can be delivered across connections.
[0071] In addition to ACK being 1, cross-connection message retention is provided. This means that if no ACK is received after a connection times out, the message will be sent again in the next connection. Both the client and server need to maintain connection data (including the FrameIndex in transit) for deduplication.
[0072] In some possible implementations, the receiving end needs to sort the received messages according to the FrameIndex of the same MsgSessionId. To ensure the order of transmitted messages, they are first grouped according to MsgSessionId into two groups: 123 and 456. Then, within each group, they are sorted in ascending order according to FrameIndex.
[0073] Therefore, the result after sorting is
[0074] Group 123:
[0075] MsgSessionId:123,FrameIndex:0
[0076] Group 456:
[0077] MsgSessionId:456,FrameIndex:0
[0078] MsgSessionId:456,FrameIndex:1
[0079] MsgSessionId:456,FrameIndex:2
[0080] In a specific example, within any given session connection, with SessionId 456, one party receives four messages. Because the DTLS protocol is based on UDP, these four messages may arrive out of order, such as:
[0081] 1.MsgSessionId:456,FrameIndex:2
[0082] 2. MsgSessionId:123,FrameIndex:0 (MsgSessionId(123) is different from the current SessionId(456), therefore it is a message identified as Retain from the previous session connection being retransmitted in the current connection)
[0083] 3.MsgSessionId:456,FrameIndex:0
[0084] 4.MsgSessionId:456,FrameIndex:1
[0085] The receiver will wait until the following conditions are met or the connection times out, at which point it will enter sleep mode:
[0086] 1. If any FrameIndex value in TransmitData is less than the End message, the message will not be received.
[0087] For example, in a session connection (SessionId=456), three messages were received.
[0088] MsgSessionId:123,FrameIndex:2,End:0
[0089] MsgSessionId:456,FrameIndex:0,End:0
[0090] MsgSessionId:456,FrameIndex:2,End:1
[0091] Then examine the messages where the current SessionId=456:
[0092] MsgSessionId:456,FrameIndex:0,End:0
[0093] MsgSessionId:456,FrameIndex:2,End:1
[0094] We can see that the FrameIndex of the message with End=1 is 2. The FrameIndex of the packet indicating the end of this session's transmission is 2. Since FrameIndex starts from 0, we can determine that the packet with FrameIndex 1 has not yet been received. Because it is a UDP protocol, the packet with FrameIndex 1 may have been lost, may still be in transit, or may be retransmitted. Therefore, we will wait to receive this data packet.
[0095] 2. TransmitData does not have an End message.
[0096] All the above judgments are based on the current session connection (messages with the current SessionId). Messages that are not part of the current session connection are not included in the waiting.
[0097] In other embodiments, other encryption methods of DLTS, if a client identifier is transmitted during the connection handshake, can be used as the identity to transmit connection configuration. Alternatively, other fields can be used in the data transmitted during the connection to identify the connection ID to which the current data belongs.
[0098] In this embodiment of the invention, in DTLS-based PSK encrypted transmission, the connection configuration for this data is embedded in the handshake's Identity. Furthermore, in each transmitted data, a field similar to MsgSessionId is used to identify the SessionId of the connection to which the data belongs, enabling the transmission of data from previous connections within the current connection. Finally, by using ACK and Retain to jointly indicate whether it is necessary to ensure no data loss across connections, both cross-connection data transmission is achieved, and transmission quality is improved.
[0099] This invention provides a data transmission system in an Internet of Things (IoT) environment. Please refer to [link / reference]. Figure 4 This illustration shows a schematic diagram of the composition structure of a data transmission system in an Internet of Things (IoT) environment according to an embodiment of the present invention. The system 400 includes:
[0100] Embedded module 401 is used to embed the session control field of the data to be transmitted during the handshake phase of the data transmission process based on the data packet transport layer security protocol.
[0101] The marking module 402 is used to mark the session identifier of the current session connection to which the data to be transmitted belongs based on the session control field and using a preset identification field, so as to obtain marked data;
[0102] The transmission module 403 is used to transmit the marked data across sessions based on the control header of the marked data and the session identifier.
[0103] In some possible implementations, the embedding module 401 is further configured to establish a pre-shared key encrypted transmission based on the data packet transport layer security protocol; during the pre-shared key encrypted transmission, establish a handshake phase corresponding to the data to be transmitted; during the handshake phase, embed a session identifier of the data to be transmitted; wherein the session control field includes the session identifier.
[0104] In some possible implementations, the embedding module 401 is further configured to determine the identity identifier corresponding to the data to be transmitted during the handshake phase; and to embed the session identifier of the data to be transmitted into the identity identifier corresponding to the handshake phase.
[0105] In some possible implementations, the marking module 402 is further used to determine each piece of data to be transmitted in the current session connection; and to use the preset identifier field to identify the session identifier of each piece of data to be transmitted in the current session connection, so that the current session connection can transmit data transmitted in the historical session connection.
[0106] In some possible implementations, the transmission module 403 is further configured to determine an acknowledgment character and a reservation identifier in the control header of the marked data; and to perform cross-session connection transmission of the marked data based on the acknowledgment character, the reservation identifier, and the session identifier.
[0107] In some possible implementations, the transmission module 403 is further configured to send the marked data in the current session connection if the acknowledgment character is 1 and the reservation identifier is 1;
[0108] If no confirmation message is received from the receiving end within the preset session connection duration, the marked data will continue to be sent in the next session connection.
[0109] In some possible implementations, the transmission module 403 is further configured to: send the marked data once if the acknowledgment character is 0 and the reservation identifier is 1; send the marked data corresponding to the current session connection according to a preset time interval and the session identifier if the acknowledgment character is 1 and the reservation identifier is 0, until an acknowledgment message is received from the receiving end within a preset session connection duration; and stop sending the marked data if no acknowledgment message is received from the receiving end within the preset session connection duration.
[0110] In some possible implementations, during the data transmission process, the data packet format of the data to be transmitted includes: a 15-byte control header and multiple bytes of data; wherein: the 15-byte control header includes:
[0111] Information session identifier, used to represent the session identifier of the data to be transmitted;
[0112] A frame index is used to indicate the frame sequence number of the data frame to which the information session identifier belongs;
[0113] The types of data frames include: empty packet type, transmitted data type, and acknowledgment data type.
[0114] The terminator is used to indicate whether this is the last data frame sent;
[0115] The confirmation character indicates whether a confirmation message is required.
[0116] Reserved identifiers are used to indicate whether data packets will be sent over different connections;
[0117] Data length and data segment.
[0118] Optionally, the transmission medium can be a wired link (e.g., but not limited to, coaxial cable, optical fiber, and Digital Subscriber Line (DSL)) or a wireless link (e.g., but not limited to, Wireless Fidelity (WIFI), Bluetooth, and mobile device networks). It should be noted that the system provided in the above embodiments is only an example illustrating the division of the functional modules described above. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, and will not be repeated here.
[0119] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. For example, as shown... Figure 5 As shown, the computer device 500 includes: a memory 501, a processor 502, and a computer program 503 stored in the memory 501 and running on the processor 502, wherein when the processor 502 executes the computer program 503, the computer device can execute any of the data transmission methods in the Internet of Things environment described above.
[0120] Furthermore, this embodiment of the invention also protects a system that may include a memory and a processor. The memory stores executable program code, and the processor is used to call and execute the executable program code to perform a data transmission method in an Internet of Things (IoT) environment provided by this embodiment of the invention. This embodiment can divide the system into functional modules based on the above method example. For example, each module can correspond to a specific function, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division; other division methods may exist in actual implementation. It should also be noted that all relevant content of each step involved in the above method embodiment can be referenced to the functional description of the corresponding functional module, and will not be repeated here.
[0121] It should be understood that the system provided in this embodiment is used to execute the data transmission method in an Internet of Things (IoT) environment described above, and therefore can achieve the same effect as the implementation method described above. When using integrated units, the system may include a processing module and a storage module. When the system is applied to a device, the processing module can be used to control and manage the device's actions. The storage module can be used to support the device in executing mutual program code, etc. The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of Digital Signal Processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0122] Furthermore, the system provided in the embodiments of the present invention may specifically be a chip, component, or module. The chip may include a connected processor and a memory. The memory stores instructions, and when the processor calls and executes the instructions, the chip can execute the data transmission method in an IoT environment provided in the above embodiments. This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, it causes the computer to execute the aforementioned method steps to implement the data transmission method in an IoT environment provided in the above embodiments.
[0123] This embodiment also provides a computer program product. When the computer program product is run on a computer, it causes the computer to perform the aforementioned related steps to realize the data transmission method in an Internet of Things environment provided in the above embodiment. The system, computer-readable storage medium, computer program product, or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they achieve can be referred to in the beneficial effects of the corresponding methods provided above, and will not be repeated here. Through the description of the above embodiments, those skilled in the art can understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by this invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical functional division. In actual implementation, there may be other division methods. For example, 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 an indirect coupling or communication connection through some interface, system or unit, and can be electrical, mechanical or other forms.
[0124] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multiple task processing and parallel processing are possible or may be advantageous. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. The above content is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A data transmission method in an Internet of Things (IoT) environment, characterized in that, The data transmission method in the Internet of Things environment includes: During the handshake phase of data transmission based on the Packet Transport Layer Security (PTS) protocol, a session control field is embedded in the data to be transmitted. Based on the session control field, the session identifier of the current session connection to which the data to be transmitted belongs is marked using a preset identifier field to obtain the marked data; Based on the control header of the tagged data and the session identifier, the tagged data is transmitted across sessions.
2. The data transmission method in an Internet of Things (IoT) environment according to claim 1, characterized in that, In the handshake phase of the data transmission process based on the Packet Transport Layer Security (PaLD) protocol, the session control field that embeds the data to be transmitted includes: Establish pre-shared key encrypted transmission based on the aforementioned data packet transport layer security protocol; During the pre-shared key encrypted transmission process, a handshake phase corresponding to the data to be transmitted is established; During the handshake phase, a session identifier is embedded in the data to be transmitted; wherein, the session control field includes the session identifier.
3. The data transmission method in an Internet of Things (IoT) environment according to claim 2, characterized in that, The session identifier embedded in the data to be transmitted during the handshake phase includes: Determine the identity identifier corresponding to the data to be transmitted during the handshake phase; The session identifier of the data to be transmitted is embedded into the identity identifier corresponding to the handshake phase.
4. The data transmission method in an Internet of Things (IoT) environment according to claim 1, characterized in that, The step of marking the session identifier of the current session connection to which the data to be transmitted belongs, based on the session control field and using a preset identifier field, to obtain marked data includes: Determine each piece of data to be transmitted in the current session connection; The preset identifier field is used to identify the session identifier of each piece of data to be transmitted in the current session connection, so that the current session connection can transmit data transmitted in the historical session connection.
5. The data transmission method in an Internet of Things (IoT) environment according to claim 1, characterized in that, The method of transmitting the tagged data across sessions based on the control header and the session identifier includes: In the control header of the tagged data, an acknowledgment character and a reservation identifier are identified; Based on the confirmation character, the reservation identifier, and the session identifier, the marked data is transmitted across sessions.
6. The data transmission method in an Internet of Things (IoT) environment according to claim 5, characterized in that, The method of transmitting the marked data across sessions based on the confirmation character, the reservation identifier, and the session identifier includes: If the confirmation character is 1 and the reservation identifier is 1, the marked data is sent in the current session connection; If no confirmation message is received from the receiving end within the preset session connection duration, the marked data will continue to be sent in the next session connection.
7. The data transmission method in an Internet of Things (IoT) environment according to claim 5, characterized in that, The method of transmitting the marked data across sessions based on the confirmation character, the reservation identifier, and the session identifier includes: If the confirmation character is 0 and the reservation flag is 1, the marked data is sent only once; If the confirmation character is 1 and the reservation identifier is 0, the marked data corresponding to the current session connection is sent according to the preset time interval and the session identifier until a confirmation message is received from the receiving end within the preset session connection duration; If no confirmation message is received from the receiving end within the preset session connection duration, the transmission of the marked data will stop.
8. The data transmission method in an Internet of Things (IoT) environment according to claim 1, characterized in that, During the data transmission process, the data packet format of the data to be transmitted includes: a 15-byte control header and multiple bytes of data; wherein: the 15-byte control header includes: Information session identifier, used to represent the session identifier of the data to be transmitted; A frame index is used to indicate the frame sequence number of the data frame to which the information session identifier belongs; The types of data frames include: empty packet type, transmitted data type, and acknowledgment data type. The terminator is used to indicate whether this is the last data frame sent; The confirmation character indicates whether a confirmation message is required. Reserved identifiers are used to indicate whether data packets will be sent over different connections; Data length and data segment.
9. A data transmission system in an Internet of Things (IoT) environment, characterized in that, The system includes: An embedding module is used to embed the session control field of the data to be transmitted during the handshake phase of the data transmission process based on the Packet Transport Layer Security protocol. The marking module is used to mark the session identifier of the current session connection to which the data to be transmitted belongs based on the session control field and using a preset identifier field, so as to obtain the marked data; The transmission module is used to transmit the tagged data across sessions based on the control header of the tagged data and the session identifier.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code that, when executed on a computer, causes the computer to perform the data transmission method in the Internet of Things environment as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Method for authentic data transmission using UDP protocol
CN101436978A
Data transmission method and device, electronic equipment and computer program product
CN119172425A
Data processing method and device, equipment and medium
CN119676289A
Data transmission over a network
US20060039350A1
System and method for implementing ASI over long distances
US20070071005A1