Data transmission method and device, storage medium and computer equipment

By analyzing and mapping the frame identification and priority fields of protocol messages, compatibility with multiple industrial network protocols is achieved, solving the compatibility problem that existing devices can only support a single protocol, and improving the flexibility and efficiency of data transmission.

CN119922252AActive Publication Date: 2025-05-02PENG CHENG LAB
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510423291.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-05-02
Estimated Expiration
2045-04-07

AI Technical Summary

Technical Problem

Existing industrial network protocol conversion equipment can only support a single industrial network protocol and cannot achieve compatibility of multiple industrial network protocols, resulting in compatibility issues in data transmission.

Method used

By receiving the protocol message to be transmitted, it is parsed to obtain the target frame identifier, the message type is determined based on the preset mapping relationship between the frame identifier and the message type, and the priority field is determined based on the mapping relationship between the message type and the priority field, the message format conversion and priority writing are performed, and the target protocol message is finally transmitted to the designated storage area and scheduled to the corresponding transmission queue.

Benefits of technology

The identification and processing of messages from different industrial network protocols without using dedicated protocol conversion devices, improving the system's compatibility and adaptability to multiple protocols and reducing equipment costs and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922252A_ABST
    Figure CN119922252A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, a storage medium and computer equipment, and the method comprises the steps: receiving a to-be-transmitted protocol message, analyzing the protocol message, and obtaining a target frame identifier of the protocol message; determining a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; determining a first priority field corresponding to the first message type according to a second preset mapping relationship between the message type and the priority field; converting the message format of the protocol message into a specified message format, and writing the first preceding-level field to obtain a target protocol message; transmitting the target protocol message to a specified storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to a first priority field included in the target protocol message, and identifying a first message type of the protocol message through a target frame identifier analyzed from the protocol message, a protocol conversion device does not need to be used, so that compatibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of industry, the integration and intelligence of smart factories are becoming higher and higher, which puts forward higher requirements for the real-time and deterministic transmission of information. Intelligent industrial communication networks include both deterministic low-latency information and non-real-time control information transmission, one real-time Ethernet and one standard Ethernet. General real-time networks are used for machine and system control, while standard networks are used for the transmission of management-level information. With the continuous improvement of the underlying interoperability standards and specifications of industrial application networks, it is becoming more and more urgent to realize the transmission of information technology (IT) and operational technology (OT) data in the same network and schedule different industrial protocol priorities according to application scenarios.

[0003] In related technologies, in industrial scenarios, programmable logic controller modules (PLC) with different protocols are usually integrated based on the application scenarios and the characteristics of each equipment manufacturer. The multi-industrial network protocol co-network transmission system includes a variety of industrial control devices and protocol exchange modules. Existing protocol conversion devices often use dedicated hardware or software and hardware to achieve protocol conversion and then co-network fusion transmission, but dedicated equipment only supports a single industrial network protocol and cannot achieve compatibility with multiple industrial network protocols. Therefore, related technologies urgently need to propose a data transmission method to solve the above technical problems. Summary of the invention

[0004] The main purpose of the present application is to provide a data transmission method, apparatus, storage medium and computer equipment, which can effectively determine the quality score of each data source and classify the same data from different data sources, so as to classify and evaluate the classified data by the quality score of each data source, so as to provide a reliability assessment of the data.

[0005] In a first aspect, an embodiment of the present application provides a data transmission method, including: Receiving a protocol message to be transmitted, parsing the protocol message, and obtaining a target frame identifier of the protocol message; Determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; Determine, according to a second preset mapping relationship between message type and priority field, a first priority field corresponding to the first message type; Convert the message format of the protocol message into a specified message format, and write the first priority field into the target protocol message; The target protocol message is transmitted to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

[0006] In a second aspect, an embodiment of the present application provides a data transmission device, including: A parsing unit, used for receiving a protocol message to be transmitted, parsing the protocol message, and obtaining a target frame identifier of the protocol message; A first determining unit, configured to determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; A second determining unit, configured to determine a first priority field corresponding to the first message type according to a second preset mapping relationship between the message type and the priority field; A writing unit, used for converting the message format of the protocol message into a specified message format, and writing the first priority field to obtain a target protocol message; A transmission unit is used to transmit the target protocol message to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

[0007] In a third aspect, an embodiment of the present application provides a storage medium, wherein the computer-readable storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute any of the above data transmission methods.

[0008] In a fourth aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above data transmission methods when executing the computer program.

[0009] In an embodiment of the present application, a protocol message to be transmitted is received, the protocol message is parsed, and a target frame identifier of the protocol message is obtained; based on a first preset mapping relationship between a frame identifier and a message type, a first message type corresponding to the target frame identifier is determined; according to a second preset mapping relationship between a message type and a priority field, a first priority field corresponding to the first message type is determined; the message format of the protocol message is converted into a specified message format, and the first priority field is written to obtain a target protocol message; the target protocol message is transmitted to a specified storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message. Compared with the related art, in which data of each industrial network protocol needs to be converted by a special protocol conversion device before it can be transmitted, the embodiment of the present application identifies the first message type of the protocol message by parsing the target frame identifier of the protocol message, so that the first message type corresponding to different protocol messages can be known, and the protocol message of the corresponding message type can be identified by replacing the protocol conversion device, without using the protocol conversion device, so as to improve compatibility.

[0010] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 A schematic diagram of a data transmission system according to an embodiment of the present application.

[0013] Figure 2 A flowchart of a data transmission method provided in an embodiment of the present application.

[0014] Figure 3 A schematic diagram of the domain segment composition of the open real-time Ethernet communication protocol provided in an embodiment of the present application.

[0015] Figure 4 A schematic diagram of the industrial network co-location and fusion scheduling framework provided in an embodiment of the present application.

[0016] Figure 5A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application.

[0017] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. 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 those skilled in the art without creative work are within the scope of protection of the present application.

