Data transmission method and device in industrial control system based on reliability UDP (User Datagram Protocol)

By adopting a data transmission method based on the reliability UDP protocol in the power system, using ring buffers and dynamic timer adjustments, the problems of instability of traditional transmission methods and unreliability of UDP protocols are solved, and data efficiency is achieved. Reliable and low overhead transmission ensures the safe and stable operation of the power system.

CN119052349APending Publication Date: 2024-11-29XIAN THERMAL POWER RES INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411145831.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The traditional point-to-point information transmission method has high investment costs, limited scalability and insufficient adaptability to large-scale system applications in the power system, and the UDP protocol cannot guarantee the reliability of data transmission, resulting in poor communication of the power wide-area protection system. Stability affects the safe and stable operation of the power system.

Method used

Using the data transmission method based on the reliability UDP protocol, by adding ACK fields and packet number fields in the ring buffer, combined with dynamic timer adjustment, the reliable data transmission and efficient information exchange are achieved, ensuring real-time upload and execution of measurement data. The accurate dispatch of messages.

Benefits of technology

It realizes data reliability and real-time, reduces protocol overhead and response time, improves transmission performance, is suitable for efficient information exchange of power systems, and ensures the safe and stable operation of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052349A_ABST
    Figure CN119052349A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device in an industrial control system based on a reliability UDP protocol, and belongs to the technical field of communication. According to the invention, through combined application of technologies such as an annular buffer area, dynamic timer adjustment and lightweight reliable UDP transmission, an efficient, reliable and low-overhead data transmission method is realized. The method has wide application prospect and practical value in the field of network communication. The method aims at achieving reliable and real-time uploading of measurement data, accurate issuing of execution messages and efficient information exchange among areas, and therefore safe and stable operation of an electric power system is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of communication, and relates to a data transmission method and device in an industrial control system based on a reliable UDP protocol. Background Art

[0002] In the power system, the distributed control system (DCS) as the core control architecture undertakes the key tasks of uploading measurement data, sending execution messages, and exchanging information between regions. However, the execution of these tasks places extremely high demands on the reliability and real-time performance of communication. If there is any instability or delay in the communication link, it may cause the execution unit to refuse to operate or malfunction, which will have a serious impact on the safe and stable operation of the power system. Therefore, for the distributed control system (DCS), developing a technical solution that can ensure the reliability and real-time performance of communication is of vital importance to improving the overall operation stability and safety of the power system.

[0003] Currently, most power grids still use the traditional point-to-point information transmission method in their communication architecture. Although this method guarantees the real-time nature of data transmission to a certain extent, it is difficult to meet the development needs of modern power wide-area protection systems due to its inherent limitations, such as high investment costs, limited scalability, and insufficient adaptability to large-scale system applications.

[0004] In addition, considering the high requirements for data transmission speed and real-time performance in power systems, UDP (User Datagram Protocol) in the traditional transport layer protocol is considered to be a potential solution. The UDP protocol has significant advantages in high-speed data transmission due to its connectionless, message-oriented, full-duplex and full-load transmission characteristics. However, the UDP protocol cannot guarantee the reliability of data transmission, that is, data may be lost, disordered or repeated during transmission, which is unacceptable for power wide-area protection systems that require high reliability. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a data transmission method and device in an industrial control system based on the reliable UDP protocol, aiming to achieve reliable real-time uploading of measurement data, accurate distribution of execution messages and efficient information exchange between regions, thereby ensuring the safe and stable operation of the power system.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] The data transmission method in the industrial control system based on the reliable UDP protocol is used by the sender, and includes the following steps:

[0008] Sending data to an idle position in a ring buffer; the ring buffer is periodically checked to see if there is data to be sent;

[0009] Construct a UDP data packet from the data at the idle position, wherein the UDP data packet has an ACK field and a data packet number field added thereto;

[0010] Encapsulate UDP data packets;

[0011] Send out the encapsulated UPD data packet;

[0012] Receive the returned data packet. If the ACK field of the returned data packet is 0, the sent UDP data packet is a data packet. If the ACK field is 1, the sent UDP data packet is a response data packet.

[0013] A further improvement of the present invention is:

[0014] Preferably, the size of the ring buffer is determined by the number of bits in the data packet number.

[0015] Preferably, the periodic check buffer time is determined by the sending time of the UDP data packet and the receiving time of the response message.

[0016] Preferably, the calculation formula for periodically checking the buffer time T is:

[0017] T=β*(SRTT+RTT_VAR)

[0018] Among them, SRTT is the RTT calculated by weighted average convergence, RTT_VAR is the variance of RTT, β is the coefficient, β is the set value, and RTT is the round-trip time from sending a message to receiving a response message.

[0019] Preferably, the UDP data packet includes a source port number, a destination port number, a length, a checksum, and data.

[0020] Preferably, after the encapsulated UDP data packet is sent out, a response data packet is received, and if the ACK received is 1 response data packet, the corresponding data is removed from the ring buffer.

[0021] Data transmission devices in industrial control systems based on the reliable UDP protocol include:

[0022] The sending module sends data to an idle position in the ring buffer; the ring buffer is regularly checked to see if there is data to be sent;

[0023] A packing module constructs a UDP data packet from the data in the idle position, wherein an ACK field and a data packet number field are added to the UDP data packet;

[0024] Encapsulation module, encapsulates UDP data packets;

[0025] The sending module sends out the encapsulated UPD data packet;

[0026] The first receiving module receives the returned data packet. If the ACK field of the returned data packet is 0, the sent UDP data packet is a data packet. If the ACK field is 1, the sent UDP data packet is a response data packet.

[0027] Preferably, the method comprises the following steps:

[0028] Receive a UDP data packet, wherein the UDP data packet has an ACK field;

[0029] Parsing UDP packets;

[0030] The parsed data packets are handed over to the corresponding data processing program for processing.

[0031] Preferably, the parsed data packet is handed over to a corresponding data processing program for processing, and then a response data packet is sent.

[0032] Data transmission devices in industrial control systems based on the reliable UDP protocol include:

[0033] A second receiving module, used for receiving a UDP data packet, wherein the UDP data packet is provided with an ACK field;

[0034] Parsing module, used to parse UDP data packets;

[0035] The processing module is used to hand over the parsed data packets to the corresponding data processing program for processing.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The present invention discloses a data transmission method in an industrial control system based on a reliable UDP protocol. The method firstly sets a ring buffer in advance and performs number management on the data to be sent, so as to ensure the reliable transmission of the data. The design of the ring buffer makes the storage and reading of data more efficient, and the number management ensures the integrity and order of the data, and prevents the data from being lost or disordered. By carrying numbers for the sent data and storing them in the corresponding numbers of the ring buffer, the integrity and traceability of the data are ensured. This management method facilitates the detection and recovery of data loss or damage that may occur during the transmission process.

[0038] On the basis of the traditional UDP protocol, the present invention realizes a lightweight reliable data transmission method by adding fields, setting a sending buffer and adjusting the time interval. This method not only retains the advantages of the UDP protocol of no connection and low overhead, but also increases the reliability of data transmission. Compared with the TCP protocol, it reduces the response time of connection establishment and release, and improves the overall transmission performance. Compared with the TCP protocol, the method proposed in the present invention significantly reduces the protocol overhead while ensuring the reliability of data transmission. Since there is no need to establish and maintain the connection state, the consumption of network resources and computing resources is reduced. In addition, since the delay of connection establishment and release is avoided, the method can respond to data transmission requirements faster. The present invention realizes an efficient, reliable and low-overhead data transmission method through the combined application of technologies such as ring buffer, dynamic timer adjustment and lightweight reliable UDP transmission. This method has broad application prospects and practical value in the field of network communication. It aims to realize reliable real-time upload of measurement data, accurate distribution of execution messages and efficient information exchange between regions, so as to ensure the safe and stable operation of the power system.

[0039] Furthermore, the present invention can dynamically adjust the time of the timer according to the transmission time interval, thereby realizing simple and effective flow control. This dynamic adjustment mechanism not only avoids the transmission of a large amount of duplicate data, but also optimizes the use of network resources and improves transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flow chart of data transmission in an industrial control system based on the reliability UDP protocol of the present invention;

[0041] Figure 2 The present invention is a flow chart of data reception in an industrial control system based on the reliable UDP protocol. DETAILED DESCRIPTION

[0042] It should be noted that the terms "first", "second", etc. in the specification and drawings of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0043] The co-shooting method provided in the embodiment of the present invention can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0044] First, the nouns of the present invention are explained below:

[0045] UDP, User Datagram Protocol, is a connectionless transport layer protocol that adds multiplexing, demultiplexing and error detection functions on top of the IP protocol's datagram service.

