Data sending method

By allocating priority to the data distribution service message in the DDS communication architecture and mapping to the network layer, the traditional DDS communication architecture is difficult to ensure the determination of data transmission in the complex network environment. transmission.

CN119383231AInactive Publication Date: 2025-01-28HUNAN INSTITUTE OF SCIENCE AND TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411462186.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional DDS communication architecture has limited scheduling capabilities on the network transmission layer, making it difficult to ensure deterministic transmission of data in complex network environments.

Method used

By packing the data to be sent to the data distribution service message, and based on the pre -set service quality strategy, it is prioritized for each message, and the network priority is mapped to the network layer to ensure that the data is scheduled and transmitted according to the priority in the network.

Benefits of technology

The determination of data in the complex network environment ensures the high reliability and low latency of the data, and meets the needs of application scenarios such as autonomous driving and industrial control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383231A_ABST
    Figure CN119383231A_ABST
Patent Text Reader

Abstract

The invention relates to a data sending method. The method comprises the following steps: acquiring a to-be-sent data set; the to-be-sent data set comprises a plurality of to-be-sent data; packaging the to-be-sent data into a data distribution service message; distributing a data distribution service priority for each data distribution service message based on a preset service quality strategy; and obtaining network priorities according to the data distribution service priorities, and sending message information corresponding to the data distribution service messages to a receiving end according to the network priorities. The method can perform deterministic transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data sending method. Background Art

[0002] In modern distributed systems and real-time communication applications, the stability and timeliness of data transmission are crucial. Especially in application scenarios such as autonomous driving, industrial control, and smart grids, the demand for high-reliability, low-latency, and deterministic data transmission is becoming more and more urgent.

[0003] To meet these requirements, the industry has widely adopted Data Distribution Service (DDS) as a standard publish-subscribe communication framework. DDS can achieve efficient data distribution between devices and support flexible Quality of Service (QoS) strategies to meet the transmission requirements of different types of data.

[0004] However, the traditional DDS communication architecture has limited scheduling capabilities at the network transmission layer, making it difficult to ensure deterministic data transmission in complex network environments. Summary of the invention

[0005] Based on this, it is necessary to provide a data sending method that can ensure deterministic data transmission in response to the above technical problems.

[0006] In a first aspect, the present application provides a data sending method, the method comprising:

[0007] Acquire a data set to be sent; the data set to be sent includes a plurality of data to be sent;

[0008] Encapsulating each of the data to be sent into a data distribution service message;

[0009] Based on a preset quality of service policy, assigning a data distribution service priority to each of the data distribution service messages;

[0010] The network priorities are obtained according to the data distribution service priorities, and the message information corresponding to the data distribution service messages is sent to the receiving end according to the network priorities.

[0011] In one embodiment, obtaining each network priority according to each data distribution service priority, and sending the message information corresponding to each data distribution service message to the receiving end according to each network priority, includes:

[0012] Mapping each of the data distribution service priorities to a network layer to obtain each of the network priorities;

[0013] Convert each of the data distribution service messages into a target message;

[0014] Each of the target messages is sent to the receiving end according to each of the network priorities.

[0015] In one embodiment, the network priority includes a first network priority and a second network priority; and mapping each of the data distribution service priorities to a network layer to obtain each of the network priorities includes:

[0016] Calculate the first network priority according to the priority value corresponding to the data distribution service priority;

[0017] Map the first network priority into segments to obtain the second network priority.

[0018] In one embodiment, sending each of the target messages to the receiving end according to each of the network priorities includes:

[0019] Obtaining a time transmission window corresponding to each of the target messages;

[0020] In combination with the priority, allocating a time slot for each of the target messages;

[0021] Each of the target messages is sent to the receiving end according to the time transmission window and the time slot.

[0022] In one embodiment, sending each of the target messages to the receiving end according to each of the network priorities includes:

[0023] Allocating an initial credit value to each of the target messages according to the priority;

