Data communication method

By using the UDP transmission protocol and CRC verification method between the control units, the problems of high-cost hardware cards and additional hardware interfaces in the prior art are solved, and efficient and low-cost multi-node data transmission and sharing are realized.

CN119520414AInactive Publication Date: 2025-02-25CHENGDU BOOSTOR TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510076197.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the fields of engineering simulation, fluid dynamics, and other fields, data synchronization between various control units requires high-cost hardware cards and additional hardware interfaces, which lacks broad adaptability.

Method used

UDP transmission protocol is adopted to transmit data from each module through UDP data packets, and the checksum field is set to 0 in the data packet. CRC cyclic redundancy verification is used to ensure data integrity, thereby achieving rapid data sharing and transmission.

Benefits of technology

It reduces hardware procurement costs, avoids the need for additional hardware slots, and realizes efficient multi-node data transmission and timely data sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520414A_ABST
    Figure CN119520414A_ABST
Patent Text Reader

Abstract

The invention discloses a data communication method, which comprises the following steps that: S1: each module acquires data of the unit and performs data segmentation storage, and every two nodes are transmitted through a UDP (User Datagram Protocol) transmission protocol; s2, constructing UDP header + data of a UDP data packet; s3, the data set is transmitted from the node A to the node B, and the node B checks and verifies the data set after receiving the data; and S4, repeating the steps S1 to S3 to complete data returning from the node B to the node A. The method has the beneficial effects that when data transmission is carried out on the relative nodes, data mutually transmitted between the relative nodes is original data of the unit, and the data integrity is ensured through CRC cyclic redundancy check, so that data of different nodes can be efficiently transmitted and shared in time when multi-node transmission is carried out, and compared with a hardware card, the data transmission efficiency is greatly improved. The cost of hardware purchase is reduced, and no extra hardware slot is needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data communication method. Background Art

[0002] In the fields of engineering simulation, fluid dynamics, nuclear physics calculation, etc., data needs to be shared and coordinated in real time between various control units. The common data synchronization method is to use a reflective memory card, that is, a hardware card that synchronizes data through optical fiber, but this hardware card is expensive and requires an additional hardware interface to be installed on the computer, which does not have a wide range of adaptability. Summary of the invention

[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a data communication method.

[0004] The object of the present invention is achieved by the following technical solution: A data communication method comprises the following steps: S1: Each module collects data from the unit and divides and stores the data, and the data is transmitted between every two nodes through the UDP transmission protocol; S2: construct UDP data packet UDP header + data; S3: Transmit the data set from node A to node B. Node B verifies and validates the data set after receiving the data. S4: Repeat steps S1 to S3 to complete the data transmission from node B to node A.

[0005] Preferably, in step S2, the data stream M to be calculated is: ; in, For the pseudo-head, is the UDP header, For the data part, is the checksum field; Then divide the data stream M into n 16-bit binary data units, .

[0006] Preferably, in step S3, the current network MTU is set to Bytes, the total length of the UDP datagram is Bytes, the network packet loss rate is set to , the calculation formula for all data packets received by the receiving end is: .

[0007] Preferably, in step S3, the step of testing and verifying the data set is: S31: Use CRC standard to generate polynomial CRC-16, ; S32: For the first data unit Take CRC operation, ; S33: For the second data unit Take CRC operation, And so on, finally for: .

[0008] The present invention has the following advantages: when the present invention performs relative node data transmission, the data transmitted between the relative nodes are all original data of the unit, and the data integrity is guaranteed by CRC cyclic redundancy check, so that when performing multi-node transmission, it can efficiently transmit and timely share data of different nodes. Compared with hardware cards, the cost of hardware procurement is reduced and no additional hardware slots are required. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A schematic diagram for describing applicable scenarios; Figure 2 It is a schematic diagram of the multi-unit inter-transmission process; Figure 3 The figure is a schematic diagram of the UDP data message composition and CRC check process. DETAILED DESCRIPTION

[0010] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0011] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0012] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0013] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0014] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use, or the positions or positional relationships commonly understood by those skilled in the art, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0015] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0016] In this embodiment, if Figure 2 As shown, a data communication method comprises the following steps: S1: Each module collects the data of the unit and divides and stores the data. The data is transmitted between every two nodes through the UDP transmission protocol, and the checksum field is set to 0; S2: construct UDP data packet UDP header + data; S3: Transmit the data set from node A to node B. Node B verifies and validates the data set after receiving the data. S4: Repeat steps S1 to S3 to complete the data transmission from node B to node A. When transmitting data between relative nodes, the data transmitted between relative nodes are all original data of this unit. The CRC cyclic redundancy check is used to ensure data integrity, so that when transmitting data between multiple nodes, it can efficiently transmit and share data from different nodes in a timely manner. Compared with hardware cards, the cost of hardware procurement is reduced and no additional hardware slots are required. Specifically, Figure 1As shown, the applicable scenario of this solution is: suppose a complete system System has complete data, which is divided into n blocks for modular operation and each module has its own data set, such as data dataA, dataB, dataC and other data, which are combined to form a complete System data set. The complete system is divided into different control units and runs different data acquisition systems. For example, unit A runs module 1 of the n modules, unit B runs module 2, and so on. The non-checked UDP transmission protocol is used between each node to complement the data of different units, so as to achieve complete data sharing and transmission on each control unit. The present invention sets the checksum field in the UDP protocol transmission to 0 to achieve fast data sharing and transmission between two distributed control units.

