Ethernet message data transmission
By using the Ethernet message sending method in the industrial control network, the proxy process data packets are constructed and sent, and the communication path extension and stability reduction caused by 5G communication is solved, and lower latency and higher stability are achieved.
Patent Information
- Application Number
- CN202510319975.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-03
AI Technical Summary
When industrial equipment is connected to 5G terminals through 5G communication, the communication path becomes longer, the wireless transmission delay becomes larger and the stability is reduced, which increases the probability of communication failure, resulting in the inability to work normally in industrial control equipment and industrial equipment.
An Ethernet message sending method is provided. By obtaining locally stored industrial Ethernet connection table entries, if the timeout detection timer is triggered and the second device is in an online connection state, a proxy process data message is constructed and sent to the first device to avoid disconnection of the communication link.
It reduces the delay of wireless transmission, improves the stability of the working of each device in industrial scenarios, avoids disconnection of communication links caused by network delay, and ensures the normal operation of industrial control equipment and industrial equipment.
Smart Images

Figure CN120091054A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to an Ethernet packet data transmission. Background Art
[0002] In the field of modern industrial automation, real-time control and precise operation are the keys to improving production efficiency and product quality. Industrial control systems usually include various industrial devices such as sensors, actuators, controllers, and monitors. Industrial devices need to perform data exchange and instruction transmission through a reliable network communication protocol.
[0003] Currently, the connection between industrial control devices and 5G terminals is mainly achieved through 5G communication. Industrial devices are connected to the 5G network through built-in 5G communication modules. Industrial devices communicate with the 5G core network through the base stations of the 5G network, thereby realizing communication with industrial control devices.
[0004] However, the connection between industrial devices and 5G terminals through 5G communication will make the communication path longer, the wireless transmission delay larger, and the stability lower. The probability of communication failures caused by timeouts increases, resulting in the disconnection of the communication link and the abnormal operation of industrial control devices and industrial devices. Summary of the Invention
[0005] The purpose of this application is to provide an Ethernet packet transmission to reduce the wireless transmission delay in industrial scenarios and improve the working stability of various devices in industrial scenarios, aiming at the deficiencies in the above-mentioned existing technologies.
[0006] To achieve the above purpose, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, an embodiment of this application provides an Ethernet packet transmission method, and the method includes:
[0008] Obtain the industrial Ethernet connection entry of the first device corresponding to the second device stored locally. The industrial Ethernet connection entry of the second device includes: the connection status information of the second device, a timeout detection timer, and the process data packet content. Among them, the connection status information of the second device is used to characterize the industrial Ethernet connection status between the second device and the second wireless device;
[0009] If the timeout detection timer is triggered, it is determined that the next process data packet from the second device has not been received within the preset timeout time corresponding to the timeout detection timer;
[0010] If the second device is in an online connection state, a new proxy process data packet is constructed according to the process data packet content;
[0011] Send the proxy process data packet to the first device.
[0012] Optionally, the method further includes:
[0013] If the second device is not in an online connection state, record the alarm log of the second device.
[0014] Optionally, the industrial Ethernet connection entry of the second device further includes: a packet count value, and the method further includes:
[0015] Incrementally calculate a first current packet count value according to a preset packet sending interval corresponding to the second device;
[0016] Update the packet count value in the industrial Ethernet connection entry of the second device according to the first current packet count value;
[0017] The constructing a new proxy process data packet according to the process data packet content includes:
[0018] Construct the proxy process data packet according to the process data packet content and the first current packet count value.
[0019] Optionally, before sending the proxy process data packet to the first device, the method further includes:
[0020] Restart the timeout detection timer.
[0021] Optionally, the method further includes:
[0022] Receive a current process data packet from the second device sent by the second wireless device;
[0023] Extract a second current packet count value, a source address, and a destination address of the current process data packet;
[0024] Search for the industrial Ethernet connection entry of the second device according to the source address and the destination address of the current process data packet;
[0025] If the industrial Ethernet connection entry of the second device is found, determine whether the current process data packet has been proxied according to the second current packet count value and the packet count value in the industrial Ethernet connection entry of the second device;
[0026] If the current process data packet has been proxied, discard the current process data packet.
[0027] Optionally, the method further includes:
[0028] If the industrial Ethernet connection entry of the second device is found, stop the timeout detection timer in the industrial Ethernet connection entry of the second device;
[0029] Update the latest packet reception timestamp in the industrial Ethernet connection entry of the second device;
[0030] Record the content of the current process data packet as the process data packet content in the industrial Ethernet connection entry of the second device;
[0031] Start the timeout detection timer;
[0032] Send the current process data packet to the first device.
[0033] Optionally, the method further includes:
[0034] If the industrial Ethernet connection entry of the second device is not found, create the industrial Ethernet connection entry of the second device according to the source address and the destination address.
[0035] Optionally, before obtaining the industrial Ethernet connection entry of the first device corresponding to the second device stored locally, the method further includes:
[0036] Receive a first status synchronization message sent by the second wireless device, where the first status synchronization message includes: connection status information of the second device;
[0037] Store the connection status information of the second device in the industrial Ethernet connection entry of the second device.
[0038] Optionally, the method further includes:
[0039] Obtain the connection status information of the first device;
[0040] Send a second status synchronization message to the second wireless device, where the second status synchronization message includes: connection status information of the first device, and the second status synchronization message is used to enable the second wireless device to store the connection status information of the first device in the industrial Ethernet connection entry of the first device.
[0041] Optionally, the first wireless device is a terminal device, the second wireless device is a user plane function (UPF) network element, the first device is an industrial device, and the second device is an industrial control device;
[0042] Or, the first wireless device is a UPF network element, the second wireless device is a terminal device, the first device is an industrial control device, and the second device is an industrial device.
[0043] In a second aspect, another embodiment of the present application provides an Ethernet packet sending device, which includes:
[0044] An obtaining module, configured to obtain an industrial Ethernet connection entry of a first device corresponding to a second device stored locally. The industrial Ethernet connection entry of the second device includes: connection status information of the second device, a timeout detection timer, and process data packet content. Among them, the connection status information of the second device is used to characterize the industrial Ethernet connection status between the second device and a second wireless device;
[0045] A determining module, configured to determine that no next process data packet from the second device has been received within a preset timeout period corresponding to the timeout detection timer if the timeout detection timer is triggered;
[0046] A constructing module, configured to construct a new proxy process data packet according to the process data packet content if the second device is in an online connection state;
[0047] A sending module, configured to send the proxy process data packet to the first device.
[0048] In a third aspect, another embodiment of the present application provides a first wireless device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the first wireless device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the Ethernet packet sending method according to any one of the above first aspects.
[0049] In a fourth aspect, another embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is run by a processor, it performs the steps of the Ethernet packet sending method according to any one of the above first aspects.
[0050] The beneficial effects of the present application are:
[0051] The present application provides an Ethernet packet sending method. First, obtain the industrial Ethernet connection entry of the first device corresponding to the second device stored locally. If the timeout detection timer in the industrial Ethernet connection entry of the second device is triggered, it is determined that the timeout detector has not received the next process data packet from the second device within a preset timeout period, indicating that there is a problem with the communication link between the first device and the second device. When the second device connection status information in the industrial Ethernet connection entry of the second device indicates that the second device is in an online connection state, that is, the delay of the communication link is affected by network fluctuations, then according to the process data packet content in the industrial Ethernet connection entry of the second device, construct a new proxy process data packet and send the proxy process data packet to the first device. The present application determines the triggering situation of the timeout detection timer and the online connection state of the second device according to the second device connection status, timeout detection timer, and process data packet in the industrial Ethernet connection entry corresponding to the second device, and determines whether to generate a proxy process data packet according to the triggering situation of the timeout detection timer and the online connection state of the second device, and generates the corresponding proxy process data packet according to the content of the process data packet, which can avoid the disconnection of the communication link between the first device and the second device caused by network delay, thereby affecting the normal operation of the first device and the second device and reducing production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative efforts.
[0053] Figure 1 It is a communication schematic diagram of an industrial control scenario provided by an embodiment of the present application;
[0054] Figure 2 It is a flowchart of an Ethernet packet sending method provided by an embodiment of the present application;
[0055] Figure 3 It is a flowchart of constructing a proxy process data packet in an Ethernet packet sending method provided by an embodiment of the present application;
[0056] Figure 4 It is a flowchart of processing the current process data packet in an Ethernet packet data sending method provided by an embodiment of the present application;
[0057] Figure 5Schematic diagram of the process of sending data packets during the Ethernet packet sending method provided by an embodiment of the present application;
[0058] Figure 6 Schematic diagram of the process of storing industrial Ethernet connection entries in an Ethernet packet sending method provided by an embodiment of the present application;
[0059] Figure 7 Schematic diagram of the process of determining industrial Ethernet connection entries in another Ethernet packet sending method provided by an embodiment of the present application;
[0060] Figure 8 Schematic diagram of the structure of an Ethernet packet sending device provided by an embodiment of the present application;
[0061] Figure 9 Schematic diagram of the structure of the first wireless device provided by an embodiment of the present application. Detailed implementation manners
[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purposes of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to actual scale. The flowcharts used in the present application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical context relationships may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0063] In addition, the described embodiments are only some embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.
[0064] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the features stated thereafter, but does not exclude adding other features.
[0065] In a real-time industrial control scenario, industrial devices and industrial control devices usually use the industrial Ethernet protocol for network communication. The industrial control device and the industrial device configure parameters through the User Datagram Protocol (UDP). The configured parameters include watchdog parameters: packet sending period and number of times. After successful negotiation, the industrial control device and the industrial device periodically send process data packets to each other. The process data packet contains the operating status and data of the device itself, which is used to ensure the normal status of both communication parties and normal network communication. Figure 1 The figure is a communication schematic diagram of an industrial control scenario provided by an embodiment of the present application, as Figure 1 shown. The specific devices include: a first device, an industrial Ethernet switch, a first wireless device, a base station, a second wireless device, a data network side switch, and a second device. The first device communicates with the first wireless device through the industrial Ethernet switch, and the second device communicates with the second wireless device through the data network side switch. The process of sending uplink data is as follows: The first device sends the process data packet to the first wireless device through the industrial Ethernet switch. The first wireless device sends the process data packet to the second wireless device through the base station. The second wireless device sends the process data packet to the second device through the data network side switch. The process of sending downlink data is as follows: The second device sends the process data packet to the second wireless device through the data network side switch. The second wireless device sends the process data packet to the first wireless device through the base station. The first wireless device sends the process data packet to the first device through the industrial Ethernet switch. Among them, when uplink data is transmitted, the first wireless device is a terminal device, the second wireless device is a User Plane Function (UPF) network element, the first device is an industrial device, and the second device is an industrial control device; when downlink data is transmitted, the first wireless device is a UPF network element, the second wireless device is a terminal device, the first device is an industrial control device, and the second device is an industrial device. However, in the prior art, due to wireless communication through the base station, the communication path becomes longer, the latency of wireless transmission becomes larger and the stability decreases, resulting in the disconnection of the wireless transmission communication path.
[0066] To this end, the present application provides an Ethernet packet sending method, which is applied to a first wireless device in an industrial control network system. The first wireless device and the second wireless device usually communicate through the PROFINET protocol, and the process data packet in the present application is a PROFINET protocol process data packet. When executing the method of the present application, the first wireless device parses the connection request packet sent between the first device and the second device, determines the communication cycle and the number of times according to the parsing result of the connection request packet to determine the corresponding watchdog parameter, and then sets the corresponding watchdog parameter through the watchdog program. The watchdog parameter is used to judge multiple delay parameters. Among them, the connection request packet can be a Connect Request type packet of the PNIO-CM protocol. By obtaining the industrial Ethernet connection entry of the first device corresponding to the second device stored locally, if the timeout detection timer in the industrial Ethernet connection entry of the second device is triggered, it is determined that the next process data packet from the second device has not been received within the preset timeout time corresponding to the timeout detection timer; if the second device is in an online connection state, a new proxy process data packet is constructed according to the content of the process data packet and sent to the first device. The present application can send a proxy process data packet when the wireless transmission fluctuates during the communication process between the first device and the second device, avoiding the communication termination between the first device and the second device, thereby improving the communication stability between the first device and the second device.
[0067] As follows, a method for sending an Ethernet packet provided by an embodiment of the present application will be described in conjunction with multiple drawings. Figure 2 It is a schematic flowchart of a method for sending an Ethernet packet provided by an embodiment of the present application. As Figure 2 shown, the method includes:
[0068] Step 201, obtain the industrial Ethernet connection entry of the first device corresponding to the second device stored locally.
[0069] Optionally, the industrial Ethernet connection entry of the second device includes: the connection status information of the second device, the timeout detection timer, and the content of the process data packet. Each device corresponds to an industrial Ethernet connection entry, and the industrial Ethernet connection entry is used to record the communication connection relationship and communication status between different devices.
[0070] Among them, the connection status information of the second device is used to characterize the industrial Ethernet connection status between the second device and the second wireless device. The timeout detection timer determines the response situation of the timeout detection event within the preset time by setting the preset time and preset conditions. The content of the process data packet includes information such as the basic information of the packet and the data transmission content, which is specifically determined according to the actual applicable scenario, and the embodiments of the present application do not limit this. The industrial Ethernet connection entry may be a ROFINET protocol connection entry.
[0071] Optionally, according to the identifiers of the first device and the second device, obtain the industrial Ethernet connection entry of the second device corresponding to the first device stored locally.
[0072] Step 202: If the timeout detection timer is triggered, it is determined that the next process data packet from the second device has not been received within the preset timeout time corresponding to the timeout detection timer.
[0073] Optionally, if the timeout detection timer is triggered, it indicates that a timeout detection event is triggered, and the timeout detection event is that the next process data packet from the second device has not been received within the preset timeout time. The preset timeout time is slightly less than the watchdog time between the first device and the second device. For example, when the watchdog time between the first device and the second device is 24 milliseconds, the preset timeout time can be 22 milliseconds.
[0074] Step 203: If the second device is in an online connection state, construct a new proxy process data packet according to the content of the process data packet.
[0075] Optionally, when the second device is in an online connection state, it means that the triggering of the timeout detection timer is affected by network fluctuations, rather than the disconnection of the second device causing the timeout detection timer to be triggered. Then, construct a new proxy process data packet according to the content of the process data packet. Specifically, when the second device is in an online connection state, parse the content of the process data packet in the industrial Ethernet connection entry of the second device to determine the target of the proxy process data packet and the specific modified fields, so as to construct a new proxy process data packet.
[0076] Step 204: Send the proxy process data packet to the first device.
[0077] Optionally, when the first device sends the proxy process data packet, the communication link between the second device and the first device is made normal, avoiding the disconnection of the communication link caused by network delay.
[0078] In the embodiment of the present application, first, an industrial Ethernet connection entry of the first device corresponding to the second device stored locally is obtained. If the timeout detection timer in the industrial Ethernet connection entry of the second device is triggered, it is determined that the timeout detector has not received the next process data message from the second device within a preset timeout period, indicating that there is a problem with the communication link between the first device and the second device. When the second device connection status information in the industrial Ethernet connection entry of the second device indicates that the second device is in an online connection state, that is, the delay of the communication link is affected by network fluctuations, a new proxy process data message is constructed according to the process data message content in the industrial Ethernet connection entry of the second device, and the proxy process data message is sent to the first device. The present application determines the triggering situation of the timeout detection timer and the online connection state of the second device according to the second device connection status, timeout detection timer, and process data message in the industrial Ethernet connection entry corresponding to the second device, and determines whether to generate a proxy process data message according to the triggering situation of the timeout detection timer and the online connection state of the second device, and generates a corresponding proxy process data message according to the content of the process data message, which can avoid the disconnection of the communication link between the first device and the second device caused by network delay, thereby affecting the normal operation of the first device and the second device and reducing production efficiency.
[0079] Based on the above embodiment, the present application also provides a process for generating an alarm log in an Ethernet message sending method. Based on the above steps 201 - step 204, the method further includes:
[0080] If the second device is not in an online connection state, an alarm log of the second device is recorded.
[0081] Optionally, if the second device is not in an online connection state, it indicates that the failure of the communication link between the first device and the second device may be caused by the second device, and an alarm log of the second device is recorded. Among them, the second alarm log may include information such as an alarm timestamp, an identifier of the second device, an alarm type, an alarm level, etc., and the embodiments of the present application do not limit this.
[0082] In the embodiment of the present application, if the second device is not in an online connection state, an alarm log of the second device is recorded. The specific alarm reason can be determined through the alarm log, so as to quickly handle the alarm problem, improve the processing speed of the alarm, and reduce the impact on production efficiency.
[0083] Based on the above embodiment, the industrial Ethernet connection entry of the second device further includes: a message count value. The present application also provides a process for constructing a proxy process data message in an Ethernet message sending method. Figure 3The flowchart shows the process of constructing a proxy process data packet in an Ethernet packet sending method provided by an embodiment of this application. As Figure 3 shown, based on the above steps 201 - 204, this method further includes:
[0084] Step 301: Incrementally calculate the first current packet count value according to the preset packet sending interval corresponding to the second device.
[0085] Among them, the packet count value increases at a fixed interval. For example, the packet count values can be 1, 2, 3, 4 in sequence, and the interval between the packet count values is 1.
[0086] Optionally, determine the first current packet count value corresponding to the proxy process data packet according to the preset packet sending interval corresponding to the second device.
[0087] Exemplarily, the first wireless device receives two process data packets. At this time, the packet count value is 2, and the interval of the packet timer is 1. Then, the timeout detection timer is triggered to send a proxy process data packet to the first device. At this time, the first current packet count value is 3.
[0088] Step 302: Update the packet count value in the industrial Ethernet connection entry of the second device according to the first current packet count value.
[0089] Optionally, use the first current packet count value as the packet count value in the industrial Ethernet connection entry of the second device.
[0090] In step 203 above, according to the content of the process data packet, construct a new proxy process data packet, including:
[0091] Step 303: Construct a proxy process data packet according to the content of the process data packet and the first current packet count value.
[0092] Among them, the proxy process data packet includes: the content of the process data packet and the first current count value.
[0093] Optionally, construct a proxy process data packet according to the content of the process data packet and the first current packet count value. This can make it possible to determine the corresponding first current packet count value according to the proxy process data packet, avoiding repeated sending of the proxy process data packet and affecting the normal communication between the first device and the second device.
[0094] In the embodiments of the present application, according to the preset packet sending interval corresponding to the second device, the first current message count value is incrementally calculated, and according to the first current message count value, the message count value in the industrial Ethernet connection entry of the second device is updated. A proxy process data message is constructed according to the process data message content and the first current message count value. The present application can ensure the continuity of the process data message and the reliability of data transmission.
[0095] Based on the above embodiments, the present application further provides a process for starting a timeout detection timer in an Ethernet message sending method. Before sending a proxy process data message to the first device in step 204 above, the method further includes:
[0096] Starting the timeout detection timer again.
[0097] Optionally, before sending a proxy process data message to the first device, start the timeout detection timer again. The communication link between the second device and the first device can be continuously monitored, so as to determine whether it is necessary to send a proxy process data message again according to the trigger status of the timeout detection timer.
[0098] In the embodiments of the present application, before sending a proxy process data message to the first device, start the timeout detection timer again. The continuous detection of the communication link can be ensured, thus ensuring the normal communication of the entire communication link and avoiding communication failures caused by network delays.
[0099] Based on the above embodiments, the present application further provides a process for processing the current process data message in an Ethernet message data sending method. Figure 4 It is a schematic diagram of the process for processing the current process data message in an Ethernet message data sending method provided by the embodiments of the present application. As Figure 4 shown, based on steps 301-step 303 above, the method further includes:
[0100] Step 401: Receive the current process data message from the second device sent by the second wireless device.
[0101] Optionally, receive the current process data message from the second device sent by the wireless device through the base station.
[0102] Step 402: Extract the second current message count value, source address, and destination address of the current process data message.
[0103] Among them, the current process data message includes a second current message count value, a source address, and a destination address. When the current process data message is an upstream data message, the source address is an industrial device, and the destination address is an industrial control device. When the current process data message is an upstream data message, the source address is an industrial control device, and the destination address is an industrial device.
[0104] Step 403: Search for the industrial Ethernet connection entry of the second device according to the source address and destination address of the current process data packet.
[0105] Optionally, different industrial Ethernet connection entries correspond to different source addresses and destination addresses. Match the source address and destination address of the current process data packet with multiple industrial Ethernet connection entries to obtain the industrial Ethernet connection entry of the second device.
[0106] Step 404: If the industrial Ethernet connection entry of the second device is found, determine whether the current process data packet has been proxied according to the second current packet count value and the packet count value in the industrial Ethernet connection table of the second device.
[0107] Optionally, if the industrial Ethernet connection entry of the second device is found, it indicates that the current process data packet may have been proxied. Then compare the second current packet count value with the packet count value in the industrial Ethernet connection table of the second device. If they are the same, it means that the current process data packet has been proxied.
[0108] Step 405: If the current process data packet has been proxied, discard the current process data packet.
[0109] Optionally, if the current process data packet has been proxied, it means that there is no need to send the current process data packet to the first device. Then discard the current process data packet.
[0110] In the embodiment of the present application, receive the current process data packet from the second device sent by the second wireless device; extract the second current packet count value, source address and destination address of the current process data packet; search for the industrial Ethernet connection entry of the second device according to the source address and destination address of the current process data packet; if the industrial Ethernet connection entry of the second device is found, determine whether the current process data packet has been proxied according to the second current packet count value and the packet count value in the industrial Ethernet connection table of the second device; if the current process data packet has been proxied, discard the current process data packet. The present application can avoid repeated sending of the current process data packet, reduce unnecessary repeated data transmission, and ensure the communication efficiency between the first device and the second device.
[0111] On the basis of the above embodiment, the present application further provides a process for sending a process data packet in an Ethernet packet sending method. Figure 5 It is a schematic flow diagram of sending a process data packet in an Ethernet packet sending method provided by an embodiment of the present application. As Figure 5 shown, on the basis of the above steps 401 - step 405, the method further includes:
[0112] Step 501: If the industrial Ethernet connection entry of the second device is found, stop the timeout detection timer in the industrial Ethernet connection entry of the second device.
[0113] Optionally, if the industrial Ethernet connection entry of the second device is found and the current process data packet has been received at this time, stop the timeout detection timer in the industrial Ethernet connection entry of the second device to avoid triggering the timeout detection timer.
[0114] Step 502: Update the latest packet reception timestamp in the industrial Ethernet connection entry of the second device.
[0115] Optionally, use the time when the current process data packet from the second device is received as the latest packet reception timestamp in the industrial Ethernet connection entry of the second device to update the latest packet reception timestamp in the industrial Ethernet connection entry of the second device.
[0116] Step 503: Record the content of the current process data packet as the process data packet content in the industrial Ethernet connection entry of the second device.
[0117] Optionally, use the current process data packet as the process data packet content in the industrial Ethernet connection entry of the second device to update the process data packet content in the industrial Ethernet connection entry of the second device.
[0118] Step 504: Start the timeout detection timer.
[0119] Step 505: Send the current process data packet to the first device.
[0120] In the embodiment of the present application, when the timeout detection timer is not triggered, that is, the current process data packet is not proxied, the latest packet reception timestamp and the process data packet content in the industrial Ethernet connection entry of the second device are updated according to the current process data packet, the timeout detection timer is started, and the current process data packet is sent to the first device. The present application ensures the real-time transmission of data, accurately records communication events, facilitates subsequent analysis and troubleshooting, and improves the efficiency of the communication link.
[0121] On the basis of the above embodiment, the present application also provides a process for creating an industrial Ethernet connection entry in an Ethernet packet sending method. On the basis of the above steps 401 - step 405, this method further includes:
[0122] If the industrial Ethernet connection entry of the second device is not found, create the industrial Ethernet connection entry of the second device according to the source address and the destination address.
[0123] Optionally, if the industrial Ethernet connection entry of the second device is not found, it indicates that the current process data packet has not been processed and no proxy has been performed on the current process data packet. In this case, an industrial Ethernet connection entry of the second device is created based on the source address and the destination address.
[0124] In the embodiment of the present application, if the industrial Ethernet connection entry of the second device is not found, an industrial Ethernet connection entry of the second device is created according to the source address and the destination address. This ensures that all current process data packets are recorded, facilitating the monitoring of communication data and contributing to the stable operation of the network.
[0125] Based on the above embodiments, the present application further provides a process for storing an industrial Ethernet connection entry in an Ethernet packet sending method. Figure 6 It is a schematic flow diagram of storing an industrial Ethernet connection entry in an Ethernet packet sending method provided by an embodiment of the present application. As Figure 6 shown, before obtaining the industrial Ethernet connection entry of the first device corresponding to the second device stored locally in step 202 above, the method further includes:
[0126] Step 601: Receive a first status synchronization packet sent by a second wireless device.
[0127] The first status synchronization packet includes: connection status information of the second device. The second wireless device is a user function plane network element UPF. The first status synchronization packet includes: target address, source address, identifier, target device status, source device status, and status synchronization packet flag.
[0128] Optionally, the second wireless device may send multiple packets to the first wireless device. The packet is determined to be the first status synchronization packet according to the packet identifier.
[0129] Step 602: Store the connection status information of the second device in the industrial Ethernet connection entry of the second device.
[0130] Optionally, the connection status information of the second device in the industrial Ethernet connection entry of the second device is updated according to the connection status information of the second device in the first status synchronization packet, and the connection status information of the second device is stored in the industrial Ethernet connection entry of the second device.
[0131] In the embodiment of the present application, a first status synchronization packet sent by a second wireless device is received, and the connection status information of the second device is stored in the industrial Ethernet connection entry of the second device. According to the connection status information of the second device, it is determined whether to send a proxy process data packet, which can ensure the accuracy of communication between the first device and the second device, thereby avoiding sending a proxy process data packet when the second device is offline and reducing system instability factors caused by incorrect communication.
[0132] Based on the above embodiments, the present application further provides a process for determining an industrial Ethernet connection entry in another Ethernet packet sending method. Figure 7 It is a schematic flow diagram of a process for determining an industrial Ethernet connection entry in another Ethernet packet sending method provided by an embodiment of the present application. As Figure 7 shown, based on the above steps 201 - 204, the method further includes:
[0133] Step 701, obtain the connection status information of the first device.
[0134] Optionally, since the first wireless device is wired to the first device, according to the connection situation between the first wireless device and the first device, the connection status information of the first device can be determined.
[0135] Step 702, send a second status synchronization packet to the second wireless device.
[0136] The second status synchronization packet includes: the connection status information of the first device. The second status synchronization packet is used to enable the second wireless device to store the connection status information of the first device in the industrial Ethernet connection entry of the first device. The second status synchronization packet includes: destination address, source address, identifier, destination device status, source device status, and status synchronization packet flag.
[0137] Optionally, the second status synchronization packet is sent to the second wireless device through wireless transmission by the base station, so that the second wireless device determines the connection status of the first device.
[0138] In an embodiment of the present application, the connection status information of the first device is obtained; a second status synchronization packet is sent to the second wireless device to ensure that the second wireless device clearly knows the connection status information of the first device, enabling the second wireless device to respond quickly, ensuring the accuracy of information transmission, and reducing production interruptions or equipment failures caused by communication errors.
[0139] Based on the same inventive concept, an embodiment of the present application also provides an Ethernet packet sending device corresponding to the Ethernet packet sending method. Since the principle of solving problems by the device in the embodiment of the present application is similar to that of the above Ethernet packet sending method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0140] Figure 8 It is a schematic structural diagram of an Ethernet packet sending device provided by an embodiment of the present application. As Figure 8 shown, the device includes:
[0141] An acquisition module 801, configured to acquire an industrial Ethernet connection entry of a first device corresponding to a second device stored locally. The industrial Ethernet connection entry of the second device includes: connection status information of the second device, a timeout detection timer, and process data packet content. The connection status information of the second device is used to characterize the industrial Ethernet connection status between the second device and a second wireless device;
[0142] A determination module 802, configured to determine that a next process data packet from the second device has not been received within a preset timeout period corresponding to the timeout detection timer if the timeout detection timer is triggered;
[0143] A construction module 803, configured to construct a new proxy process data packet according to the process data packet content if the second device is in an online connection state;
[0144] A sending module 804, configured to send the proxy process data packet to the first device.
[0145] In a possible implementation manner, the apparatus further includes: a recording module, and the recording module is further configured to: record an alarm log of the second device if the second device is not in an online connection state.
[0146] In a possible implementation manner, the industrial Ethernet connection entry of the second device further includes: a packet count value. The construction module 803 is further configured to: incrementally calculate a first current packet count value according to a preset packet sending interval corresponding to the second device;
[0147] Update the packet count value in the industrial Ethernet connection entry of the second device according to the first current packet count value;
[0148] In a possible implementation manner, the construction module 803 is specifically configured to: construct a proxy process data packet according to the process data packet content and the first current packet count value.
[0149] In a possible implementation manner, the sending module 804 is further configured to: restart the timeout detection timer.
[0150] In a possible implementation manner, the apparatus further includes: a judgment module, and the judgment module is specifically configured to: receive a current process data packet of the second device sent by the second wireless device;
[0151] Extract a second current packet count value, a source address, and a destination address of the current process data packet;
[0152] Search for the industrial Ethernet connection entry of the second device according to the source address and the destination address of the current process data packet;
[0153] If an industrial Ethernet connection entry of the second device is found, determine whether the current process data packet has been proxied according to the second current packet count value and the packet count value in the industrial Ethernet connection entry of the second device;
[0154] If the current process data packet has been proxied, discard the current process data packet.
[0155] In a possible implementation, the determination module is further configured to: if an industrial Ethernet connection entry of the second device is found, stop the timeout detection timer in the industrial Ethernet connection entry of the second device;
[0156] Update the latest packet reception timestamp in the industrial Ethernet connection entry of the second device;
[0157] Record the packet content in the current process data packet as the process data packet content in the industrial Ethernet connection entry of the second device;
[0158] Start the timeout detection timer;
[0159] Send the current process data packet to the first device.
[0160] In a possible implementation, the determination module is further configured to: if an industrial Ethernet connection entry of the second device is not found, create an industrial Ethernet connection entry of the second device according to the source address and the destination address.
[0161] In a possible implementation, the apparatus further includes: a storage module, and the storage module is specifically configured to: receive a first status synchronization packet sent by the second wireless device, where the first status synchronization packet includes: connection status information of the second device;
[0162] Store the connection status information of the second device into the industrial Ethernet connection entry of the second device.
[0163] In a possible implementation, the sending module 804 is further configured to: obtain the connection status information of the first device;
[0164] Send a second status synchronization packet to the second wireless device, where the second status synchronization packet includes: the connection status information of the first device, and the second status synchronization packet is used to enable the second wireless device to store the connection status information of the first device into the industrial Ethernet connection entry of the first device.
[0165] In a possible implementation, the first wireless device is a terminal device, the second wireless device is a user plane function UPF network element, the first device is an industrial device, and the second device is an industrial control device;
[0166] Alternatively, the first wireless device is a UPF network element, the second wireless device is a terminal device, the first device is an industrial control device, and the second device is an industrial device.
[0167] For the processing procedures of the various modules in the device and the interaction procedures between the various modules, reference may be made to the relevant descriptions in the foregoing method embodiments, which will not be elaborated herein.
[0168] An embodiment of the present application further provides a first wireless device. Figure 9 As shown in the structural schematic diagram of the first wireless device provided by the embodiment of the present application, Figure 9 the first wireless device includes: a processor 901, a memory 902, and optionally, a bus 903 may also be included. The memory 902 stores machine-readable instructions executable by the processor 901. When the first wireless device runs, the processor 901 communicates with the memory 902 through the bus 903. When the machine-readable instructions are executed by the processor 901, the steps of the foregoing Ethernet packet sending method are executed.
[0169] An embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the foregoing Ethernet packet sending method are executed.
[0170] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above may refer to the corresponding processes in the method embodiments, which will not be elaborated in the present application. In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other may be through some communication interfaces. The indirect coupling or communication connection of the devices or modules may be in an electrical, mechanical, or other form.
[0171] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0172] The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application.
Claims
1. A method for sending an Ethernet message, characterized in that: A first wireless device applied to an industrial control network system, the method comprising: Obtain a locally stored industrial Ethernet connection entry corresponding to a second device from a first device, wherein the industrial Ethernet connection entry of the second device includes: connection status information of the second device, a timeout detection timer, and process data message content, wherein the connection status information of the second device is used to characterize the industrial Ethernet connection status between the second device and the second wireless device; If the timeout detection timer is triggered, determining that the next process data message from the second device is not received within a preset timeout period corresponding to the timeout detection timer; If the second device is in an online connection state, constructing a new proxy process data message according to the content of the process data message; Send the proxy process data message to the first device.
2. The method according to claim 1, characterized in that: The method further comprises: If the second device is not in an online connection state, an alarm log of the second device is recorded.
3. The method according to claim 1, characterized in that: The industrial Ethernet connection table entry of the second device further includes: a message count value, and the method further includes: Incrementally calculating the first current message count value according to a preset packet sending interval corresponding to the second device; According to the first current message count value, updating the message count value in the industrial Ethernet connection table entry of the second device; The step of constructing a new proxy process data message according to the process data message content includes: The proxy process data message is constructed according to the process data message content and the first current message count value.
4. The method according to claim 1, characterized in that: Before sending the proxy process data message to the first device, the method further includes: The timeout detection timer is started again.
5. The method according to claim 3, characterized in that: The method further comprises: receiving a current process data message from the second device sent by the second wireless device; Extracting a second current message count value, a source address, and a destination address of the current process data message; According to the source address and the destination address of the current process data message, searching the industrial Ethernet connection table entry of the second device; If the industrial Ethernet connection table entry of the second device is found, determining whether the current process data message has been proxied according to the second current message count value and the message count value in the industrial Ethernet connection representation of the second device; If the current process data message has been proxied, the current process data message is discarded.
6. The method according to claim 5, characterized in that The method further comprises: If the industrial Ethernet connection entry of the second device is found, stop the timeout detection timer in the industrial Ethernet connection entry of the second device; Updating the latest packet receiving timestamp in the industrial Ethernet connection table entry of the second device; Recording the message content in the current process data message as the process data message content in the industrial Ethernet connection table entry of the second device; Starting the timeout detection timer; The current process data message is sent to the first device.
7. The method according to claim 5, characterized in that The method further comprises: If the industrial Ethernet connection entry of the second device is not found, an industrial Ethernet connection entry of the second device is created according to the source address and the destination address.
8. The method according to claim 1, characterized in that: Before obtaining the locally stored industrial Ethernet connection entry corresponding to the second device from the first device, the method further includes: receiving a first state synchronization message sent by the second wireless device, wherein the first state synchronization message includes: connection state information of the second device; The connection status information of the second device is stored in the industrial Ethernet connection table entry of the second device.
9. The method according to claim 1, characterized in that: The method further comprises: Acquire connection status information of the first device; A second state synchronization message is sent to the second wireless device, wherein the second state synchronization message includes: connection state information of the first device, and the second state synchronization message is used to enable the second wireless device to store the connection state information of the first device in the industrial Ethernet connection table entry of the first device.
10. The method according to any one of claims 1 to 9, characterized in that: The first wireless device is a terminal device, the second wireless device is a user plane function UPF network element, the first device is an industrial device, and the second device is an industrial control device; Alternatively, the first wireless device is a UPF network element, the second wireless device is a terminal device, the first device is an industrial control device, and the second device is an industrial device.