Data transmission method and device, equipment, storage medium and computer program product
By converting data frame formats between different industrial networks, the problems of data loss and parsing errors in cross-protocol data transmission are solved, and reliable transparent transmission and imperceptible reception of data are achieved.
Patent Information
- Application Number
- CN202511060557.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-10
AI Technical Summary
Due to protocol differences, cross-protocol data transmission cannot be achieved between different industrial networks, resulting in data being incorrectly parsed or discarded, reducing the reliability of data transmission.
By converting the data packets of the first industrial network into the data frame format of the second industrial network, the data packets can be transparently transmitted between different networks, ensuring the compatibility and reliability of the data frame format.
It improves the reliability of cross-protocol data transmission, realizes data-free reception, avoids data loss or parsing errors, and is suitable for a variety of industrial network topologies.
Smart Images

Figure CN120768960A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial communication, and in particular to a data transmission method, device, equipment, storage medium and computer program product. BACKGROUND
[0002] In an industrial network scenario, different manufacturers or systems usually adopt a closed design of private protocol or special protocol, and only support interconnection of industrial devices within their own protocol family. Different protocols have significant differences in data frame structure, resulting in the inability of industrial devices in different industrial networks to transmit data, and forming protocol islands between different industrial networks.
[0003] Therefore, how to realize cross-protocol data transmission in an industrial network is of great significance. SUMMARY
[0004] Therefore, it is necessary to provide a data transmission method, device, equipment, storage medium and computer program product to improve the reliability of data transmission between devices in an industrial network.
[0005] In a first aspect, the present application provides a data transmission method for a first industrial device in a first industrial network, the method comprising:
[0006] obtaining a first data packet, the first data packet having a first data frame format corresponding to the first industrial network;
[0007] performing data frame format conversion on the first data packet according to a second data frame format corresponding to a second industrial network, to obtain a second data packet;
[0008] sending the second data packet to a second industrial device in the second industrial network.
[0009] In one embodiment, performing data frame format conversion on the first data packet according to a second data frame format corresponding to a second industrial network, to obtain a second data packet, comprises:
[0010] obtaining a control field and a data field from the first data packet, the control field including a network address field and a network type field;
[0011] performing data frame conversion on the control field and the data field according to the second data frame format, to obtain the second data packet.
[0012] In one embodiment, obtaining a control field and a data field from the first data packet comprises:
[0013] The standard preamble field and the first check field are deleted from the first data packet to obtain a first control field and a first data field, where the first control field is a control field in the first industrial network and the first data field is a data field in the first industrial network.
[0014] In one embodiment, performing data frame conversion on the control field and the data field according to the second data frame format to obtain the second data packet includes:
[0015] Generate a second control field and a second check field according to the first control field and the first data field, where the second control field is a control field in the second industrial network;
[0016] The first control field and the first data field are determined as the second data field, and the second control field, the second data field and the second check field are spliced to obtain a second data packet. The second data field is a data field in the second industrial network.
[0017] In one embodiment, obtaining a control field and a data field from a first data packet includes:
[0018] The first control field and the first check field are deleted from the first data packet to obtain a first data field, where the first data field includes a second control field and a second data field. The first control field is a control field in the first industrial network, the first data field is a data field in the first industrial network, the second control field is a control field in the second industrial network, and the second data field is a data field in the second industrial network.
[0019] In one embodiment, performing data frame conversion on the control field and the data field according to the second data frame format to obtain the second data packet includes:
[0020] Obtain a preset standard preamble code, and generate a second check field according to the second data field;
[0021] The standard preamble, the second control field, the second data field, and the second check field are concatenated to obtain a second data packet.
[0022] In one embodiment, the method further comprises:
[0023] determining, according to the first control field, whether the second data packet needs to be grouped with other data packets;
[0024] The standard preamble, the second control field, the second data field, and the second check field are concatenated to obtain a second data packet, including:
[0025] If the second data packet needs to be packetized with other data packets, a third control field and a third data field are obtained from the other data packets, and a standard preamble, the second control field, the second data field, the third control field, the third data field, and a second check field are spliced to obtain a packetized data packet.
[0026] In one of the embodiments, the first control field comprises a special network preamble, a special network standard frame header, and a special network protocol frame header.
[0027] The special network protocol frame header comprises:
[0028] A destination address field, which is used to indicate a destination address of the data packet and is used for link addressing in the first industrial network.
[0029] A source address field, which is used to indicate a source address of the data packet.
[0030] A length field, which is used to indicate a data length of the data packet.
[0031] In one of the embodiments, the special network protocol frame header further comprises one or more of the following:
[0032] A frame sending sequence reset field, which is used to indicate whether the frame sending sequence of the data packet is reset.
[0033] A frame sending sequence field, which is used to indicate the frame sending sequence of the data packet.
[0034] A subframe identification field, which is used to indicate an identification of a subframe when the data packet is a subframe.
[0035] A fragment end field, which is used to indicate whether the subframe is the last subframe in the data packet.
[0036] In a second aspect, the application provides a data transmission method, which is used for a second industrial device in a second industrial network, and the method comprises:
[0037] Receiving a second data packet sent by a first industrial device in a first industrial network;
[0038] According to a destination address indicated by the second data packet, sending the second data packet to a device corresponding to the destination address.
[0039] The second data packet is obtained by performing data frame format conversion on a first data packet according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0040] In one of the embodiments, the second data packet comprises real-time data, and the second data packet is sent to a device corresponding to the destination address according to the destination address indicated by the second data packet, comprising:
[0041] determining a real-time data transmission resource corresponding to the first industrial network;
[0042] sending the second data packet to a device corresponding to the destination address according to the destination address on the real-time data transmission resource.
[0043] In a third aspect, the application provides a data transmission method for a control device in a second industrial network, comprising:
[0044] receiving a second data packet sent by a second industrial device in the second industrial network;
[0045] The second data packet is sent by a first industrial device in a first industrial network to the second industrial device, the second data packet is obtained by performing data frame format conversion on a first data packet by the first industrial device according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0046] In one of the embodiments, the method further comprises:
[0047] deleting the second control field and the second check field from the second data packet to obtain a second data field, the second data field comprising a first control field and a first data field, the first control field comprising a network address field and a network type field, the first control field being a control field in the first industrial network, the first data field being a data field in the first industrial network, the second control field being a control field in the second industrial network, and the second data field being a data field in the second industrial network;
[0048] sending the first control field and the first data field to a control device corresponding to a source address indicated in the network address field.
[0049] In one of the embodiments, the method further comprises:
[0050] determining whether the second data packet needs to be processed in a packet group with other data packets according to the second control field;
[0051] sending the first control field and the first data field to a control device corresponding to a source address indicated in the network address field, comprising:
[0052] If the second data packet needs to be grouped with other data packets, the third control field and the third data field are obtained from the other data packets, and the first control field, the first data field, and the third data field are grouped and processed according to the source address indicated in the network address field and sent to the control device.
[0053] In one embodiment, the second control field includes a dedicated network preamble, a dedicated network standard frame header, and a dedicated network protocol frame header;
[0054] The dedicated network protocol frame header includes:
[0055] Destination address field, the destination address field is used to indicate the destination address of the data packet and is used for link addressing in the second industrial network;
[0056] Source address field: The source address field is used to indicate the source address of the data packet;
[0057] Length field: The length field is used to indicate the data length of the data packet.
[0058] In one embodiment, the dedicated network protocol frame header further includes one or more of the following:
[0059] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0060] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0061] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0062] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0063] In one embodiment, the method further comprises:
[0064] Corresponding real-time data transmission resources are allocated to one or more first industrial networks connected to the second industrial network, and the real-time data transmission resources are used to transmit real-time data corresponding to the first industrial network.
[0065] In a fourth aspect, the present application provides a data transmission device for use with a first industrial device in a first industrial network, the device comprising:
[0066] An acquisition module, configured to acquire a first data packet, where the first data packet has a first data frame format corresponding to the first industrial network;
[0067] a conversion module, configured to convert the data frame format of the first data packet into a second data frame format corresponding to the second industrial network, to obtain a second data packet;
[0068] The sending module is configured to send the second data packet to a second industrial device in the second industrial network.
[0069] In a fifth aspect, the present application provides a data transmission device for a second industrial device in a second industrial network, the device comprising:
[0070] a receiving module, configured to receive a second data packet sent by a first industrial device in the first industrial network;
[0071] a sending module, configured to send the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet;
[0072] The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0073] In a sixth aspect, the present application provides a data transmission device for use with a control device in a second industrial network, the device comprising:
[0074] A receiving module is used to receive a second data packet sent by a second industrial device in a second industrial network, wherein the second data packet is sent from a first industrial device in a first industrial network to a second industrial device, and the second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0075] In a seventh aspect, the present application provides an industrial device, including a memory, a transceiver, and a processor:
[0076] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of a processor; and a processor for reading the computer program in the memory and performing the following operations:
[0077] Acquire a first data packet, where the first data packet has a first data frame format corresponding to the first industrial network;
[0078] performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network to obtain a second data packet;
[0079] The transceiver is controlled to send a second data packet to a second industrial device in the second industrial network.
[0080] In an eighth aspect, the present application provides an industrial device, including a memory, a transceiver, and a processor:
[0081] The memory is configured to store a computer program; the transceiver is configured to transceive data under control of the processor; and the processor is configured to read the computer program in the memory and perform the following operations:
[0082] The transceiver is controlled to receive a second data packet sent by a first industrial device in a first industrial network;
[0083] According to a destination address indicated by the second data packet, the second data packet is sent to a device corresponding to the destination address;
[0084] The second data packet is obtained by performing data frame format conversion on the first data packet according to a second data frame format corresponding to a second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0085] In a ninth aspect, the present application provides a control device, comprising a memory, a transceiver, and a processor:
[0086] The memory is configured to store a computer program; the transceiver is configured to transceive data under control of the processor; and the processor is configured to read the computer program in the memory and perform the following operations:
[0087] The transceiver is controlled to receive a second data packet sent by a second industrial device in a second industrial network, wherein the second data packet is sent by a first industrial device in a first industrial network to the second industrial device, the second data packet is obtained by performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0088] In a tenth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the method of the first aspect, the second aspect, or the third aspect.
[0089] In an eleventh aspect, the present application provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the steps of the method of the first aspect, the second aspect, or the third aspect.
[0090] The above-mentioned data transmission method, apparatus, equipment, storage medium and computer program product, when the first industrial equipment in the first industrial network transmits a data packet to the second industrial equipment in the second industrial network, the first industrial equipment will convert the first data packet having the first data frame format corresponding to the first industrial network into a second data packet having the second data frame format corresponding to the second industrial network, so that the second data packet can be accurately identified by the second industrial equipment, avoiding the problem of data being incorrectly parsed or discarded during cross-protocol data transmission, resulting in low data transmission reliability. Therefore, the embodiment of the present application can improve the reliability of data transmission during cross-protocol data transmission; and, since during cross-protocol data transmission, data is transparently transmitted from the first industrial equipment to the second industrial equipment, and the frame format of the second data packet received by the second industrial equipment is the second data frame format corresponding to the second industrial network, the second industrial equipment can receive the data sent by the first industrial equipment in the first industrial network without performing any configuration or other operations, thereby realizing data-unperceived reception in cross-protocol data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0092] Figure 1 This is a network topology diagram of a wired industrial network;
[0093] Figure 2 This is a network topology diagram of another wired industrial network;
[0094] Figure 3 1 is a flow chart of a data transmission method according to an embodiment;
[0095] Figure 4 A schematic flow chart of a data transmission method in another embodiment;
[0096] Figure 5 Schematic diagram of a flow chart of a data transmission method in another embodiment;
[0097] Figure 6 A schematic diagram of a frame structure of a data frame in a dedicated network when a non-dedicated network and a dedicated network perform data transmission according to an embodiment;
[0098] Figure 7 A schematic diagram of the architecture of a controller provided in one embodiment;
[0099] Figure 8A schematic diagram of the time division of data transmission of different network types provided by an embodiment;
[0100] Figure 9 A schematic diagram of data flow when industrial equipment on a dedicated network transmits data to industrial equipment on a non-dedicated network, provided by one embodiment;
[0101] Figure 10 A schematic diagram illustrating changes in the data frame format when an industrial device on a dedicated network transmits data to an industrial device on a non-dedicated network according to an embodiment;
[0102] Figure 11 A schematic diagram of data flow when an industrial device on a non-dedicated network transmits data to an industrial device on a dedicated network, provided by one embodiment;
[0103] Figure 12 A schematic diagram illustrating changes in the data frame format when an industrial device on a non-dedicated network transmits data to an industrial device on a dedicated network, provided by one embodiment;
[0104] Figure 13 A schematic diagram of a controller in a private network sending data to a master station after receiving data is provided for one embodiment;
[0105] Figure 14 A schematic diagram of a data packet transmission sequence field, a subframe sequence number field, and a fragmentation end field in a dedicated network protocol frame header field provided by one embodiment;
[0106] Figure 15 is a structural block diagram of a data transmission device in one embodiment;
[0107] Figure 16 is a structural block diagram of a data transmission device in another embodiment;
[0108] Figure 17 is a structural block diagram of a data transmission device in yet another embodiment;
[0109] Figure 18 Schematic diagram of the structure of industrial equipment in one embodiment. DETAILED DESCRIPTION
[0110] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0111] In the traditional industrial network field, data transmission between industrial equipment and controllers is based on wired networks.
[0112] See also Figure 1 , Figure 1 This is a network topology diagram of a wired industrial network. Figure 1 In the wired industrial network shown, the control device and industrial devices 1 to 4 form a simple single-level topology through wired cables. Figure 1 The industrial devices in the illustrated embodiment may be industrial devices in a dedicated network. Industrial devices in the dedicated network can transmit data to each other, but due to the different protocols between non-dedicated networks and dedicated networks, industrial devices in non-dedicated networks cannot transmit data to each other.
[0113] See also Figure 2 , Figure 2 This is another network topology diagram of a wired industrial network. Figure 2 In the wired industrial network shown, there are Network 1 and Network 2 (Network 1 is a non-dedicated network, and Network 2 is a non-dedicated network) that support a non-dedicated network protocol suite, and a dedicated network (or private network) that supports a dedicated network protocol suite. The dedicated network is provided with control devices and industrial devices 1 to 4 connected by cables. Network 1 is provided with industrial devices 1 to 3, and Network 2 is provided with industrial devices 1 to 3. Industrial device 1 in Network 1 is connected to industrial device 3 in the dedicated network by cables, and industrial device 1 in Network 2 is connected to industrial device 4 in the dedicated network by cables. In other embodiments, a complex multi-level topology can be formed between the devices in at least one of the dedicated network, Network 1, and Network 2 via wired cables. The embodiments of the present application do not limit the connection method between the devices in at least one of the dedicated network, Network 1, and Network 2.
[0114] Since different industrial networks differ in at least one of the data frame structure, transmission mechanism, and addressing method, other networks (such as Network 1 and Network 2) cannot generate compliant data frames for the dedicated network. Therefore, data from other networks cannot pass through or be transmitted in the dedicated network. In addition, the dedicated network cannot generate compliant data frames for other networks. Therefore, data from the dedicated network cannot pass through or be transmitted to other networks.
[0115] In other words, when multiple industrial network protocols are interconnected, the following protocol closedness issue often exists: each protocol vendor typically develops based on proprietary standards, without open underlying communication interfaces or data encapsulation rules. In this scenario, industrial devices using other protocols cannot directly parse or generate compliant data frames. As a result, cross-protocol data transmission in industrial networks can lead to data being incorrectly parsed or discarded, resulting in low data transmission reliability.
[0116] In view of this, embodiments of the present application provide a data transmission method, apparatus, device, storage medium, and computer program product, which can improve the reliability of data transmission during cross-protocol data transmission between devices in an industrial network.
[0117] The data transmission method provided in the embodiment of the present application can be applied to any industrial network unless otherwise specified. For example, it can be applied to Figures 1 to 2 In any of the networks shown (eg, dedicated networks or non-dedicated networks), it is understood that Figures 1 to 2 The industrial network shown does not constitute a limitation on the network topology of the industrial network to which the data transmission method according to the embodiment of the present application is applied.
[0118] Below, in conjunction with the drawings in the embodiments of this application, the technical solutions in the embodiments of this application are clearly and completely described. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0119] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0120] In an exemplary embodiment, Figure 3 As shown, a data transmission method is provided, which is described by taking the method applied to a first industrial device in a first industrial network as an example, and includes the following steps:
[0121] Step 301: Acquire a first data packet, where the first data packet has a first data frame format corresponding to a first industrial network.
[0122] In the embodiment of the present application, the first industrial network and the second industrial network may be industrial networks of any two protocols.
[0123] In some embodiments, the first industrial network may be a dedicated network. In other embodiments, the first industrial network may be a non-dedicated network. The first industrial device is an industrial device in the first industrial network that is directly connected to an industrial device in the second industrial network. For example, if the first industrial network is a dedicated network, the first industrial device is an industrial device in the dedicated network that is directly connected to an industrial device in a non-dedicated network. For example, if the first industrial network is a non-dedicated network, the first industrial device is an industrial device in the non-dedicated network that is directly connected to an industrial device in a dedicated network.
[0124] For example, the data packets in the embodiments of the present application can be understood as data frames. The data packets can include a frame header, a data portion, and a frame trailer (i.e., a checksum field). In the absence of a conflict, the data packets in the embodiments of the present application, unless otherwise specified, can be the first data packet or the second data packet.
[0125] In some embodiments, the first data packet may be generated by the first industrial device, or may be transmitted to the first industrial device by other industrial devices in the first industrial network.
[0126] Step 302 : Convert the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network to obtain a second data packet.
[0127] The first data frame format is different from the second data frame format.
[0128] The second data packet has the same data portion (eg, information in a third-part data (Thrid-part DATA) field) as the first data packet, and information other than the data portion is different between the first data packet and the second data packet.
[0129] In some embodiments, step 302 may include: obtaining the data portion of the first data packet; generating a frame header of the second data packet based on the frame header of the first data packet and the second data frame format; determining the frame tail of the second data packet based on the frame header and data portion of the second data packet; and splicing the frame header, data portion and frame tail of the second data packet to obtain a second data packet.
[0130] Step 303: Send the second data packet to the second industrial device in the second industrial network.
[0131] Exemplarily, the second data packet may be transparently transmitted to the second industrial device in the second industrial network.
[0132] In the above embodiment, when the first industrial device in the first industrial network transmits a data packet to the second industrial device in the second industrial network, the first industrial device will convert the first data packet having the first data frame format corresponding to the first industrial network into a second data packet having the second data frame format corresponding to the second industrial network, so that the second data packet can be accurately identified by the second industrial device, thereby avoiding the problem of data being incorrectly parsed or discarded during cross-protocol data transmission, resulting in low data transmission reliability. Therefore, the embodiment of the present application can improve the reliability of data transmission during cross-protocol data transmission; and, since data is transparently transmitted from the first industrial device to the second industrial device during cross-protocol data transmission, and the frame format of the second data packet received by the second industrial device is the second data frame format corresponding to the second industrial network, the second industrial device can receive the data sent by the first industrial device in the first industrial network without performing any configuration or other operations, thereby realizing data-unperceived reception in cross-protocol data transmission.
[0133] In one embodiment, step 302 may include: obtaining a control field and a data field from the first data packet, the control field including a network address (Ethernet Addresses) field and a network type (Ether Type) field; performing data frame conversion on the control field and the data field according to a second data frame format to obtain a second data packet.
[0134] The data field may include transmission data or valid data, and the valid data may include third-part valid data (Thrid-part Valid DATA).
[0135] The network address field may have the same meaning as the Media Access Control (MAC) address field, or in other words, the network address field and the MAC address field may be interchangeable. For example, the network address field may represent an address field of a protocol of the International Organization for Standardization (ISO), the International Electrotechnical Commission (IEC), or the Institute of Electrical and Electronics Engineers (IEEE). In some embodiments, the network address field may include a source address and a destination address.
[0136] The Network Type (Ether Type) field may indicate the network type corresponding to the data packet. For example, if the first data packet is a data packet in a dedicated network, the Network Type field in the first data packet indicates the dedicated network. For example, if the first data packet is a data packet in a non-dedicated network (e.g., Network 1 or Network 2), the Network Type field in the first data packet indicates the non-dedicated network (e.g., Network 1 or Network 2).
[0137] Exemplarily, the control field and the data field may be included in a third-party data (Thrid-part DATA) field in the first data packet, and the data field may include a third-party valid data (Thrid-part Valid DATA) field.
[0138] In an embodiment of the present application, the network address field is used to accurately identify the network address of the data packet, and the network type field indicates the network protocol to which the data packet belongs. According to the second data frame format, the control field and the data field are converted into data frames to obtain a second data packet, thereby ensuring the integrity and accuracy of data when transmitted between different industrial networks, avoiding data packet loss or parsing errors caused by mismatch of industrial network protocols, and improving the reliability of data transmission.
[0139] The following description uses the example of a first industrial network being a non-dedicated network and a second industrial network being a dedicated network as an example: In some embodiments, obtaining a control field and a data field from a first data packet includes obtaining a first control field and a first data field from the first data packet. Exemplarily, obtaining the first control field and the first data field from the first data packet may include removing a standard preamble field (e.g., a preamble field in a non-dedicated network) and a first checksum field (e.g., a checksum field in a non-dedicated network) from the first data packet to obtain the first control field and the first data field (e.g., a control field and a data field in a non-dedicated network), wherein the first control field is the control field in the first industrial network, and the first data field is the data field in the first industrial network.
[0140] In some embodiments, the control field and the data field are converted into data frames according to the second data frame format to obtain a second data packet, including: generating a second control field and a second check field (for example, a control field and a check field in a dedicated network) based on the first control field and the first data field, where the second control field is a control field in the second industrial network; determining the first control field and the first data field as the second data field (for example, a data field in a dedicated network), and splicing the second control field, the second data field, and the second check field to obtain a second data packet, where the second data field is a data field in the second industrial network.
[0141] In some possible implementations, generating the second control field and the second check field based on the first control field and the first data field may include: generating the second control field based on the first control field; generating the second check field based on the second control field and the first data field.
[0142] In some possible implementations, generating the second control field based on the first control field may include: determining the network address field under the second industrial network based on the network address field in the first control field, and / or determining the network type field under the second industrial network, and generating the second control field based on the network address field under the second industrial network and / or the network type field under the second industrial network.
[0143] In an embodiment of the present application, by retaining the first control field and the first data field in the first data packet intact and using them as the second data field in the second data packet, the loss or tampering of the data content is avoided, thereby improving the reliability of data transmission.
[0144] The following description uses the example of a first industrial network being a dedicated network and a second industrial network being a non-dedicated network. In some embodiments, obtaining a control field and a data field from a first data packet includes obtaining a second control field and a second data field from the first data packet. Exemplarily, obtaining the second control field and the second data field from the first data packet may include deleting the first control field (e.g., a control field in a dedicated network) and a first checksum field (e.g., a checksum field in a dedicated network) from the first data packet to obtain a first data field (e.g., a data field in a dedicated network), the first data field including a second control field and a second data field (e.g., a control field and a data field in a non-dedicated network, respectively), the first control field being a control field in the first industrial network, the first data field being a data field in the first industrial network, the second control field being a control field in the second industrial network, and the second data field being a data field in the second industrial network.
[0145] In some embodiments, the control field and the data field are converted into data frames according to the second data frame format to obtain a second data packet, including: obtaining a preset standard preamble code (for example, the preamble code field in a non-dedicated network), and generating a second check field based on the second data field (for example, the data field in a non-dedicated network); splicing the standard preamble code, the second control field, the second data field and the second check field to obtain a second data packet.
[0146] Exemplarily, generating the second check field according to the second data field may include: generating the second check field according to the second control field and the second data field (eg, a control field and a data field in a non-dedicated network, respectively).
[0147] In some embodiments, the method further includes: determining whether the second data packet needs to be grouped with other data packets based on the first control field; splicing the standard preamble, the second control field, the second data field, and the second check field to obtain a second data packet, including: if the second data packet needs to be grouped with other data packets, obtaining a third control field and a third data field from the other data packets, and splicing the standard preamble, the second control field, the second data field, the third control field, the third data field, and the second check field to obtain the grouped data packet.
[0148] Illustratively, if the second data packet needs to be grouped with other data packets, a second check field may be generated according to the second control field, the second data field, the third control field, and the third data field.
[0149] Exemplarily, if the second data does not need to be grouped with other data packets, the standard preamble, the second control field, the second data field, and the second check field are concatenated to obtain the second data packet.
[0150] In some embodiments, the first control field (for example, the first control field here is a control field in a private network) includes a private network preamble, a private network standard frame header, and a private network protocol frame header;
[0151] The dedicated network protocol frame header includes:
[0152] A destination address field, where the destination address field is used to indicate a destination address of the data packet and is used for link addressing in the first industrial network;
[0153] Source address field: The source address field is used to indicate the source address of the data packet;
[0154] Length field: The length field is used to indicate the data length of the data packet.
[0155] In some embodiments, the dedicated network protocol frame header further includes one or more of the following:
[0156] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0157] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0158] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0159] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0160] In an exemplary embodiment, Figure 4 As shown, a data transmission method is provided, which is described by taking the method applied to a second industrial device in a second industrial network as an example, and includes the following steps:
[0161] Step 401: Receive a second data packet sent by a first industrial device in a first industrial network; wherein the second data packet is obtained by the first industrial device converting the first data packet into a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0162] If the first industrial network is a dedicated network, the second industrial network is a non-dedicated network. If the first industrial network is a non-dedicated network, the second industrial network is a dedicated network. The second industrial device is an industrial device in the second industrial network that is directly connected to an industrial device in the first industrial network. For example, if the second industrial network is a dedicated network, the second industrial device is an industrial device in the dedicated network that is directly connected to an industrial device in a non-dedicated network. For example, if the second industrial network is a non-dedicated network, the second industrial device is an industrial device in the non-dedicated network that is directly connected to an industrial device in the dedicated network.
[0163] Step 402: Send the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet.
[0164] Exemplarily, the destination address indicated by the second data packet may be the destination address in the network address in the control field in the second data packet.
[0165] In the above embodiment, since the second data packet is obtained by converting the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network, that is, the second data packet is a data packet that complies with the network protocol of the second industrial network, the second industrial device of the second industrial network can receive the data sent by the first industrial device of the first industrial network without performing any configuration or other operations, thereby realizing the imperceptible reception of data in cross-protocol data transmission, and sending the second data packet to the device corresponding to the destination address according to the destination address indicated by the second data packet, avoiding the situation where the second industrial device cannot parse the data in the data packet or discards the data packet due to the failure to perform protocol conversion, thereby improving the reliability of data transmission.
[0166] In scenarios where multiple industrial network protocols are interconnected, there is also the problem of differences in transmission mechanisms. Due to conflicts between real-time protocols and non-real-time protocols in time slot allocation and priority scheduling, it is difficult to guarantee deterministic latency when transmitting data across protocols. For example, real-time protocols include Common Industrial Protocol Sync (CIP Sync) of Ethernet Industrial Protocol (EtherNet Industrial Protocol, EtherNet / IP). For example, non-real-time protocols include Hypertext Transfer Protocol (HTTP), etc. However, some technical solutions have the problem of insufficient real-time guarantees, that is, they do not take into account the deterministic transmission requirements of other industrial networks.
[0167] In view of this, in some embodiments, the second data packet includes real-time data, and sending the second data packet to the device corresponding to the destination address according to the destination address indicated by the second data packet includes: determining a real-time data transmission resource corresponding to the first industrial network; and sending the second data packet to the device corresponding to the destination address according to the destination address on the real-time data transmission resource.
[0168] The data transmission resources of the second industrial device may include multiple transmission resources, which may include real-time transmission resources of the first industrial network, real-time transmission resources of the second industrial network, and non-real-time transmission resources. If the second industrial network also receives data packets sent by industrial devices in other industrial networks, the data transmission resources may also include real-time transmission resources of the other industrial networks.
[0169] The data transmission resources in the embodiments of the present application may include time domain resources. In some embodiments, a first time window of a first duration may be generated for each first duration, and each first time window includes multiple transmission resources that are continuous and have non-overlapping time periods. In other embodiments, a second time window of a second duration may be generated for each second duration, and each second time window includes multiple real-time transmission resources of the first industrial network, multiple real-time transmission resources of the second industrial network, and one non-real-time transmission resource that are continuous and have non-overlapping time periods.
[0170] Exemplarily, the length of time occupied by the real-time transmission resources corresponding to each industrial network can be determined based on at least one of the following: the priority of real-time data transmission in the industrial network, the amount of data transmitted in real-time in the industrial network per unit time, the data transmission service of the industrial network, the data service quality level of the industrial network, etc.
[0171] In an embodiment of the present application, a second data packet is sent on a real-time data transmission resource, so that when the second data packet is a real-time data packet, the real-time data transmission resource corresponding to the first industrial network can be used to transmit the second data packet, and real-time data transmission resources are reserved for the transmission of the second data packet, thereby avoiding the situation where the second data packet cannot be transmitted in real time, reducing the transmission delay of the real-time second data packet, and helping to ensure the deterministic transmission requirements of the industrial network.
[0172] In some possible embodiments, the second data packet includes non-real-time data, and sending the second data packet to the device corresponding to the destination address according to the destination address indicated by the second data packet includes: sending the second data packet to the device corresponding to the destination address according to the destination address on non-real-time transmission resources.
[0173] In an exemplary embodiment, Figure 5 As shown, a data transmission method is provided, which is described by taking the method applied to a control device in a second industrial network as an example, and includes the following steps:
[0174] Step 501: Receive a second data packet sent by a second industrial device in a second industrial network; wherein the second data packet is sent from a first industrial device in a first industrial network to a second industrial device, and the second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0175] In the above embodiment, since the second data packet is obtained by converting the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network, that is, the second data packet is a data packet that complies with the network protocol of the second industrial network, the control device in the second industrial network can receive the data sent by the first industrial device in the first industrial network without performing any configuration or other operations, thereby realizing the imperceptible reception of data in cross-protocol data transmission, avoiding the situation where the control device in the second industrial network cannot parse the data in the data packet or discards the data packet due to the failure to perform protocol conversion, and improving the reliability of data transmission.
[0176] In some embodiments, the data transmission method may further include the following steps: deleting the second control field and the second check field from the second data packet to obtain the second data field, the second data field including the first control field and the first data field, the first control field including the network address field and the network type field, the first control field is the control field in the first industrial network, the first data field is the data field in the first industrial network, the second control field is the control field in the second industrial network, and the second data field is the data field in the second industrial network; according to the source address indicated in the network address field, the first control field and the first data field are sent to the control device corresponding to the source address.
[0177] In the above embodiment, even if the first industrial device converts the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network to obtain the second data packet, the network address field in the first control field in the second data field in the second data packet still retains the source address and destination address in the first data packet, so that the control device in the second industrial network can send the first control field and the first data field to the control device corresponding to the source address according to the source address indicated in the network address field, so that the data can accurately reach the control device corresponding to the source address, thereby improving the reliability of data transmission.
[0178] The following describes the packet grouping process of the control device in the second industrial network: In some embodiments, the method further includes: determining whether the second data packet needs to be grouped with other data packets based on the second control field;
[0179] According to the source address indicated in the network address field, the first control field and the first data field are sent to the control device corresponding to the source address, including: if the second data packet needs to be grouped with other data packets, the third control field and the third data field are obtained from the other data packets, and according to the source address indicated in the network address field, the first control field, the first data field, and the third data field are grouped and processed and sent to the control device corresponding to the source address.
[0180] In some embodiments, the second control field (for example, the second control field here is a control field in a private network) includes a private network preamble, a private network standard frame header, and a private network protocol frame header;
[0181] The dedicated network protocol frame header includes:
[0182] Destination address field, the destination address field is used to indicate the destination address of the data packet and is used for link addressing in the second industrial network;
[0183] Source address field: The source address field is used to indicate the source address of the data packet;
[0184] Length field: The length field is used to indicate the data length of the data packet.
[0185] In some embodiments, the dedicated network protocol frame header further includes one or more of the following:
[0186] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0187] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0188] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0189] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0190] Length field: The length field is used to indicate the data length of the data packet.
[0191] In some embodiments, the data transmission method may further include: allocating corresponding real-time data transmission resources to one or more first industrial networks connected to the second industrial network, where the real-time data transmission resources are used to transmit real-time data corresponding to the first industrial network.
[0192] The following describes the data transmission method using data transmission between industrial equipment in a dedicated network and industrial equipment in a non-dedicated network as an example. It should be noted that the following embodiments are schematic illustrations of data transmission and do not constitute a limitation of the present application. In the absence of conflict, in some embodiments, the following dedicated network can be replaced by the first industrial network, the industrial equipment in the dedicated network can be replaced by the first industrial equipment in the first industrial network, the non-dedicated network, network 1 or network 2 can be replaced by the second industrial network, and the industrial equipment in the non-dedicated network, network 1 or network 2 can be replaced by the second industrial equipment in the second industrial network; in other embodiments, the following dedicated network can be replaced by the second industrial network, the industrial equipment in the dedicated network can be replaced by the second industrial equipment in the second industrial network, the non-dedicated network, network 1 or network 2 can be replaced by the first industrial network, and the industrial equipment in the non-dedicated network, network 1 or network 2 can be replaced by the first industrial network.
[0193] For example, in Figure 2 In the embodiment shown, a non-dedicated network is allowed to access the dedicated network through a control device, industrial device 1, industrial device 2, industrial device 3, or any one of industrial devices 4 in the dedicated network, for example, network 1 is accessed through industrial device 3, and network 2 is accessed through industrial device 4.
[0194] In order to enable data from non-dedicated networks to be transmitted in a dedicated network, an access frame structure needs to be designed. The access frame complies with the transmission mechanism and addressing method of the dedicated network and carries data from non-dedicated networks across the dedicated network.
[0195] Figure 6 A schematic diagram of the frame structure of a data frame in a dedicated network when a non-dedicated network and a dedicated network are used for data transmission according to an embodiment. For example, the frame structure of the non-dedicated network needs to be converted into Figure 6 The frame structure shown in the figure can be transmitted in a dedicated network. Figure 6 In the example, the dedicated network uses identifier A. The frame structure includes the following fields: a control field, a data field (such as the data field in the dedicated network), and a check field. For example, the dedicated network is a Wired-Wireless Time Synchronization network (WiTSnet) third-party (Packet-Thrid part) connection.
[0196] In some embodiments, the control field may include at least one of the following: a custom preamble field, a standard Ethernet frame header (compliant with ISO / IEC / IEEE 8802-3 standards) field, and a dedicated network protocol frame header field.
[0197] In standard Ethernet devices, the preamble field is 7 bytes. According to ISO / IEC / IEEE 8802-3, the first two bytes are used as clock synchronization codes, encoded in 4B / 5B or 7B / 8B format, to form the start delimiter of the data stream. Therefore, the remaining 5 bytes can be used to transmit custom protocol fields. The remaining 5 bytes used to transmit the preamble of a custom protocol can be a custom preamble field. The custom preamble field can include the preamble / Start Frame Delimiter (SFD) field.
[0198] For example, the custom preamble field or Preamble / SFD field may include at least one of the following: a preamble 1 (Pre1) field, a preamble 2 (Pre2) field, a destination address (A-Destination, A-Dest) field of a private network, and an SFD field.
[0199] By carrying the destination address field (A-Dest) of the private network in the custom preamble field, this address is associated with the link layer address allocation and addressing method of the custom protocol to identify the destination address of the data packet. Industrial equipment in the private network can quickly determine the transmission direction and priority information by judging the destination address information of the preamble, thereby reducing data residence delay.
[0200] Exemplarily, the standard Ethernet frame header field may include at least one of the following: a network address (EthernetAddress) field (i.e., a MAC address field, including a source address and a destination address), and a network type (EtherType) field (e.g., a network type / Ethernet type of a dedicated protocol).
[0201] For example, the network address field may include at least one of the following: a destination address (DA) field and a source address (SA) field. The destination address field may exemplarily occupy 6 bytes (6 octets), and the source address field may exemplarily occupy 6 bytes (6 octets).
[0202] Exemplarily, the dedicated network protocol frame header field may include a common header (CommonHeader) field.
[0203] For example, the dedicated network protocol frame header field or the common header (CommonHeader) field may include at least one of the following: other control field (Other Control field), A-Dest field, source address of the dedicated network (A-Source) field, data packet frame transmission sequence reset (PaketIDRst) field (or data packet identification reset field), data packet frame transmission sequence (PaketID) field (or data packet identification field), subframe sequence number (SubSeqN) field, fragment end (FragEnd) field, and data length (LEN) field.
[0204] A-Destination (A-Dest): consistent with the address field of the custom preamble field;
[0205] A-Source: carries the source address field of the private network, identifying the source address of the data packet;
[0206] PaketIDRst: used to reset the frame sending sequence of the identification data packet;
[0207] PacketID: used to identify the frame sending order of the data packet;
[0208] SubSeqN: If the data packet is framed, it is used to identify the subframe sequence number; the sequence number 0 indicates no framing, and the sequence number can be 1, 2, 3, or an integer greater than 3; it is used to identify the subframe order;
[0209] FragEnd: used to identify the last subframe of a data packet;
[0210] LEN: identifies the length of the data.
[0211] Exemplarily, the data field may include a third-part data (Thrid-part DATA) field.
[0212] For example, the data field may include at least one of the following: a network address field (i.e., a MAC address field), a network type (EtherType) field, a non-dedicated network valid data field (Thrid-part Valid DATA), and a virtual local area network (VLAN) field (this field is an optional (opt) field and exemplarily occupies 4 bytes (4 octets). Exemplarily, the network address field may include at least one of the following: a DA field and an SA field. Exemplarily, the DA field may occupy 6 bytes (6 octets), and the SA field may occupy 6 bytes (6 octets).
[0213] The MAC address field is used to store MAC address information: the MAC address field includes the source address field and the destination address field, which complies with the ISO / IEC / IEEE 8802-3 standard. The EtherType is the Ethernet type of the non-dedicated network. If the non-dedicated network data exists in a VLAN, the VLAN field stores the VLAN information.
[0214] In some possible embodiments, the non-dedicated network valid data segment is a field defined in accordance with a specific protocol suite.
[0215] Exemplarily, the check field may include a frame check sequence (FCS) field.
[0216] It should be noted that Figure 6 The frame structure in the embodiment is only an example. The order of the fields in the frame structure can be other orders. The embodiment of the present application does not limit the order of the fields. For example, the VLAN field can be after the CommonHeader. In addition, the frame structure can be used Figure 6 It is composed of some fields in the middle, and there is no restriction on this.
[0217] In order to ensure the integrity of non-dedicated network data and achieve seamless access, the access frame (i.e. the data frame mentioned above) will carry the complete control field and payload (fields other than the preamble and frame check) of the non-dedicated network data frame, and will be restored to the non-dedicated network data frame format when leaving the dedicated network.
[0218] Figure 7 This is a schematic diagram of the architecture of a controller provided in one embodiment. The controller may be the control device in the above embodiment. Figure 7The controller shown is a controller for a dedicated network (A-Controller). The controller for the dedicated network not only integrates (exemplarily, functionally) the master station of the dedicated network, but also integrates master station 1 (the master station of network 1) and master station 2 (the master station of network 2) of the non-dedicated network. Exemplarily, the master station can be the control device in the above-mentioned embodiment. Exemplarily, the A-Controller transmits output data (including control elements in the dedicated network) and receives input data from nodes, and is responsible for controlling at least one of the following: an industrial device (A-Device) in the dedicated network, an industrial device (Device) in the non-dedicated network (Network 1), an industrial device (SubDevice) in the non-dedicated network (Network 2), a slave station, a slave industrial device, and receives process data and service data collected by these nodes.
[0219] In some embodiments, upon receiving an access frame, the scheduling module in the controller in the dedicated network distributes the data field to the master station of the dedicated network, the master station 1 corresponding to network 1, or the master station 2 corresponding to network 2 according to the source address of the data field in the data frame transmitted in the dedicated network. For example, the master station of the dedicated network can implement the function of the controller of the dedicated network in the related art when the data packets in the dedicated network can only be transmitted among the devices in the dedicated network. That is, the controller in the embodiment of the present application not only integrates the functions of the controller of the dedicated network in the related art, but also integrates the functions of the master station of the non-dedicated network (for processing the data field transmitted by the non-dedicated network). For example, the master stations of the non-dedicated network include the master station 1 corresponding to network 1 and the master station 2 corresponding to network 2.
[0220] Before the network system operates normally, the A-Device connected to the non-dedicated network in the dedicated network needs to be pre-set, that is, the A-Controller needs to obtain the destination address information A-Destination of different non-dedicated networks in the dedicated network (address information that follows the addressing method of the dedicated network).
[0221] like Figure 2 As shown, network 1 is connected to industrial device 3 in a private network, and the network address of industrial device 3 in the private network is A-Addr1, so the destination address of the data packet sent by the controller in the private network to the industrial device in network 1 is A-Des=A-Addr1; network 2 is connected to industrial device 4, and the network address of industrial device 4 in the private network is A-Addr2, so the destination address of the data packet sent by the controller in the private network to the industrial device in network 2 is A-Des=A-Addr2.
[0222] In addition, for non-dedicated networks, bandwidth and priority can be dynamically allocated. By pre-setting reserved time slots and allocating high priority, strong real-time data of non-dedicated networks can be transmitted to ensure the certainty of strong real-time data.
[0223] Figure 8 A schematic diagram of the time division of data transmission of different network types is provided for one embodiment. Taking a non-dedicated network including network 1 and network 2 as an example, multiple continuous data segments can be pre-divided, and the multiple continuous data segments include a dedicated network real-time data segment, a network 1 real-time data segment, a network 2 real-time data segment, and a non-real-time data segment. The data segments may include time periods for data transmission. Exemplarily, the transmission priority of dedicated network real-time data, network 1 real-time data, network 2 real-time data, and non-real-time data decreases in sequence. Exemplarily, data with a higher priority is transmitted first, and data with a lower priority is transmitted later. For example, dedicated network real-time data, network 1 real-time data, network 2 real-time data, and non-real-time data may be transmitted in sequence.
[0224] It should be noted that Figure 8 The non-dedicated network shown includes network 1 and network 2. In other embodiments, if the non-dedicated network includes network 1 or network 2 or includes other networks or other network combinations, the time division method corresponding to the data of different network types can be based on Figure 8 The embodiment shown in the figure is analogous. For example, the non-dedicated network includes Network 1, and the plurality of consecutive data segments include a dedicated network real-time data segment, a Network 1 real-time data segment, and a non-real-time data segment.
[0225] Data transmission between industrial devices on a dedicated network and industrial devices on a non-dedicated network may include: industrial devices on a dedicated network transmitting data to industrial devices on a non-dedicated network, and industrial devices on a non-dedicated network transmitting data to industrial devices on a dedicated network.
[0226] The following describes how industrial devices on a dedicated network transmit data to industrial devices on a non-dedicated network:
[0227] Figure 9 A schematic diagram of data flow when industrial equipment on a dedicated network transmits data to industrial equipment on a non-dedicated network is provided in one embodiment. Figure 10 A schematic diagram of a data frame format change when an industrial device on a dedicated network transmits data to an industrial device on a non-dedicated network provided by an embodiment.
[0228] When the industrial device in the special network needs to send data to the industrial device in the network 1 of the non-special network, the data is transmitted from the control device of the special network to the industrial device 3 of the special network, and then to the industrial device in the network 1, wherein the industrial device 3 of the special network performs the conversion of the data frame format.
[0229] In this way, the industrial device 1 in the network 1 can transmit the data to the industrial device 3 in the network 1 through the industrial device 2 in the network 1 after receiving the data. The industrial device 1 in the network 2 can transmit the data to the industrial device 3 in the network 2 through the industrial device 2 in the network 2 after receiving the data.
[0230] It should be noted that the data flow direction of the industrial device in the special network transmitting data to the industrial device in the non-special network is only an example, and the data can also have other flow directions, which are not limited by the embodiments of the present application.
[0231] Since the connection relationship is pre-configured, the data packet sent to the special network of the network 1 has the destination address A-Dest=A-Addr1 of the control field in the special network (that is, the address of the industrial device 3 in the special network, and the industrial device 3 in the special network is the industrial device connected to the network 1 in the special network), and the source address A-Source=A-Controller(0) of the control field in the special network (that is, the address of the control device in the special network), that is, Figure 10 S=0, D=A-Addr1 in the above formula. The data packet sent to the special network of the network 2 has the destination address A-Dest=A-Addr2 of the control field in the special network (that is, the address of the industrial device 4 in the special network, and the industrial device 4 in the special network is the industrial device connected to the network 2 in the special network), and the source address A-Source=A-Controller(0) of the control field in the special network (that is, the address of the control device in the special network), that is, Figure 10 S=0, D=A-Addr2 in the above formula. Within the special network domain, the data packet is transmitted to the destination edge node (the industrial device of the special network connected to the non-special network, for example, the industrial device 3 in the special network connected to the network 1, or the industrial device 4 in the special network connected to the network 3) according to the addressing mode of the special network.
[0232] Figure 10The information of Preamble and SFD is merely an exemplary description and does not constitute a limitation to the present application. The information of Preamble and SFD may be other information.
[0233] The destination edge node (for example, industrial device 3 or industrial device 4 in a dedicated network) needs to convert the received access frame (also called a data frame or data packet) before forwarding it to the non-dedicated network, including deleting the control field of the dedicated network, for example, deleting the custom preamble field in the access frame, the dedicated network standard frame header field (that is, the above-mentioned standard Ethernet frame header), and the dedicated network protocol frame header field, including adding a standard preamble (the non-dedicated network retains the complete control field of the original frame, for example, the data field in the non-dedicated network includes a control field and a valid data field), and finally recalculating the FCS (that is, setting the calculated check information in the check field), where the check field includes a checksum.
[0234] In some possible embodiments, when a dedicated network transmits data to a non-dedicated network, the source address in the data field of the data packet of the dedicated network (for example, in the third-party data field of the frame structure of the dedicated network) or the control field of the data packet of the non-dedicated network (for example, included in the third-party data field of the frame structure of the non-dedicated network), may be the address of the control device in the dedicated network, and the destination address may be the destination address in the non-dedicated network.
[0235] The following describes how an industrial device on a non-dedicated network transmits data to an industrial device on a dedicated network:
[0236] Figure 11 A schematic diagram of data flow when an industrial device on a non-dedicated network transmits data to an industrial device on a dedicated network provided by one embodiment. Figure 12 A schematic diagram of a data frame format change when an industrial device on a non-dedicated network transmits data to an industrial device on a dedicated network provided by one embodiment.
[0237] When industrial equipment in a non-dedicated network needs to send data to industrial equipment in network 1 of a dedicated network, the data starts with industrial equipment 3 on network 1 and passes through industrial equipment 2 and industrial equipment 1 on network 1, before being transmitted to the industrial equipment in the dedicated network. Industrial equipment 1 on network 1 converts the data frame format. When industrial equipment in a non-dedicated network needs to send data to industrial equipment in network 2 of a dedicated network, the data starts with industrial equipment 3 on network 2 and passes through industrial equipment 2 and industrial equipment 1 on network 2, before being transmitted to the industrial equipment in the dedicated network. Industrial equipment 1 on network 2 converts the data frame format.
[0238] Thus, the industrial device 3 in the private network can transmit to the control device in the private network in turn through the industrial device 2 and the industrial device 1 in the private network after receiving the data transmitted by the industrial device 1 in the network 1. The industrial device 4 in the private network can transmit to the control device in the private network in turn through the industrial device 3, the industrial device 2 and the industrial device 1 in the private network after receiving the data transmitted by the industrial device 1 in the network 3.
[0239] It should be noted that the data flow direction of the industrial device in the non-private network transmitting data to the industrial device in the private network is only an example, and the data can also have other flow directions, which are not limited by the embodiments of the present application.
[0240] The data in the non-private network needs to be converted (also referred to as data frame format conversion) before entering the private network. After the edge node (i.e., the industrial device in the non-private network connected to the industrial device in the private network, for example, in the network 1, the edge node is the industrial device 1 in the network 1; in the network 2, the edge node is the industrial device 1 in the network 2) of the non-private network receives the data packet of the non-private network, the control field and the data field can be extracted. For example, the control field and the data field can include the Ethernet MAC address field (i.e., the network address field (Ethernet Addresses)) to the valid data field (i.e., the third-party valid data field (Thrid-Part Valid DATA)) of the third-party data packet. The control field and the data field are the data field of the non-private network access frame, for example, the DATA data segment (i.e., the third-party data (Thrid-Part DATA) field). In the CommonHeader field of the private network protocol frame header, the destination address is A-Dest=A-Controller(0) (i.e., the address of the control device in the private network), and the source address A-Source is the address A-Dddr of the non-private network itself (i.e., the source address of the data packet in the non-private network, for example, the source address of the data packet in the network 1 or the source address of the data packet in the network 2). In some embodiments, the edge node of the non-private network can be pre-configured with the address of the control device in the private network.
[0241] Figure 12 The information of the SFD in the above is only an example and does not constitute a limitation of the present application, and the information of the SFD can be other information.
[0242] In other embodiments, the edge node of the non-dedicated network may set the source address in the header field of the dedicated network protocol frame to the address of the non-dedicated network itself, and the destination address to the address of the edge node in the dedicated network. After receiving the data frame, the edge node of the dedicated network may reset the source address in the header field of the dedicated network protocol frame to the address of the edge node in the dedicated network, and reset the destination address to the address of the control device in the dedicated network. In some embodiments, the edge node of the non-dedicated network may be pre-configured with the address of the control device in the dedicated network and / or the address of the edge node in the dedicated network (e.g., industrial device 3 in network 1 or industrial device 4 in network 2).
[0243] In some further embodiments, the edge node of the non-dedicated network can set the source address in the dedicated network protocol frame header field to the non-dedicated network's own address, and the destination address to the address of the control device in the dedicated network; after receiving the data frame, the edge node of the dedicated network can reset the source address in the dedicated network protocol frame header field to the address of the edge node of the dedicated network.
[0244] In this way, by resetting the source address in the private network protocol frame header field to the address of the edge node of the private network, the problem of other industrial devices in the private network being unable to recognize the source address in the private network protocol frame header field, resulting in the data packet being incorrectly parsed or discarded, is avoided.
[0245] In some embodiments, when a non-dedicated network transmits data to a dedicated network, in the control field of the data packet of the non-dedicated network (for example, included in the third-party data field of the frame structure of the non-dedicated network) or the data field of the data packet of the dedicated network (for example, the third-party data field of the frame structure of the dedicated network), the source address may be the address of the non-dedicated network itself, and the destination address may be the address of the control device in the dedicated network, or the destination address may be the address of the edge node in the non-dedicated network (for example, the address of industrial device 1 in network 1, the address of industrial device 2 in network 2).
[0246] Figure 13A schematic diagram of a controller in a dedicated network, provided for one embodiment, sending data to a master station after receiving the data. Upon receiving an access frame, the controller in the dedicated network needs to convert the frame format, delete the custom preamble field, the dedicated network standard frame header field (i.e., the aforementioned standard Ethernet frame header field), the dedicated network protocol frame header field, and the check field, and then distribute the data field in the access frame to the corresponding network master station based on the source address A-Source (or the source address in the third-party data field). For example, based on the source address corresponding to network 1 in the data field of the access frame in the dedicated network, the data field is distributed to master station 1 (also known as a control device) corresponding to network 1; based on the source address corresponding to network 2 in the data field of the access frame in the dedicated network, the data field is distributed to master station 2 (also known as a control device) corresponding to network 2.
[0247] In other embodiments, upon receiving an access frame, the controller in the dedicated network may extract the data field in the access frame and distribute the data field to the master station 1 corresponding to the network 1 or the master station 2 corresponding to the network 2.
[0248] In some embodiments, the scheduling module in the controller in the dedicated network can obtain the data field in the access frame (which can be obtained by deleting the field or extracting the field) upon receiving the access frame, and distribute the data field to the master station of the dedicated network, the master station 1 corresponding to network 1, or the master station 2 corresponding to network 2 according to the source address of the data field. Among them, the master station of the dedicated network can be: the controller of the dedicated network when the data packets in the dedicated network in the related art can only be transmitted among the devices in the dedicated network. That is, the controller in the embodiment of the present application not only integrates the functions of the controller of the dedicated network in the related art, but also integrates the master station functions of the non-dedicated network (for processing the data fields transmitted by the non-dedicated network). For example, the master stations of the non-dedicated network include the master station 1 corresponding to network 1 and the master station 2 corresponding to network 2.
[0249] The following describes the segmentation of data packets:
[0250] Figure 14 A schematic diagram of the data packet frame sending order field, subframe sequence number field, and fragment end field in the dedicated network protocol frame header field provided for one embodiment. When a data packet from a non-dedicated network accesses a dedicated network, there may be segmentation. Therefore, after the edge node and / or controller side of the dedicated network receives the segmented data packet, it is necessary to wait for all segmented frames to arrive and combine them into a complete data packet in sequence for transmission.
[0251] Non-dedicated network data is uniformly identified by the packet frame sequence (PaketID). When fragmentation occurs, the subframe sequence number (SubSeqN) is used to identify the sequence number of the fragmented data, and the fragment end (FragEnd) is used to identify the last segment of the fragmented data (i.e., the segmentation is completed). When the edge node or controller receives the access frame data in the fragmented mode, it combines the valid data segment (Valid DATA) of the access frame in sequence and then forwards it to the non-dedicated network or the corresponding master station.
[0252] The data packet 1 (corresponding to PacketID 1) transmitted on the non-dedicated network is divided into 4 segments for transmission (corresponding to SubSeqN including 1 to 4), the FragEnd corresponding to the largest SubSeqN is the first value, and the FragEnd corresponding to the other SubSeqN is the second value. For example, Figure 14 As shown, the first value is 1 and the second value is 0. In other embodiments, the first value is 0 and the second value is 1. For example, an industrial device in a private network (e.g., industrial devices 3, 4, or a controller in the private network) receives a fragmented data packet with a PaketID of 1 and a FragEnd of 1, indicating that this is the last segment with a PaketID of 1. The received fragmented data packets with a PaketID of 1 and SubSeqNs of 1 to 4 (data packets corresponding to segments 1 to 4) are combined and then forwarded or processed.
[0253] The data packet 2 (corresponding to PacketID 2) transmitted on the non-dedicated network is divided into 4 segments for transmission (corresponding to SubSeqN including 1 to 4), the FragEnd corresponding to the largest SubSeqN is the first value, and the FragEnd corresponding to the other SubSeqN is the second value. For example, Figure 14 As shown, the first value is 1 and the second value is 0. In other embodiments, the first value is 0 and the second value is 1. For example, an industrial device in a private network (e.g., industrial devices 3, 4, or a controller in the private network) receives a fragmented data packet with a PaketID of 2 and a FragEnd of 1, indicating that this is the last segment with a PaketID of 1. The received fragmented data packets with a PaketID of 1 and SubSeqNs of 1 to 4 (data packets corresponding to segments 1 to 4) are combined and then forwarded or processed.
[0254] Data packet 3 (corresponding to PacketID 3) transmitted over a non-dedicated network is not segmented, so SubSeqN is 0 and FragEnd is the second value. Figure 14 As shown, the second value is 0. In other embodiments, the second value is 1.
[0255] The data transmission method in the embodiment of the present application effectively improves the openness and compatibility of dedicated networks and private protocols, breaks the "protocol island" dilemma between different industrial networks, realizes interoperability between networks, and can also expand and optimize related networks and protocols on this basis.
[0256] The data transmission method in the embodiment of the present application allows non-dedicated networks to access private protocols in the network access mode; in the protocol-unaware access, the data frame structure (or data frame format) is converted by industrial equipment in the non-dedicated network, thereby supporting the transparent transmission of non-dedicated network data to industrial equipment in the dedicated / private protocol; in resource guarantee, based on the resource requirements of specific data (such as real-time data) of the non-dedicated network protocol, the network dynamically allocates bandwidth and priority to ensure the transmission resources of key control instructions (such as real-time data) of the non-dedicated network protocol and realize deterministic transmission.
[0257] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0258] Based on the same technical concept, an embodiment of the present application further provides a data transmission device, which can implement the functions of the first industrial device side in the first industrial network in the aforementioned embodiment.
[0259] In an exemplary embodiment, Figure 15 As shown, a data transmission device is provided, which is used for a first industrial device in a first industrial network, including:
[0260] An acquisition module 1501 is configured to acquire a first data packet, where the first data packet has a first data frame format corresponding to a first industrial network;
[0261] The conversion module 1502 is configured to convert the data frame format of the first data packet according to a second data frame format corresponding to the second industrial network to obtain a second data packet;
[0262] The sending module 1503 is configured to send the second data packet to the second industrial device in the second industrial network.
[0263] In one of the embodiments, the conversion module 1502 further comprises:
[0264] The obtaining unit is configured to obtain the control field and the data field from the first data packet, the control field comprising a network address field and a network type field.
[0265] The conversion unit is configured to perform data frame conversion on the control field and the data field according to a second data frame format to obtain a second data packet.
[0266] In one of the embodiments, the obtaining unit is further configured to delete the standard preamble field and the first check field from the first data packet to obtain a first control field and a first data field, the first control field being a control field in the first industrial network and the first data field being a data field in the first industrial network.
[0267] In one of the embodiments, the conversion unit is further configured to generate a second control field and a second check field according to the first control field and the first data field, the second control field being a control field in the second industrial network; determine the first control field and the first data field as a second data field, and splice the second control field, the second data field and the second check field to obtain the second data packet, the second data field being a data field in the second industrial network.
[0268] In one of the embodiments, the obtaining unit is further configured to delete the first control field and the first check field from the first data packet to obtain the first data field, the first data field comprising a second control field and a second data field, the first control field being a control field in the first industrial network and the first data field being a data field in the first industrial network, the second control field being a control field in the second industrial network and the second data field being a data field in the second industrial network.
[0269] In one of the embodiments, the conversion unit is further configured to obtain a preset standard preamble and generate a second check field according to the second data field; and splice the standard preamble, the second control field, the second data field and the second check field to obtain the second data packet.
[0270] In one of the embodiments, the data transmission device further comprises a determination module configured to determine whether the second data packet needs to be processed in packet with other data packets according to the first control field; and the conversion unit is further configured to, if the second data packet needs to be processed in packet with other data packets, obtain a third control field and a third data field from the other data packets, and splice the standard preamble, the second control field, the second data field, the third control field, the third data field and the second check field to obtain a packet-processed data packet.
[0271] In one embodiment, the first control field includes a dedicated network preamble, a dedicated network standard frame header, and a dedicated network protocol frame header;
[0272] The dedicated network protocol frame header includes:
[0273] A destination address field, where the destination address field is used to indicate a destination address of the data packet and is used for link addressing in the first industrial network;
[0274] Source address field: The source address field is used to indicate the source address of the data packet;
[0275] Length field: The length field is used to indicate the data length of the data packet.
[0276] In one embodiment, the dedicated network protocol frame header further includes one or more of the following:
[0277] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0278] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0279] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0280] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0281] It should be noted here that the above-mentioned data transmission device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned data transmission method embodiment for the first industrial equipment in the first industrial network, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be described in detail here. Each module in the above-mentioned data transmission device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the first industrial equipment in the first industrial network in the form of hardware, or can be stored in the memory in the first industrial equipment in the first industrial network in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0282] Based on the same technical concept, an embodiment of the present application further provides a data transmission device, which can implement the functions of the second industrial device side in the second industrial network in the aforementioned embodiment.
[0283] In an exemplary embodiment, Figure 16 As shown, a data transmission device is provided for a second industrial device in a second industrial network, comprising:
[0284] The receiving module 1601 is configured to receive a second data packet sent by a first industrial device in the first industrial network;
[0285] The sending module 1602 is configured to send the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet;
[0286] The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0287] In one embodiment, the second data packet includes real-time data, and the sending module 1602 includes:
[0288] a determining unit, configured to determine a real-time data transmission resource corresponding to the first industrial network;
[0289] The sending unit is used to send a second data packet to a device corresponding to the destination address according to the destination address on the real-time data transmission resource.
[0290] It should be noted here that the above-mentioned data transmission device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned data transmission method embodiment for the second industrial equipment in the second industrial network, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be described in detail here. Each module in the above-mentioned data transmission device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the second industrial equipment in the second industrial network in the form of hardware, or can be stored in the memory in the second industrial equipment in the second industrial network in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0291] Based on the same technical concept, an embodiment of the present application further provides a data transmission device, which can implement the functions of the control device side in the second industrial network in the aforementioned embodiment.
[0292] In an exemplary embodiment, Figure 17 As shown, a data transmission device is provided for a control device in a second industrial network, comprising:
[0293] The receiving module 1701 is configured to receive a second data packet sent by a second industrial device in a second industrial network;
[0294] Among them, the second data packet is sent from the first industrial device in the first industrial network to the second industrial device. The second data packet is obtained by the first industrial device converting the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network. The first data packet has the first data frame format corresponding to the first industrial network.
[0295] In one embodiment, the data transmission device further includes:
[0296] a conversion module, configured to delete the second control field and the second check field from the second data packet to obtain a second data field, where the second data field includes the first control field and the first data field, the first control field includes the network address field and the network type field, the first control field is a control field in the first industrial network, the first data field is a data field in the first industrial network, the second control field is a control field in the second industrial network, and the second data field is a data field in the second industrial network;
[0297] The sending module is used to send the first control field and the first data field to the control device corresponding to the source address according to the source address indicated in the network address field.
[0298] In one embodiment, the data transmission device further includes:
[0299] a packet grouping module, configured to determine, based on the second control field, whether the second data packet needs to be grouped with other data packets;
[0300] The sending module is also used to obtain the third control field and the third data field from the other data packets if the second data packet needs to be grouped with other data packets, and to group the first control field, the first data field, and the third data field and send them to the control device according to the source address indicated in the network address field.
[0301] In one embodiment, the second control field includes a dedicated network preamble, a dedicated network standard frame header, and a dedicated network protocol frame header;
[0302] The dedicated network protocol frame header includes:
[0303] Destination address field, the destination address field is used to indicate the destination address of the data packet and is used for link addressing in the second industrial network;
[0304] Source address field: The source address field is used to indicate the source address of the data packet;
[0305] Length field: The length field is used to indicate the data length of the data packet.
[0306] In one embodiment, the dedicated network protocol frame header further includes one or more of the following:
[0307] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0308] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0309] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0310] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0311] In one embodiment, the data transmission device further includes:
[0312] The resource allocation module is used to allocate corresponding real-time data transmission resources to one or more first industrial networks connected to the second industrial network, where the real-time data transmission resources are used to transmit real-time data corresponding to the first industrial network.
[0313] It should be noted that the above-mentioned data transmission device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned data transmission method embodiment for the control device in the second industrial network, and can achieve the same technical effects. The parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here. Each module in the above-mentioned data transmission device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the control device in the second industrial network in the form of hardware, or can be stored in the memory in the control device in the second industrial network in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0314] Figure 18 This is a schematic diagram of the structure of an industrial device provided in an embodiment of the present application. The industrial device may include a processor 1810, a transceiver 1820, and a memory 1830. The transceiver 1820 is used to receive and send data under the control of the processor 1810.
[0315] Among them, Figure 18 In the present disclosure, a bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits such as one or more processors represented by processor 1810 and memory represented by memory 1830. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and are not further described herein. The bus interface provides an interface.
[0316] The transceiver 1820 may include multiple components, namely, a transmitter and a receiver, and provides a unit for communicating with various other devices over a transmission medium, such as a wireless channel, a wired channel, an optical cable, etc. The processor 1810 is responsible for managing the bus architecture and general processing, and the memory 1830 may store data used by the processor 1810 when performing operations.
[0317] The processor 1810 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor 1810 may also adopt a multi-core architecture.
[0318] Optionally, the industrial device may be a first industrial device in a first industrial network. The processor 1810 calls a computer program stored in the memory 1830 to execute the following steps according to the obtained executable instructions:
[0319] Acquire a first data packet, where the first data packet has a first data frame format corresponding to the first industrial network;
[0320] performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network to obtain a second data packet;
[0321] The control transceiver 1820 sends the second data packet to the second industrial device in the second industrial network.
[0322] In one embodiment, the processor 1810 is specifically configured to perform the following operations:
[0323] Acquire a control field and a data field from the first data packet, where the control field includes a network address field and a network type field;
[0324] According to the second data frame format, the control field and the data field are converted into data frames to obtain a second data packet.
[0325] In one embodiment, the processor 1810 is further configured to perform the following operations:
[0326] The standard preamble field and the first check field are deleted from the first data packet to obtain a first control field and a first data field, where the first control field is a control field in the first industrial network and the first data field is a data field in the first industrial network.
[0327] In one embodiment, the processor 1810 is further configured to perform the following operations:
[0328] Generate a second control field and a second check field according to the first control field and the first data field, where the second control field is a control field in the second industrial network;
[0329] The first control field and the first data field are determined as the second data field, and the second control field, the second data field and the second check field are spliced to obtain a second data packet. The second data field is a data field in the second industrial network.
[0330] In one embodiment, the processor 1810 is further configured to perform the following operations:
[0331] The first control field and the first check field are deleted from the first data packet to obtain a first data field, where the first data field includes a second control field and a second data field. The first control field is a control field in the first industrial network, the first data field is a data field in the first industrial network, the second control field is a control field in the second industrial network, and the second data field is a data field in the second industrial network.
[0332] In one embodiment, the processor 1810 is further configured to perform the following operations:
[0333] Obtain a preset standard preamble code, and generate a second check field according to the second data field;
[0334] The standard preamble, the second control field, the second data field, and the second check field are concatenated to obtain a second data packet.
[0335] In one embodiment, the processor 1810 is further configured to perform the following operations:
[0336] determining, according to the first control field, whether the second data packet needs to be grouped with other data packets;
[0337] If the second data packet needs to be grouped with other data packets, the third control field and the third data field are obtained from the other data packets, and the standard preamble, the second control field, the second data field, the third control field, the third data field and the second check field are spliced to obtain the grouped data packet.
[0338] In one embodiment, the first control field includes a dedicated network preamble, a dedicated network standard frame header, and a dedicated network protocol frame header;
[0339] The dedicated network protocol frame header includes:
[0340] A destination address field, where the destination address field is used to indicate a destination address of the data packet and is used for link addressing in the first industrial network;
[0341] Source address field: The source address field is used to indicate the source address of the data packet;
[0342] Length field: The length field is used to indicate the data length of the data packet.
[0343] In one embodiment, the dedicated network protocol frame header further includes one or more of the following:
[0344] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0345] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0346] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0347] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0348] Optionally, the industrial device may be a first industrial device in a first industrial network. The processor 1810 calls a computer program stored in the memory 1830 to execute the following steps according to the obtained executable instructions:
[0349] Controlling the transceiver 1820 to receive a second data packet sent by the first industrial device in the first industrial network;
[0350] Controlling the transceiver 1820 to send the second data packet to the device corresponding to the destination address according to the destination address indicated by the second data packet;
[0351] The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0352] In one embodiment, the processor 1810 is further configured to perform the following operations:
[0353] determining a real-time data transmission resource corresponding to the first industrial network;
[0354] On the real-time data transmission resource, according to the destination address, the transceiver 1820 is controlled to send the second data packet to the device corresponding to the destination address.
[0355] Optionally, the industrial device can be a control device, and the processor 1810 is configured to execute the following steps by invoking a computer program stored in the memory 1830 according to the obtained executable instructions.
[0356] The control transceiver 1820 receives a second data packet sent by a second industrial device in a second industrial network, wherein the second data packet is sent by the first industrial device in the first industrial network to the second industrial device, and the second data packet is obtained by performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0357] In one embodiment, the processor 1810 is specifically configured to execute the following operations:
[0358] The second control field and the second check field are deleted from the second data packet to obtain a second data field, and the second data field includes the first control field and the first data field, the first control field includes a network address field and a network type field, the first control field is a control field in the first industrial network, the first data field is a data field in the first industrial network, the second control field is a control field in the second industrial network, and the second data field is a data field in the second industrial network.
[0359] According to the source address indicated in the network address field, the control transceiver 1820 sends the first control field and the first data field to a control device corresponding to the source address.
[0360] In one embodiment, the processor 1810 is specifically configured to execute the following operations:
[0361] According to the second control field, it is determined whether the second data packet needs to be processed in a packet with other data packets.
[0362] If the second data packet needs to be processed in a packet with other data packets, a third control field and a third data field are obtained from the other data packets, and according to the source address indicated in the network address field, the first control field, the first data field, and the third data field are processed in a packet, and then the control transceiver 1820 sends them to the control device.
[0363] In one embodiment, the second control field includes a special network preamble, a special network standard frame header, and a special network protocol frame header.
[0364] The special network protocol frame header includes:
[0365] A destination address field, the destination address field is used to indicate a destination address of the data packet, and is used for link addressing in the second industrial network.
[0366] Source address field: The source address field is used to indicate the source address of the data packet;
[0367] Length field: The length field is used to indicate the data length of the data packet.
[0368] In one embodiment, the dedicated network protocol frame header further includes one or more of the following:
[0369] The frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset;
[0370] The frame transmission sequence field is used to indicate the frame transmission sequence of the data packet;
[0371] A subframe identification field, where the subframe identification field is used to indicate the identification of a subframe when the data packet is a subframe;
[0372] The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
[0373] In one embodiment, the processor 1810 is specifically configured to perform the following operations:
[0374] Corresponding real-time data transmission resources are allocated to one or more first industrial networks connected to the second industrial network, and the real-time data transmission resources are used to transmit real-time data corresponding to the first industrial network.
[0375] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs)), etc.
[0376] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above embodiments are implemented.
[0377] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps in any one of the above embodiments when executed by a processor.
[0378] For example, when the computer program is executed by a processor, the following steps are implemented:
[0379] Acquire a first data packet, where the first data packet has a first data frame format corresponding to the first industrial network;
[0380] performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network to obtain a second data packet;
[0381] A second data packet is sent to a second industrial device in the second industrial network.
[0382] For example, when the computer program is executed by a processor, the following steps are implemented:
[0383] receiving a second data packet sent by a first industrial device in the first industrial network;
[0384] Sending the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet;
[0385] The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
[0386] For example, when the computer program is executed by a processor, the following steps are implemented:
[0387] receiving a second data packet sent by a second industrial device in a second industrial network;
[0388] Among them, the second data packet is sent from the first industrial device in the first industrial network to the second industrial device. The second data packet is obtained by the first industrial device converting the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network. The first data packet has the first data frame format corresponding to the first industrial network.
[0389] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a programmable logic unit (PLC), a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, and the like.
[0390] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0391] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A data transmission method, characterized in that: For a first industrial device in a first industrial network, the method includes: Acquire a first data packet, where the first data packet has a first data frame format corresponding to the first industrial network; performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network to obtain a second data packet; The second data packet is sent to a second industrial device in the second industrial network.
2. The method according to claim 1, characterized in that The step of converting the first data packet into a second data frame format according to a second data frame format corresponding to the second industrial network to obtain a second data packet includes: Acquire a control field and a data field from the first data packet, wherein the control field includes a network address field and a network type field; According to the second data frame format, data frame conversion is performed on the control field and the data field to obtain the second data packet.
3. The method according to claim 2, characterized in that The obtaining of a control field and a data field from the first data packet includes: The standard preamble field and the first check field are deleted from the first data packet to obtain a first control field and a first data field, wherein the first control field is a control field in the first industrial network, and the first data field is a data field in the first industrial network.
4. The method according to claim 3, characterized in that The step of performing data frame conversion on the control field and the data field according to the second data frame format to obtain the second data packet includes: generating a second control field and a second check field according to the first control field and the first data field, wherein the second control field is a control field in the second industrial network; The first control field and the first data field are determined as the second data field, and the second control field, the second data field and the second check field are spliced to obtain the second data packet, where the second data field is the data field in the second industrial network.
5. The method according to claim 2, characterized in that The obtaining of a control field and a data field from the first data packet includes: The first control field and the first check field are deleted from the first data packet to obtain a first data field, where the first data field includes a second control field and a second data field. The first control field is a control field in the first industrial network, the first data field is a data field in the first industrial network, the second control field is a control field in the second industrial network, and the second data field is a data field in the second industrial network.
6. The method according to claim 5, characterized in that The step of performing data frame conversion on the control field and the data field according to the second data frame format to obtain the second data packet includes: Obtain a preset standard preamble code, and generate a second check field according to the second data field; The standard preamble, the second control field, the second data field, and the second check field are concatenated to obtain the second data packet.
7. The method according to claim 6, characterized in that The method further comprises: determining, according to the first control field, whether the second data packet needs to be grouped with other data packets; The step of concatenating the standard preamble, the second control field, the second data field, and the second check field to obtain the second data packet includes: If the second data packet needs to be grouped together with the other data packets, the third control field and the third data field are obtained from the other data packets, and the standard preamble, the second control field, the second data field, the third control field, the third data field and the second check field are spliced to obtain the grouped data packet.
8. The method according to any one of claims 4 to 7, characterized in that: The first control field includes a dedicated network preamble, a dedicated network standard frame header, and a dedicated network protocol frame header; Wherein, the dedicated network protocol frame header includes: a destination address field, the destination address field being used to indicate a destination address of a data packet and being used for link addressing in the first industrial network; A source address field, wherein the source address field is used to indicate the source address of the data packet; The length field is used to indicate the data length of the data packet.
9. The method according to claim 8, characterized in that The dedicated network protocol frame header also includes one or more of the following: A frame transmission sequence reset field, wherein the frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset; A frame transmission sequence field, wherein the frame transmission sequence field is used to indicate the frame transmission sequence of the data packet; A subframe identification field, where the subframe identification field is used to indicate an identification of the subframe when the data packet is a subframe; The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
10. A data transmission method, characterized in that: For a second industrial device in a second industrial network, the method includes: receiving a second data packet sent by a first industrial device in the first industrial network; Sending the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet; The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
11. The method according to claim 10, characterized in that The second data packet includes real-time data, and sending the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet includes: determining a real-time data transmission resource corresponding to the first industrial network; The second data packet is sent to a device corresponding to the destination address on the real-time data transmission resource according to the destination address.
12. A data transmission method, characterized in that: For a control device in a second industrial network, the method comprises: receiving a second data packet sent by a second industrial device in the second industrial network; Among them, the second data packet is sent by the first industrial device in the first industrial network to the second industrial device, and the second data packet is obtained by the first industrial device converting the data frame format of the first data packet according to the second data frame format corresponding to the second industrial network, and the first data packet has the first data frame format corresponding to the first industrial network.
13. The method according to claim 12, characterized in that The method further comprises: deleting the second control field and the second check field from the second data packet to obtain a second data field, where the second data field includes a first control field and a first data field, the first control field includes a network address field and a network type field, the first control field is a control field in the first industrial network, the first data field is a data field in the first industrial network, the second control field is a control field in the second industrial network, and the second data field is a data field in the second industrial network; According to the source address indicated in the network address field, the first control field and the first data field are sent to a control device corresponding to the source address.
14. The method according to claim 13, wherein: The method further comprises: determining, according to the second control field, whether the second data packet needs to be grouped with other data packets; The sending, according to the source address indicated in the network address field, the first control field and the first data field to a control device corresponding to the source address, includes: If the second data packet needs to be grouped together with the other data packets, the third control field and the third data field are obtained from the other data packets, and according to the source address indicated in the network address field, the first control field, the first data field, and the third data field are grouped together and sent to the control device.
15. The method according to claim 13 or 14, characterized in that The second control field includes a dedicated network preamble, a dedicated network standard frame header, and a dedicated network protocol frame header; Wherein, the dedicated network protocol frame header includes: a destination address field, where the destination address field is used to indicate a destination address of a data packet and is used for link addressing in the second industrial network; A source address field, wherein the source address field is used to indicate the source address of the data packet; The length field is used to indicate the data length of the data packet.
16. The method according to claim 15, characterized in that The dedicated network protocol frame header also includes one or more of the following: A frame transmission sequence reset field, wherein the frame transmission sequence reset field is used to indicate whether the frame transmission sequence of the data packet is reset; A frame transmission sequence field, wherein the frame transmission sequence field is used to indicate the frame transmission sequence of the data packet; A subframe identification field, where the subframe identification field is used to indicate an identification of the subframe when the data packet is a subframe; The fragment end field is used to indicate whether the subframe is the last subframe in the data packet.
17. The method according to claim 12, wherein: The method further comprises: Corresponding real-time data transmission resources are allocated to one or more of the first industrial networks connected to the second industrial network, and the real-time data transmission resources are used to transmit real-time data corresponding to the first industrial network.
18. A data transmission device, characterized in that: For a first industrial device in a first industrial network, the apparatus comprises: an acquisition module, configured to acquire a first data packet, where the first data packet has a first data frame format corresponding to the first industrial network; a conversion module, configured to convert the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, to obtain a second data packet; A sending module is configured to send the second data packet to a second industrial device in the second industrial network.
19. A data transmission device, characterized in that: For use in a second industrial device in a second industrial network, the apparatus comprises: a receiving module, configured to receive a second data packet sent by a first industrial device in the first industrial network; a sending module, configured to send the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet; The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
20. A data transmission device, characterized in that: Used for a control device in a second industrial network, the apparatus comprises: A receiving module is configured to receive a second data packet sent by a second industrial device in the second industrial network, wherein the second data packet is sent from a first industrial device in the first industrial network to the second industrial device, and the second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
21. An industrial device, characterized in that: Including memory, transceiver, processor: The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; and the processor is used to read the computer program in the memory and perform the following operations: Acquire a first data packet, where the first data packet has a first data frame format corresponding to a first industrial network; performing data frame format conversion on the first data packet according to a second data frame format corresponding to the second industrial network to obtain a second data packet; The transceiver is controlled to send the second data packet to a second industrial device in the second industrial network.
22. An industrial device, characterized in that: Including memory, transceiver, processor: The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; and the processor is used to read the computer program in the memory and perform the following operations: controlling the transceiver to receive a second data packet sent by a first industrial device in the first industrial network; Sending the second data packet to a device corresponding to the destination address according to the destination address indicated by the second data packet; The second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
23. A control device, characterized in that: Including memory, transceiver, processor: The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; and the processor is used to read the computer program in the memory and perform the following operations: Control the transceiver to receive a second data packet sent by a second industrial device in a second industrial network, wherein the second data packet is sent by a first industrial device in a first industrial network to the second industrial device, and the second data packet is obtained by the first industrial device converting the first data packet into a data frame format according to a second data frame format corresponding to the second industrial network, and the first data packet has a first data frame format corresponding to the first industrial network.
24. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.
25. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.