[0024] Based on the bandwidth usage of each target message, dynamically adjust the initial credit value to obtain a target credit value;

[0025] Based on the target credit value, the target message is sent to the receiving end.

[0026] In one embodiment, encapsulating each of the to-be-sent data into a data distribution service message includes:

[0027] Obtaining a preset data distribution service data structure;

[0028] According to the data distribution service data structure, each of the data to be sent is encapsulated into a data distribution service message.

[0029] In a second aspect, the present application provides a data sending device, the device comprising:

[0030] An acquisition module, used for acquiring a set of data to be sent; the set of data to be sent includes a number of data to be sent;

[0031] An encapsulation module, used for encapsulating each of the to-be-sent data into a data distribution service message;

[0032] A priority setting module, used to assign a data distribution service priority to each of the data distribution service messages based on a preset service quality policy;

[0033] The sending module is used to obtain each network priority according to each data distribution service priority, and send the message information corresponding to each data distribution service message to the receiving end according to each network priority.

[0034] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0036] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0037] The above data transmission method encapsulates the data to be sent into a standardized data distribution service message, assigns a priority to each message based on a pre-set service quality policy, maps the message to the network layer according to the priority when sending the message, and schedules the data according to the mapped network priority. This ensures that the network device can process the data packet according to the priority when actually sending it, thereby ensuring the deterministic transmission of the data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 An application environment diagram of a data sending method in an embodiment;

[0040] Figure 2 A schematic diagram of a flow chart of a data sending method in an embodiment;

[0041] Figure 3 A schematic diagram of capturing data in an embodiment;

[0042] Figure 4 A schematic diagram of capturing data in another embodiment;

[0043] Figure 5 is a structural block diagram of a data sending device in one embodiment;

[0044] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0046] The data transmission method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the sending end 102 communicates with the receiving end 104 through the network. The receiving end 104 obtains a set of data to be sent; encapsulates each data to be sent into a data distribution service message; based on a pre-set service quality policy, assigns a data distribution service priority to each data distribution service message; obtains each network priority according to each data distribution service priority, and sends the message information corresponding to each data distribution service message to the receiving end according to each network priority. Among them, the sending end 102 can be but is not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The receiving end 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0047] For example, in the field of vehicle-mounted communications, the transmitter can be a sensor device, such as a vehicle-mounted camera, radar, lidar, temperature sensor, etc. These devices generate data and send the data to the receiver through DDS. The receiver can be an autonomous driving decision system, which needs to receive data streams from sensors to make decisions. The receiver can also be a cloud server, which is used to collect vehicle data for analysis or monitoring, such as remote fault detection or OTA (Over-the-Air) updates.

[0048] For example, in a smart city's traffic management system, the sending end can be a traffic sensor installed on the road, and the receiving end is the system of the city's traffic control center. The sensor collects data such as vehicle flow and speed and sends it to the control center, which optimizes the timing of traffic lights based on this data to improve traffic efficiency.

[0049] For example, in a smart home system, the sending end can be a smart thermostat, and the receiving end is the user's mobile phone application. The thermostat sends indoor temperature data to the mobile phone application, and the user can check the temperature through the application and remotely adjust the air conditioning settings at home.

[0050] Taking in-vehicle communications as an example, the standard currently commonly used in the field of in-vehicle communications is the Automotive Open System Architecture Adaptive Platform, which supports systems that can operate with faults and responds to dynamically changing needs through an adaptive runtime environment. The Automotive Open System Architecture Adaptive Platform introduces DDS as in-vehicle communication middleware to provide reliable, scalable and high-performance communication management capabilities. DDS adopts a distributed publish-subscribe architecture, emphasizes a data-centric communication model, supports a variety of QoS strategies, and encapsulates complex underlying communication processes, allowing the application layer to simplify communication operations. At the same time, DDS can adapt to real-time operating systems to achieve efficient management of computing resources and real-time communication needs.

