Data transmission method and device, equipment, storage medium and computer program product

By optimizing the data packet structure in the industrial network and making multiple subframes share a frame header, the problem of low data transmission efficiency is solved and the efficiency and speed of data packet transmission is achieved.

CN119561989APending Publication Date: 2025-03-04SHENZHEN INOVANCE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411637277.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In industrial networks, the existing technology has the problem of low data transmission efficiency, especially in the fields of video surveillance, Internet of Things and industrial automation, which makes it impossible for transmitted data to reach the receiver quickly.

Method used

By optimizing the packet structure, multiple subframes share a frame header, thereby combining transmission in the same packet, saving public message overhead.

Benefits of technology

Improve data transmission efficiency, ensure that the transmitted data can quickly reach the receiving device, and reduce redundant overhead in data packet transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561989A_ABST
    Figure CN119561989A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method and device, equipment, a storage medium and a computer program product. The method comprises: receiving a data packet sent by a sending device in the industrial network, the data packet comprising a data frame, the data frame comprising a frame header and a plurality of subframes, the subframes comprising a device address field, a data field, a command field and a length field, wherein the device address field is used for indicating a device address of a device corresponding to the subframe; the data field comprises transmission data; the command field is used for indicating the data type and the storage space of the transmission data; the length field is used for indicating the data length of the transmission data. By adopting the method, the data transmission efficiency in the industrial network can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial network technology, and in particular to a data transmission method, apparatus, device, storage medium and computer program product. Background Art

[0002] In the field of industrial networks, the demand for real-time data transmission is increasing, especially in the fields of video surveillance, Internet of Things and industrial automation. It is of great significance to ensure that the transmitted data reaches the receiving end quickly. Summary of the invention

[0003] Based on this, it is necessary to provide a data transmission method, device, equipment, storage medium and computer program product that can improve the data transmission efficiency in industrial networks in response to the above technical problems.

[0004] In a first aspect, the present application provides a data transmission method for a receiving device in an industrial network, the method comprising:

[0005] Receive a data packet sent by a sending device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein:

[0006] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0007] The data field includes transmission data;

[0008] The command field is used to indicate the data type and storage space of the transmission data;

[0009] The length field is used to indicate the data length of the transmission data.

[0010] In one of the embodiments, the subframe further includes one or more of the following fields:

[0011] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0012] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0013] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0014] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0015] A first check field, wherein the first check field is used to check the subframe;

[0016] First reserved field.

[0017] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0018] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0019] The source address field is used to indicate the source address corresponding to the data packet;

[0020] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0021] In one embodiment, the frame header further includes one or more of the following fields:

[0022] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0023] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0024] A second check field, wherein the second check field is used to check the frame header;

[0025] Second reserved field.

[0026] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0027] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0028] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0029] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0030] The priority field is used to indicate the transmission priority of the data packet.

[0031] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0032] In a second aspect, the present application provides a data transmission method for a sending device in an industrial network, the method comprising:

[0033] Sending a data packet to a receiving device in the industrial network, the data packet comprising a data frame, the data frame comprising a frame header and a plurality of subframes, the subframe comprising a device address field, a data field, a command field, and a length field, wherein:

[0034] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0035] The data field includes transmission data;

[0036] The command field is used to indicate the data type and storage space of the transmission data;

[0037] The length field is used to indicate the data length of the transmission data.

[0038] In one of the embodiments, the subframe further includes one or more of the following fields:

[0039] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0040] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0041] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0042] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0043] A first check field, wherein the first check field is used to check the subframe;

[0044] First reserved field.

[0045] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0046] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0047] The source address field is used to indicate the source address corresponding to the data packet;

[0048] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0049] In one embodiment, the frame header further includes one or more of the following fields:

[0050] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0051] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0052] A second check field, wherein the second check field is used to check the frame header;

[0053] Second reserved field.

[0054] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0055] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0056] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0057] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0058] The priority field is used to indicate the transmission priority of the data packet.

[0059] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0060] In a third aspect, the present application provides a data transmission device for a receiving device in an industrial network, the device comprising:

[0061] A receiving module, configured to receive a data packet sent by a sending device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and a plurality of subframes, the subframe includes a device address field, a data field, a command field, and a length field, wherein:

[0062] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0063] The data field includes transmission data;

[0064] The command field is used to indicate the data type and storage space of the transmission data;

[0065] The length field is used to indicate the data length of the transmission data.

[0066] In a fourth aspect, the present application provides a data transmission device for use in a sending device in an industrial network, the device comprising:

[0067] A sending module is used to send a data packet to a receiving device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and multiple subframes, and the subframe includes a device address field, a data field, a command field, and a length field, wherein:

[0068] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0069] The data field includes transmission data;

[0070] The command field is used to indicate the data type and storage space of the transmission data;

[0071] The length field is used to indicate the data length of the transmission data.

[0072] In a fifth aspect, the present application provides a receiving device, including a memory, a transceiver, and a processor:

[0073] The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer program in the memory and perform the following operations:

[0074] Control the transceiver to receive a data packet sent by a sending device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein:

[0075] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0076] The data field includes transmission data;

[0077] The command field is used to indicate the data type and storage space of the transmission data;

[0078] The length field is used to indicate the data length of the transmission data.

[0079] In a sixth aspect, the present application provides a sending device, including a memory, a transceiver, and a processor:

[0080] The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer program in the memory and perform the following operations:

[0081] Control the transceiver to send a data packet to a receiving device in the industrial network, the data packet including a data frame, the data frame including a frame header and a plurality of subframes, the subframe including a device address field, a data field, a command field, and a length field, wherein:

[0082] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0083] The data field includes transmission data;

[0084] The command field is used to indicate the data type and storage space of the transmission data;

[0085] The length field is used to indicate the data length of the transmission data.

[0086] In a seventh aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect above are implemented.

[0087] In an eighth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect or the second aspect above.

[0088] The above-mentioned data transmission method, apparatus, device, storage medium and computer program product, a receiving device in an industrial network receives a data packet sent by a sending device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, the device address field is used to indicate the device address of the device corresponding to the subframe; the data field includes transmission data; the command field is used to indicate the data type and storage space of the transmission data; the length field is used to indicate the data length of the transmission data, so that the embodiment of the present application optimizes the data packet structure, multiple subframes share a frame header, so that multiple subframes can be combined in the same data packet for transmission, saving common message overhead, improving data transmission efficiency, and ensuring that the transmission data can reach the receiving device quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. 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 creative work.

[0090] FIG1 is a schematic flow chart of a data transmission method according to an embodiment;

[0091] FIG2 is a schematic diagram of a data frame in another embodiment;

[0092] FIG3 is a schematic diagram of a data frame in another embodiment;

[0093] FIG4 is a schematic diagram of a data frame in another embodiment;

[0094] FIG5 is a schematic diagram of a data frame in another embodiment;

[0095] FIG6 is a schematic diagram of a data frame in another embodiment;

[0096] FIG7 is a schematic diagram of a data frame in another embodiment;

[0097] FIG8 is a schematic diagram of a data frame in another embodiment;

[0098] FIG9 is a schematic diagram of a data frame in another embodiment;

[0099] FIG10 is a schematic diagram of a data frame in another embodiment;

[0100] FIG11 is a schematic diagram of a data frame in another embodiment;

[0101] FIG12 is a schematic diagram of a data frame in another embodiment;