[0019] It should be noted that in some processes described in the specification, claims and the above-mentioned drawings, multiple steps appearing in a specific order are included, but it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, descriptions such as "first", "second" or "target" in this document are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0020] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations: Time-sensitive networking (TSN) is a series of Ethernet standard protocols developed by the IEEE 802.1 standard working group. It is used to address the shortcomings of traditional Ethernet in real-time, deterministic and reliability, and ensure that time-sensitive traffic is transmitted in the network with low latency and predictability. It is widely used in industrial automation, automotive, aerospace and other fields.

[0021] The key technologies and mechanisms are: 1. Time synchronization: Through the Precision Time Protocol (PTP), devices in the network can synchronize their clocks to sub-microsecond accuracy. The master clock periodically broadcasts time information, and the slave clock adjusts its own time after receiving it, ensuring that the time of each device in the network is consistent, laying the foundation for real-time communication.

[0022] 2. Priority scheduling: With the help of the priority code point (PCP) in the virtual local area network (VLAN) tag, TSN can divide traffic into 8 priorities. Mission-critical traffic is given high priority and is transmitted through the network first to avoid being blocked by low-priority traffic, ensuring that important data is processed in a timely manner.

[0023] 3. Traffic shaping and reservation: The time-aware shaper (TAS) schedules traffic according to the preset time window, plans bandwidth resources in advance, prevents traffic conflicts, and ensures that key traffic is transmitted on time. The gated list (GCL) controls the opening and closing of ports according to the schedule, limits the traffic within a specific time, and improves network determinism.

[0024] 4. Frame preemption: Under the premise of not discarding data, high-priority frames are allowed to interrupt the transmission of low-priority frames. After the high-priority frame is transmitted, the low-priority frame continues to be transmitted, reducing the waiting time of the high-priority frame and improving the overall transmission efficiency.

[0025] A network protocol is a set of rules, standards, and conventions that must be followed when devices in a network communicate. It specifies the data format, transmission order, error handling method, etc., to ensure that different devices can exchange information accurately and efficiently.

[0026] Frame ID, or frame identifier, is a number or mark used to identify a specific data frame in computer networks, communication protocols, and some data transmission or storage systems. In TSN networks, in order to achieve accurate time synchronization and traffic scheduling, each data frame will also have a corresponding Frame ID. It can be used to classify and mark different data streams in the network, combined with TSN's time-aware scheduling mechanism, to ensure that key data frames can be accurately transmitted within the specified time, meeting the needs of time-sensitive application scenarios such as industrial automation and vehicle networks.

[0027] Traffic Manager (TM), also known as message scheduler, is a key component used to manage and control network traffic in network systems or related devices. The TM module can classify and mark different types of traffic and provide different levels of quality of service (QoS) guarantees. It can allocate corresponding resources and priorities to traffic based on application requirements, such as real-time, bandwidth requirements, delay tolerance, etc.

[0028] For example, for applications with high real-time requirements such as voice and video calls, the TM module will ensure that they have sufficient bandwidth and low latency to ensure call quality; while for applications with lower real-time requirements such as email and file transfer, the remaining bandwidth resources can be reasonably allocated while ensuring key services.

[0029] In industrial scenarios, programmable logic controller (PLC) modules with different protocols are usually integrated based on the application scenarios and the characteristics of each equipment manufacturer. The multi-industrial network protocol co-network transmission system includes a variety of industrial control devices and protocol exchange modules. Existing protocol conversion devices often use dedicated hardware or software and hardware to achieve protocol conversion and then co-network fusion transmission, but dedicated devices only support a single industrial network protocol and cannot achieve compatibility with multiple industrial network protocols.

[0030] For example, only the dedicated protocol conversion device can identify the message of the open real-time Ethernet communication protocol (Profinet protocol) used in the field of industrial automation as the Profinet protocol, and then perform protocol conversion; only the dedicated protocol conversion device can identify the message of Ethernet control automation technology (EtherCAT protocol) as the Profinet protocol, and then perform protocol conversion. However, the protocol conversion device of the message of the EtherCAT protocol cannot identify the message of the Profinet protocol, and then perform protocol conversion. That is, only when the specific protocol type of the message can be identified, can the subsequent transmission process be carried out.

[0031] In order to solve the above problems, the embodiment of the present application receives the protocol message to be transmitted, parses the protocol message, and obtains the target frame identifier of the protocol message; based on the first preset mapping relationship between the frame identifier and the message type, determines the first message type corresponding to the target frame identifier; according to the second preset mapping relationship between the message type and the priority field, determines the first priority field corresponding to the first message type; converts the message format of the protocol message into a specified message format, and writes the first priority field to obtain the target protocol message; transmits the target protocol message to a specified storage area, so that the message scheduler schedules the target protocol message to the corresponding transmission queue according to the first priority field included in the target protocol message. Compared with the related art, each industrial network protocol data needs to be converted by a special protocol conversion device before it can be transmitted. In this embodiment of the present application, the target frame identifier obtained by parsing the protocol message is used to identify the first message type of the protocol message, so that the first message type corresponding to different protocol messages can be known, and the protocol conversion device can be used to identify the protocol message of the corresponding message type, without using the protocol conversion device, so as to improve compatibility. Please continue to refer to the following specific embodiments for details.

[0032] See also Figure 1 , Figure 1A schematic diagram of a data transmission system provided in an embodiment of the present application, which includes a terminal 140, the Internet 130, a switch 120, a control device 110, etc.

[0033] The terminal 140 includes but is not limited to a pre-configured sensor or an electronic device with data reporting capability such as a desktop computer. In addition, it can be a single device or a collection of multiple devices. The terminal 140 can communicate with the Internet 130 in a wired or wireless manner to exchange data.

[0034] Terminal 140 includes but is not limited to pre-configured industrial robotic arms, welding robots, sensors, etc.