[0051] DDS provides reliable application communication services for in-vehicle communications, but it still faces many challenges. First, the in-vehicle communication system needs to process a large amount of data from different sensors to ensure the real-time and deterministic transmission of data, while maintaining decoupling from the application end and ensuring communication security. However, the network latency and jitter in traditional networks often cannot meet the strict requirements of autonomous driving systems for deterministic in-vehicle networks (IVN). For example, autonomous driving systems typically require IVN end-to-end latency to be less than 250 microseconds and transmission bandwidth to be greater than 100Mbps, which is far beyond the capabilities of traditional in-vehicle Ethernet and buses.

[0052] Therefore, a data transmission method is proposed in the present application. In an exemplary embodiment, Figure 2 As shown, a data transmission method is provided, which is applied to Figure 1 The sending end 102 in the example is used for explanation, including the following S202 to S208. Among them:

[0053] Step S202, obtaining a set of data to be sent; the set of data to be sent includes a number of data to be sent.

[0054] Among them, a set of data needs to be transmitted. Taking vehicle communication as an example, these data may come from different sensors, control systems or user applications, covering sensor data, control instructions, diagnostic information, etc.

[0055] Step S204: encapsulate each data to be sent into a data distribution service message.

[0056] Among them, data distribution service messages refer to messages based on DDS encapsulation, hereinafter referred to as DDS messages. Among them, DDS is a publish-subscribe data transmission middleware that supports real-time and efficient message communication. Through DDS encapsulation, raw data can be transmitted in a reliable and scalable manner in a distributed system.

[0057] In this embodiment, the purpose of encapsulating each data is to achieve standardized data transmission in a distributed system, ensuring efficient and reliable communication between different devices or applications, especially in complex application scenarios such as vehicle-mounted communications and the Internet of Things. Encapsulation can simplify the data transmission process, making the complexity of the underlying transmission transparent to the application, while ensuring that the data meets certain QoS requirements during transmission.

[0058] Optionally, before encapsulating the data, you first need to define the data model to be transmitted using the Interface Definition Language (IDL). This model describes the structure and type of the data. For example, sensor data may include multiple fields such as timestamp, sensor ID, measurement value, etc. The data model defined by IDL will ensure that a consistent data format is used on the sending and receiving ends.

[0059] The process of encapsulating data into DDS messages includes packaging the original data to be sent into messages that conform to the DDS protocol format. Each message is accompanied by metadata that describes the source, type, and other information of the message. The encapsulated DDS message includes the data payload (i.e., the actual data to be transmitted) and some control information (such as the sender ID, sequence number, etc.), so that the receiving end can correctly identify, process, and verify the received message.

[0060] Step S206: allocating a data distribution service priority to each data distribution service message based on a preset service quality policy.

[0061] Among them, the quality of service policy, or QoS policy, refers to the set of service quality parameters defined in network transmission, covering the priority, reliability, delay, bandwidth requirements, etc. of data transmission. The QoS policy is used to control the transmission performance of different types of data flows to ensure that key data can be transmitted first.

[0062] Data distribution service priority refers to the transmission priority assigned to each DDS message according to the service quality policy. Data with high priority will be transmitted first to ensure the real-time and reliability of important data streams.

[0063] Optionally, first, a service quality policy needs to be set according to the application scenario, such as autonomous driving, industrial control, or smart city requirements. In this embodiment, the service quality policy focuses on priority. In other embodiments, the QoS policy generally also includes delay requirements, reliability, lifespan, and throughput requirements.

[0064] Each QoS parameter is pre-configured based on the needs of the application scenario. For example, control signals and sensor data may require extremely high reliability and low latency, while status logs or non-critical data may allow for certain delays and packet loss.

[0065] Optionally, during data transmission, preset QoS requirements are extracted for each DDS message. These requirements may be determined by the application or upper-level logic, for example, sensor data for autonomous driving is usually configured as high priority, while background logs may be low priority. Once the relevant QoS parameters are extracted for a DDS message, it will be assigned a data distribution service priority based on these parameters.