[0046] ACK, Acknowledge, usually refers to a confirmation signal in computer network protocols, which is used to indicate that the receiver has successfully received and processed a data segment or data packet.

[0047] See also Figure 1 The present invention discloses a data transmission method in an industrial control system based on a reliable UDP protocol, which is applied to a sender. The data transmission method specifically includes the following steps:

[0048] S1, sending data to an idle position in a ring buffer; the ring buffer is regularly checked to see if there is data to be sent;

[0049] In this process, the sender first obtains the free number in the circular buffer and stores the data to be sent in the corresponding number in the circular buffer. It should be understood that the circular data structure is a data structure of a buffer with a fixed size and connected head and tail. When the data is read or written, the pointer moves to the next position. When the end of the buffer is reached, the pointer returns to the starting position of the buffer to achieve circular use. A circular buffer is set in advance, and the sent data carries a number and is stored in the corresponding number in the buffer. The sent data is managed to achieve reliable data transmission.

[0050] Specifically, the buffer uses a circular data structure, and the size of the buffer is set to the maximum number of data packets, which is determined by the number of bits in the data packet number. In the current scenario, 10 bits are sufficient, that is, the maximum value is 1024.

[0051] In order to ensure that data can be sent without omission, it is necessary to regularly check whether there is data in the buffer that needs to be sent. If there is data to be sent, the data, number and ACK information will be handed over to the encapsulation data packet program for processing.

[0052] The time to check the buffer is calculated based on RTT (round-trip delay from sending a message to receiving a response message). The specific calculation formula is:

[0053] T=β*(SRTT+RTT_VAR)

[0054] Among them, SRTT is the RTT calculated by weighted average convergence, and RTT_VAR is the variance of RTT. When the packet loss rate is low, reducing β, on the contrary, increasing β can improve data transmission efficiency and avoid unlimited data transmission. This method dynamically adjusts the timer time according to the transmission time interval, which can achieve simple flow control. It can also avoid the transmission of a large amount of duplicate data.

[0055] S2, constructs a UDP data packet with the data at the idle position, to which an ACK field and a data packet number field are added; after receiving the data number and ACK, the data packet encapsulation program constructs a UDP data packet (the data packet includes the source port, destination port, length, checksum and data), and adds the ACK field and number field information on its basis.

[0056] S3, encapsulates UDP data packets;

[0057] In this process, the encapsulation process is that the information generated by the user needs to be converted into a data form suitable for transmission on the network. After a reliable connection is established between the sender and the receiver host, the data is converted into data segments for transmission through the Internet. At the network layer (such as the IP layer), the data segments are encapsulated into data packets or datagrams. The data packet contains information such as the destination address (IP address), the local address, and some bytes for error correction. At this time, the logical address is placed in the header of the data packet to ensure that the data packet can be correctly routed between different network nodes. At the data link layer, the data packet is converted into a frame. The frame contains the hardware address (such as the MAC address) as a unique identifier to identify the target device when transmitting in the local network. In addition, the frame also includes some functional fields such as data check to ensure the integrity and accuracy of the data; at the physical layer, the frame is converted into a bit stream. The bit stream is a form of digital encoding and is transmitted on the transmission medium through a digital signal (such as an optical signal or an electrical signal). This step is a key step in converting data from the logical level to the physical level; throughout the encapsulation process, each layer of the protocol will add a protocol header and trailer to its corresponding PDU (protocol data unit). The protocol header contains information related to communication between layers, such as header length, payload length, upper layer protocol type, etc.

[0058] S4, sends the encapsulated UDP data packet to the receiver.

[0059] S5, receiving the returned data packet. If the ACK field of the returned data packet is 0, the sent UDP data packet is a data packet. If the ACK field is 1, the sent UDP data packet is a response data packet.

[0060] See also Figure 2 The second aspect of the present invention discloses a data transmission method in an industrial control system based on a reliable UDP protocol, which is applied to a receiving party. The data receiving method specifically includes the following steps:

[0061] S1, receiving a UDP data packet, wherein the UDP data packet has an ACK field;

[0062] S2, parses UDP data packets;

[0063] After receiving the data packet, the receiver starts to parse the data packet. First, it determines whether an error occurs during the data transmission process based on the checksum in the data packet. If an error occurs, the data is discarded.

[0064] If the data is valid, parse the ACK field in the data packet. If the ACK field is 0, it means it is a data packet, and if it is 1, it means it is a response data packet.