[0035] Switch 120 A switch is a network device used for forwarding electrical (optical) signals, and it plays a vital role in network communications. The switch establishes and maintains a MAC address table by checking the source MAC address and receiving port in the received data frame. For example, when a computer A is connected to a port of the switch and sends data, the switch will record the correspondence between the MAC address of computer A and the port. When the switch receives a data frame, it checks the destination MAC address in the data frame and searches for the corresponding port in the MAC address table. If a match is found, the data frame is forwarded from the corresponding port; if not found, the switch usually uses a broadcast method to send the data frame from all other ports except the receiving port to find the destination device. The message sent by the terminal 140 to the control device 110 is sent to the corresponding control device 110 through the switch 120. The message sent by the control device 110 to the terminal 140 is also sent to the corresponding terminal 140 through the switch 120.

[0036] The data transmission method according to the embodiment of the present disclosure may be implemented in the switch 120 .

[0037] It should be noted that Figure 1 The scenario diagram of the data transmission system shown is merely an example. The data transmission system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of image processing technology and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0038] In this embodiment, the description will be made from the perspective of a data transmission device, which can be specifically integrated in a computer device having a storage unit and a microprocessor installed therein and having computing capabilities.

[0039] See also Figure 2 , Figure 2 A flow chart of a data transmission method provided in an embodiment of the present application. The data transmission method includes: In step 201, a protocol message to be transmitted is received, the protocol message is parsed, and a target frame identifier of the protocol message is obtained.

[0040] Among them, the protocol message is a data unit encapsulated in a specific network protocol format in network communication, which contains the information that the sender wants to pass to the receiver, as well as some control information used for network transmission and processing, such as source address, destination address, data content, etc. Different network protocols have different message formats and contents. The target frame identifier is a number or mark set to uniquely identify a protocol message. In network communication, this identifier can be used to distinguish different messages, making it easier to manage, track and process messages.

[0041] Specifically, the switch receives a protocol message from other devices through a network interface, and after receiving the message, parses the message according to the message format specification of the protocol, and extracts a target frame identifier for identifying the message from the message.

[0042] For example, in some industrial protocol messages, the target frame identifier may be located in a specific field in the message header, and the target frame identifier can be obtained by parsing the field.

[0043] By parsing and obtaining the target frame identifier, a basis is provided for the subsequent determination of the message type, so that the switch can identify and distinguish different messages for targeted processing.

[0044] In some implementations, parsing the protocol message to obtain a target frame identifier of the protocol message includes: (1) obtaining multiple domain segments included in the protocol message; (2) Finding a protocol type field from the plurality of fields; (3) determining a target segment after the protocol type segment among the multiple segments; (4) Parse the target field segment to obtain the target frame identifier of the protocol message.

[0045] Among them, the protocol message is composed of multiple different fields, but the protocol messages corresponding to different protocol types all include a protocol type field and an isochronous real-time data field (Isochronous Real-Time, IRT-Data) after the protocol type field. The IRT-Data field includes a frame identifier, so the protocol type field can be found from the multiple fields, and the next field after the protocol type field in the multiple fields is determined as the IRT-Data field (that is, the target field). The target frame identifier of the protocol message can be obtained by parsing the target field.

[0046] Thus, the protocol messages corresponding to different protocol types usually differ in specific formats and contents, but the embodiments of the present application utilize the common feature that protocol messages of different protocol types all contain a protocol type field and an isochronous real-time data field (IRT-Data) thereafter. By first searching for the protocol type field and then determining the IRT-Data field to obtain the target frame identifier, the parsing method does not rely on specific protocol details and can be widely applied to a variety of different protocol types, thereby improving the system's compatibility and adaptability to different protocols.

[0047] In some implementations, parsing the target field segment to obtain a target frame identifier of the protocol message includes: (1.1) Acquire target data in a previously preset storage space in the target domain segment; (1.2) Determine the target data as the target frame identifier of the protocol message.

[0048] The target domain segment includes a designated storage space, a portion of which is in a pre-set storage space (e.g., the first 2 bytes) and is used to fill in a target frame identifier, and the remaining storage space is used to fill in user devices or nodes participating in isochronous real-time (IRT-User) communication.

[0049] Based on this, the target data in the pre-set storage space in the target domain segment can be obtained, and the target data can be determined as the target frame identifier of the protocol message.

[0050] See also Figure 3 , Figure 3A schematic diagram of the domain structure of the open real-time Ethernet communication protocol (Profinet protocol) provided in the embodiment of the present application. Taking the Profinet protocol as an example, it includes a preamble domain, a frame start delimiter frame (SFD frame) start domain, a target MAC address domain, a protocol type domain, an isochronous real-time data domain (Isochronous Real-Time, IRT-Data), and a frame check sequence domain (Frame Check Sequence, FCS). Among them, the specified storage space size of the IRT-Data domain after the protocol type domain is 40 to 1440 bytes. When the specified storage space size is 40 bytes, since the first 2 bytes are used to store the target frame identifier, the remaining 38 bytes are used to store IRT-User; when the specified storage space size is 1440 bytes, since the first 2 bytes are used to store the target frame identifier, the remaining 1438 bytes are used to store IRT-User.

[0051] Therefore, since the target frame identifier is clearly stored in the pre-set storage space of the target domain segment (such as the first 2 bytes), there is no need to fully scan and analyze the entire target domain segment during the parsing process, and only the data at the specific position can be directly obtained. This greatly reduces the time and computing resources required for parsing, improves the processing speed, and can significantly improve the overall performance of the system, especially when processing a large number of protocol messages.

[0052] In step 202, based on a first preset mapping relationship between a frame identifier and a message type, a first message type corresponding to the target frame identifier is determined.

[0053] The first preset mapping relationship is a pre-set correspondence table that records the correspondence between different frame identifiers and message types. Through this mapping relationship, the corresponding message type can be quickly determined according to the frame identifier of the protocol message.

[0054] Specifically, after obtaining the target frame identifier, the switch searches a pre-set first preset mapping relationship table, finds the message type corresponding to the target frame identifier in the table, and determines it as the first message type.