[0066] Exemplarily, the preset service quality policy may be that the priority of control signals or emergency task data is 1 (highest), the priority of video data stream is 2, the priority of ordinary sensor data is 3, and the priority of log or non-critical data is 4.

[0067] Furthermore, in DDS, the priority of data is set through the "transport_priority" field. "Transport_priority" is a QoS policy of DDS, which is used to determine the priority of DDS messages when they are transmitted in the network. According to the priority calculated in the QoS parameters, the "transport_priority" field is assigned to the DDS message. For example, the transport_priority of a control signal may be set to 100, while the low-priority log message may be set to 20.

[0068] Optionally, priorities can be adjusted dynamically based on network status or real-time needs. For example, if network load increases, the system can appropriately increase the priority of urgent data flows to ensure that critical data can still be transmitted first. The dynamic adjustment mechanism can be based on feedback from real-time network monitoring or can be scheduled in real time by a controller or policy engine.

[0069] Step S208, obtaining each network priority according to each data distribution service priority, and sending the message information corresponding to each data distribution service message to the receiving end according to each network priority.

[0070] In step S208, the DDS priority is mapped to the network priority, and then the data is scheduled and transmitted according to the mapped network priority, ensuring that data of different priorities can be correctly sent to the receiving end according to the predetermined network service quality requirements.

[0071] Optionally, the network priority mapping can be to map the DDS priority to the DSCP (Differentiated Services Code Point) field in the IP protocol. DSCP is a part of the IP data packet header and is used to identify different service priorities. High-priority data packets can be assigned higher DSCP values, so that they are preferentially transmitted in routers and switches in the network.

[0072] Optionally, the network priority mapping can also be to map the DDS priority to the PCP (Priority Code Point) field in the Ethernet protocol. PCP is the priority field in the VLAN frame, and the value range is 0 to 7. The higher the value, the higher the priority. The Ethernet switch determines the transmission order of the data frame based on the PCP value.

[0073] After the mapping is completed, the data packets will be scheduled according to the network priority when they are transmitted in the network. Different network devices (such as routers, switches, etc.) will classify and queue the data packets according to these priorities and decide the transmission order of the data packets.

[0074] The receiving end parses the DDS message according to the priority information in the received data packet and the DDS encapsulation protocol, and processes the message accordingly according to its priority. High-priority messages may be processed immediately and applied to key business processes, while low-priority messages may be delayed or cached in a queue.

[0075] In the above embodiment, by mapping the DDS priority to the network priority, it is possible to ensure that key data is processed preferentially in the network, reduce delays and jitters, and ensure the real-time and deterministic nature of the system.

[0076] Furthermore, in one embodiment, the above-mentioned obtaining each network priority according to each data distribution service priority, and sending the message information corresponding to each data distribution service message to the receiving end according to each network priority, includes: mapping each data distribution service priority to the network layer to obtain each network priority; converting each data distribution service message into a target message; and sending each target message to the receiving end according to each network priority.

[0077] In this embodiment, mapping each data distribution service to the network layer means converting the priority information of the application layer or the transport layer into network priority information that can be understood by the network layer, so that network devices such as routers and switches can schedule and manage data packets based on this information.

[0078] Optionally, each data distribution service priority can be mapped to the IP layer or Ethernet layer, which can be set according to the application scenario.

[0079] Optionally, the data distribution service priority may be mapped to the IP layer to obtain a DSCP value, and then each target message may be sent to the receiving end according to the DSCP value.

[0080] Exemplarily, first, the priority of each DDS message is extracted according to the transport_priority field in the data distribution service, and then, the DDS priority is converted into a DSCP value according to a predefined mapping rule.