[0065] Among them, the ACK field is 1 for the response data packet, indicating that the other party has received the data with this number. According to the number of the data packet, the data with the corresponding number is removed from the buffer to ensure the reliability of the data. Because the sender has not received the response data packet with the corresponding number, the data will still be in the buffer. When the timed time interval arrives to recheck the buffer, the buffer will retransmit the data. The data packet with the ACK field being 0 means that data is being sent and needs to be sent to the response data packet construction program to construct a response data packet and send it to the sender.

[0066] S3, the parsed data packet is handed over to the corresponding data processing program for processing.

[0067] The third aspect of the present invention discloses a data transmission device in an industrial control system based on a reliable UDP protocol, which is applied to a sender and includes:

[0068] The sending module sends data to an idle position in the ring buffer; the ring buffer is regularly checked to see if there is data to be sent;

[0069] A packing module constructs a UDP data packet from the data in the idle position, wherein an ACK field and a data packet number field are added to the UDP data packet;

[0070] Encapsulation module, encapsulates UDP data packets;

[0071] The sending module sends out the encapsulated UPD data packet;

[0072] The first receiving module receives the returned data packet. If the ACK field of the returned data packet is 0, the sent UDP data packet is a data packet. If the ACK field is 1, the sent UDP data packet is a response data packet.

[0073] The fourth aspect of the present invention discloses a data transmission device in an industrial control system based on a reliable UDP protocol, which is applied to a receiving side and includes:

[0074] A second receiving module, used for receiving a UDP data packet, wherein the UDP data packet is provided with an ACK field;

[0075] Parsing module, used to parse UDP data packets;

[0076] The processing module is used to hand over the parsed data packets to the corresponding data processing program for processing.

[0077] The following is further described in conjunction with specific embodiments:

[0078] Example 1

[0079] S1, the sender first obtains the idle number in the ring buffer and stores the data to be sent in the corresponding number in the ring buffer.

[0080] Specifically, the buffer uses a circular data structure, and the size of the buffer is set to the maximum number of data packets, which is determined by the number of bits in the data packet number. In the current scenario, 10 bits are sufficient, that is, the maximum value is 1024.

[0081] Check regularly whether there is data to be sent in the buffer. If there is data to be sent, the data, number and ACK information will be handed over to the encapsulation data packet program for processing.

[0082] The time to check the buffer is calculated based on RTT (the round-trip time from sending a message to receiving a response message), T = β*(SRTT+RTT_VAR), SRTT is the RTT calculated by weighted average convergence, RTT_VAR is the variance of RTT, when the packet loss rate is low, reduce β, on the contrary, increase β, which can improve data transmission efficiency and avoid unlimited data sending, 1.2<β<2.0.

[0083] S2, after receiving the data number and ACK, the sender's data packet encapsulation program constructs a UDP data packet (the data packet includes the source port, destination port, length, checksum and data), and adds the ACK field and number field information on its basis, encapsulates it, and sends it to the receiver.

[0084] Due to the unreliability of the UDP protocol, two fields are added to the UDP data packet format, namely the ACK field and the data packet number field. ACK is 0, indicating that the data packet is a data packet, and ACK is 1, indicating a response packet. By adding fields based on the UDP protocol, setting the send buffer and time interval, compared with the traditional UDP protocol, the reliability of data transmission can be guaranteed in a lightweight manner. Compared with the TCP protocol, the overhead is smaller, and the response time for connection establishment and release is reduced.

[0085] S3, after receiving the data packet, the receiver starts to parse the data packet. First, it determines whether an error occurs in the data transmission process based on the checksum in the data packet. If an error occurs, the data is discarded.

[0086] If the data is valid, parse the ACK field in the data packet. If the ACK field is 0, it means it is a data packet, and if it is 1, it means it is a response data packet.

[0087] Among them, the ACK field is 1 for the response data packet, indicating that the other party has received the data with this number. According to the number of the data packet, the data with the corresponding number is removed from the buffer to ensure the reliability of the data. Because the sender has not received the response data packet with the corresponding number, the data will still be in the buffer. When the timed time interval arrives to recheck the buffer, the buffer will retransmit the data. The data packet with the ACK field being 0 means that data is being sent and needs to be sent to the response data packet construction program to construct a response data packet and send it to the sender. The data parsed by the receiver will be processed by the corresponding data processing program.