[0055] For example, if the target frame identifier is "0x88A4", and the message type corresponding to "0x88A4" in the mapping relationship table is "EtherCAT protocol message", then the first message type is "EtherCAT protocol message".

[0056] This is to clarify the specific type of the message. Different types of messages have different importance and processing methods in the network. Subsequently, appropriate priorities can be assigned to them based on the message type.

[0057] In step 203, a first priority field corresponding to the first message type is determined according to a second preset mapping relationship between message types and priority fields.

[0058] Among them, the second preset mapping relationship is also a preset correspondence table, which records the correspondence between different message types and priority fields. Through this mapping relationship, the priority that the message should have in network transmission can be determined according to the message type. The priority field uses a specific coding value to represent different priorities. For example, in a TSN network, the PCP (Priority Code Point) value is a common priority field.

[0059] Specifically, after determining the first message type, the switch searches the second preset mapping table. In the table, the priority field value corresponding to the first message type is found and determined as the first priority field. For example, if the first message type is "EtherCAT protocol message", and the PCP value corresponding to "EtherCAT protocol message" in the mapping table is "6", then the value of the first priority field is "6".

[0060] In this way, appropriate priority fields are assigned to messages, so that switches can schedule messages according to the priority fields when transmitting messages, ensuring that protocol messages with higher time sensitivity requirements are transmitted first, thereby improving the service quality of the network.

[0061] In step 204, the message format of the protocol message is converted into a specified message format, and the first priority field is written to obtain a target protocol message.

[0062] Among them, according to the requirements of the specified message format, the original protocol message is format converted. This involves reorganizing the header structure of the message, adding or deleting certain fields, etc. After completing the format conversion, the first priority field is written to the corresponding position in the specified message format. The specified message format can be a TSN message format.

[0063] For example, when converting a protocol message into a TSN message format, the first priority field (PCP value) is written into the PCP field position in the VLAN tag of the TSN message.

[0064] Specifically, message format conversion includes extracting key data from protocol messages, such as Frame ID or other uniquely identifying fields. EtherCAT messages usually have a specific frame structure, which contains device information, control instructions, data, etc. The switch obtains key data for subsequent processing by identifying and parsing these specific fields. The TSN protocol has its own header structure, which contains specific fields such as timestamp, priority identifier, and flow identifier. After obtaining the key information of the EtherCAT message, the switch will generate the corresponding TSN header based on this information.

[0065] For example, the priority field in the TSN header is set according to the device identification and the urgency of the control instruction in the EtherCAT message. Finally, the EtherCAT data is encapsulated, that is, the data part of the parsed EtherCAT message is encapsulated into the data part of the TSN message. In this way, the original EtherCAT data becomes the effective load of the TSN message.

[0066] The TSN protocol provides an accurate time synchronization mechanism, which can ensure that the clock synchronization accuracy of each device in the network reaches the sub-microsecond level. For welding robots, which have extremely high requirements for time accuracy, conversion to the TSN message format can make better use of the TSN time synchronization function, achieve accurate coordinated actions between multiple robots, and improve welding quality and efficiency.

[0067] The TSN protocol can ensure low latency and deterministic transmission of messages in the network through a series of scheduling mechanisms, such as time-aware shaper (TAS) and frame preemption. After converting EtherCAT messages to TSN message format, control instructions such as welding robots can be transmitted according to a predetermined time window, avoiding delays and jitters that may occur in traditional networks, and ensuring the real-time and stability of welding operations.

[0068] As a result, in complex network environments such as industrial automation, there may be multiple devices with different protocols at the same time, such as devices using the EtherCAT protocol and devices that require TSN protocol support. By converting EtherCAT messages to TSN message format, the communication barriers between different protocols can be broken and seamless integration of heterogeneous networks can be achieved. This allows devices originally based on different protocols to work together in the same network, improving the integration and openness of the entire network system. For systems that have already deployed devices based on old protocols (such as EtherCAT), if new functions or technologies are to be introduced, they often face high costs for equipment replacement or large-scale transformation. Converting existing protocol messages to TSN message format does not require large-scale replacement of the original equipment. Only message format conversion is required at network nodes (such as switches) to make old devices compatible with the new TSN network, greatly reducing the cost of system upgrades and transformations and improving compatibility.

[0069] In step 205, the target protocol message is transmitted to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

[0070] Among them, see Figure 4 , Figure 4 Schematic diagram of the industrial network co-network fusion scheduling framework provided for the embodiment of the present application. Protocol messages of different protocol types such as EhterCAT protocol, Profinet protocol, Ethernet Industrial Protocol (Ethernet Industrial Protocol, EhterNet / IP protocol), serial communication protocol (Mudbus protocol) are input to the switch and placed in the input queue corresponding to each protocol type by the switch; the switch identifies the protocol message in each input queue respectively and converts it into a specified message format, and puts it into the shared memory module of the switch in the form of data fast, that is, the specified storage area, so that the P4 scheduling module of the P4 high-level language can be used to manage the buffering, queuing and scheduling of data packets, because they traverse from the entry matching-action pipeline to the exit pipeline. Using custom algorithms and requirements, a specific mapping relationship with the message scheduler (i.e., TM module) is completed. Thereby further controlling the order of the exit queue.

[0071] In some implementations, after transmitting the target protocol message to the designated storage area, the method further includes: (1) obtaining a first number of protocol packets to be transmitted included in each transmission queue and a second number of the maximum number of protocol packets to be transmitted in each transmission queue; (2) Calculate the ratio of the number of first messages in each transmission queue to the number of corresponding second messages to obtain the proportion of the number of messages in each transmission queue; (3) when there is a first transmission queue in the plurality of transmission queues whose number of messages exceeds a first preset number of messages, determining a second priority field corresponding to the first transmission queue; (4) determining a second message type corresponding to the second priority field according to a second preset mapping relationship between the message type and the priority field; (5) determining, from the plurality of priority fields, a third priority field whose corresponding priority is one priority level after the second priority field; (6) Changing the mapping relationship between the second message type and the second priority field in the second preset mapping relationship to a mapping relationship between the second message type and the third priority field.