[0102] FIG13 is a schematic diagram of an exemplary network topology in another embodiment;

[0103] FIG14 is a schematic diagram of a data frame in another embodiment;

[0104] FIG15 is a schematic diagram of a data frame in another embodiment;

[0105] FIG16 is a schematic diagram of a data frame in another embodiment;

[0106] FIG17 is a schematic diagram of a data frame in another embodiment;

[0107] FIG18 is a schematic diagram of a data frame in another embodiment;

[0108] FIG19 is a schematic diagram of a data frame in another embodiment;

[0109] FIG20 is a schematic diagram of a data frame in another embodiment;

[0110] FIG21 is a schematic diagram of a data frame in another embodiment;

[0111] FIG22 is a schematic diagram of a data packet in another embodiment;

[0112] FIG23 is a schematic diagram of a data packet in another embodiment;

[0113] FIG24 is a schematic diagram of a data packet in another embodiment;

[0114] FIG25 is a schematic diagram of a data packet in another embodiment;

[0115] FIG26 is a schematic diagram of a data packet in another embodiment;

[0116] FIG27 is a schematic diagram of a data packet in another embodiment;

[0117] FIG28 is a schematic diagram of a data packet in another embodiment;

[0118] FIG29 is a schematic diagram of a data packet in another embodiment;

[0119] FIG30 is a schematic diagram of a data packet in another embodiment;

[0120] FIG31 is a flow chart of a data transmission method according to another embodiment;

[0121] FIG32 is a block diagram of a data transmission device according to an embodiment;

[0122] FIG33 is a structural block diagram of a data transmission device in another embodiment;

[0123] FIG. 34 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0124] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0125] In the field of industrial networks, the demand for real-time data transmission is increasing, especially in the fields of video surveillance, Internet of Things and industrial automation, where it is of great significance for the transmitted data to reach the receiving end quickly.

[0126] However, currently, in industrial networks, usually, the data packets of each device are individually addressed and transmitted, and each data packet contains a common message overhead, which wastes network bandwidth and reduces data transmission efficiency.

[0127] 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 data transmission efficiency in an industrial network.

[0128] The data transmission method provided in the embodiment of the present application can be applied to an industrial network, which can be any network topology, and no specific limitation is made to the implementation environment of the embodiment of the present application.

[0129] Below, in conjunction with the drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0130] 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.

[0131] In an exemplary embodiment, as shown in FIG1 , a data transmission method is provided, which is described by taking the method applied to a receiving device in an industrial network as an example, and includes the following steps:

[0132] Step 101, a receiving device receives a data packet sent by a sending device in an industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein: the device address field is used to indicate the device address of the device corresponding to the subframe; the data field includes transmission data; the command field is used to indicate the data type and storage space of the transmission data; the length field is used to indicate the data length of the transmission data.

[0133] In an embodiment of the present application, the receiving device can be any industrial device in the industrial network, and of course it can also be a controller in the industrial device, or it can be a wireless device in the industrial public network. Similarly, the sending device can also be any industrial device, controller or wireless device in the industrial network. It can be understood that the receiving device and the sending device are different devices in the industrial network.

[0134] After receiving the data packet sent by the sending device, the receiving device parses the data packet, which includes a data frame. The data packet may also include other fields. The other fields that the data packet may include will be described in the following embodiments. Hereinafter, the data frame included in the data packet will be exemplarily introduced.

[0135] Exemplarily, see Figure 2, which is a schematic diagram of a data frame in an exemplary data packet. The WiTSNET (Wired-wireless Time Synchronization Net) Frame shown in Figure 2 is a data frame, which includes a frame header (WiTSNETHeader) and multiple subframes (WiTSNETSubframe1 to WiTSNETSubframex as shown in Figure 2, where x is a positive integer greater than), and multiple subframes are spliced ​​after the frame header in a preset frame transmission order.

[0136] In the embodiment of the present application, for each subframe, the subframe includes a device address field (PA, PositionAddress), a data field (Data), a command field (CMD, Command) and a length field (LEN, Length).

[0137] Exemplarily, referring to FIG. 3 , FIG. 3 is a schematic diagram of a subframe in a data frame.

[0138] Among them, the device address field is used to indicate the device address of the device (industrial device) corresponding to the subframe. The device address is used to uniquely identify the device in the current industrial network. In this way, the receiving end can identify the specific location of the subframe in the data packet based on the device address field.

[0139] For example, taking the receiving end as an industrial device, the industrial device can compare the device address pre-assigned to it with the device address indicated by the device address field included in each subframe for consistency, and determine the subframe with the consistent device address as the subframe corresponding to the industrial device.

[0140] Exemplarily, taking the receiving end as a controller, the controller may identify the device address indicated by the device address field included in each subframe in the data frame, thereby matching each subframe with its matching industrial device.

[0141] The data field includes transmission data, that is, the data actually transmitted, which can be business data, commands, operation instructions, etc.

[0142] The command field is used to indicate the data type and storage space of the transmission data included in the data field. The data type is, for example, a character string.

[0143] The storage space represents the need to store the transmission data in the designated storage space. For example, taking the receiving end as an industrial device, the industrial device identifies the corresponding subframe from the data packet, accesses the transmission data included in the data field, and stores the transmission data in the storage space indicated by the command field.

[0144] The length field is used to indicate the data length of the transmission data included in the data field, so that the receiving end can read and store the transmission data.

[0145] In an embodiment of the present application, optionally, the order of the device address field (PA), data field (Data), command field (CMD) and length field (LEN) included in the subframe in the subframe can be as shown in Figure 3; optionally, the order of the device address field (PA), data field (Data), command field (CMD) and length field (LEN) included in the subframe in the subframe can be as shown in any of Figures 4-6; optionally, the order of the device address field (PA), data field (Data), command field (CMD) and length field (LEN) included in the subframe in the subframe can also be other combined arrangement orders other than Figures 3-6. The embodiment of the present application does not impose specific restrictions on the order of the fields included in the subframe in the subframe, which can be flexibly selected during actual implementation.

[0146] The above embodiment optimizes the data packet structure so that multiple subframes share a frame header, so that multiple subframes can be combined in the same data packet for transmission, saving common message overhead, improving data transmission efficiency, and ensuring that the transmitted data can quickly reach the receiving device.

[0147] In an embodiment of the present application, based on the above embodiment, in addition to the device address field, data field, command field and length field, the subframe also includes one or more of the following fields (the multiple fields can be at least two fields, and at most all of the following fields): access direction field, command status field, sequence number field, count field, first check field, and first reserved field.

[0148] The following is an introduction to each field.

[0149] The access direction field (ACCDIR) is used to indicate the valid receiving direction of the received subframe.

[0150] It is understandable that when the current transmission mode of the industrial network is loopback mode (loopback mode means that when the loopback frame sent by the controller reaches the destination industrial device, the destination industrial device modifies the destination address in the loopback frame to the controller address and then loops back to the controller), if the receiving end is any industrial device between the controller and the destination industrial device, then the receiving end will receive data packets in both the outbound direction and the inbound direction of the controller. However, unlike receiving data packets in the outbound direction, the receiving end does not need to do any processing on the data packets received in the inbound direction.

[0151] Alternatively, when the receiving end is a controller, the receiving end may need to process part of or all of the subframes in the data packet.