[0081] For example, high priority data flow (such as emergency control instructions) → DDS transport_priority = 100 → DSCP = 46 (Expedited Forwarding, EF); medium priority data flow (such as real-time video stream) → DDS transport_priority = 80 → DSCP = 34 (Assured Forwarding, AF); low priority data flow (such as non-critical status log) → DDS transport_priority = 20 → DSCP = 0 (Best Effort).

[0082] The mapped DSCP value is placed in the TOS (Type of Service) field of the IP data packet. This field can convey the priority information of the data packet, allowing network devices to identify the priority of the data packet and provide an appropriate service level during transmission. Routers and switches in the network read the DSCP value in the data packet and determine the transmission order and path of the data packet based on the value. High-priority DSCP values ​​(such as 46) will be processed and transmitted first, while low-priority values ​​(such as 0) may be delayed or queued.

[0083] For example, the emergency brake command in the autonomous driving system has the highest DDS priority. Assuming DDS transport_priority = 100, the mapped DSCP = 46. This value ensures that the data stream has the highest transmission speed and priority in the network and can be quickly transmitted to the receiving end in an emergency. The vehicle diagnostic log has a lower priority. Assuming DDS transport_priority = 20, the mapped DSCP = 0. This type of data stream can be transmitted when the network is idle, without affecting the transmission requirements of critical data streams.

[0084] In the above embodiment, the priority of DDS is mapped to the DSCP value of the network layer, so that the network device can give priority to the transmission of data packets according to the priority. Through reasonable mapping rules, key data flows can get priority bandwidth and transmission channels when the network load is high, ensuring the real-time performance and reliability of the system.

[0085] Since each network layer has different devices and mechanisms to process data packets, priority mapping is required at multiple levels to ensure that data can be correctly processed according to its priority requirements during end-to-end network transmission. Therefore, the DSCP value needs to be further mapped.

[0086] Furthermore, in one embodiment, the above-mentioned network priority includes a first network priority and a second network priority; the above-mentioned mapping of each data distribution service priority to the network layer to obtain each network priority includes: calculating according to the priority value corresponding to the data distribution service priority to obtain the first network priority; mapping the first network priority in segments to obtain the second network priority.

[0087] If the data stream needs to traverse multiple network layers, such as from a wide area network (WAN) to a local area network (LAN), it is necessary to map the IP layer priority, that is, DSCP, to the Ethernet layer priority, that is, PCP. In such a scenario, the DSCP value is used for priority scheduling of routers in the IP network, and when the data stream enters the LAN, the Ethernet switch will perform flow control based on the PCP field. Mapping DSCP to PCP ensures that the data stream has a consistent priority throughout the transmission process, avoiding priority loss or changes at the network boundary.

[0088] In this embodiment, the mapping of network priority involves three levels, first mapping from DDS priority to DSCP, and then mapping from DSCP to PCP. This two-layer mapping mechanism allows the reasonable allocation and use of priorities at different network levels to ensure the accuracy and real-time performance of data transmission.

[0089] Optionally, the DDS priority is mapped to the first network priority, that is, mapped to DSCP. First, according to the transport_priority field of DDS, the DDS priority is mapped to the DSCP value in the IP protocol. This mapping combines the DDS priority with the network priority of the IP layer, ensuring that the IP layer device can perform priority scheduling according to the DSCP value.

[0090] Optionally, the DSCP segment is mapped to the second network priority, that is, mapped to PCP. The second network priority is a segment mapping performed at the Ethernet layer. The PCP field is located in the Ethernet VLAN tag, with a value range of 0-7, and is used to instruct the Ethernet switch how to schedule and forward Ethernet frames. Data frames with high PCP values ​​will be processed first to ensure that critical data can be transmitted with low latency.

[0091] Exemplarily, DSCP values ​​(0 to 63) can be mapped to PCP according to the following segmentation rules:

[0092] The high priority range (DSCP 48-63) is mapped to PCP 6-7.

[0093] The medium priority range (DSCP 24-47) maps to PCP 3-5.

[0094] The low priority range (DSCP 0-23) is mapped to PCP 0-2.