[0072] Among them, the transmission queue is a queue in the switch for storing protocol messages to be transmitted. Each queue corresponds to a different priority. The message scheduler will put it into the corresponding queue according to the priority field in the message and wait for transmission. The protocol message to be transmitted is a protocol message that has been processed (such as format conversion, priority field writing, etc.) but has not been transmitted to the target device and is waiting to be queued in the transmission queue for transmission. The first message number is the actual number of protocol messages to be transmitted currently contained in each transmission queue. The second message number is the maximum number of protocol messages to be transmitted that each transmission queue can accommodate, that is, the upper limit of the capacity of the queue. The message number ratio is obtained by calculating the ratio of the first message number of each transmission queue to the corresponding second message number, reflecting the ratio of the number of messages stored in the current queue to the maximum capacity of the queue. The first preset message number ratio is a preset threshold value used to determine whether the transmission queue is in an overloaded state. When the message number ratio of a transmission queue exceeds the threshold, the transmission queue is determined to be overloaded and is determined as the first transmission queue. The second priority field is the priority field corresponding to the first transmission queue, which is used to identify the priority of the message in the queue. The second message type is a message type corresponding to the second priority field according to a second preset mapping relationship between the message type and the priority field. The third priority field is determined from multiple priority fields, and its corresponding priority is a field of the next priority after the second priority field.

[0073] Specifically, the switch traverses each transmission queue, counts the actual number of protocol messages to be transmitted in each queue, and obtains the first message number. At the same time, the switch queries the configuration information of each transmission queue to obtain its maximum capacity, that is, the second message number. For each transmission queue, the first message number is divided by the corresponding second message number to obtain the message number ratio of the queue.

[0074] For example, if the number of first messages in a transmission queue is 50 and the number of second messages is 100, then the message ratio is 50 / 100 = 0.5 (i.e. 50%). By calculating the message ratio, the load level of each transmission queue can be quantified, which facilitates the subsequent judgment of which queues may be at risk of overload and provides a basis for further priority adjustment.

[0075] Compare the proportion of the number of messages in each transmission queue with the proportion of the first preset number of messages. If it is found that the proportion of the number of messages in a transmission queue exceeds the preset value, it is determined as the first transmission queue. Then, query the configuration information of the queue to obtain its corresponding second priority field. Identify the transmission queue in the overloaded state (the first transmission queue) and determine its current priority field (the second priority field) so as to adjust the priority of the messages in the queue and alleviate the overload of the queue.

[0076] In the second preset mapping relationship table, find the message type corresponding to the second priority field and determine it as the second message type. For example, if the value of the second priority field is "6", and the message type corresponding to "6" in the mapping relationship table is "EtherCAT protocol message", then the second message type is "EtherCAT protocol message". The type of the current high-priority message in the first transmission queue is clarified to provide information for the subsequent adjustment of the priority of this type of message, so that the priority adjustment can be carried out more targeted.

[0077] The second priority field is known. Among all the priority fields, in the order of high to low or low to high (determined according to the specific priority system), find a priority field that is immediately behind it and determine it as the third priority field. For example, if the second priority field is "6", and the priority fields are in the order of "7, 6, 5, 4..." from high to low, then the third priority field is "5". A new priority field (third priority field) is determined to reduce the priority of the message type (second message type) that originally has a higher priority (second priority field) by one level, thereby alleviating the overload of the first transmission queue without affecting key services.

[0078] In the second preset mapping relationship table, the original correspondence between the second message type and the second priority field is modified to a correspondence between the second message type and the third priority field.

[0079] For example, the original "EtherCAT protocol message (second message type)" corresponds to "6 (second priority field)", which is now changed to "EtherCAT protocol message" corresponding to "5 (third priority field)". By changing the mapping relationship, subsequent protocol messages with the second message type will be assigned the priority corresponding to the third priority field when determining the priority, thereby reducing the priority of this type of message and reducing its number in the first transmission queue, thereby alleviating queue overload and optimizing network traffic.

[0080] In some implementations, after the mapping relationship between the second message type and the second priority field in the second preset mapping relationship is changed to a mapping relationship between the second message type and the third priority field, the method further includes: When the proportion of the number of messages in the first transmission queue does not exceed the first preset proportion of the number of messages, the mapping relationship between the second message type and the third priority field in the second preset mapping relationship is restored to the mapping relationship between the second message type and the second priority field.

[0081] Among them, the switch will continuously monitor the proportion of the number of messages in the first transmission queue, continuously obtain the actual number of protocol messages to be transmitted in the first transmission queue (the first number of messages) and the maximum capacity of the queue (the second number of messages), and calculate their ratio to obtain the proportion of the number of messages. The proportion of the number of messages in the first transmission queue calculated in real time is compared with the first preset proportion of the number of messages. If the proportion of the number of messages does not exceed the first preset proportion of the number of messages, it means that the overload of the first transmission queue has been alleviated and the load has returned to a normal level. Then modify the second preset mapping relationship. The mapping relationship previously adjusted to the second message type and the third priority field is restored to the mapping relationship between the second message type and the second priority field.

[0082] In this way, by continuously monitoring the load of the first transmission queue and dynamically adjusting the mapping relationship between the message type and the priority field according to the load, flexible allocation of network resources is achieved. When the queue is overloaded, the priority of a specific message type is reduced to reduce the pressure on the queue; when the queue load returns to normal, the original priority of the message is restored in time to ensure that key business messages can continue to be transmitted with a higher priority and ensure the quality of network services.