[0152] Therefore, in order to enable the receiving end to distinguish whether the received data packet needs to be processed, in an embodiment of the present application, the effective receiving direction of the subframe can be represented by the access direction field. Only the data packet received by the receiving end in the effective receiving direction is valid, and the receiving end can access the transmission data included in the data packet.

[0153] In this way, after the receiving end receives the data packet and identifies the corresponding subframe from the data packet, it can determine whether the data packet needs to be processed by identifying whether the receiving direction of the data packet received by the receiving end is consistent with the effective receiving direction indicated by the access direction field in the subframe. If the two are consistent, it indicates that the receiving end needs to process the data packet, otherwise, it indicates that the receiving end does not need to process the data packet.

[0154] It should be noted that when the current transmission mode of the industrial network is unidirectional mode (unidirectional mode means that the controller sends a unidirectional frame to the destination industrial device, and the destination industrial device performs frame elimination and no longer continues to transmit), the effective receiving direction of the subframe in the device corresponding to the subframe can still be indicated by accessing the direction field.

[0155] The command status field (CSTS, Command Status) is used to indicate the access status of the transmission data, and the access status can be access success or access failure. In the embodiment of the present application, after the receiving end receives the data packet, for a subframe, if the receiving end has accessed the transmission data included in the subframe, then the receiving end needs to update the command status field, so that the updated command status field indicates that the receiving end has successfully accessed the transmission data included in the subframe, and if the receiving end has not accessed the transmission data included in the subframe, then the receiving end does not need to update the command status field, so that whether the receiving end has accessed the transmission data included in the subframe can be determined by whether the command status field is updated or not.

[0156] The sequence number field (SeqN) is used to indicate the transmission order of subframes.

[0157] Taking the embodiment shown in FIG. 1 as an example, for the first subframe (WiTSNETSubframe1), the sequence number field included in the subframe may indicate that the subframe is sent first in the frame sending order, and for the x-th subframe (WiTSNETSubframex), the sequence number field included in the subframe may indicate that the subframe is sent x-th in the frame sending order, and as described above, x is a positive integer greater than 1.

[0158] The count field, or the Command Execution Count field (CEC / CES), is used to record the number of accesses to the transmitted data when the device address is a multicast address.

[0159] In an embodiment of the present application, devices in the same group can transmit data through the same multicast address. If the device address field included in the subframe indicates a multicast address, then each device under the multicast address can access the transmission data included in the subframe. After each device successfully accesses the transmission data included in the subframe, the number of accesses in the count field included in the subframe is accumulated by 1.

[0160] That is, after the receiving end receives the data packet, for a subframe, if the device address field included in the subframe indicates a multicast address, and the multicast address corresponding to the receiving end is the same as the multicast address indicated by the device address field, then if the receiving end successfully accesses the transmission data included in the subframe, the receiving end needs to accumulate the number of accesses in the count field by 1.

[0161] The first check field may be a CRC (Cyclic Redundancy Check) code, and the first check field is used to check the subframe.

[0162] The first reserved field (Reserve) is used to extend the subframe later, and the embodiment of the present application does not make any specific restrictions here.

[0163] As described above, in an embodiment of the present application, in addition to the device address field, data field, command field and length field mentioned in the above embodiment, the subframe also includes one or more of an access direction field, a command status field, a sequence number field, a count field, a first check field, and a first reserved field.

[0164] For example, based on the embodiment shown in Figure 3, referring to Figure 7, in the exemplary subframe shown in Figure 7, the subframe includes an access direction field (ACCDIR), a device address field (PA), a command field (CMD), a length field (LEN), a command status field (CSTS), a sequence number field (SeqN), a first reserved field (Reserve), a data field (Data), a count field (CEC / CES) and a first check field (CRC).

[0165] For example, based on the embodiment shown in Figure 3, referring to Figure 8, the subframe includes an access direction field (ACCDIR), a device address field (PA), a command field (CMD), a length field (LEN), a command status field (CSTS), a sequence number field (SeqN), a data field (Data), a count field (CEC / CES) and a first check field (CRC).

[0166] For example, based on the embodiment shown in Figure 3, referring to Figure 9, the subframe includes an access direction field (ACCDIR), a device address field (PA), a command field (CMD), a length field (LEN), a command status field (CSTS), a sequence number field (SeqN), a data field (Data), and a count field (CEC / CES).

[0167] It should be noted that in the embodiment of the present application, there is no specific restriction on which type or types of the access direction field, command status field, sequence number field, count field, first check field and first reserved field the subframe includes, and it can be flexibly selected as needed during the actual implementation process.

[0168] In addition, it should be noted that the embodiment of the present application does not impose any specific restrictions on the order of the fields included in the subframe. During implementation, the fields can be arranged in any combination in the subframe.

[0169] Taking a subframe including an access direction field (ACCDIR), a device address field (PA), a command field (CMD), a length field (LEN), a command status field (CSTS), a sequence number field (SeqN), a first reserved field (Reserve), a data field (Data), a count field (CEC / CES) and a first check field (CRC) as an example, optionally, Figure 7 shows a schematic diagram of the front-to-back order of the fields included in a subframe; optionally, refer to Figure 10, which shows a schematic diagram of the front-to-back order of the fields included in another subframe in a subframe; optionally, refer to Figure 11, which shows a schematic diagram of the front-to-back order of the fields included in another subframe in a subframe. Of course, the order of the access direction field (ACCDIR), device address field (PA), command field (CMD), length field (LEN), command status field (CSTS), sequence number field (SeqN), first reserved field (Reserve), data field (Data), count field (CEC / CES) and first check field (CRC) in the subframe can also be other combined arrangement orders other than Figures 7, 10 and 11. The embodiment of the present application does not impose specific restrictions on the order of the fields included in the subframe in the subframe, and can be flexibly selected during actual implementation.

[0170] In the embodiment of the present application, since the device address field is a network-wide unique address assigned to the device, multiple subframes can be carried in one data packet. In this way, the exact position of the subframe in the data packet can be identified by the device address in the subframe, saving common message overhead, such as the preamble and the protocol overhead of standard Ethernet (ISO / IEC / IEEE 8802-3).

[0171] The data frame included in the data packet is further introduced. The above embodiment has exemplarily introduced the subframes in the data frame, and next, the frame header included in the data frame is exemplarily introduced.

[0172] Exemplarily, based on the embodiment shown in FIG. 2 , referring to FIG. 12 , FIG. 12 is a schematic diagram of a frame header in a data frame.

[0173] Among them, the frame header (WiTSNETHeader) includes the destination address field (WiTSNETDaddress, WiTSNETDestination Address), the source address field (WiTSNETSAddress, WiTSNET Source Address) and the transmission characteristics field (TraMS, Transmission Mode and Status).

[0174] The destination address field (WiTSNETDaddress) is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet. In this way, the receiving end can determine the destination address corresponding to the data packet according to the destination address field, and determine the link layer addressing mode corresponding to the data packet, and address it according to the link layer addressing mode for subsequent data transmission process.

[0175] The following is an exemplary description of the addressing of data packets in conjunction with the network topology shown in FIG. 13 .

[0176] The network topology shown in Figure 13 includes a branch network (200), a branch network (201) and a branch network (210). The branch network (200), the branch network (201) and the branch network (210) are all linear connection networks.