[0017] Furthermore, in step S2, the data stream M to be calculated is: ; in, For the pseudo-head, is the UDP header, For the data part, is the checksum field; Then divide the data stream M into n 16-bit binary data units, .

[0018] Furthermore, in step S3, the current network MTU is set to Bytes, the total length of the UDP datagram is Bytes, the network packet loss rate is set to , the calculation formula for all data packets received by the receiving end is: .

[0019] Specifically, in the applicable scenarios of this solution, a large amount of data will be involved, but these data are usually divided by different control units into a small number of data sets to participate in the transmission process, so the datagram arrival rate can be greatly improved. Since the checksum field in the datagram is 0 at the time of initialization, a checksum operation is performed on each data unit at the application layer to improve the accuracy of the entire data, such as Figure 3 As shown, the steps for testing and validating the data set are: S31: Use CRC standard to generate polynomial CRC-16, ; S32: For the first data unit Take CRC operation, ; S33: For the second data unit Take CRC operation, And so on, finally for: .

[0020] Specifically, the advantage of CRC-16 check is that it can well detect burst errors in transmission, and its calculation efficiency is high. When transmitting relative node data, the data received by node B is the original data transmitted by node A. The data integrity is guaranteed by CRC cyclic redundancy check, so that when performing multi-node transmission, it can efficiently transmit and timely share data from different nodes.

[0021] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data communication method, characterized in that: The following steps are involved: S1: Each module collects data from the unit and divides and stores the data, and the data is transmitted between every two nodes through the UDP transmission protocol; S2: construct UDP data packet UDP header + data; S3: Transmit the data set from node A to node B. Node B verifies and validates the data set after receiving the data. S4: Repeat steps S1 to S3 to complete the data transmission from node B to node A.

2. The data communication method according to claim 1, characterized in that: In step S2, the data stream M to be calculated is: ; in, For the pseudo-head, is the UDP header, For the data part, is the checksum field; Then divide the data stream M into n 16-bit binary data units, 。 3. The data communication method according to claim 2, characterized in that: In step S3, the current network MTU is set to Bytes, the total length of the UDP datagram is Bytes, the network packet loss rate is set to , the calculation formula for all data packets received by the receiving end is: 。 4. The data communication method according to claim 3, characterized in that: In step S3, the steps of testing and verifying the data set are: S31: Use CRC standard to generate polynomial CRC-16, ; in, To generate the polynomial, the standard polynomial used for CRC calculation, is the weight of different bits; S32: For the first data unit Take CRC operation, ; in, The first data unit The CRC check value, is the initial CRC value; S33: For the second data unit Take CRC operation, ; in, The first data unit CRC check value; And so on, finally for: ; in, For the Data Unit The CRC check value, For the -1 data unit The CRC check value, For the A 16-bit binary data unit.

Citation Information

Patent Citations

  • Improved CRC (Cyclic Redundancy Check) realization method

    CN104639294A

  • Communication protocol and message format for internal module connection of charging pile

    CN112532641A

  • CRC segmented calculation method and device in high-speed network

    CN114679239A

  • Method and apparatus for transmitting / receiving ofvoice over internet protocol packet with UDP inwireless communications system

    KR1020070034441A