[0083] In some embodiments, the method further comprises: (1) when there is a second transmission queue among the plurality of transmission queues, the proportion of the number of messages of which does not exceed the second preset proportion of the number of messages, determining a fourth priority field corresponding to the second transmission queue, the second preset proportion of the number of messages being lower than the first preset proportion of the number of messages; (2) determining, according to a second preset mapping relationship between the message type and the priority field, a third message type corresponding to the fourth priority field; (3) determining, from a plurality of priority fields, a fifth priority field having a corresponding priority level that is a previous priority level before the second priority field; (4) Changing the mapping relationship between the third message type and the fourth priority field in the second preset mapping relationship to a mapping relationship between the third message type and the fifth priority field.

[0084] Among them, the second preset message quantity ratio is a pre-set threshold value, which is used to determine whether the load of the transmission queue is low. The threshold is lower than the first preset message quantity ratio. When the message quantity ratio of a transmission queue does not exceed this threshold, it is considered that the queue load is light, and the second preset message quantity ratio is lower than the first preset message quantity ratio. The fourth priority field is the priority field corresponding to the second transmission queue, which is used to identify the priority of the message in the queue. The third message type is the message type corresponding to the fourth priority field according to the second preset mapping relationship. The fifth priority field is selected from multiple priority fields, and its corresponding priority is in the previous priority field before the second priority field, that is, a priority one level higher than the second priority field.

[0085] Specifically, the switch traverses all transmission queues, calculates the proportion of the number of messages in each queue, and compares it with the second preset proportion of the number of messages. If the proportion of the number of messages in a queue does not exceed the second preset proportion of the number of messages, the queue is determined as the second transmission queue. Then, by querying the second preset mapping relationship table of the queue, the fourth priority field corresponding to the second transmission queue is obtained. By identifying the transmission queue with a lighter load (the second transmission queue) and clarifying its current corresponding priority (the fourth priority field), preparations are made for the subsequent adjustment of the priority of the relevant message type.

[0086] The message type corresponding to the fourth priority field is searched in the second preset mapping relationship table, and is determined to be the third message type. For example, if the fourth priority field is "3", the message type corresponding to "3" in the mapping table is "Profinet protocol", and the third message type is "Profinet protocol". The message type corresponding to the current priority in the second transmission queue is clarified so as to adjust the priority of the message of this type.

[0087] According to the existing multiple priority fields and the priority order between them, the field of the previous priority that is before the second priority field is found and determined as the fifth priority field.

[0088] For example, the priority fields are "7, 6, 5, 4, 3..." from high to low. If the second priority field is "3", the fifth priority field is "4". A higher priority field (fifth priority field) is determined to increase the priority of the third message type to optimize the allocation of network resources.

[0089] In the second preset mapping relationship table, the original corresponding relationship between the third message type and the fourth priority field is modified to the corresponding relationship between the third message type and the fifth priority field.

[0090] For example, the original "Profinet protocol (third message type)" corresponds to "3 (fourth priority field)", and now it is changed to "Profinet protocol" corresponds to "4 (fifth priority field)". By adjusting the mapping relationship, subsequent protocol messages belonging to the third message type are assigned a higher priority (the priority corresponding to the fifth priority field) when determining the priority, thereby improving the transmission priority of this type of message in the network and making better use of network resources.

[0091] In this way, by increasing the priority of the message type corresponding to the transmission queue with a lighter load, the dynamic optimization allocation of network resources is realized. When the load of some queues is light, the priority of the message type originally in the queue is increased so that it can be transmitted faster and avoid idle resources. At the same time, it can also balance the load between different queues to a certain extent, improving the operating efficiency and performance of the entire network.

[0092] In some implementations, after the mapping relationship between the third message type and the fourth priority field in the second preset mapping relationship is changed to a mapping relationship between the third message type and the fifth priority field, the method further includes: When the proportion of the number of messages in the second transmission queue exceeds the proportion of the second preset number of messages, the mapping relationship between the third message type and the fifth priority field in the second preset mapping relationship is restored to the mapping relationship between the third message type and the fourth priority field.

[0093] Among them, the switch will continue to monitor the status of the second transmission queue and regularly calculate the proportion of the number of messages in the queue. The specific method is to obtain the number of protocol messages currently to be transmitted in the second transmission queue (the first number of messages) and the maximum capacity of the queue (the second number of messages), and then calculate the ratio of the two to obtain the proportion of the number of messages. Compare the proportion of the number of messages in the second transmission queue calculated in real time with the second preset proportion of the number of messages. If the proportion of the number of messages exceeds the second preset proportion of the number of messages, it means that the load of the second transmission queue has changed and is no longer in a lighter state. Once it is determined that the proportion of the number of messages in the second transmission queue exceeds the second preset proportion of the number of messages, the network device will modify the second preset mapping relationship. The mapping relationship previously adjusted to the third message type and the fifth priority field is restored to the mapping relationship between the third message type and the fourth priority field.

[0094] In this way, by continuously monitoring the load of the second transmission queue and dynamically adjusting the mapping relationship between the message type and the priority field according to the load changes, flexible allocation of network resources is achieved. When the queue load is light, the priority of the relevant message type is increased to make full use of network resources; when the queue load is no longer light, the original priority of the message is restored in time to avoid excessive occupation of resources by the queue due to too high a priority, which affects the normal operation of other queues and services.

[0095] As can be seen from the above, the embodiment of the present application receives the protocol message to be transmitted, parses the protocol message, and obtains the target frame identifier of the protocol message; based on the first preset mapping relationship between the frame identifier and the message type, determines the first message type corresponding to the target frame identifier; according to the second preset mapping relationship between the message type and the priority field, determines the first priority field corresponding to the first message type; converts the message format of the protocol message into a specified message format, and writes the first priority field to obtain the target protocol message; transmits the target protocol message to a specified storage area, so that the message scheduler schedules the target protocol message to the corresponding transmission queue according to the first priority field included in the target protocol message. Compared with the related art, the data of each industrial network protocol needs to be converted by a special protocol conversion device before it can be transmitted. In the embodiment of the present application, the target frame identifier obtained by parsing the protocol message is used to identify the first message type of the protocol message, so that the first message type corresponding to different protocol messages can be known, and the protocol conversion device can be used to identify the protocol message of the corresponding message type, without using the protocol conversion device, so as to improve compatibility.