[0088] The method of the present invention can ensure reliable data transmission by presetting a ring buffer and managing the sent data by numbering. The design of the ring buffer not only optimizes the storage and reading efficiency of the data, but also effectively ensures the integrity and order of the data through numbering management, thereby greatly reducing the risk of data loss or disorder. At the same time, it can enhance data traceability and integrity: by carrying numbers for the sent data and storing them in the corresponding positions of the ring buffer in an orderly manner, the present invention realizes complete recording and accurate tracing of the data. This management method not only facilitates timely detection of data loss or damage, but also provides an effective means for rapid data recovery. The method of the present invention can also realize lightweight reliable data transmission: on the basis of the traditional UDP protocol, the present invention cleverly constructs a light and efficient data transmission method by adding fields, setting up a sending buffer and flexibly adjusting the time interval. This innovation significantly enhances the reliability of data transmission while retaining the connectionless and low-overhead advantages of the UDP protocol. The method of the present invention reduces protocol overhead and response delay: compared with the TCP protocol, the method proposed by the present invention greatly reduces the protocol overhead while ensuring the reliability of data transmission. By eliminating the complex process of connection establishment and release, it not only reduces the consumption of network resources and computing resources, but also significantly shortens the response time, thereby improving the overall transmission performance.

[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission method in an industrial control system based on a reliable UDP protocol, characterized in that: For the sender, the following steps are included: Sending data to an idle position in a ring buffer; the ring buffer is periodically checked to see if there is data to be sent; Construct a UDP data packet from the data at the idle position, wherein the UDP data packet has an ACK field and a data packet number field added thereto; Encapsulate UDP data packets; Send out the encapsulated UPD data packet; Receive the returned data packet. If the ACK field of the returned data packet is 0, the sent UDP data packet is a data packet. If the ACK field is 1, the sent UDP data packet is a response data packet.

2. The data transmission method based on the reliable UDP protocol in the industrial control system according to claim 1 is characterized in that: The size of the ring buffer is determined by the number of bits in the data packet number.

3. The data transmission method based on the reliable UDP protocol in the industrial control system according to claim 1 is characterized in that: The periodic check buffer time is determined by the sending time of the UDP data packet and the receiving time of the response message.

4. The data transmission method based on the reliable UDP protocol in the industrial control system according to claim 2 is characterized in that: The calculation formula for the periodic check buffer time T is: T=β*(SRTT+RTT_VAR) Among them, SRTT is the RTT calculated by weighted average convergence, RTT_VAR is the variance of RTT, β is the coefficient, which is the set value, and RTT is the round-trip time from sending a message to receiving a response message.

5. The data transmission method based on the reliable UDP protocol in the industrial control system according to claim 1 is characterized in that: The UDP data packet includes a source port number, a destination port number, a length, a checksum, and data.

6. The data transmission method based on the reliable UDP protocol in the industrial control system according to claim 1 is characterized in that: After the encapsulated UDP data packet is sent, a response data packet is received. If the ACK received is a 1 response data packet, the corresponding data is removed from the ring buffer.

7. A data transmission device in an industrial control system based on a reliable UDP protocol, characterized in that: include: The sending module sends the data to the free position in the ring buffer; The ring buffer is periodically checked to see if there is data to be sent; A packing module constructs a UDP data packet from the data in the idle position, wherein an ACK field and a data packet number field are added to the UDP data packet; Encapsulation module, encapsulates UDP data packets; The sending module sends out the encapsulated UPD data packet; The first receiving module receives the returned data packet. If the ACK field of the returned data packet is 0, the sent UDP data packet is a data packet. If the ACK field is 1, the sent UDP data packet is a response data packet.

8. A data transmission method in an industrial control system based on a reliable UDP protocol, characterized in that: For the receiving side, the following steps are included: Receive a UDP data packet, wherein the UDP data packet has an ACK field; Parsing UDP packets; The parsed data packets are handed over to the corresponding data processing program for processing.

9. A data transmission method in an industrial control system based on a reliable UDP protocol, characterized in that: After the parsed data packet is handed over to the corresponding data processing program for processing, a response data packet is sent.

10. A data transmission device in an industrial control system based on a reliable UDP protocol, characterized in that: include: A second receiving module, used for receiving a UDP data packet, wherein the UDP data packet is provided with an ACK field; Parsing module, used to parse UDP data packets; The processing module is used to hand over the parsed data packets to the corresponding data processing program for processing.