[0177] In the network topology shown in FIG13, each device has a unique topological address. The topological address includes a port address and a location address. The location address indicates the sequential position of a device (such as 101-109 shown in FIG13) in a linear connection network. Each device is marked with a number. Starting from the first device (101), the location address is equal to 1. The next device (102) should obtain the value of the location address of the previous device and increase it by 1. The next-highest-level linear connection network (such as the branch network 210) is extended and connected by a device at the upper level.

[0178] There are three different types of ports in the network topology. The main port (1a) is connected to the previous device connected on the same branch in the line. If the main port (2a) is the first device in a linear connection network, it realizes the connection to the higher-level linear connection network (200).

[0179] The secondary port (1b) is used to connect to subsequent devices in a linear connection network.

[0180] Port addresses (1c), (3a), (4a), and (4b) are branch ports of a device in the previous branch network that is connected to the newly expanded branch network. If there is a newly added lower-level branch network, it can be connected to the network topology shown in Figure 13 through the branch port (1b).

[0181] A device (such as 106) can also have multiple branch ports (4a, 4b). All port extensions in a linear connection network belong to the same level. Based on this rule, each device in Ethernet has a unique topological address, so that the device can be addressed by its position in the topology of Ethernet.

[0182] In an embodiment of the present application, exemplarily, the destination address corresponding to the data packet can be indicated by the destination address field, and the destination address can be the above-mentioned topological address. The receiving end can determine the destination address corresponding to the data packet based on the destination address field, and determine the link layer addressing method corresponding to the data packet. The link layer addressing method can be determined based on the addressing rules in the network topology shown in Figure 13, and the receiving end performs addressing according to the link layer addressing method.

[0183] The source address field (WiTSNETSAddress) is used to indicate the source address corresponding to the data packet.

[0184] The transmission characteristics field (TraMS) is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0185] In the embodiments of the present application, the industrial network may have a variety of transmission modes, including loopback mode, unidirectional mode, etc. For the meaning of the loopback mode and the unidirectional mode, please refer to the relevant description of the above embodiments, which will not be repeated here. The transmission characteristic field can be used to identify the transmission mode used by the industrial network.

[0186] In the related art, in the standard Ethernet frame structure, after the receiving end receives the standard Ethernet frame, the receiving end needs to determine the transmission mode through learning, so as to determine how to forward the standard Ethernet frame. This method is not conducive to improving data transmission efficiency. In the embodiment of the present application, the transmission mode corresponding to the data packet can be indicated by the transmission feature field. In this way, the receiving end can quickly identify the transmission mode by directly identifying the transmission feature field, which is conducive to improving data transmission efficiency.

[0187] In an embodiment of the present application, the transmission characteristic field is also used to indicate the transmission status corresponding to the data packet. The transmission status may refer to the transmission status of the data packet corresponding to the current transmission mode. For example, in the loopback mode, the transmission status may refer to whether the data packet is currently before the loopback or after the loopback, and so on.

[0188] In an embodiment of the present application, the order of the destination address field (WiTSNETDaddress), the source address field (WiTSNETSAddress) and the transmission characteristic field (TraMS) in the frame header may be as shown in Figure 12; optionally, the order of the destination address field (WiTSNETDaddress), the source address field (WiTSNETSAddress) and the transmission characteristic field (TraMS) in the frame header may be as shown in any of Figures 14-15; optionally, the order of the destination address field (WiTSNETDaddress), the source address field (WiTSNETSAddress) and the transmission characteristic field (TraMS) in the frame header may also be other combined arrangement orders other than Figures 12-15. The embodiment of the present application does not impose specific restrictions on the order of the fields included in the frame header in the frame header, which can be flexibly selected during actual implementation.

[0189] In an embodiment of the present application, the frame header includes a destination address field and a source address field, so that the destination address and source address of the data packet can be quickly traced through the frame header, and the transmission characteristic field can conveniently indicate the transmission mode and transmission status corresponding to the data packet, which is conducive to improving data transmission efficiency and the flexibility and efficiency of data processing, and providing richer transmission modes.

[0190] Based on the above embodiment, in addition to the destination address field, the source address field and the transmission feature field, the frame header also includes one or more of the following fields: a sub-protocol type field, a priority field, a second check field, and a second reserved field.

[0191] The following is an introduction to each field.

[0192] The sub-protocol type field (EtherSubType) is used to indicate the protocol information corresponding to the data packet, and the protocol information may include a protocol number and a protocol version.

[0193] In an embodiment of the present application, unlike standard Ethernet frames, data packets in an embodiment of the present application can be transmitted in a custom network segment, and the protocol information can be the custom protocol number and protocol version used by the custom network segment, thereby improving the flexibility of data transmission.

[0194] The priority field is used to indicate the transmission priority of a data packet. When the receiving end receives multiple data packets, it can transmit each data packet according to the transmission priority indicated by the priority field in each data packet.

[0195] The second check field may be a CRC code, and the second check field is used to check the frame header.

[0196] The second reserved field (Reserve) is used to expand the frame header later, and the embodiment of the present application does not make any specific restrictions here.

[0197] As described above, in an embodiment of the present application, in addition to the destination address field, source address field and transmission characteristic field mentioned in the above embodiment, the frame header also includes one or more of a sub-protocol type field, a priority field, a second check field, and a second reserved field.

[0198] For example, based on the embodiment shown in Figure 12, refer to Figure 16. In the exemplary frame header shown in Figure 16, the frame header includes a sub-protocol type field (EtherSubType), a priority field (Priority), a destination address field (WiTSNETDaddress), a transmission feature field (TraMS), a source address field (WiTSNETSAddress), a second reserved field (Reserve) and a second check field (CRC).

[0199] For example, based on the embodiment shown in Figure 12, refer to Figure 17. In the exemplary frame header shown in Figure 17, the frame header includes a sub-protocol type field (EtherSubType), a priority field (Priority), a destination address field (WiTSNETDaddress), a transmission feature field (TraMS), a source address field (WiTSNETSAddress) and a second check field (CRC).

[0200] For example, based on the embodiment shown in Figure 12, refer to Figure 18. In the exemplary frame header shown in Figure 18, the frame header includes a sub-protocol type field (EtherSubType), a priority field (Priority), a destination address field (WiTSNETDaddress), a transmission feature field (TraMS), and a source address field (WiTSNETSAddress).

[0201] It should be noted that in the embodiment of the present application, there is no specific restriction on which type or types of the sub-protocol type field, priority field, destination address field, transmission feature field, source address field, second reserved field and second check field are included in the frame header, and it can be flexibly selected as needed during the actual implementation process.

[0202] In addition, it should be noted that the embodiment of the present application does not impose any specific restrictions on the order of the fields included in the frame header. During implementation, the fields can be arranged in any combination order in the frame header.

[0203] Taking the frame header including the sub-protocol type field (EtherSubType), the priority field (Priority), the destination address field (WiTSNETDaddress), the transmission feature field (TraMS), the source address field (WiTSNETSAddress) and the second check field (CRC) as an example, optionally, Figure 16 shows a schematic diagram of the front-to-back order of the fields included in a frame header; optionally, refer to Figure 19, Figure 19 shows a schematic diagram of the front-to-back order of the fields included in another frame header; optionally, refer to Figure 20, Figure 20 shows a schematic diagram of the front-to-back order of the fields included in another frame header.