[0096] The specific implementation of the above steps can be found in the previous embodiments, which will not be described in detail here.

[0097] In order to better implement the data transmission method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above data transmission method. The meanings of the terms are the same as those in the above data transmission method, and the specific implementation details can refer to the description in the method embodiment.

[0098] See also Figure 5 , Figure 5 The schematic diagram of the structure of the data transmission device provided in the embodiment of the present application is applied to a computer device, wherein the data transmission device may include a parsing unit 601, a first determination unit 602, a second determination unit 603, a writing unit 604, and a transmission unit 605.

[0099] The parsing unit 601 is used to receive a protocol message to be transmitted, parse the protocol message, and obtain a target frame identifier of the protocol message; A first determining unit 602 is used to determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; A second determining unit 603 is used to determine a first priority field corresponding to the first message type according to a second preset mapping relationship between the message type and the priority field; A writing unit 604, configured to convert the message format of the protocol message into a specified message format, and write the first priority field into the target protocol message; The transmission unit 605 is used to transmit the target protocol message to a designated storage area, so that the message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

[0100] In some embodiments, the parsing unit 601 includes: An acquisition subunit, used for acquiring a plurality of domain segments included in the protocol message; A search subunit, used to search for a protocol type field segment from the plurality of fields; A determination subunit, used to determine a subsequent target domain segment after the protocol type domain segment among the multiple domain segments; The parsing subunit is used to parse the target domain segment to obtain the target frame identifier of the protocol message.

[0101] In some embodiments, the parsing subunit is configured to: Acquire target data in a pre-set storage space in the target domain segment; The target data is determined as a target frame identifier of the protocol message.

[0102] In some embodiments, the apparatus further comprises: An acquisition unit, used to acquire a first number of protocol messages to be transmitted included in each transmission queue, and a maximum second number of protocol messages to be transmitted in each transmission queue; A calculation unit, used to calculate the ratio of the first message quantity of each transmission queue to the corresponding second message quantity, so as to obtain the message quantity ratio of each transmission queue; A third determining unit is used to determine a second priority field corresponding to a first transmission queue when there is a first transmission queue in the plurality of transmission queues whose number of messages accounts for more than a first preset number of messages; a fourth determining unit, configured to determine a second message type corresponding to the second priority field according to a second preset mapping relationship between the message type and the priority field; A fifth determining unit, configured to determine, from a plurality of priority fields, a third priority field whose corresponding priority is one priority level after the second priority field; The first changing unit is used to change the mapping relationship between the second message type and the second priority field in the second preset mapping relationship to a mapping relationship between the second message type and the third priority field.

[0103] In some embodiments, the apparatus further comprises: A first restoration unit is used to restore the mapping relationship between the second message type and the third priority field in the second preset mapping relationship to the mapping relationship between the second message type and the second priority field when the proportion of the number of messages in the first transmission queue does not exceed the proportion of the first preset number of messages.

[0104] In some embodiments, the apparatus further comprises: a sixth determination unit, configured to determine a fourth priority field corresponding to the second transmission queue when there is a second transmission queue in the plurality of transmission queues whose proportion of the number of messages does not exceed a second preset proportion of the number of messages, and the second preset proportion of the number of messages is lower than the first preset proportion of the number of messages; a seventh determining unit, configured to determine a third message type corresponding to the fourth priority field according to a second preset mapping relationship between the message type and the priority field; An eighth determination unit, configured to determine, from a plurality of priority fields, a fifth priority field whose corresponding priority is at a previous priority before the second priority field; The second changing unit is used to change the mapping relationship between the third message type and the fourth priority field in the second preset mapping relationship to a mapping relationship between the third message type and the fifth priority field.

[0105] In some embodiments, the apparatus further comprises: The second restoration unit is used to restore the mapping relationship between the third message type and the fifth priority field in the second preset mapping relationship to the mapping relationship between the third message type and the fourth priority field when the proportion of the number of messages in the second transmission queue exceeds the proportion of the second preset number of messages.

[0106] The specific implementation of each of the above units can be found in the previous embodiments, which will not be described in detail here.

[0107] As can be seen from the above, the embodiment of the present application receives the protocol message to be transmitted through the parsing unit 601, parses the protocol message, and obtains the target frame identifier of the protocol message; the first determination unit 602 determines the first message type corresponding to the target frame identifier based on the first preset mapping relationship between the frame identifier and the message type; the second determination unit 603 determines the first priority field corresponding to the first message type according to the second preset mapping relationship between the message type and the priority field; the writing unit 604 converts the message format of the protocol message into the specified message format, and writes the first priority field to obtain the target protocol message; the transmission unit 605 transmits the target protocol message to the specified storage area, so that the message scheduler schedules the target protocol message to the corresponding transmission queue according to the first priority field included in the target protocol message. Compared with the related art, in which the data of each industrial network protocol needs to be converted by a special protocol conversion device before it can be transmitted, the embodiment of the present application identifies the first message type of the protocol message by parsing the target frame identifier of the protocol message, thereby knowing the first message type corresponding to different protocol messages. Instead of using a protocol conversion device to identify the protocol message of the corresponding message type, there is no need to use a protocol conversion device, thereby improving compatibility.

[0108] The specific implementation of each of the above units can be found in the previous embodiments, which will not be described in detail here.

[0109] Reference Figure 6 , Figure 6The block diagram of the structure of part of the computer device 1000 for implementing the embodiment of the present disclosure. The computer device 1000 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 622 (for example, one or more processors) and memory 632, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 642 or data 644. Among them, the memory 632 and the storage medium 630 can be temporary storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server 600. Furthermore, the central processing unit 622 can be configured to communicate with the storage medium 630 and execute a series of instruction operations in the storage medium 630 on the server 600.