[0095] Through this segment mapping, data can be prioritized at the Ethernet layer based on the PCP value to ensure that switches in the network can identify and process high-priority data flows.

[0096] After completing the mapping from DSCP to PCP, the DDS message is encapsulated into an IP packet and the corresponding DSCP value and PCP value are assigned to it according to the priority. The data message will be transmitted through the network according to the priority of the IP layer and the Ethernet layer, ensuring that routers and switches can properly process the data according to the priority.

[0097] Combination Figure 3 and Figure 4 As shown, Figure 3 and Figure 4 This is a priority diagram obtained after Wireshark captures the packet. Figure 3 and Figure 4 It can be seen that different DSCP values ​​are mapped to different values ​​in PCP.

[0098] In the above embodiment, the data distribution service priority is first mapped to the DSCP value of the IP layer, and then further converted to the PCP value of the Ethernet layer through segment mapping. This two-layer priority mapping mechanism ensures the full link priority management from the IP layer to the Ethernet layer, which can effectively ensure the real-time and low-latency transmission of key data in a complex network environment.

[0099] In one embodiment, the above-mentioned sending of each target message to the receiving end according to each network priority includes: obtaining the time transmission window corresponding to each target message; allocating a time slot to each target message in combination with the priority; and sending each target message to the receiving end according to the time transmission window and the time slot.

[0100] The time transmission window refers to the transmission time period prearranged for packets of a specific priority in the network device. The time transmission window ensures that only packets with appropriate priority can be transmitted within a specific time to ensure the determinism and real-time performance of the system.

[0101] In Time-Sensitive Networking (TSN), time transmission windows are predefined through the time synchronization mechanism of network devices (such as IEEE 802.1AS). Each time transmission window is reserved for a specific type of traffic to ensure that critical data can be transmitted at the required time without being delayed due to network congestion or conflicts.

[0102] For example, if an autonomous driving vehicle needs to process data streams from sensors within milliseconds, a time transmission window of every 100 milliseconds can be set for such data streams to ensure that the messages of the data stream can be sent preferentially within this window.

[0103] Optionally, combined with the network priority, each message is assigned to a suitable time slot according to its priority. A high-priority data stream is assigned to an earlier time slot in the time transmission window to ensure that it can be transmitted as soon as possible.

[0104] For example, assuming there is a time transmission window of every 100 milliseconds, high-priority messages (such as brake control instructions) can be assigned to time slots from 1 to 5 milliseconds, while medium-priority messages (such as camera video streams) may be assigned to time slots from 6 to 20 milliseconds.

[0105] Optionally, after allocating the time transmission window and time slot, each target message will be sent according to these time arrangements to ensure that the message reaches the receiving end within the specified time. This method ensures deterministic transmission of the network and avoids delays and jitter problems caused by congestion and queuing in traditional networks.

[0106] In the above embodiment, by combining the priority and time scheduling mechanism, it can be ensured that the key data can be transmitted at the appropriate time, meeting the system's high requirements for real-time and deterministic transmission.

[0107] In one embodiment, the above-mentioned sending each target message to the receiving end according to each network priority includes: allocating an initial credit value to each target message according to the priority; dynamically adjusting the initial credit value based on the bandwidth usage of each target message to obtain a target credit value; and sending the target message to the receiving end based on the target credit value.

[0108] In this embodiment, a credit value-based mechanism is used to dynamically schedule the transmission of packets. This mechanism is usually used in a credit-based traffic shaping mechanism to ensure that the traffic in the network is balanced between bandwidth usage and priority scheduling, thereby achieving efficient network resource management.