[0204] Of course, the order of the sub-protocol type field (EtherSubType), priority field (Priority), destination address field (WiTSNETDaddress), transmission feature field (TraMS), source address field (WiTSNETSAddress) and second check field (CRC) in the frame header can also be other combined arrangement orders other than Figures 16, 19 and 20. The embodiment of the present application does not impose specific restrictions on the order of the fields included in the frame header in the frame header, and can be flexibly selected during actual implementation.

[0205] In an embodiment of the present application, the frame header information is optimized, and the destination address and source address of the data packet can be quickly traced through the frame header, and the transmission characteristic field can conveniently indicate the transmission mode and transmission status corresponding to the data packet, which is beneficial to improving data transmission efficiency and the flexibility and efficiency of data processing, and providing richer transmission modes. In addition, the frame header can optionally and flexibly include one or more of the sub-protocol type field, priority field, second check field, and second reserved field, thereby improving the flexibility of data processing.

[0206] The above embodiment introduces that the data frame includes a frame header and multiple subframes, and exemplarily introduces the frame structure of the subframe and the frame header. In the embodiment of the present application, optionally, the data frame also includes a padding field. When the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length. Exemplarily, the minimum frame length corresponding to the standard Ethernet can be 64 bytes.

[0207] Based on any of the above embodiments, taking the embodiment shown in FIG. 2 as an example, referring to FIG. 21 , in addition to a frame header (WiTSNETHeader) and multiple subframes (WiTSNETSubframe1-WiTSNETSubframex as shown in FIG. 21 ), the data frame (WiTSNETFrame) also includes a padding field (WiTSNETDataPad). When the frame length of a data packet is less than the minimum frame length specified by standard Ethernet, the data packet can be padded to the minimum frame length through the padding field, and each bit of the padding field is set to 0.

[0208] In this way, the filling field can ensure the smooth sending of the data packet and improve the reliability of data transmission.

[0209] In an embodiment of the present application, optionally, the data frame also includes an end field, and the end field is used to indicate the end position of the data frame.

[0210] Please continue to refer to Figure 21. In addition to the frame header (WiTSNETHeader), multiple subframes (WiTSNETSubframe1-WiTSNET

[0211] In addition to the WiTSNETDataSubframex and padding fields (WiTSNETDataPad), the data frame also includes an end field (WiTSNETDataEnd).

[0212] The end field may include a preset special value, which is different from other values ​​in the data packet. When the receiving end recognizes the special value included in the end field, it can determine the end of the data frame, followed by the frame tail FCS (Frame Check Sequence). In this way, the data subframe and the frame tail can be accurately distinguished through the end field, which is conducive to improving the accuracy of data transmission.

[0213] In the embodiment of the present application, in addition to the data frame described in any of the above embodiments, as shown in FIG. 22 , the data packet also includes a preamble, a start frame delimiter (SFD) and a frame tail FCS.

[0214] The preamble includes a destination address field (WiTSNETDaddress), which is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet.

[0215] In the frame format defined by standard Ethernet, the preamble has 7 bytes. According to ISO / IEC / IEEE 8802-3, the first 2 bytes (Pre1 and Pre2 shown in Figure 22) are used as clock synchronization codes for 4B / 5B or 7B / 8B encoding to form a data stream start delimiter. In the embodiment of the present application, the remaining 5 bytes are used for customization, that is, in the embodiment of the present application, the destination address field can be located in the last 5 bytes of the preamble.

[0216] In this way, compared to the data frame, the receiving end will first identify the preamble code, and can quickly determine the destination address corresponding to the data packet based on the destination address field included in the preamble code, and determine the link layer addressing method corresponding to the data packet, and address it according to the link layer addressing method, thereby improving data transmission efficiency.

[0217] It should be noted that during the transmission of the data packet, if the device has the ability to modify the preamble (for example, a device in a custom network segment), then the device can add a destination address field to the preamble so that subsequent devices can quickly identify the destination address corresponding to the data packet. Conversely, if the device does not have the ability to modify the preamble (for example, a device in a standard Ethernet), then the destination address field is not added to the preamble. During the transmission of the data packet, the first device with the ability to modify the preamble adds the destination address field to the preamble.

[0218] Optionally, the custom part in the preamble includes not only the destination address field, but also the priority field and / or the third reserved field.

[0219] The priority field is used to indicate the transmission priority of the data packet, and each data packet can be transmitted according to the transmission priority indicated by the priority field in each data packet.

[0220] The third reserved field is used to extend the preamble code later, and the embodiment of the present application does not make any specific restrictions here.

[0221] Exemplarily, referring to FIG. 23 , taking the case where the preamble in the data packet also includes a priority field and a third reserved field, the receiving end can quickly determine the transmission direction and priority information by judging the custom information of the preamble, thereby reducing the data residence delay.

[0222] Similar to the destination address field (WiTSNETDaddress), the priority field (Priority) and the third reserved field (Reserve) may also be located in the last 5 bytes of the preamble.

[0223] It should be noted that in the embodiment of the present application, there is no specific restriction on the order of the various fields included in the preamble code in the preamble code, and it can be flexibly selected in the actual implementation process. For example, continuing to take the preamble code in the data packet including the destination address field (WiTSNETDaddress), the priority field (Priority) and the third reserved field (Reserve) as an example, Figure 24 shows another schematic diagram of the order of the destination address field (WiTSNETDaddress), the priority field (Priority) and the third reserved field (Reserve) in the preamble code, and Figure 25 shows another schematic diagram of the order of the destination address field (WiTSNETDaddress), the priority field (Priority) and the third reserved field (Reserve) in the preamble code, and so on.

[0224] In the embodiment of the present application, the receiving end can quickly determine the transmission direction and priority information by judging the custom information of the preamble code, thereby reducing the data residence delay.

[0225] In one embodiment, based on any of the above embodiments, in an embodiment of the present application, the data packet also includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in the Ethernet.

[0226] Taking the embodiment shown in Figure 23 as an example, see Figure 26, the Ethernet routing field includes an Ethernet address field (EthernetAddress), the Ethernet address field includes a destination MAC (Media Access Control) address field (Destination Address, DA) and a source MAC address field (Source Address, SA), a virtual local area network tag field (Virtual Local Area Network, VLAN), and an Ethernet type field (EtherType).

[0227] In this way, by filling in the relevant address information of the data packet in the Ethernet address field, the data packet can be transmitted in the standard Ethernet, transmitted to the custom network segment through the standard Ethernet, and then received by the receiving end, thereby achieving compatibility between the standard Ethernet and the custom network segment and improving compatibility.

[0228] In one embodiment, based on the embodiment shown in FIG. 26 , referring to FIG. 27 , the data packet includes a preamble (Preamble), a start frame delimiter (SFD), an Ethernet routing field, a data frame (WiTSNETFrame), and a frame tail (FCS).

[0229] Among them, in the frame format defined by standard Ethernet, the preamble code has 7 bytes. According to ISO / IEC / IEEE 8802-3, the first 2 bytes (Pre1 and Pre2 shown in Figure 27) are used as clock synchronization codes for 4B / 5B or 7B / 8B encoding to form a data stream start separator. In the embodiment of the present application, the remaining 5 bytes are used for customization.

[0230] In the embodiment of the present application, a priority field (Priority), a destination address field (WiTSNETDaddress) and a third reserved field (Reserve) are customized in the remaining 5 bytes of the preamble.

[0231] The priority field is used to indicate the transmission priority of the data packet. Each data packet can be transmitted according to the transmission priority indicated by the priority field (Priority) in each data packet.

[0232] The third reserved field is used to extend the preamble code later, and the embodiment of the present application does not make any specific restrictions here.

[0233] The destination address field (WiTSNETDaddress) is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet.

[0234] In this way, compared with the data frame, in the embodiment of the present application, the receiving end will first identify the preamble code. The receiving end can quickly determine the transmission direction and priority information by judging the custom information of the preamble code, thereby reducing the data residence delay.

[0235] In one embodiment, based on the embodiment shown in Figure 26, refer to Figure 28, in the embodiment of the present application, the customized data frame (WiTSNETFrame) includes a frame header (WiTSNETHeader), multiple subframes (WiTSNETSubframe1 to WiTSNETSubframex as shown in Figure 28), a padding field (WiTSNETDataPad), and an end field (WiTSNETDataEnd), wherein, when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field (WiTSNETDataPad) is used to fill the frame length of the data packet to the minimum frame length, and the end field (WiTSNETDataEnd) is used to indicate the end position of the data frame.

[0236] In one embodiment, based on the embodiment shown in Figure 28, refer to Figure 29, in the embodiment of the present application, the customized frame header (WiTSNETHeader) includes a sub-protocol type field (EtherSubType), a priority field (Priority), a destination address field (WiTSNETDaddress), a transmission feature field (TraMS), a source address field (WiTSNETSAddress), a second reserved field (Reserve) and a second check field (CRC).

[0237] The sub-protocol type field (EtherSubType) is used to indicate the protocol information corresponding to the data packet, and the protocol information may include a protocol number and a protocol version.

[0238] The Priority field is used to indicate the transmission priority of the data packet.

[0239] The destination address field (WiTSNETDaddress) is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet.

[0240] The transmission characteristics field (TraMS) is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0241] The source address field (WiTSNETSAddress) is used to indicate the source address corresponding to the data packet.