[0110] The computer device 1000 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input and output interfaces 658, and / or one or more operating systems 641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0111] The central processor 622 in the computer device 1000 may be used to execute the data transmission method of the embodiment of the present disclosure, for example: Receiving a protocol message to be transmitted, parsing the protocol message, and obtaining a target frame identifier of the protocol message; Determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; Determine, according to a second preset mapping relationship between message type and priority field, a first priority field corresponding to the first message type; Convert the message format of the protocol message into a specified message format, and write the first priority field into the target protocol message; The target protocol message is transmitted to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

[0112] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the data transmission methods of the aforementioned embodiments.

[0113] The present disclosure also provides a computer program product, which includes a computer program. The processor of a computer device reads and executes the computer program, so that the computer device executes the above-mentioned data transmission method. For example: Receiving a protocol message to be transmitted, parsing the protocol message, and obtaining a target frame identifier of the protocol message; Determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; Determine, according to a second preset mapping relationship between message type and priority field, a first priority field corresponding to the first message type; Convert the message format of the protocol message into a specified message format, and write the first priority field into the target protocol message; The target protocol message is transmitted to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

[0114] In addition, the terms "comprises" and "includes" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product or apparatus.

[0115] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0116] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0119] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0121] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0122] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0123] The above is a specific description of the implementation method of the present application, but the present application is not limited to the above-mentioned implementation method. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A data transmission method, characterized in that: include: Receiving a protocol message to be transmitted, parsing the protocol message, and obtaining a target frame identifier of the protocol message; Determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; Determine, according to a second preset mapping relationship between message type and priority field, a first priority field corresponding to the first message type; Convert the message format of the protocol message into a specified message format, and write the first priority field into the target protocol message; The target protocol message is transmitted to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

2. The data transmission method according to claim 1, characterized in that: The parsing of the protocol message to obtain a target frame identifier of the protocol message includes: Acquire multiple domain segments included in the protocol message; Find out a protocol type field segment from the multiple fields; Determine a subsequent target domain segment after the protocol type domain segment among the multiple domain segments; The target field segment is parsed to obtain a target frame identifier of the protocol message.

3. The data transmission method according to claim 2, characterized in that: The parsing of the target domain segment to obtain the target frame identifier of the protocol message includes: Acquire target data in a pre-set storage space in the target domain segment; The target data is determined as a target frame identifier of the protocol message.

4. The data transmission method according to claim 1, characterized in that: After the target protocol message is transmitted to the designated storage area, the method further includes: Acquire a first number of protocol packets to be transmitted included in each transmission queue, and a maximum second number of protocol packets to be transmitted in each transmission queue; Calculate the ratio of the number of first messages in each transmission queue to the number of corresponding second messages to obtain the proportion of the number of messages in each transmission queue; When there is a first transmission queue in the plurality of transmission queues whose number of messages exceeds a first preset number of messages, determining a second priority field corresponding to the first transmission queue; Determine, according to a second preset mapping relationship between the message type and the priority field, a second message type corresponding to the second priority field; Determine, from a plurality of priority fields, a third priority field whose corresponding priority is one priority level after the second priority field; The mapping relationship between the second message type and the second priority field in the second preset mapping relationship is changed to a mapping relationship between the second message type and the third priority field.

5. The data transmission method according to claim 4, characterized in that: After the mapping relationship between the second message type and the second priority field in the second preset mapping relationship is changed to a mapping relationship between the second message type and the third priority field, the method further includes: When the proportion of the number of messages in the first transmission queue does not exceed the first preset proportion of the number of messages, the mapping relationship between the second message type and the third priority field in the second preset mapping relationship is restored to the mapping relationship between the second message type and the second priority field.

6. The data transmission method according to claim 4, characterized in that: The method further comprises: When there is a second transmission queue among the plurality of transmission queues, the proportion of the number of messages does not exceed the second preset proportion of the number of messages, determining a fourth priority field corresponding to the second transmission queue, and the proportion of the second preset number of messages is lower than the proportion of the first preset number of messages; Determine, according to a second preset mapping relationship between the message type and the priority field, a third message type corresponding to the fourth priority field; Determine from a plurality of priority fields a fifth priority field whose corresponding priority is at a previous priority before the second priority field; The mapping relationship between the third message type and the fourth priority field in the second preset mapping relationship is changed to a mapping relationship between the third message type and the fifth priority field.

7. The data transmission method according to claim 6, characterized in that: After the mapping relationship between the third message type and the fourth priority field in the second preset mapping relationship is changed to a mapping relationship between the third message type and the fifth priority field, the method further includes: When the proportion of the number of messages in the second transmission queue exceeds the proportion of the second preset number of messages, the mapping relationship between the third message type and the fifth priority field in the second preset mapping relationship is restored to the mapping relationship between the third message type and the fourth priority field.

8. A data transmission device, characterized in that: include: A parsing unit, used for receiving a protocol message to be transmitted, parsing the protocol message, and obtaining a target frame identifier of the protocol message; A first determining unit, configured to determine a first message type corresponding to the target frame identifier based on a first preset mapping relationship between the frame identifier and the message type; A second determining unit, configured to determine a first priority field corresponding to the first message type according to a second preset mapping relationship between the message type and the priority field; A writing unit, used for converting the message format of the protocol message into a specified message format, and writing the first priority field to obtain a target protocol message; A transmission unit is used to transmit the target protocol message to a designated storage area, so that a message scheduler schedules the target protocol message to a corresponding transmission queue according to the first priority field included in the target protocol message.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the data transmission method according to any one of claims 1 to 7.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the data transmission method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Media access control safety protocol message transmission method and related device

    CN110858822A

  • Data scheduling method, electronic equipment and storage medium

    CN113438169A

  • Protocol-based flow control method

    CN113726611A

  • Deterministic service forwarding method and device

    CN114430397A

  • Message forwarding control method and device, equipment and storage medium

    CN115987912A