[0109] First, an initial credit value is assigned to each target message according to the priority. In the network, each target message is assigned an initial credit value according to its priority. The credit value is a metric used to reflect the weight or priority of a data stream in bandwidth usage. The size of the initial credit value depends on the priority of the message. Messages with high priority will be assigned a higher initial credit value to ensure that they have more bandwidth resources during transmission and are processed first. Messages with low priority will be assigned a lower initial credit value, indicating that these messages may be delayed or have reduced resources when competing for bandwidth. Afterwards, based on the bandwidth usage of each target message, the initial credit value is dynamically adjusted to obtain the target credit value. Among them, bandwidth usage refers to the relationship between the bandwidth currently available on the network and the bandwidth actually used. According to the bandwidth status of the network, the credit value of the message is dynamically adjusted to ensure the effective use of network resources. When the load in the network changes, its credit value is adjusted according to the actual bandwidth occupancy of the message. For example, if the network load is light, the credit value of low-priority messages may be increased so that they can also obtain more bandwidth. If the network load increases, the credit value of low-priority messages will be reduced to prioritize bandwidth usage for high-priority messages. Finally, based on the target credit value, the target message is sent to the receiving end. After the network load and credit value are adjusted, the transmission order of each message is determined based on the final target credit value. The higher the target credit value of the message, the higher the priority it will be transmitted to the receiving end.

[0110] In the above embodiment, the scheduling mechanism based on credit value can achieve more refined resource management when the network bandwidth is tight or the traffic is unbalanced.

[0111] In one embodiment, the above-mentioned encapsulating each data to be sent into a data distribution service message includes: obtaining a preset data distribution service data structure; and encapsulating each data to be sent into a data distribution service message according to the data distribution service data structure.

[0112] The preset data distribution service data structure refers to the data format and structure used to define the DDS message. It specifies the fields, types, and relationships between each message to ensure that the data can be correctly parsed, transmitted, and processed in the DDS system.

[0113] Optionally, this data structure is usually defined by IDL (Interface Definition Language). IDL is a standardized description language used to define data structures between different systems to ensure that message passing is consistent across different operating systems, programming languages, and platforms.

[0114] For example, if a sensor data message needs to be transmitted, the data structure should include a sensor ID, a timestamp, and a measurement value.

[0115] Optionally, after obtaining the preset data structure, each piece of data to be sent will be encapsulated according to the structure. Each piece of data to be sent will be organized into a message body that conforms to the data distribution service message format and is ready for transmission through DDS. The encapsulation process includes filling the original data into the message in sequence according to the field order of the data structure, and converting the data into a binary format that can be transmitted by the network through serialization so that it can be sent through the DDS transport layer.

[0116] In the above embodiment, the format and type of data are defined to ensure that messages can be transmitted consistently between different platforms. This data encapsulation process ensures that different types of data streams can be transmitted and processed in a standardized format.

[0117] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0118] Based on the same inventive concept, the embodiment of the present application also provides a data sending device for implementing the data sending method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data sending device embodiments provided below can refer to the limitations on the data sending method above, and will not be repeated here.

[0119] In an exemplary embodiment, Figure 5 As shown, a data sending device is provided, comprising:

[0120] The acquisition module 510 is used to acquire a data set to be sent; the data set to be sent includes a number of data to be sent.

[0121] The encapsulation module 520 is used to encapsulate each data to be sent into a data distribution service message.

[0122] The priority setting module 530 is used to assign a data distribution service priority to each data distribution service message based on a preset service quality policy.

[0123] The sending module 540 is used to obtain each network priority according to each data distribution service priority, and send the message information corresponding to each data distribution service message to the receiving end according to each network priority.

[0124] In one embodiment, the priority setting module 630 includes:

[0125] The priority mapping unit is used to map the priority of each data distribution service to the network layer to obtain each network priority.

[0126] The conversion unit is used to convert each data distribution service message into a target message.

[0127] The message sending unit is used to send each target message to the receiving end according to each network priority.

[0128] In one embodiment, the priority mapping unit includes:

[0129] The first mapping subunit is used to calculate according to the priority value corresponding to the data distribution service priority to obtain the first network priority.

[0130] The second mapping subunit is used to segmentally map the first network priority to obtain the second network priority.