[0242] The second check field may be a CRC code, and the second check field is used to check the frame header.

[0243] The second reserved field (Reserve) is used to expand the frame header later, and the embodiment of the present application does not make any specific restrictions here.

[0244] In an embodiment of the present application, the frame header information is optimized, and the destination address and source address of the data packet can be quickly traced through the frame header, and the transmission characteristic field can conveniently indicate the transmission mode and transmission status corresponding to the data packet, which is beneficial to improving data transmission efficiency and the flexibility and efficiency of data processing, and providing richer transmission modes. In addition, the frame header can optionally and flexibly include one or more of the sub-protocol type field, priority field, second check field, and second reserved field, thereby improving the flexibility of data processing.

[0245] In one embodiment, based on the embodiment shown in Figure 28, referring to Figure 30, in the embodiment of the present application, the customized subframe (WiTSNETFrame) includes an access direction field (ACCDIR), a device address field (PA), a command field (CMD), a length field (LEN), a command status field (CSTS), a sequence number field (SeqN), a first reserved field (Reserve), a data field (Data), a count field (CEC / CES) and a first check field (CRC).

[0246] The access direction field (ACCDIR) is used to indicate the effective receiving direction of the receiving subframe.

[0247] The device address field (PA) is used to indicate the device address of the device (industrial device) corresponding to the subframe.

[0248] The command field (CMD) is used to indicate the data type and storage space of the transmission data included in the data field.

[0249] The length field (LEN) is used to indicate the data length of the transmitted data.

[0250] The command status field (CSTS) is used to indicate the access status of the transmission data, which can be access success or access failure.

[0251] The sequence number field (SeqN) is used to indicate the transmission order of subframes.

[0252] The first reserved field (Reserve) is used to extend the subframe later.

[0253] The data field (Data) includes the transmission data.

[0254] The count field (CEC / CES) is used to record the number of accesses to the transmitted data when the device address is a multicast address.

[0255] The first check field (CRC) is used to check the subframe.

[0256] In the embodiments of the present application, by optimizing the data packet structure, flexible data transmission is achieved, data protocol overhead is reduced, and transmission efficiency is improved. In addition, by optimizing the data packet structure, the data processing logic is optimized, and by effectively organizing and marking fields in the data packet, the flexibility and efficiency of data processing are improved, providing a transmission mode with richer data.

[0257] In one embodiment, a data transmission method is provided for use with a sending device in an industrial network. As shown in FIG31 , the method comprises the following steps:

[0258] Step 3001, sending a data packet to a receiving device in an industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein: the device address field is used to indicate the device address of the device corresponding to the subframe; the data field includes transmission data; the command field is used to indicate the data type and storage space of the transmission data; the length field is used to indicate the data length of the transmission data.

[0259] In one embodiment, the subframe further includes one or more of the following fields:

[0260] An access direction field, where the access direction field is used to indicate a valid receiving direction of a received subframe;

[0261] A command status field, which is used to indicate the access status of the transmitted data;

[0262] Sequence number field: The sequence number field is used to indicate the transmission order of subframes;

[0263] A count field, which is used to record the number of accesses to the transmission data when the device address is a multicast address;

[0264] A first check field, where the first check field is used to check a subframe;

[0265] First reserved field.

[0266] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0267] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0268] The source address field is used to indicate the source address corresponding to the data packet;

[0269] The transmission characteristics field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0270] In one embodiment, the frame header further includes one or more of the following fields:

[0271] Sub-protocol type field, which is used to indicate the protocol information corresponding to the data packet;

[0272] Priority field, the priority field is used to indicate the transmission priority of the data packet;

[0273] A second check field, the second check field is used to check the frame header;

[0274] Second reserved field.

[0275] In one of the embodiments, the data frame further includes a padding field. When the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0276] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0277] In one of the embodiments, the data packet also includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet.

[0278] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0279] The priority field is used to indicate the transmission priority of the data packet.

[0280] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in the Ethernet.

[0281] For the implementation and beneficial effects of the data transmission method for the sending end, please refer to the relevant description in the embodiment of the data transmission method for the receiving end above, which will not be repeated here.

[0282] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0283] Based on the same technical concept, the embodiment of the present application further provides a data transmission device, which can implement the functions of the receiving device side in the above-mentioned embodiment.

[0284] In an exemplary embodiment, as shown in FIG32 , a data transmission device is provided, which is used for a receiving device in an industrial network, including:

[0285] The receiving module 3201 is used to receive a data packet sent by a sending device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and multiple subframes, and the subframe includes a device address field, a data field, a command field, and a length field, wherein:

[0286] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0287] The data field includes transmission data;

[0288] The command field is used to indicate the data type and storage space of the transmission data;

[0289] The length field is used to indicate the data length of the transmission data.

[0290] In one of the embodiments, the subframe further includes one or more of the following fields:

[0291] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0292] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0293] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0294] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0295] A first check field, wherein the first check field is used to check the subframe;

[0296] First reserved field.

[0297] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0298] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0299] The source address field is used to indicate the source address corresponding to the data packet;

[0300] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0301] In one embodiment, the frame header further includes one or more of the following fields:

[0302] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0303] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0304] A second check field, wherein the second check field is used to check the frame header;

[0305] Second reserved field.

[0306] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0307] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0308] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0309] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0310] The priority field is used to indicate the transmission priority of the data packet.

[0311] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0312] 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 receiving device, 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 receiving device in the form of hardware, or can be stored in the memory in the receiving device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0313] Based on the same technical concept, the embodiment of the present application further provides a data transmission device, which can implement the functions of the sending device side in the above embodiment.

