Data transmission method, device and equipment, computer storage medium and program product
By converting data in the industrial Ethernet protocol format to the industrial bus protocol format and determining the transmission set based on data size and priority, the data transmission delay problem is solved, enabling timely transmission and efficient processing of critical data.
Patent Information
- Application Number
- CN202411599808.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-11
AI Technical Summary
In existing technologies, high-priority data is delayed in processing while waiting for lower-priority data to complete, resulting in low data processing efficiency.
Transmitted data in the industrial Ethernet protocol format is converted into the industrial bus protocol format, and the data transmission set is determined according to the data size, preset execution priority and transmission bandwidth to ensure that critical data is transmitted first.
By optimizing the data transmission sequence, critical data is ensured to be transmitted to the execution device in a timely manner, reducing latency and improving system data processing efficiency.
Smart Images

Figure CN119583470B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of communication, and particularly relates to a data transmission method and device, equipment, computer storage medium and program product. BACKGROUND
[0002] With the continuous development of industry and manufacturing, more and more operational technology (OT) networks need efficient data transmission methods to support their operation.
[0003] In the prior art, when data is transmitted, the transmission is usually performed according to the receiving time, and the protocol data is transmitted and processed according to the order in which they arrive. The transmission data that arrives earliest will be processed first. However, different transmission data has different priorities and the transmission bandwidth is limited. If the data that arrives earliest is low-priority data, these data will be transmitted first. The high-priority data that arrives later needs to wait until the low-priority data that arrives first is transmitted before being transmitted. In this case, the high-priority data is delayed in transmission and processing, resulting in low efficiency of data processing. SUMMARY
[0004] The embodiments of the present application provide a data transmission method, device, equipment, computer storage medium and program product to solve the problem of low efficiency of data processing in the prior art.
[0005] In a first aspect, the embodiments of the present application provide a data processing method, which comprises:
[0006] acquiring transmission data, the transmission data being in an industrial Ethernet protocol format;
[0007] converting the transmission data into an industrial bus protocol format;
[0008] determining a data transmission set according to the data size of the transmission data, a preset execution priority and a transmission bandwidth size;
[0009] sending the transmission data in the data transmission set to a corresponding execution device.
[0010] In a second aspect, the embodiments of the present application provide a data processing device, which comprises:
[0011] an acquisition module configured to acquire transmission data, the transmission data being in an industrial Ethernet protocol format;
[0012] a conversion module configured to convert the transmission data into an industrial bus protocol format;
[0013] a determination module configured to determine a data transmission set according to the data size of the transmission data, a preset execution priority and a transmission bandwidth size;
[0014] The sending module is configured to send the transmission data in the data transmission set to a corresponding execution device.
[0015] In a third aspect, an embodiment of the present application provides a data processing system, which comprises:
[0016] The protocol conversion device is configured to acquire transmission data in an industrial Ethernet protocol format and convert the transmission data into an Ethernet protocol format and then transmit the transmission data to the scheduling device;
[0017] The scheduling device is configured to convert the received transmission data into an industrial bus protocol format, determine a data transmission set according to the data size of the transmission data, a preset execution priority, and a transmission bandwidth size, and send the transmission data in the data transmission set to a corresponding execution device.
[0018] The execution device is configured to receive and process the transmission data sent by the scheduling device.
[0019] In a fourth aspect, an embodiment of the present application provides a terminal device, which comprises a processor and a memory storing computer program instructions; and the processor implements the data transmission method of the first aspect when executing the computer program instructions.
[0020] In a fifth aspect, an embodiment of the present application provides a computer storage medium, which stores computer program instructions; and the computer program instructions are executed by a processor to implement the data transmission method of the first aspect.
[0021] In a sixth aspect, an embodiment of the present application provides a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform the data transmission method of the first aspect.
[0022] The embodiments of the present application provide a data transmission method, device, and equipment, and a computer storage medium and a program product. The method first acquires transmission data in an industrial Ethernet protocol format, so that multiple protocol data from different industrial devices can be received and converted into an industrial bus protocol to adapt to the needs of different execution devices and ensure that the data can be correctly and accurately transmitted to a target execution device. A transmission data set is determined according to the size of the transmission data, a preset execution priority, and a transmission bandwidth size; by comprehensively considering the data size, the priority, and the bandwidth, the order and the manner of data transmission can be optimized, and it is ensured that critical data is transmitted in priority. Finally, the transmission data in the transmission data set is sent to an execution device according to the transmission data set. By comprehensively considering the data size, the execution priority, and the bandwidth, the order of data transmission is optimized, it is ensured that the data can be transmitted to the execution device in time according to the priority for processing, the delay of critical operations is reduced, and the efficiency of system data processing is improved. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the data transmission system provided in an embodiment of this application;
[0025] Figure 2 This is a flowchart illustrating the data transmission method provided in an embodiment of this application;
[0026] Figure 3 This is a flowchart illustrating one implementation of obtaining a data transmission set according to an embodiment of this application;
[0027] Figure 4 This is a flowchart illustrating another implementation of obtaining a data transmission set provided in an embodiment of this application;
[0028] Figure 5 This is a flowchart illustrating one implementation of converting transmitted data into Ethernet protocol format according to an embodiment of this application.
[0029] Figure 6 This is a schematic diagram of the data packet structure provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of the data transmission device provided in the embodiments of this application;
[0031] Figure 8 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation
[0032] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0033] It is to be understood that the terminology "first" and "second", and the like, used herein is merely intended to differentiate one entity or operation from another, without necessarily requiring or implying any actual relationship or order between such entities or operations. Also, the use of terminology "comprises", "comprising", or any other forms of the expression "comprises" used herein is not intended to refer to a closed or exhaustive list, but to allow for the inclusion of additional elements, not expressly listed or inherent to such process, method, article, or apparatus. Without further limitations, the elements defined by the statement "comprises" do not exclude the presence of additional identical elements in the process, method, article, or apparatus including the elements defined by the statement "comprises".
[0034] The existing industrial network solution is a five-layer architecture, including two layers of enterprise-level platform and workshop-level platform, three layers of field network, including production line control network, device control network and physical device network. The three layers of field network have strict requirements on network performance, and custom industrial Ethernet / fieldbus protocol is used, so how to reasonably allocate resources and schedule communication requests of different protocols is a key problem. In the prior art, when transmitting data, the data is transmitted according to the receiving time, and the protocol data is transmitted and processed according to the order of arrival, and the transmission data arriving earliest will be processed first. However, an industrial network usually contains a large number of devices, sensors and control systems, and due to the existence of devices of different protocols and levels, different transmission data generated have different priorities and the transmission bandwidth is limited. If the data arriving earliest is low-priority data, these data will be transmitted first. The high-priority data arriving later needs to wait until the transmission of the low-priority data arriving earliest is completed before being transmitted, and the high-priority data is delayed in transmission and processing, resulting in low efficiency of data processing.
[0035] To solve the prior art, the embodiment of the application provides a data transmission method, device and equipment, computer storage medium and program product. The method first acquires transmission data in an industrial Ethernet protocol format, so that multiple protocol data from different industrial devices can be received and converted into an industrial bus protocol that can adapt to the requirements of different execution devices, ensuring that the data can be correctly and accurately transmitted to the target execution device. The transmission data set is determined according to the size of the transmission data, the preset execution priority and the transmission bandwidth size; by comprehensively considering the data size, priority and bandwidth, the order and mode of data transmission can be optimized, and the key data can be transmitted in priority. Finally, the transmission data in the transmission data set is sent to the execution device. By comprehensively considering the data size, execution priority and bandwidth factors, the order of data transmission is optimized, ensuring that the data can be transmitted to the execution device in time according to the priority for processing, reducing the delay of key operations and improving the efficiency of system data processing.
[0036] Firstly, the data transmission system provided by the embodiment of the application is introduced.
[0037] Figure 1 The structure schematic diagram of the data transmission system 100 provided by an embodiment of the application is shown. As shown in the figure, Figure 1 The system can include a protocol conversion device 110, a scheduling device 120 and an execution device 130.
[0038] The protocol conversion device 110 is used to acquire transmission data in an industrial Ethernet protocol format, and convert the transmission data into an Ethernet protocol format and then transmit it to the scheduling device; the scheduling device 120 includes a protocol identification module 121, a protocol conversion module 122 and a protocol scheduling module 123, the protocol identification module 121 is used to identify the protocol type of the received transmission data, the protocol conversion module 122 is used to convert the received transmission data into an industrial bus protocol format, and the protocol scheduling module 123 is used to determine the data transmission set according to the data size, the preset execution priority and the transmission bandwidth size of the transmission data, and send the transmission data in the data transmission set to the corresponding execution device; the execution device 130 is used to receive and process the transmission data sent by the scheduling device.
[0039] The data transmission method provided by the embodiment of the application is introduced.
[0040] Figure 2 The flowchart of the data transmission method provided by an embodiment of the application is shown. As shown in the figure, Figure 2 The method can include the following steps: S201 to S203.
[0041] S201, acquiring transmission data, the transmission data being in an industrial Ethernet protocol format.
[0042] The acquired transmission data is collected from different industrial control devices and needs to be transmitted, usually in the form of an industrial Ethernet protocol, for connecting industrial devices and systems.
[0043] The industrial Ethernet protocol is an industrial communication protocol based on Ethernet technology, used for connecting industrial devices and systems. Industrial Ethernet connects multiple devices through switches and other devices to realize communication and data exchange between devices.
[0044] In some embodiments, the transmission data is acquired through a device connection interface, such as a serial port, an Ethernet interface, or a sensor, etc.
[0045] The transmission data can also be acquired through wireless communication technology, such as Bluetooth, ZigBee protocol, or Long Range Wide Area Network (LoRaWAN).
[0046] In some embodiments, the industrial Ethernet protocol can include EtherNet / Industrial Protocol, Modbus Transmission Control Protocol (Modbus TCP), and PROFINET.
[0047] S202, convert the transmission data into an industrial bus protocol format.
[0048] In some embodiments, the data in the industrial Ethernet protocol format can be converted into data in the industrial bus protocol format using a protocol converter or preset rules.
[0049] The industrial bus protocol is a serial communication protocol used to connect and control devices in an industrial automation environment. The industrial bus uses a bus structure to connect multiple devices through a bus to realize communication and data exchange between devices.
[0050] In some embodiments, the industrial bus protocol can include Modbus Real-Time Under serial communication (Modbus RTU), PROcess FIeldBUS (PROFIBUS), and Controller Area Network (CAN).
[0051] The protocol data of different industrial devices can be converted into the industrial bus protocol, which can adapt to the needs of different execution devices, can uniformly process data from different sources, and does not need to configure a receiving and processing system for each protocol, thereby simplifying the complexity of the system and improving the flexibility and scalability of the system.
[0052] Since the industrial Ethernet protocol is used to connect industrial devices and systems, different industrial devices may support different industrial Ethernet protocols, and therefore it is necessary to convert the industrial Ethernet protocol format into the industrial bus protocol so that data can be transmitted in different industrial devices and systems.
[0053] S203, determining a data transmission set according to the data size of the transmission data, the preset execution priority and the transmission bandwidth size.
[0054] In some embodiments, the preset execution priority can be preset in the transmission data, and obtained through the data content of the transmission data.
[0055] In the industrial control network, different devices have different data transmission needs, and the transmission bandwidth of the network is limited. According to the size of the data, the preset execution priority and the available transmission bandwidth, it is determined which data should be transmitted first, which optimizes the use of network resources and ensures that critical task data can be transmitted in time.
[0056] S204, sending the transmission data in the data transmission set to the corresponding execution device.
[0057] The data in the data transmission set that has been determined is sent to the corresponding execution device, so that the corresponding execution device performs the corresponding operation.
[0058] It is ensured that data with higher priority can be transmitted and processed first, thereby improving the efficiency of data processing.
[0059] The transmission data is obtained, and the transmission data is in the industrial Ethernet protocol format; so that multiple protocol data from different industrial devices can be received and converted into the industrial bus protocol, which can adapt to the needs of different execution devices and ensure that data can be correctly and accurately transmitted to the target execution device. The transmission data set is determined according to the size of the transmission data, the preset execution priority and the transmission bandwidth size; by comprehensively considering the data size, priority and bandwidth, the order and mode of data transmission can be optimized, and it is ensured that critical data is transmitted first. Finally, the transmission data in the transmission data set is sent to the execution device according to the transmission data set. By comprehensively considering the data size, execution priority and bandwidth factors, the order of data transmission is optimized, it is ensured that data can be transmitted to the execution device in time according to the priority, the delay of critical operation is reduced, and the efficiency of system data processing is improved.
[0060] In some embodiments, asFigure 3 As shown, determining the data transmission set according to the data size of the transmission data, the preset execution priority and the transmission bandwidth size can include S301 and S302.
[0061] S301, in the case where the preset execution priorities of the transmission data are different, sorting the transmission data according to the preset execution priorities;
[0062] S302, selecting the transmission data in the sorted order to join the preset set in sequence to obtain the data transmission set, and the total data size of the transmission data in the data transmission aggregation does not exceed the transmission bandwidth size.
[0063] By sorting the transmission data according to the preset execution priority and selecting the transmission data to join the preset set in sequence according to the transmission bandwidth size limit, it can be ensured that the high-priority data is transmitted in priority under the premise that the total data size of the transmission data does not exceed the transmission bandwidth size, and the order of data transmission is optimized, thereby improving the response speed of the system to critical data.
[0064] In some embodiments, as shown, Figure 4 determining the data transmission set according to the data size of the transmission data, the preset execution priority and the transmission bandwidth size can include S401 to S403.
[0065] S401, in the case where the preset execution priorities of the transmission data are the same, determining the total data size of the transmission data according to the data size of the transmission data;
[0066] S402, establishing a target optimization model with the maximum total data size as the objective function;
[0067] S403, solving the target optimization model with the transmission bandwidth size as the constraint condition to obtain the data transmission set.
[0068] By establishing an optimization model with the maximum total data size as the objective and solving the model with the transmission bandwidth size as the constraint condition, it can be ensured that as much data as possible is transmitted under the premise of meeting the bandwidth constraint, which helps to improve the efficiency of data transmission; and with the transmission bandwidth size as the constraint condition, the data transmission set can be dynamically adjusted to adapt to changing network conditions and optimize data transmission according to real-time bandwidth availability.
[0069] The data transmission set determination method of the preset execution priority different transmission data and the preset execution priority same transmission data can be used in combination. For example, when the preset execution priority different transmission data and the preset execution priority same transmission data exist simultaneously, first, the preset execution priority is sorted, and the preset set is sequentially added according to the priority order; when the transmission data corresponding to a preset execution priority of a certain level cannot be simultaneously added to the preset set, a target optimization function is established and solved, and part of the transmission data corresponding to the preset execution priority of the certain level is selected to be added to the preset set, to obtain the data transmission set.
[0070] In some embodiments, the formula of the data transmission set can be expressed as:
[0071]
[0072] wherein n is the number of transmission data, p i is the preset execution priority of the i th transmission data, w i is the data packet size of the i th transmission data, x i is whether the i th transmission data is selected, and takes the value of 0 or 1, 0 representing that the transmission data is not selected, and 1 representing that the transmission data is selected.
[0073] The formula of the constraint condition can be expressed as:
[0074]
[0075] wherein c is the transmission bandwidth size.
[0076] In some embodiments, the target optimization model is solved with the transmission bandwidth size as the constraint condition, and the branch and bound method, the Lagrange multiplier method, the dynamic programming method, etc. can be used to solve the target optimization model.
[0077] In some embodiments, the target optimization model is solved with the transmission bandwidth size as the constraint condition, to obtain the data transmission set, which can include:
[0078] Selecting any transmission data to create two branch nodes, wherein the two branch nodes are the selected transmission data and the unselected transmission data, respectively;
[0079] Repeating the establishment of the branch nodes of the remaining transmission data under the branch nodes, and removing the branch when the total data size of the transmission data in the branch exceeds the transmission bandwidth size;
[0080] Selecting the transmission data with the largest total data size in the branch to be added to the preset set, to obtain the data transmission set.
[0081] By creating branch nodes for each transmission data, all possible data transmission combinations are simulated, while removing the branch when the total size of transmission data in the branch exceeds the transmission bandwidth, avoiding evaluating all data combinations, which can effectively reduce the waste of computing resources; Finally, the transmission data with the largest total data size in the branch is selected to join the preset set, ensuring that as much data as possible is transmitted under the bandwidth limit.
[0082] In one example, when there are three transmission data with the same preset execution priority, first select any transmission data as the first target data, and establish a branch node that selects the first target data and does not select the second target data; select any data from the remaining two transmission data as the second target data, and establish four branch nodes that select the second target data and do not select the second target data under the branch node that selects the first target data and does not select the second target data; determine whether the total data size of the selected transmission data in each branch exceeds the transmission bandwidth size, and delete the branch if it exceeds the transmission bandwidth size; select the remaining transmission data as the third target data, and establish branch nodes that select the third target data and do not select the third target data under the remaining branch nodes; determine whether the total data size of the selected transmission data in each branch exceeds the transmission bandwidth size, and delete the branch if it exceeds the transmission bandwidth size; finally, select all transmission data selected by the branch with the largest total data size of transmission data to join the preset set as the data transmission set.
[0083] In some embodiments, after repeatedly establishing branch nodes for the remaining transmission data under the branch node and removing the branch when the total data size of the transmission data in the branch exceeds the transmission bandwidth size, the method can further include:
[0084] Selecting all transmission data selected by the branch with a difference between the total data size and the transmission bandwidth size less than a set threshold to join the preset set as the data transmission set.
[0085] When creating branch nodes, only branches with a difference between the total data size and the transmission bandwidth size less than a set threshold are selected, and when the size of the transmission bandwidth used meets the set threshold, the data transmission set is generated, reducing the traversal of all transmission data and improving transmission efficiency.
[0086] In some embodiments, converting the transmission data into an industrial bus protocol format can include:
[0087] Converting the transmission data in the industrial Ethernet protocol format into an Ethernet protocol format;
[0088] Converting the transmission data in the Ethernet protocol format into an industrial bus protocol format.
[0089] By converting data from the industrial Ethernet protocol format to a common Ethernet protocol format, compatibility with a wider range of network devices can be achieved, enabling data transmission between different devices; converting data to a specific industrial bus protocol format facilitates tighter integration and communication with industrial equipment and systems.
[0090] In some embodiments, such as Figure 5 As shown, converting transmission data in the industrial Ethernet protocol format to the Ethernet protocol format can include S501 and S502.
[0091] S501 parses the transmitted data according to the Industrial Ethernet protocol to obtain the structure and corresponding fields of the transmitted data;
[0092] S502 maps the structure and fields of the transmitted data to the structure and fields of the Ethernet protocol format according to the Ethernet protocol format and adds the Ethernet protocol header to obtain the transmitted data in the Ethernet protocol format.
[0093] By parsing transmitted data according to the Industrial Ethernet protocol, the structure and fields of the data can be accurately identified, which helps to ensure the integrity and accuracy of the data during the conversion process; mapping the structure and fields of Industrial Ethernet protocol format data to Ethernet protocol format ensures the consistency and compatibility of data between Industrial Ethernet protocol and Ethernet protocol.
[0094] During the parsing process according to the Industrial Ethernet protocol, a predefined protocol feature library is used for matching. By comparing data features with known protocol features, the data can be classified and its corresponding Industrial Ethernet protocol can be determined.
[0095] In some embodiments, data is transmitted in the form of data packets, such as... Figure 6 As shown, the packet format can include a header and a data portion. The header consists of a fixed portion and a variable portion. The fixed portion includes the version, header length, differentiated services, total length, identifier, flags, fragment offset, time to live, protocol, header checksum, source address, and destination address. The variable portion includes optional fields of variable length and padding data.
[0096] Wherein, the version indicates the version of the data packet format, used to indicate the protocol version used by the data packet; the header length indicates the total length of the header, including the fixed part and the variable part; the differentiated service is used to provide the differentiation of the quality of service (QoS), allowing the network to provide different levels of service according to the field of the data packet; the total length indicates the length of the entire data packet, including the header and the data part; the identification is a unique identifier, used to identify each piece of data sent; the flag is used to control and identify the specific functions of the data packet, such as whether to allow segmentation, etc.; the fragment offset is used to indicate the position of the current fragment in the original data when the data packet is transmitted by fragmentation; the time to live indicates the maximum number of routers that the data packet can pass through in the network. Every time a router is passed, the value is reduced by 1, and when it is 0, the data packet is discarded; the protocol indicates the type of upper layer protocol carried by the data packet; the header checksum is used to check the header, to detect whether an error occurs in the header during transmission; the source address indicates the network address of the device sending the data packet, and the destination address indicates the network address of the device receiving the data packet.
[0097] The optional field contains some additional, optionally required header fields, used to support specific network functions, such as security parameters, routing options, etc.; some padding bytes are added at the end of the header to ensure that the length of the header is a multiple of 32 bits.
[0098] In some embodiments, before obtaining the transmission data in the Ethernet protocol format, the method further comprises:
[0099] Adding a transmission control information field in the transmission data.
[0100] The transmission control information can include data priority, flow control information, security control information, transmission timestamp, and data packet sequence number, etc., and the security control information can include an encryption key or an authentication mark.
[0101] The transmission control information field contains important control information, and by adding the transmission control information field, the data transmission process can be more accurately controlled, which helps to ensure the reliability of the data during transmission.
[0102] In some embodiments, before obtaining the transmission data in the Ethernet protocol format, the method further comprises:
[0103] Adding a check field in the transmission data.
[0104] By adding a check field in the transmission data, it can be verified whether the received data is consistent with the data from the sending end, so as to check whether an error occurs in the data transmission process, which can significantly reduce the error rate in data transmission and improve the accuracy of data transmission.
[0105] In some embodiments, the transmission data in the Ethernet protocol format is converted into the industrial bus protocol format, including:
[0106] The transmission data is parsed according to the Ethernet protocol format to obtain the structure and corresponding fields of the transmission data;
[0107] According to the industrial bus protocol format, the structure and fields of the transmission data are mapped to the structure and fields of the industrial bus protocol format and an industrial bus protocol header is added to obtain the transmission data in the industrial bus protocol format.
[0108] By parsing the transmission data according to the Ethernet protocol, the structure and fields of the data in the Ethernet protocol format can be accurately identified, which helps to ensure the integrity and accuracy of the data in the conversion process; mapping the structure and fields of the data in the Ethernet protocol format to the industrial bus protocol format ensures the consistency and compatibility of the data between the Ethernet protocol and the industrial bus protocol.
[0109] Figure 7 A data transmission device 700 provided by an embodiment of the application is shown, which can include:
[0110] The acquisition module 701 is configured to acquire transmission data, the transmission data being in an industrial Ethernet protocol format;
[0111] The conversion module 702 is configured to convert the transmission data into an industrial bus protocol format;
[0112] The determination module 703 is configured to determine a data transmission set according to the data size of the transmission data, a preset execution priority, and a transmission bandwidth size;
[0113] The sending module 704 is configured to send the transmission data in the data transmission set to a corresponding execution device.
[0114] In some embodiments, the data transmission device 700 can further include:
[0115] The sorting module is configured to sort the transmission data according to the preset execution priority in a case where the preset execution priorities of the transmission data are different;
[0116] The selection module is configured to select the transmission data in sequence according to the sorting order to add the transmission data to a preset set to obtain the data transmission set, the total data size of the transmission data in the data transmission set being less than the transmission bandwidth size.
[0117] In some embodiments, the data transmission device 700 can further include:
[0118] The determination module 703 is further configured to determine the total data size of the transmission data according to the data size of the transmission data in a case where the preset execution priorities of the transmission data are the same;
[0119] The establishing module is configured to establish a target optimization model with a total data size maximum as an objective function;
[0120] The solving module is configured to solve the target optimization model with a transmission bandwidth size as a constraint condition to obtain a data transmission set.
[0121] In some embodiments, the data transmission device 700 can further include:
[0122] The establishing module is further configured to select any transmission data to create two branch nodes, where the two branch nodes are selected transmission data and non-selected transmission data, respectively.
[0123] The establishing module is further configured to repeatedly establish branch nodes of the remaining transmission data in sequence under the branch nodes, and remove the branch when the total data size of the transmission data in the branch exceeds the transmission bandwidth size.
[0124] The selecting module is further configured to select transmission data with the largest total data size in the branch to join a preset set to obtain the data transmission set.
[0125] In some embodiments, the conversion module 702 is further configured to convert the transmission data in the industrial Ethernet protocol format into the Ethernet protocol format.
[0126] The conversion module 702 is further configured to convert the transmission data in the Ethernet protocol format into the industrial bus protocol format.
[0127] In some embodiments, the data transmission device 700 can further include:
[0128] The parsing module is configured to parse the transmission data according to the industrial Ethernet protocol to obtain the structure and corresponding fields of the transmission data.
[0129] The mapping module is configured to map the structure and fields of the transmission data to the structure and fields of the Ethernet protocol format and add an Ethernet protocol header according to the Ethernet protocol format, to obtain the transmission data in the Ethernet protocol format.
[0130] In some embodiments, the data transmission device 700 can further include:
[0131] The adding module is configured to add a transmission control information field in the transmission data.
[0132] In some embodiments, the adding module is further configured to add a check field in the transmission data.
[0133] In some embodiments, the parsing module is further configured to parse the transmission data according to the Ethernet protocol format to obtain the structure and corresponding fields of the transmission data.
[0134] The mapping module is further configured to map the structure and fields of the transmission data to the structure and fields of the industrial bus protocol format and add an industrial bus protocol header according to the industrial bus protocol format, to obtain the transmission data in the industrial bus protocol format.
[0135] Figure 7 Each module in the apparatus shown can implement Figure 2 each step in the method and achieve the corresponding technical effects, which will not be described in detail here for brevity.
[0136] Figure 8 A hardware structure schematic diagram of a terminal device provided by an embodiment of the present application is shown.
[0137] The terminal device can include a processor 801 and a memory 802 storing computer program instructions.
[0138] Specifically, the processor 801 described above can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement one or more embodiments of the present application.
[0139] The memory 802 can include a mass storage for data or instructions. By way of example and not limitation, the memory 802 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 802 can include a removable or non-removable (or fixed) medium, or the memory 802 is a non-volatile solid state memory. The memory 802 can be internal or external to the integrated gateway disaster recovery device.
[0140] In one example, the memory 802 can include read-only memory (ROM), random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions that, when executed (e.g., by one or more processors), are operable to perform operations described with reference to the data transmission method according to the present disclosure.
[0141] The processor 801 implements the above-mentioned Figure 2The data transmission method in the illustrated embodiment.
[0142] In one example, the terminal device can further include a communication interface 803 and a bus 804. Wherein, as shown, the processor 801, the memory 802, the communication interface 803 are connected through the bus 804 and complete the communication between each other. Figure 8 As shown, the processor 801, the memory 802, the communication interface 803 are connected through the bus 804 and complete the communication between each other.
[0143] The communication interface 803 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0144] The bus 804 includes hardware, software or both, which couples the components of the terminal device to each other. By way of example and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or other suitable bus or combination of two or more of these. Where appropriate, the bus 804 can include one or more buses. Although specific buses are described and illustrated in the embodiments of the present application, the present application contemplates any suitable bus or interconnect.
[0145] In addition, in combination with the data transmission method in the above-mentioned embodiments, the embodiments of the present application can provide a computer storage medium to implement. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by the processor to implement any one of the data transmission methods in the above-mentioned embodiments.
[0146] The embodiments of the present application also provide a computer program product, including a computer program, the computer program is executed by the processor to implement any one of the data transmission methods in the above-mentioned embodiments.
[0147] It is to be understood that the application is not limited to particular configurations and processes described herein and shown in the drawings. For simplicity, detailed descriptions of known methods and apparatuses are omitted so as not to obscure the disclosure. In the above-described embodiments, several specific steps are described as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated herein, but can include any number of additional steps or changes to the described steps, or can be performed in any order, or in parallel, depending on the circumstances.
[0148] The functional blocks shown in the above-described block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, and the like. When implemented in software, the elements of the present application are program or text segments used to perform the required tasks. The program or text segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link as a data signal carried by a carrier wave. A "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact discs (CD-ROM), optical disks, hard disks, optical fiber media, radio frequency (RF) links, and the like. The text segments can be downloaded via a computer network such as the Internet, an intranet, or the like.
[0149] It is also to be understood that the exemplary embodiments described in this application are based on a series of steps or apparatuses to describe some methods or systems. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from that in the embodiments, or several steps can be performed simultaneously.
[0150] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0151] The above only is a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.
Claims
1. A data transmission method, characterized by, The method comprises the following steps: acquiring transmission data in an industrial Ethernet protocol format; converting the transmission data into an industrial bus protocol format; determining a data transmission set according to the data size of the transmission data, a preset execution priority, and a transmission bandwidth size; sending the transmission data in the data transmission set to corresponding execution devices; the step of determining the data transmission set according to the data size of the transmission data, the preset execution priority, and the transmission bandwidth size comprises the following steps: when the preset execution priorities of the transmission data are the same, determining the total data size of the transmission data according to the data size of the transmission data; establishing a target optimization model with the maximum total data size as a target function; solving the target optimization model with the transmission bandwidth size as a constraint condition to obtain the data transmission set; the step of solving the target optimization model with the transmission bandwidth size as a constraint condition to obtain the data transmission set comprises the following steps: selecting an arbitrary transmission data to create two branch nodes, wherein the two branch nodes are respectively selecting the transmission data and not selecting the transmission data; repeatedly establishing branch nodes of the remaining transmission data under the branch nodes, and removing the branch when the total data size of the transmission data of the branch exceeds the transmission bandwidth size; selecting the transmission data with the maximum total data size in the branch to join a preset set to obtain the data transmission set.
2. The data transmission method of claim 1, wherein, the step of determining the data transmission set according to the data size of the transmission data, the preset execution priority, and the transmission bandwidth size comprises the following steps: when the preset execution priorities of the transmission data are different, sorting the transmission data according to the preset execution priorities; selecting the transmission data in a preset set in sequence according to the sorting order to obtain the data transmission set, wherein the total data size of the transmission data in the data transmission set does not exceed the transmission bandwidth size.
3. The data transmission method of claim 1, wherein, the step of converting the transmission data into an industrial bus protocol format comprises the following steps: converting the transmission data in the industrial Ethernet protocol format into an Ethernet protocol format; converting the transmission data in the Ethernet protocol format into an industrial bus protocol format.
4. The data transmission method of claim 3, wherein, the step of converting the transmission data in the industrial Ethernet protocol format into an Ethernet protocol format comprises the following steps: analyzing the transmission data according to the industrial Ethernet protocol to obtain the structure and corresponding fields of the transmission data; mapping the structure and fields of the transmission data to the structure and fields of the Ethernet protocol format and adding an Ethernet protocol header according to the Ethernet protocol format to obtain the transmission data in the Ethernet protocol format.
5. The data transmission method of claim 4, wherein, before obtaining the transmission data in the Ethernet protocol format, the method further comprises the following step: adding a transmission control information field in the transmission data.
6. The data transmission method of claim 4, wherein, before obtaining the transmission data in the Ethernet protocol format, the method further comprises the following step: adding a check field in the transmission data.
7. The data transmission method of claim 3, wherein, the step of converting the transmission data in the Ethernet protocol format into an industrial bus protocol format comprises the following steps: analyzing the transmission data according to the Ethernet protocol format to obtain the structure and corresponding fields of the transmission data; Map the structure and fields of the transmission data to the structure and fields of the industrial bus protocol format and add an industrial bus protocol header according to the industrial bus protocol format to obtain transmission data in the industrial bus protocol format.
8. A data transmission apparatus, characterized by comprising: The device comprises: an acquisition module configured to acquire transmission data in an industrial Ethernet protocol format; a conversion module configured to convert the transmission data into an industrial bus protocol format; a determination module configured to determine a data transmission set according to the data size of the transmission data, a preset execution priority, and a transmission bandwidth size; a sending module configured to send transmission data in the data transmission set to a corresponding execution device; the determination of the data transmission set according to the data size of the transmission data, the preset execution priority, and the transmission bandwidth size comprises: determining the total data size of the transmission data according to the data size of the transmission data when the preset execution priority of the transmission data is the same; establishing a target optimization model with the maximum total data size as a target function; solving the target optimization model with the transmission bandwidth size as a constraint condition to obtain the data transmission set; the solving of the target optimization model with the transmission bandwidth size as a constraint condition to obtain the data transmission set comprises: selecting any transmission data to create two branch nodes, wherein the two branch nodes are to select the transmission data and not to select the transmission data, respectively; repeatedly establishing branch nodes of the remaining transmission data under the branch nodes, and removing a branch when the total data size of the transmission data of the branch exceeds the transmission bandwidth size; selecting transmission data with the maximum total data size in the branch to join a preset set to obtain the data transmission set.
9. A data transmission system, characterized in that The system comprises: a protocol conversion device configured to acquire transmission data in an industrial Ethernet protocol format and convert the transmission data into an Ethernet protocol format before transmitting the transmission data to a scheduling device; a scheduling device configured to convert received transmission data into an industrial bus protocol format, determine a data transmission set according to the data size of the transmission data, a preset execution priority, and a transmission bandwidth size, and send transmission data in the data transmission set to a corresponding execution device; an execution device configured to receive and process transmission data sent by the scheduling device; the determination of the data transmission set according to the data size of the transmission data, the preset execution priority, and the transmission bandwidth size comprises: determining the total data size of the transmission data according to the data size of the transmission data when the preset execution priority of the transmission data is the same; establishing a target optimization model with the maximum total data size as a target function; solving the target optimization model with the transmission bandwidth size as a constraint condition to obtain the data transmission set; the solving of the target optimization model with the transmission bandwidth size as a constraint condition to obtain the data transmission set comprises: selecting any transmission data to create two branch nodes, wherein the two branch nodes are to select the transmission data and not to select the transmission data, respectively; The branch nodes for sequentially establishing the rest of the transmission data are repeated under the branch node, and the branch is removed when the total data size of the transmission data of the branch exceeds the transmission bandwidth size; The transmission data with the largest total data size of the transmission data in the branch is selected to join a preset set to obtain a data transmission set.
10. A terminal device, comprising: The device comprises a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the data transmission method of any one of claims 1-7.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the data transmission method of any one of claims 1-7.
12. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device to enable the electronic device to execute the data transmission method of any one of claims 1-7.
Citation Information
Patent Citations
Priority strategy-based signal routing conversion method and device
CN110891023A
Ethernet and controller area network protocol interconversion for in-vehicle networks
CN113302885A