[0131] In one embodiment, the sending module includes:

[0132] The window acquisition unit is used to acquire the time transmission window corresponding to each target message.

[0133] The time slot allocation unit is used to allocate a time slot to each target message in combination with the priority.

[0134] The first scheduling unit is used to send each target message to the receiving end according to the time transmission window and the time slot.

[0135] In one embodiment, the sending module further includes:

[0136] The credit value allocation unit is used to allocate an initial credit value to each target message according to the priority.

[0137] The adjustment unit is used to dynamically adjust the initial credit value based on the bandwidth usage of each target message to obtain a target credit value.

[0138] The second scheduling unit is used to send the target message to the receiving end based on the target credit value.

[0139] In one embodiment, the packaging module includes:

[0140] The structure acquisition unit is used to acquire the preset data distribution service data structure.

[0141] The data encapsulation unit is used to encapsulate each data to be sent into a data distribution service message according to the data distribution service data structure.

[0142] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the current frame image to be processed, the target frame image, the target pixel point, the brightness value corresponding to the target pixel point, the brightness target value in the first block, the first difference, and the first preset threshold. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data sending method is implemented.

[0143] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0144] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0146] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.

[0147] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0148] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

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

Claims

1. A data transmission method, characterized in that: The method comprises: Acquire a data set to be sent; the data set to be sent includes a plurality of data to be sent; Encapsulating each of the data to be sent into a data distribution service message; Based on a preset quality of service policy, assigning a data distribution service priority to each of the data distribution service messages; The network priorities are obtained according to the data distribution service priorities, and the message information corresponding to the data distribution service messages is sent to the receiving end according to the network priorities.

2. The method according to claim 1, characterized in that The obtaining of each network priority according to each data distribution service priority, and sending message information corresponding to each data distribution service message to a receiving end according to each network priority, comprises: Mapping each of the data distribution service priorities to a network layer to obtain each of the network priorities; Convert each of the data distribution service messages into a target message; Each of the target messages is sent to the receiving end according to each of the network priorities.

3. The method according to claim 2, characterized in that The network priority includes a first network priority and a second network priority; and mapping each of the data distribution service priorities to the network layer to obtain each of the network priorities includes: Calculate the first network priority according to the priority value corresponding to the data distribution service priority; Map the first network priority into segments to obtain the second network priority.

4. The method according to claim 2, characterized in that: The sending each of the target messages to the receiving end according to each of the network priorities includes: Obtaining a time transmission window corresponding to each of the target messages; In combination with the priority, allocating a time slot for each of the target messages; Each of the target messages is sent to the receiving end according to the time transmission window and the time slot.

5. The method according to claim 2, characterized in that: The sending each of the target messages to the receiving end according to each of the network priorities includes: Allocating an initial credit value to each of the target messages according to the priority; Based on the bandwidth usage of each target message, dynamically adjust the initial credit value to obtain a target credit value; Based on the target credit value, the target message is sent to the receiving end.

6. The method according to claim 1, characterized in that The step of encapsulating each of the to-be-sent data into a data distribution service message comprises: Obtaining a preset data distribution service data structure; According to the data distribution service data structure, each of the data to be sent is encapsulated into a data distribution service message.

7. A data sending device, characterized in that: The device comprises: An acquisition module, used for acquiring a set of data to be sent; the set of data to be sent includes a number of data to be sent; An encapsulation module, used for encapsulating each of the to-be-sent data into a data distribution service message; A priority setting module, used to assign a data distribution service priority to each of the data distribution service messages based on a preset service quality policy; The sending module is used to obtain each network priority according to each data distribution service priority, and send the message information corresponding to each data distribution service message to the receiving end according to each network priority.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Vehicle DDS and TSN fusion deployment method and system, storage medium and electronic equipment

    CN118200128A

  • Data sending method and system, vehicle, storage medium and program product

    CN118233405A

  • Vehicle control system

    US20230379385A1