[0314] In an exemplary embodiment, as shown in FIG33 , a data transmission device is provided, which is used for a sending device in an industrial network, including:

[0315] The sending device 3301 sends a data packet to a receiving device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and multiple subframes, and the subframe includes a device address field, a data field, a command field, and a length field, wherein:

[0316] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0317] The data field includes transmission data;

[0318] The command field is used to indicate the data type and storage space of the transmission data;

[0319] The length field is used to indicate the data length of the transmission data.

[0320] In one of the embodiments, the subframe further includes one or more of the following fields:

[0321] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0322] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0323] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0324] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0325] A first check field, wherein the first check field is used to check the subframe;

[0326] First reserved field.

[0327] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0328] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0329] The source address field is used to indicate the source address corresponding to the data packet;

[0330] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0331] In one embodiment, the frame header further includes one or more of the following fields:

[0332] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0333] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0334] A second check field, wherein the second check field is used to check the frame header;

[0335] Second reserved field.

[0336] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0337] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0338] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0339] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0340] The priority field is used to indicate the transmission priority of the data packet.

[0341] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0342] 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 sending device, 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 specifically repeated 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 sending device in the form of hardware, or can be stored in the memory in the sending device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0343] 34 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application, which may be an industrial device or a controller. The computer device may include a processor 3400, a transceiver 3410, and a memory 3420. The transceiver 3410 is used to receive and send data under the control of the processor 3400.

[0344] In FIG. 34 , the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 3400 and memory represented by memory 3420. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface.

[0345] The transceiver 3410 may be a plurality of elements, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, such as a wireless channel, a wired channel, an optical cable, etc. The processor 3400 is responsible for managing the bus architecture and general processing, and the memory 3420 may store data used by the processor 3400 when performing operations.

[0346] The processor 3400 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 3400 may also adopt a multi-core architecture.

[0347] Optionally, the device may be a receiving device, and the processor 3400 is configured to execute the following steps according to the obtained executable instructions by calling a computer program stored in the memory 3420:

[0348] Control the transceiver 3410 to receive a data packet sent by a sending device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and multiple subframes, and the subframe includes a device address field, a data field, a command field, and a length field, wherein:

[0349] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0350] The data field includes transmission data;

[0351] The command field is used to indicate the data type and storage space of the transmission data;

[0352] The length field is used to indicate the data length of the transmission data.

[0353] In one of the embodiments, the subframe further includes one or more of the following fields:

[0354] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0355] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0356] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0357] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0358] A first check field, wherein the first check field is used to check the subframe;

[0359] First reserved field.

[0360] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0361] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0362] The source address field is used to indicate the source address corresponding to the data packet;

[0363] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0364] In one embodiment, the frame header further includes one or more of the following fields:

[0365] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0366] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0367] A second check field, wherein the second check field is used to check the frame header;

[0368] Second reserved field.

[0369] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0370] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0371] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0372] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0373] The priority field is used to indicate the transmission priority of the data packet.

[0374] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0375] Optionally, the device may be a sending device, and the processor 3400 is configured to execute the following steps according to the obtained executable instructions by calling a computer program stored in the memory 3420:

[0376] Control the transceiver 3410 to send a data packet to a receiving device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein:

[0377] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0378] The data field includes transmission data;

[0379] The command field is used to indicate the data type and storage space of the transmission data;

[0380] The length field is used to indicate the data length of the transmission data.

[0381] In one of the embodiments, the subframe further includes one or more of the following fields:

[0382] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0383] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0384] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0385] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0386] A first check field, wherein the first check field is used to check the subframe;

[0387] First reserved field.

[0388] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0389] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0390] The source address field is used to indicate the source address corresponding to the data packet;

[0391] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0392] In one embodiment, the frame header further includes one or more of the following fields:

[0393] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0394] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0395] A second check field, wherein the second check field is used to check the frame header;

[0396] Second reserved field.

[0397] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0398] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0399] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0400] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0401] The priority field is used to indicate the transmission priority of the data packet.

[0402] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0403] In one embodiment, a computer-readable storage medium is provided, which 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.

[0404] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0405] Receive a data packet sent by a sending device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein:

[0406] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0407] The data field includes transmission data;

[0408] The command field is used to indicate the data type and storage space of the transmission data;

[0409] The length field is used to indicate the data length of the transmission data.

[0410] In one of the embodiments, the subframe further includes one or more of the following fields:

[0411] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0412] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0413] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0414] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0415] A first check field, wherein the first check field is used to check the subframe;

[0416] First reserved field.

[0417] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0418] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0419] The source address field is used to indicate the source address corresponding to the data packet;

[0420] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0421] In one embodiment, the frame header further includes one or more of the following fields:

[0422] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0423] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0424] A second check field, wherein the second check field is used to check the frame header;

[0425] Second reserved field.

[0426] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0427] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0428] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0429] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0430] The priority field is used to indicate the transmission priority of the data packet.

[0431] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0432] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0433] Sending a data packet to a receiving device in the industrial network, the data packet comprising a data frame, the data frame comprising a frame header and a plurality of subframes, the subframe comprising a device address field, a data field, a command field, and a length field, wherein:

[0434] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0435] The data field includes transmission data;

[0436] The command field is used to indicate the data type and storage space of the transmission data;

[0437] The length field is used to indicate the data length of the transmission data.

[0438] In one of the embodiments, the subframe further includes one or more of the following fields:

[0439] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0440] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0441] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0442] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0443] A first check field, wherein the first check field is used to check the subframe;

[0444] First reserved field.

[0445] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0446] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0447] The source address field is used to indicate the source address corresponding to the data packet;

[0448] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0449] In one embodiment, the frame header further includes one or more of the following fields:

[0450] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0451] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0452] A second check field, wherein the second check field is used to check the frame header;

[0453] Second reserved field.

[0454] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0455] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0456] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0457] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0458] The priority field is used to indicate the transmission priority of the data packet.

[0459] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0460] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps:

[0461] Receive a data packet sent by a sending device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein:

[0462] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0463] The data field includes transmission data;

[0464] The command field is used to indicate the data type and storage space of the transmission data;

[0465] The length field is used to indicate the data length of the transmission data.

[0466] In one of the embodiments, the subframe further includes one or more of the following fields:

[0467] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0468] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0469] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0470] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0471] A first check field, wherein the first check field is used to check the subframe;

[0472] First reserved field.

[0473] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0474] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0475] The source address field is used to indicate the source address corresponding to the data packet;

[0476] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0477] In one embodiment, the frame header further includes one or more of the following fields:

[0478] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0479] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0480] A second check field, wherein the second check field is used to check the frame header;

[0481] Second reserved field.

[0482] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0483] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0484] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0485] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0486] The priority field is used to indicate the transmission priority of the data packet.

[0487] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0488] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps:

[0489] Sending a data packet to a receiving device in the industrial network, the data packet comprising a data frame, the data frame comprising a frame header and a plurality of subframes, the subframe comprising a device address field, a data field, a command field, and a length field, wherein:

[0490] The device address field is used to indicate the device address of the device corresponding to the subframe;

[0491] The data field includes transmission data;

[0492] The command field is used to indicate the data type and storage space of the transmission data;

[0493] The length field is used to indicate the data length of the transmission data.

[0494] In one of the embodiments, the subframe further includes one or more of the following fields:

[0495] An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe;

[0496] A command status field, wherein the command status field is used to indicate an access status of the transmission data;

[0497] A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe;

[0498] A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address;

[0499] A first check field, wherein the first check field is used to check the subframe;

[0500] First reserved field.

[0501] In one embodiment, the frame header includes a destination address field, a source address field, and a transmission feature field; wherein,

[0502] The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet;

[0503] The source address field is used to indicate the source address corresponding to the data packet;

[0504] The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

[0505] In one embodiment, the frame header further includes one or more of the following fields:

[0506] A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet;

[0507] A priority field, wherein the priority field is used to indicate a transmission priority of the data packet;

[0508] A second check field, wherein the second check field is used to check the frame header;

[0509] Second reserved field.

[0510] In one of the embodiments, the data frame further includes a padding field, and when the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

[0511] In one of the embodiments, the data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

[0512] In one of the embodiments, the data packet further includes a preamble code, the preamble code includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

[0513] In one of the embodiments, the preamble further includes a priority field and / or a third reserved field;

[0514] The priority field is used to indicate the transmission priority of the data packet.

[0515] In one of the embodiments, the data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in Ethernet.

[0516] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can 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 can include random access memory (RAM) or external cache memory, etc. As an 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 each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0517] The technical features of the above embodiments may be combined arbitrarily. 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.

[0518] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data transmission method, characterized in that: For use in a receiving device in an industrial network, the method comprises: Receive a data packet sent by a sending device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein: The device address field is used to indicate the device address of the device corresponding to the subframe; The data field includes transmission data; The command field is used to indicate the data type and storage space of the transmission data; The length field is used to indicate the data length of the transmission data.

2. The method according to claim 1, characterized in that: The subframe also includes one or more of the following fields: An access direction field, wherein the access direction field is used to indicate a valid receiving direction for receiving the subframe; A command status field, wherein the command status field is used to indicate an access status of the transmission data; A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe; A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address; A first check field, wherein the first check field is used to check the subframe; First reserved field.

3. The method according to claim 1, characterized in that The frame header includes a destination address field, a source address field and a transmission feature field; wherein, The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet; The source address field is used to indicate the source address corresponding to the data packet; The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

4. The method according to claim 3, characterized in that The frame header also includes one or more of the following fields: A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet; A priority field, wherein the priority field is used to indicate a transmission priority of the data packet; A second check field, wherein the second check field is used to check the frame header; Second reserved field.

5. The method according to claim 1, characterized in that The data frame further includes a padding field. When the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

6. The method according to claim 1, characterized in that The data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

7. The method according to claim 1, characterized in that The data packet also includes a preamble, the preamble includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

8. The method according to claim 7, characterized in that The preamble also includes a priority field and / or a third reserved field; The priority field is used to indicate the transmission priority of the data packet.

9. The method according to any one of claims 1 to 8, characterized in that: The data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in the Ethernet.

10. A data transmission method, characterized in that: For a sending device in an industrial network, the method comprises: Sending a data packet to a receiving device in the industrial network, the data packet comprising a data frame, the data frame comprising a frame header and a plurality of subframes, the subframe comprising a device address field, a data field, a command field, and a length field, wherein: The device address field is used to indicate the device address of the device corresponding to the subframe; The data field includes transmission data; The command field is used to indicate the data type and storage space of the transmission data; The length field is used to indicate the data length of the transmission data.

11. The method according to claim 10, characterized in that The subframe also includes one or more of the following fields: An access direction field, where the access direction field is used to indicate a valid receiving direction for receiving the subframe; A command status field, wherein the command status field is used to indicate an access status of the transmission data; A sequence number field, wherein the sequence number field is used to indicate a frame transmission order of the subframe; A count field, the count field being used to record the number of accesses to the transmission data when the device address is a multicast address; A first check field, wherein the first check field is used to check the subframe; First reserved field.

12. The method according to claim 10, characterized in that The frame header includes a destination address field, a source address field and a transmission feature field; wherein, The destination address field is used to indicate the destination address corresponding to the data packet, and the destination address is associated with the link layer addressing mode corresponding to the data packet; The source address field is used to indicate the source address corresponding to the data packet; The transmission characteristic field is used to indicate the transmission mode and transmission status corresponding to the data packet.

13. The method according to claim 12, characterized in that The frame header also includes one or more of the following fields: A sub-protocol type field, wherein the sub-protocol type field is used to indicate the protocol information corresponding to the data packet; A priority field, wherein the priority field is used to indicate a transmission priority of the data packet; A second check field, wherein the second check field is used to check the frame header; Second reserved field.

14. The method according to claim 10, characterized in that The data frame further includes a padding field. When the frame length of the data packet is less than the minimum frame length corresponding to the standard Ethernet, the padding field is used to fill the frame length of the data packet to the minimum frame length.

15. The method according to claim 10, characterized in that The data frame further includes an end field, and the end field is used to indicate the end position of the data frame.

16. The method according to claim 10, characterized in that The data packet also includes a preamble, the preamble includes a destination address field, the destination address field is used to indicate a destination address corresponding to the data packet, and the destination address is associated with a link layer addressing mode corresponding to the data packet.

17. The method according to claim 16, characterized in that The preamble also includes a priority field and / or a third reserved field; The priority field is used to indicate the transmission priority of the data packet.

18. The method according to any one of claims 10 to 17, characterized in that: The data packet further includes an Ethernet routing field, and the Ethernet routing field is used to transmit the data packet in the Ethernet.

19. A data transmission device, characterized in that: A receiving device used in an industrial network, the device comprising: A receiving module, configured to receive a data packet sent by a sending device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and a plurality of subframes, the subframe includes a device address field, a data field, a command field, and a length field, wherein: The device address field is used to indicate the device address of the device corresponding to the subframe; The data field includes transmission data; The command field is used to indicate the data type and storage space of the transmission data; The length field is used to indicate the data length of the transmission data.

20. A data transmission device, characterized in that: A transmitting device used in an industrial network, the device comprising: A sending module is used to send a data packet to a receiving device in the industrial network, wherein the data packet includes a data frame, the data frame includes a frame header and multiple subframes, and the subframe includes a device address field, a data field, a command field, and a length field, wherein: The device address field is used to indicate the device address of the device corresponding to the subframe; The data field includes transmission data; The command field is used to indicate the data type and storage space of the transmission data; The length field is used to indicate the data length of the transmission data.

21. A receiving 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; the processor is used to read the computer program in the memory and perform the following operations: Control the transceiver to receive a data packet sent by a sending device in an industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein: The device address field is used to indicate the device address of the device corresponding to the subframe; The data field includes transmission data; The command field is used to indicate the data type and storage space of the transmission data; The length field is used to indicate the data length of the transmission data.

22. A sending 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; the processor is used to read the computer program in the memory and perform the following operations: Control the transceiver to send a data packet to a receiving device in the industrial network, the data packet includes a data frame, the data frame includes a frame header and multiple subframes, the subframe includes a device address field, a data field, a command field and a length field, wherein: The device address field is used to indicate the device address of the device corresponding to the subframe; The data field includes transmission data; The command field is used to indicate the data type and storage space of the transmission data; The length field is used to indicate the data length of the transmission data.

23. 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 18 are implemented.

24. 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 18 are implemented.

Citation Information

Cited By

  • Data processing method and device and electronic equipment

    CN120390045A