Processing method, system, device and medium for data communication in industrial control system
By using diagnostic requests, data transmission requests and data operation requests in the industrial control system, the problem that intelligent devices cannot process data synchronously under the unmatched function is solved, and the synchronization of data and logical operations is achieved, and the reliability of data exchange is improved.
Patent Information
- Application Number
- CN202211338873.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-10-28
AI Technical Summary
In an industrial control system without time-based function, smart devices cannot perform data synchronization processing, resulting in uncertain logical operation results.
By introducing processing methods of diagnostic requests, data transmission requests and data operation requests in the industrial control system, the fieldbus is used to realize ring topological interconnection, generate transportation demand tables and guide data transmission and operation.
The data synchronization processing and logical computing operations between smart devices are realized, and the reliability of data exchange is improved.
Smart Images

Figure CN115664624B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, system, device and medium for processing data communication in an industrial control system. Background Art
[0002] With the development of Internet of Things technology, informatization and industrialization are deeply integrated, and various industrial control systems are widely used in the fields of industry, energy, transportation, etc. In the industrial control field, there are a large number of scattered intelligent devices, and the distances between intelligent devices are different.
[0003] If there is no accurate clock source in the DCS (Distributed Control System) and PLC (Programmable Logic Control) systems and the clock synchronization function is not equipped, there will be a time asynchrony problem between the smart devices on site. This problem makes it impossible for the smart devices to synchronize data processing and logic operations, which can easily lead to uncertain logic results. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the defect that the industrial control system in the prior art has no time synchronization function and the intelligent devices on site cannot process the data synchronously, resulting in uncertain logical operation results. A method, system, device and medium for processing communication data in an industrial control system are provided.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] In a first aspect, the present invention provides a method for processing data communication in an industrial control system, the processing method comprising:
[0007] The target node device sends a diagnostic request to the remaining node devices; the target node device and the remaining node devices are interconnected in sequence in a ring topology via a field bus, and the diagnostic request is used to obtain the data transport requirements of each of the node devices;
[0008] receiving responses to the diagnostic request from the next node device in sequence to generate a transport demand table; the transport demand table includes a logical address of a source node device and a logical address of a destination node device, and the logical address of the source node device corresponds to the logical address of the destination node device;
[0009] The target node sends a data transmission request corresponding to the transportation demand table to the remaining node devices; the data transmission request is used to guide each of the node devices to transmit the corresponding target data;
[0010] receiving a response to the data transmission request from the next node device in sequence;
[0011] The target node device sends a data operation request to the remaining node devices; the data operation request is used to prompt each of the node devices to operate on the received target data.
[0012] Preferably, the diagnostic request includes a first diagnostic frame, and the step of sequentially receiving a response to the diagnostic request from the next node device to generate a transport demand table includes:
[0013] The current node device supplements the corresponding data transmission path in the first diagnostic frame to generate an updated first diagnostic frame;
[0014] When the UDP (User Datagram Protocol) of the updated first diagnostic frame is not greater than a threshold, the current node device forwards the updated first diagnostic frame to the next node device;
[0015] If the next node device is the target node device, the transportation requirement table is obtained based on the updated first diagnostic frame.
[0016] Preferably, the step of sequentially receiving a response to the diagnostic request from the next node device to generate a transportation demand table further includes:
[0017] When the UDP of the updated first diagnostic frame is greater than the threshold, the current node device generates two different second diagnostic frames again according to the updated first diagnostic frame, and forwards the second diagnostic frames to the next node device.
[0018] Preferably, the data transmission request includes a first transport frame, and the step of sequentially receiving a response to the data transmission request from the next node device includes:
[0019] Determine the local logical address of the current node device;
[0020] Finding the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier carried in the first transport frame;
[0021] Determine the data transmission action performed by the current node device according to the local logical address, the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier; the data transmission action includes at least one of data upload, data download and data forwarding;
[0022] and / or,
[0023] The processing method also includes:
[0024] N devices in the industrial control system are sorted and their logical addresses are edited in sequence to form node devices having first to Nth logical addresses respectively, and the node device having the smallest logical address is taken as the target node device, N≥1 and N is an integer.
[0025] In a second aspect, the present invention provides a processing system for data communication in an industrial control system, the processing system comprising:
[0026] A first sending module is used for the target node device to send a diagnostic request to the remaining node devices; the target node device and the remaining node devices are interconnected in sequence in a ring topology through a field bus, and the diagnostic request is used to obtain the data transportation requirements of each of the node devices;
[0027] A generating module, used for sequentially receiving responses to the diagnostic request from the next node device to generate a transport demand table; the transport demand table includes a logical address of a source node device and a logical address of a destination node device, and the logical address of the source node device corresponds to the logical address of the destination node device;
[0028] A second sending module, used for the target node to send a data transmission request corresponding to the transportation demand table to the remaining node devices; the data transmission request is used to guide each of the node devices to transmit the corresponding target data;
[0029] A response receiving module, used for receiving a response to the data transmission request from the next node device in sequence;
[0030] The third sending module is used for the target node device to send a data operation request to the remaining node devices; the data operation request is used to prompt each of the node devices to operate on the received target data.
[0031] Preferably, the diagnostic request includes a first diagnostic frame, and the generating module includes:
[0032] A supplementing unit, configured for the current node device to supplement the corresponding data transmission path in the first diagnostic frame to generate an updated first diagnostic frame;
[0033] A diagnostic frame forwarding unit, configured to forward the updated first diagnostic frame to the next node device by the current node device when the UDP of the updated first diagnostic frame is not greater than a threshold;
[0034] An acquisition unit is used to acquire the transportation requirement table based on the updated first diagnostic frame if the next node device is the target node device.
[0035] Preferably, the generating module further includes:
[0036] The diagnostic frame regeneration unit is used for, when the UDP of the updated first diagnostic frame is greater than a threshold, the current node device generates two different second diagnostic frames again according to the updated first diagnostic frame, and forwards the second diagnostic frame to the next node device.
[0037] Preferably, the data transmission request includes a first transport frame, and the response receiving module includes:
[0038] A determination unit, used to determine the local logical address of the current node device;
[0039] A search unit, used to search for the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier carried in the first transport frame;
[0040] a determination unit, configured to determine a data transmission action performed by the current node device according to the local logical address, the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number, and the data validity identifier; the data transmission action includes at least one of data upload, data download, and data forwarding;
[0041] and / or,
[0042] The processing system further comprises:
[0043] The address setting module sorts N devices in the industrial control system and edits the logical addresses in sequence to form node devices with the first logical address to the Nth logical address respectively, and takes the node device with the smallest serial number logical address as the target node device, N≥1 and N is an integer.
[0044] In a third aspect, the present invention provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method for processing data communication in the industrial control system as described in the first aspect.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for processing data communication in the industrial control system as described in the first aspect is implemented.
[0046] The positive and progressive effects of the present invention are: providing a processing method, system, device and medium for data communication in an industrial control system, in which the target node device sends a diagnostic request to the remaining node devices; receives responses to the diagnostic request from the next node device in turn to generate a transportation demand table; the target node sends a data transmission request corresponding to the transportation demand table to the remaining node devices; receives responses to the data transmission request from the next node device in turn; the target node device sends a data operation request to the remaining node devices. The present invention solves the problem that in an industrial control system without a time synchronization function, the intelligent devices on site cannot process data synchronously, causing uncertain logical operation results; the field bus is used to realize the transmission requirements of sending and receiving data in a unified pace, and the requirements of performing logical operation processing at the last moment of the same data transmission cycle are realized, thereby improving the reliability of data exchange. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flowchart of a method for processing data communication in an industrial control system is provided for Embodiment 1 of the present invention.
[0048] Figure 2 A topological diagram of node devices of a method for processing data communication in an industrial control system is provided for embodiment 1 of the present invention.
[0049] Figure 3 A flowchart of step S13 of a method for processing data communication in an industrial control system is provided for embodiment 1 of the present invention.
[0050] Figure 4 A flowchart of step S15 of a method for processing data communication in an industrial control system is provided for embodiment 1 of the present invention.
[0051] Figure 5 A structural diagram of a first diagnostic frame of a method for processing data communication in an industrial control system is provided for embodiment 1 of the present invention.
[0052] Figure 6 A structural diagram of a first transport frame of a method for processing data communication in an industrial control system is provided for embodiment 1 of the present invention.
[0053] Figure 7 A module schematic diagram of a data communication processing system in an industrial control system is provided for Embodiment 2 of the present invention.
[0054] Figure 8 A schematic diagram of the structure of an electronic device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0055] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0056] Example 1
[0057] like Figure 1 As shown, this embodiment provides a method for processing data communication in an industrial control system, and the processing method includes:
[0058] S11. Sort the N devices in the industrial control system and edit the logical addresses in sequence to form node devices having the first logical address to the Nth logical address respectively, and take the node device with the smallest logical address as the target node device, N≥1 and N is an integer.
[0059] S12, the target node device sends a diagnostic request to the remaining node devices; the target node device and the remaining node devices are interconnected in sequence in a ring topology via a field bus, and the diagnostic request is used to obtain the data transmission requirements of each node device.
[0060] S13. Receive responses to the diagnostic request from the next node device in sequence to generate a transportation demand table; the transportation demand table includes the logical address of the source node device, the logical address of the destination node device and the target data, and the logical address of the source node device, the logical address of the destination node device and the target data correspond to each other.
[0061] S14. The target node sends a data transmission request corresponding to the transportation demand table to the remaining node devices; the data transmission request is used to guide each node device to transmit the corresponding target data.
[0062] S15. Receive responses to the data transmission request from the next node device in sequence.
[0063] S16. The target node device sends a data operation request to the remaining node devices; the data operation request is used to prompt each node device to operate on the received target data.
[0064] Specifically, this processing method is applied to industrial control systems without a time synchronization function. All devices in the industrial control system are edited with a logical address (0, 1, 2, 3...N). Node device 0 is the node device with the smallest logical address, so it is the default target node device. Each node device in the device cluster of the entire industrial control system has two Ethernet ports, which are interconnected through the field bus, and one node device is always kept as the target node device. Figure 2 As shown in the figure, there are 6 node devices in the equipment cluster of the industrial control system, and the transmission direction of the data link is clockwise. When the 0-node device does not receive any request message containing data frames within the preset period, it indicates that the link status is abnormally disconnected, otherwise it indicates that the link status is normally connected. This method realizes the automatic diagnosis and automatic recovery of the topological link, ensuring the effectiveness of data communication.
[0065] The following uses the 0 node device as the target node device and combines the attached Figure 2 Describe the specific process of the treatment method.
[0066] The 0-node device sends a diagnostic request to the remaining node devices through the field bus via the first Ethernet port, and the diagnostic request includes a first diagnostic frame. The 1-node device, the 2-node device, the 3-node device, the 4-node device, and the 5-node device receive the first diagnostic frame in turn, and add their own data transport requirements in the first diagnostic frame in turn to form a new first diagnostic frame. When the 0-node device receives the new first diagnostic frame through the second Ethernet port, it obtains the data transport requirements of all other node devices from the first diagnostic frame and generates a transport requirement table.
[0067] Again, the 0-node device sends a data transmission request corresponding to the transport demand table to other node devices through the first Ethernet port, and the data transmission request includes a first transport frame. The 1-node device, the 2-node device, the 3-node device, the 4-node device and the 5-node device receive the first transport frame in sequence, and perform data upload, data download or data forwarding actions. When the 0-node device receives the first transport frame for the first time through the second Ethernet port, it indicates that the data transmission actions of the other node devices in the topology map are all completed, or, when the 0-node device receives the first transport frame for the second time through the second Ethernet port, it indicates that the data transmission actions of the other node devices in the topology map are all completed.
[0068] Finally, the 0-node device sends a data operation request to other node devices through the first Ethernet port. In response to the data operation request, the 1-node device, the 2-node device, the 3-node device, the 4-node device and the 5-node device simultaneously operate on the target data they have received.
[0069] This method enables synchronized data processing and logic operation of node devices in industrial control systems without time synchronization functions.
[0070] In an optional embodiment, if Figure 3 As shown, step S13 includes:
[0071] S131. The current node device supplements the corresponding data transmission path in the first diagnostic frame to generate an updated first diagnostic frame.
[0072] S1321: When the UDP of the updated first diagnosis frame is not greater than the threshold, the current node device forwards the updated first diagnosis frame to the next node device.
[0073] S1322: When the UDP of the updated first diagnostic frame is greater than the threshold, the current node device generates two different second diagnostic frames again according to the updated first diagnostic frame, and forwards the second diagnostic frames to the next node device.
[0074] S133: If the next node device is the target node device, obtain a transportation requirement table based on the updated first diagnostic frame.
[0075] Specifically, the current node device uses the data transmission path of the device at the end of the first diagnostic frame to generate a new first diagnostic frame. When the new diagnostic frame exceeds the maximum payload length of UDP, the new first diagnostic frame is cut to generate two different second diagnostic frames, and then the second diagnostic frame is sent to the next node device, otherwise the new first diagnostic frame is directly sent to the next node device. The frame headers of the two second diagnostic frames are the same, but the frame data are different.
[0076] This method ensures that the data transport requirements of all node devices in the industrial control system can be collected by the target node device, expanding the scope of data communication and the reliability of the communication process. When the node device increases or decreases, the transport demand table is updated by retrieving the first diagnostic frame, realizing the self-adaptation of the data exchange cycle of each node device in the industrial control system without the time synchronization function.
[0077] In an optional implementation, the data transmission request includes a first transport frame, such as Figure 4 As shown, step S15 includes:
[0078] S151. Determine the local logical address of the current node device.
[0079] S152: Look up the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number, and the data validity identifier carried in the first transport frame.
[0080] S153. Determine the data transmission action performed by the current node device according to the local logical address, the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier; the data transmission action includes at least one of data upload, data download and data forwarding.
[0081] Specifically, if the local logical address of the current node device is 1, and the logical address of the current source node device in the first transport frame is also 1, then the data upload operation is performed in the data area of the first transport frame, and the data is marked as valid. If the local logical address of the current node device is 1, the logical address of the current destination node device of the first transport frame is also 1, and the data is marked as valid, then the data download operation is performed from the data area of the first transport frame. If the local logical address of the current node device is 1, the logical address of the current source node device is also 2, and the logical address of the current destination node device is 3, then the first transport frame is directly forwarded to the next node device. This method ensures the certainty of topological link data transmission, the accuracy of data reception and the characteristics of fast data transmission speed.
[0082] For example, Figure 5 The figure shows the structure of the first diagnostic frame. The first diagnostic frame can be included in the diagnostic request initiated by the 0 node device, and starts with a link diagnostic tag (a characteristic value of one byte length), indicating that this frame is the first diagnostic frame. With the transmission of the first diagnostic frame, each remaining node device automatically adds the data transmission path to be sent at the end. The link diagnostic frame length indicates the total length of the link diagnostic frame, which is used to parse the information of the node device, and the target node indicates the logical address of the destination node device.
[0083] like Figure 6 The figure shows the structure of the first transport frame. The first transport frame can be included in the data transmission request initiated by the 0-node device, and starts with a link transport mark (a feature of one byte length), indicating that this frame is the first transport frame. The data valid mark is set to invalid when the 0-node device sends it, indicating that the data in the data area of the first transport frame is invalid; when the data valid mark is set to valid, it indicates that the data in the data area of the first transport frame is valid. Only when the destination node device detects that the data valid mark is set to valid can the data download action be performed. The data area indicates that the maximum valid data of UDP is 1472 bytes. After removing the bytes occupied by the first 5 first transport frames, the remaining bytes are the maximum amount of communicable data of the current first transport frame.
[0084] In the present embodiment, a method for processing data communication in an industrial control system is provided to solve the problem that in an industrial control system without a time synchronization function, the intelligent devices on site cannot process data synchronously, causing uncertain logical operation results; the field bus is used to realize the transmission requirement of sending and receiving data in a uniform pace, and the requirement of performing logical operation processing at the last moment of the same data transmission cycle is realized, thereby improving the reliability of data exchange.
[0085] Example 2
[0086] like Figure 7, which is a schematic diagram of a module of a data communication processing system in an industrial control system in this embodiment. Specifically, the processing system includes: an address setting module 210, a first sending module 220, a generating module 230, a second sending module 240, a response receiving module 250 and a third sending module 260.
[0087] The address setting module 210 sorts the N devices in the industrial control system and edits the logical addresses in sequence to form node devices with the first logical address to the Nth logical address respectively, and takes the node device with the smallest logical address as the target node device, N≥1 and N is an integer.
[0088] The first sending module 220 is used for the target node device to send a diagnostic request to the remaining node devices; the target node device and the remaining node devices are interconnected in sequence in a ring topology via a field bus, and the diagnostic request is used to obtain the data transportation requirements of each node device.
[0089] The generation module 230 is used to receive responses to the diagnosis request from the next node device in sequence to generate a transportation demand table; the transportation demand table includes the logical address of the source node device and the logical address of the destination node device, and the logical address of the source node device corresponds to the logical address of the destination node device.
[0090] The second sending module 240 is used for the target node to send a data transmission request corresponding to the transportation demand table to the remaining node devices; the data transmission request is used to guide each node device to transmit the corresponding target data.
[0091] The response receiving module 250 is used to sequentially receive a response to the data transmission request from the next node device.
[0092] The third sending module 260 is used for the target node device to send a data operation request to the remaining node devices; the data operation request is used to prompt each node device to operate on the received target data.
[0093] Specifically, the processing system is applied to an industrial control system without a time synchronization function. The address setting module 210 edits a logical address (0, 1, 2, 3...N) for all devices in the industrial control system. Node device 0 is the node device with the smallest logical address, so it is the target node device by default. Each node device in the device cluster of the entire industrial control system has two Ethernet ports, which are interconnected through the field bus, and one node device is always kept as the target node device. Figure 2As shown in the figure, there are 6 node devices in the equipment cluster of the industrial control system, and the transmission direction of the data link is clockwise. When the 0-node device does not receive any request message containing data frames within the preset period, it indicates that the link status is abnormally disconnected, otherwise it indicates that the link status is normally connected. This method realizes the automatic diagnosis and automatic recovery of the topological link, ensuring the effectiveness of data communication.
[0094] The following uses the 0 node device as the target node device and combines the attached Figure 7 Describe the specific process of the treatment method.
[0095] The first sending module 220 controls the 0-node device to send a diagnostic request to the remaining node devices through the field bus via the first Ethernet port, and the diagnostic request includes a first diagnostic frame. The 1-node device, the 2-node device, the 3-node device, the 4-node device, and the 5-node device receive the first diagnostic frame in turn, and add their own data transport requirements in the first diagnostic frame in turn to form a new first diagnostic frame. When the 0-node device receives the new first diagnostic frame through the second Ethernet port, it obtains the data transport requirements of all other node devices from the first diagnostic frame, and the generation module 230 generates a transport requirement table.
[0096] Again, the second sending module 240 controls the 0-node device to send a data transmission request corresponding to the transport demand table to other node devices through the first Ethernet port, and the data transmission request includes a first transport frame. The response receiving module 250 controls the 1-node device, the 2-node device, the 3-node device, the 4-node device and the 5-node device to receive the first transport frame in sequence, and perform data uploading, data downloading or data forwarding. When the 0-node device receives the first transport frame for the first time through the second Ethernet port, it indicates that the data transmission actions of other node devices in the topology map are all completed, or, when the 0-node device receives the first transport frame for the second time through the second Ethernet port, it indicates that the data transmission actions of other node devices in the topology map are all completed.
[0097] Finally, the third sending module 260 controls the 0-node device to send a data operation request to other node devices through the first Ethernet port. In response to the data operation request, the 1-node device, the 2-node device, the 3-node device, the 4-node device and the 5-node device simultaneously operate on the target data received by each of them. This method realizes the synchronous data processing and logic operation of the node devices in the industrial control system without the time synchronization function.
[0098] In an optional embodiment, if Figure 7 As shown, the generation module 230 includes:
[0099] The supplementing unit 231 is used for the current node device to supplement the corresponding data transmission path in the first diagnostic frame to generate an updated first diagnostic frame.
[0100] The diagnosis frame forwarding unit 2321 is configured to forward the updated first diagnosis frame to the next node device when the UDP of the updated first diagnosis frame is not greater than a threshold.
[0101] The diagnostic frame regeneration unit 2322 is used for, when the UDP of the updated first diagnostic frame is greater than a threshold, the current node device to generate two different second diagnostic frames again according to the updated first diagnostic frame, and forward the second diagnostic frames to the next node device.
[0102] The acquisition unit 233 is configured to acquire the transportation requirement table based on the updated first diagnostic frame if the next node device is the target node device.
[0103] Specifically, the current node device is on the data transmission path of the device at the end of the first diagnostic frame, and the supplement unit 231 generates a new first diagnostic frame. When the new diagnostic frame exceeds the maximum payload length of UDP, the new first diagnostic frame is cut to generate two different second diagnostic frames, and the diagnostic frame regeneration unit 2322 sends the second diagnostic frame to the next node device, otherwise the diagnostic frame forwarding unit 232 sends the new first diagnostic frame to the next node device. The frame headers of the two second diagnostic frames are the same, but the frame data are different.
[0104] This method ensures that the data transport requirements of all node devices in the industrial control system can be collected by the target node device, expanding the scope of data communication and the reliability of the communication process. When the node device increases or decreases, the transport demand table is updated by retrieving the first diagnostic frame, realizing the self-adaptation of the data exchange cycle of each node device in the industrial control system without the time synchronization function.
[0105] In an optional implementation, the data transmission request includes a first transport frame, such as Figure 7 As shown, the response receiving module 250 includes:
[0106] The determination unit 251 is used to determine the local logical address of the current node device.
[0107] The search unit 252 is used to search the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier carried in the first transport frame.
[0108] The determination unit 253 determines the data transmission action performed by the current node device according to the local logical address, the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier; the data transmission action includes at least one of data uploading, data downloading and data forwarding.
[0109] Specifically, if the local logical address of the current node device is 1, and the logical address of the current source node device in the first transport frame is also 1, the determination unit 253 performs a data upload operation in the data area of the first transport frame, and marks the data valid identifier as valid. If the local logical address of the current node device is 1, the logical address of the current destination node device of the first transport frame is also 1, and the data valid identifier is valid, the determination unit 253 performs a data download operation from the data area of the first transport frame. If the local logical address of the current node device is 1, the logical address of the current source node device is also 2, and the logical address of the current destination node device is 3, the determination unit 253 directly forwards the first transport frame to the next node device.
[0110] This method ensures the certainty of topology link data transmission, the accuracy of data reception and the fast data transmission speed.
[0111] In the present embodiment, a processing system for data communication in an industrial control system is provided to solve the problem that in an industrial control system without a timing function, the intelligent devices on site cannot process data synchronously, causing uncertain logical operation results; the field bus is used to realize the transmission requirement of sending and receiving data in a uniform pace, and the requirement of performing logical operation processing at the last moment of the same data transmission cycle is realized, thereby improving the reliability of data exchange.
[0112] Example 3
[0113] Figure 8 A schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device includes at least one processor and a memory connected to the at least one processor. The memory stores a computer program that can be run by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data communication processing method in the industrial control system of embodiment 1. The electronic device provided in this embodiment can be a personal computer, such as a desktop computer, an all-in-one computer, a laptop computer, a tablet computer, etc., and can also be a terminal device such as a mobile phone, a wearable device, a handheld computer, etc. Figure 8 The electronic device 3 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0114] The components of the electronic device 3 may include, but are not limited to: the at least one processor 4 mentioned above, the at least one memory 5 mentioned above, and a bus 6 connecting different system components (including the memory 5 and the processor 4).
[0115] The bus 6 includes a data bus, an address bus and a control bus.
[0116] The memory 5 may include a volatile memory, such as a random access memory (RAM) 51 and / or a cache memory 52 , and may further include a read-only memory (ROM) 53 .
[0117] The memory 5 may also include a program / utility 55 having a set (at least one) of program modules 54, such program modules 54 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0118] The processor 4 executes various functional applications and data processing by running the computer programs stored in the memory 5, such as the processing method of data communication in the above-mentioned industrial control system.
[0119] The electronic device 3 may also communicate with one or more external devices 7 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 8. Furthermore, the electronic device 3 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 9. Figure 8 As shown, the network adapter 9 communicates with other modules of the electronic device 3 via the bus 6. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 3, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0120] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0121] Example 4
[0122] This embodiment provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method for processing data communication in the industrial control system of Embodiment 1 is implemented.
[0123] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0124] In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product runs on an electronic device, the program code is used to enable the electronic device to execute the processing method for data communication in the industrial control system of Example 1.
[0125] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the electronic device, partially on the electronic device, as an independent software package, partially on the electronic device and partially on a remote device, or completely on the remote device.
[0126] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A method for processing data communication in an industrial control system, characterized in that: The processing method comprises: The target node device sends a diagnostic request to the remaining node devices; the target node device and the remaining node devices are interconnected in sequence in a ring topology via a field bus, and the diagnostic request is used to obtain the data transport requirements of each of the node devices; receiving responses to the diagnostic request from the next node device in sequence to generate a transport demand table; the transport demand table includes a logical address of a source node device and a logical address of a destination node device, and the logical address of the source node device corresponds to the logical address of the destination node device; The target node device sends a data transmission request corresponding to the transportation demand table to the remaining node devices; the data transmission request is used to guide each of the node devices to transmit the corresponding target data; receiving a response to the data transmission request from the next node device in sequence; The target node device sends a data operation request to the remaining node devices; the data operation request is used to prompt each of the node devices to operate on the received target data.
2. The method for processing data communication in an industrial control system according to claim 1, characterized in that: The diagnostic request includes a first diagnostic frame, and the step of sequentially receiving a response to the diagnostic request from the next node device to generate a transportation demand table includes: The current node device supplements the corresponding data transmission path in the first diagnostic frame to generate an updated first diagnostic frame; When the UDP of the updated first diagnostic frame is not greater than a threshold, the current node device forwards the updated first diagnostic frame to the next node device; If the next node device is the target node device, the transportation requirement table is obtained based on the updated first diagnostic frame.
3. The method for processing data communication in an industrial control system according to claim 2, characterized in that: The step of sequentially receiving a response to the diagnostic request from the next node device to generate a transportation demand table further includes: When the UDP of the updated first diagnostic frame is greater than a threshold, the current node device generates two different second diagnostic frames again according to the updated first diagnostic frame, and forwards the second diagnostic frames to the next node device.
4. The method for processing data communication in an industrial control system according to claim 1, characterized in that: The data transmission request includes a first transport frame, and the step of sequentially receiving a response to the data transmission request from the next node device includes: Determine the local logical address of the current node device; Finding the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier carried in the first transport frame; Determine the data transmission action performed by the current node device according to the local logical address, the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier; the data transmission action includes at least one of data upload, data download and data forwarding; and / or, The processing method also includes: N devices in the industrial control system are sorted and their logical addresses are edited in sequence to form node devices having first to Nth logical addresses respectively, and the node device having the smallest logical address is taken as the target node device, N≥1 and N is an integer.
5. A data communication processing system in an industrial control system, characterized in that: The processing system comprises: A first sending module is used for the target node device to send a diagnostic request to the remaining node devices; the target node device and the remaining node devices are interconnected in sequence in a ring topology through a field bus, and the diagnostic request is used to obtain the data transportation requirements of each of the node devices; A generating module, used for sequentially receiving responses to the diagnostic request from the next node device to generate a transport demand table; the transport demand table includes a logical address of a source node device and a logical address of a destination node device, and the logical address of the source node device corresponds to the logical address of the destination node device; A second sending module, used for the target node device to send a data transmission request corresponding to the transportation demand table to the remaining node devices; the data transmission request is used to guide each of the node devices to transmit the corresponding target data; A response receiving module, used for receiving a response to the data transmission request from the next node device in sequence; The third sending module is used for the target node device to send a data operation request to the remaining node devices; the data operation request is used to prompt each of the node devices to operate on the received target data.
6. The data communication processing system in the industrial control system as claimed in claim 5, characterized in that: The diagnostic request includes a first diagnostic frame, and the generating module includes: A supplementing unit, configured for the current node device to supplement the corresponding data transmission path in the first diagnostic frame to generate an updated first diagnostic frame; A diagnostic frame forwarding unit, configured to forward the updated first diagnostic frame to the next node device by the current node device when the UDP of the updated first diagnostic frame is not greater than a threshold; An acquisition unit is used to acquire the transportation requirement table based on the updated first diagnostic frame if the next node device is the target node device.
7. The data communication processing system in the industrial control system according to claim 6, characterized in that: The generating module also includes: The diagnostic frame regeneration unit is used for, when the UDP of the updated first diagnostic frame is greater than a threshold, the current node device generates two different second diagnostic frames again according to the updated first diagnostic frame, and forwards the second diagnostic frame to the next node device.
8. The data communication processing system in the industrial control system according to claim 6, characterized in that: The data transmission request includes a first transport frame, and the response receiving module includes: A determination unit, used to determine the local logical address of the current node device; A search unit, used to search for the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number and the data validity identifier carried in the first transport frame; a determination unit, configured to determine a data transmission action performed by the current node device according to the local logical address, the logical address of the current source node device, the logical address of the current destination node device, the transport sequence number, and the data validity identifier; the data transmission action includes at least one of data upload, data download, and data forwarding; and / or, The processing system further comprises: The address setting module sorts N devices in the industrial control system and edits the logical addresses in sequence to form node devices with the first logical address to the Nth logical address respectively, and takes the node device with the smallest serial number logical address as the target node device, N≥1 and N is an integer.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for processing data communication in the industrial control system as claimed in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer program stored on the computer-readable storage medium, when executed by the processor, implements the method for processing data communication in the industrial control system according to any one of claims 1 to 4.
Citation Information
Patent Citations
Communication System for a Control System Over Ethernet and IP Networks
US20090282165A1
KR20220095549A