Message transmission method, device and equipment and automatic driving vehicle
By selecting different queues for message transmission in autonomous driving vehicles based on the delay sensitivity of sensor data, the problem of long delay in sensor data reception and processing is solved, and the system performance and maximum driving speed are improved.
Patent Information
- Application Number
- CN202311103116.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-29
AI Technical Summary
The receiving and processing time delay of sensor data in autonomous driving vehicles is relatively long, affecting system performance and maximum driving speed.
By obtaining the first and second messages to be transmitted, and determining different queues for transmission according to their different delay sensitivity. The first queue is transmitted through the kernel protocol stack, while the second queue skips the kernel protocol stack and directly transmits.
While ensuring system performance, it reduces the delay in receiving and processing of sensor data, and improves the data receiving and processing capabilities and overall performance of the autonomous driving system.
Smart Images

Figure CN119544823A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of autonomous driving and communication technologies, and in particular to the field of vehicle-mounted sensor communication technologies, and specifically to a message transmission method, device, electronic device, computer-readable storage medium, computer program product, and autonomous driving vehicle. Background Art
[0002] With the development of autonomous driving technology, the amount of sensor data in the autonomous driving system of autonomous driving vehicles is becoming increasingly large. The delay in receiving and processing sensor data directly affects the central processing unit (CPU) load, end-to-end delay, and the maximum driving speed supported by the autonomous driving system. Therefore, how to reduce the delay in receiving and processing sensor data while ensuring system performance has always been a hot topic in this field.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides a method, device, electronic device, computer-readable storage medium, computer program product and autonomous driving vehicle for message transmission.
[0005] According to one aspect of the present disclosure, a message transmission method is provided, including: obtaining a first message and a second message to be transmitted and a plurality of queues for transmitting the first message and the second message, wherein the second message has a higher delay sensitivity than the first message; determining at least one first queue among the plurality of queues, wherein the at least one first queue is set to be transmitted via a kernel protocol stack; determining at least one second queue among the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is set to skip the kernel protocol stack for transmission; transmitting the first message through the at least one first queue; and transmitting the second message through the at least one second queue.
[0006] According to another aspect of the present disclosure, a message transmission device is provided, including: an acquisition module, configured to acquire a first message and a second message to be transmitted and a plurality of queues for transmitting the first message and the second message, wherein the second message has a higher delay sensitivity than the first message; a first queue determination module, configured to determine at least one first queue among the plurality of queues, wherein the at least one first queue is set to be transmitted via a kernel protocol stack; a second queue determination module, configured to determine at least one second queue among the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is set to skip the kernel protocol stack for transmission; a first transmission module, configured to transmit the first message through the at least one first queue; and a second transmission module, configured to transmit the second message through the at least one second queue.
[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided above in the present disclosure.
[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method provided above in the present disclosure.
[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the method provided above when executed by a processor.
[0010] According to another aspect of the present disclosure, an autonomous driving vehicle is provided, comprising a controller, wherein the controller is configured to execute the method provided above in the present disclosure.
[0011] According to one or more embodiments of the present disclosure, the reception and processing delay of sensor data can be reduced while ensuring system performance.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0015] Figure 2 A flow chart of a message transmission method according to an embodiment of the present disclosure is shown;
[0016] Figure 3 A flowchart of a process of obtaining a message according to an embodiment of the present disclosure is shown;
[0017] Figure 4 A schematic diagram of a system using the message transmission method according to an embodiment of the present disclosure is shown;
[0018] Figure 5 A structural block diagram of a message transmission device according to an embodiment of the present disclosure is shown;
[0019] Figure 6 A structural block diagram of a message transmission device according to another embodiment of the present disclosure is shown;
[0020] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0021] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0022] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0023] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0024] With the development of autonomous driving technology, the amount of sensor data in the autonomous driving system of autonomous vehicles is becoming increasingly large. The delay in receiving and processing sensor data directly affects the CPU load, end-to-end delay, and the maximum driving speed supported by the autonomous driving system.
[0025] In the related art, the switching chip is often responsible for the interconnection of the entire in-vehicle Ethernet network. The various Ethernet devices in the car can be connected to the autonomous driving system through the switching chip. These Ethernet devices may include sensors, gateways, positioning devices, central control, etc. These devices can send messages and transmit the messages to the autonomous driving system through the port connected to the switching chip and the controller to realize the interaction between the device and the autonomous driving system running on the controller. These ports can support multiple DMA (Direct Memory Access) queues. The messages sent by the above devices can be mixed together and randomly transmitted to the controller through one of the multiple DMA queues. At this time, the autonomous driving system will respond to the message interrupt and read the message from the queue, and perform preliminary processing on the message through the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol stack, and then send it to the software running on the controller through the socket interface for subsequent processing.
[0026] However, some of the messages sent by the above-mentioned devices may involve data of some delay-sensitive services, such as point cloud data of lidar and position data of positioning system. These messages are transmitted together with a large number of other messages, resulting in a large transmission delay of these messages, which has a great impact on the accuracy of related services. Since all messages are transmitted via the TCP / IP protocol stack, the CPU occupancy rate of the autonomous driving system is also increased, further increasing the transmission delay of the message. At the same time, since the messages are randomly transmitted to different CPUs for processing through different DMA queues, the cache may fail frequently, thereby reducing the performance of the autonomous driving system.
[0027] Therefore, there is an urgent need for a method that can reduce the reception and processing delay of sensor data while ensuring system performance.
[0028] In view of the above technical problem, according to one aspect of the present disclosure, a message transmission method is provided.
[0029] Before describing in detail the message transmission method according to the embodiment of the present disclosure, Figure 1 Schematic diagram depicting an exemplary system in which the various methods and apparatus described herein may be implemented.
[0030] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes a motor vehicle 110 , a server 120 , and one or more communication networks 130 coupling the motor vehicle 110 to the server 120 .
[0031] In an embodiment of the present disclosure, the motor vehicle 110 may include a computing device according to an embodiment of the present disclosure and / or be configured to perform a method according to an embodiment of the present disclosure.
[0032] The server 120 may run one or more services or software applications that enable the method of message transmission. In some embodiments, the server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. A user of the motor vehicle 110 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0033] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0034] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0035] In some embodiments, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from motor vehicle 110. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of motor vehicle 110.
[0036] The network 130 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including, but not limited to, TCP / IP, SNA, IPX, etc. By way of example only, one or more networks 130 may be a satellite communications network, a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (including, for example, Bluetooth, WiFi), and / or any combination of these and other networks.
[0037] The system 100 may also include one or more databases 150. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 150 may be used to store information such as audio files and video files. The data repository 150 may reside in various locations. For example, the data repository used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The data repository 150 may be of different types. In some embodiments, the data repository used by the server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to a command.
[0038] In some embodiments, one or more of the databases 150 may also be used by an application to store application data. The databases used by the application may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0039] The motor vehicle 110 may include a sensor 111 for sensing the surrounding environment. The sensor 111 may include one or more of the following sensors: a visual camera, an infrared camera, an ultrasonic sensor, a millimeter wave radar, and a laser radar (LiDAR). Different sensors may provide different detection accuracy and range. The camera may be installed at the front, rear, or other location of the vehicle. The visual camera may capture the situation inside and outside the vehicle in real time and present it to the driver and / or passengers. In addition, by analyzing the images captured by the visual camera, information such as traffic light indications, intersection conditions, and the operating status of other vehicles may be obtained. The infrared camera may capture objects under night vision conditions. Ultrasonic sensors may be installed around the vehicle to measure the distance of objects outside the vehicle from the vehicle using the characteristics of strong ultrasonic directionality. Millimeter wave radars may be installed at the front, rear, or other location of the vehicle to measure the distance of objects outside the vehicle from the vehicle using the characteristics of electromagnetic waves. Laser radars may be installed at the front, rear, or other location of the vehicle to detect object edges and shape information, thereby identifying and tracking objects. Due to the Doppler effect, the radar device may also measure the speed change of the vehicle and the moving object.
[0040] The motor vehicle 110 may also include a communication device 112. The communication device 112 may include a satellite positioning module capable of receiving satellite positioning signals (e.g., Beidou, GPS, GLONASS, and GALILEO) from satellites 141 and generating coordinates based on these signals. The communication device 112 may also include a module for communicating with a mobile communication base station 142, and the mobile communication network may implement any suitable communication technology, such as GSM / GPRS, CDMA, LTE, and other current or evolving wireless communication technologies (e.g., 5G technology). The communication device 112 may also have a vehicle-to-vehicle or vehicle-to-everything (V2X) module, which is configured to implement, for example, vehicle-to-vehicle (V2V) communication with other vehicles 143 and vehicle-to-infrastructure (V2I) communication with infrastructure 144. In addition, the communication device 112 may also have a module configured to communicate with a user terminal 145 (including but not limited to a smartphone, a tablet computer, or a wearable device such as a watch) by, for example, using a wireless LAN or Bluetooth of the IEEE802.11 standard. Using the communication device 112, the motor vehicle 110 may also access the server 120 via the network 130.
[0041] The motor vehicle 110 may also include a control device 113. The control device 113 may include a processor that communicates with various types of computer-readable storage devices or media, such as a central processing unit (CPU) or a graphics processing unit (GPU), or other dedicated processors. The control device 113 may include an automatic driving system for automatically controlling various actuators in the vehicle. The automatic driving system is configured to control the powertrain, steering system, and braking system of the motor vehicle 110 (not shown) via multiple actuators in response to inputs from multiple sensors 111 or other input devices to control acceleration, steering, and braking, respectively, without human intervention or limited human intervention. Some processing functions of the control device 113 can be implemented through cloud computing. For example, some processing can be performed using an on-board processor, while other processing can be performed using computing resources in the cloud. The control device 113 can be configured to perform a method according to the present disclosure. In addition, the control device 113 can be implemented as an example of a computing device on the motor vehicle side (client) according to the present disclosure.
[0042] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0043] The message transmission method according to an embodiment of the present disclosure is described in detail below.
[0044] Figure 2 FIG. 2 shows a flow chart of a message transmission method 200 according to an embodiment of the present disclosure. Figure 2 As shown, the method 200 includes steps S210, S220, S230, S240 and S250. The method 200 can be applied to various scenarios where data is received based on Ethernet and has high requirements on performance and latency, such as sensor data transmission and control of autonomous driving vehicles, and reception of positioning data and / or lidar point cloud data in vehicle networks.
[0045] In step S210, a first message and a second message to be transmitted and a plurality of queues for transmitting the first message and the second message are obtained, and the second message has a higher delay sensitivity than the first message.
[0046] In step S220, at least one first queue among the plurality of queues is determined, where the first queue is configured to be transmitted via a kernel protocol stack.
[0047] In step S230, at least one second queue among the plurality of queues is determined, where the second queue is different from the first queue and is configured to skip the kernel protocol stack for transmission.
[0048] In step S240, a first message is transmitted through at least one first queue.
[0049] In step S250, a second message is transmitted through at least one second queue.
[0050] In the example, the first message and the second message can be, for example, sent from Ethernet devices such as sensors, gateways, positioning devices, and central control. These devices can send out the first message and the second message, transmit the first message and the second message to the autonomous driving system through the port to which the switching chip is connected to the controller, and interact with the autonomous driving system running on the controller. Generally speaking, the on-board switching chip is a hardware device that integrates a switch and a physical network card, and the switching chip can configure the transmission of messages in the queue. The first message and the second message can be two messages sent from different Ethernet devices, or two messages sent from the same Ethernet device.
[0051] In the example, there may be multiple queues for the transmission of messages. The queue may be, for example, a DMA queue, which may be understood as a channel for transmitting messages. In some embodiments, as the vehicle moves, some messages, such as the point cloud data message of the lidar and the positioning data message, have a strong timeliness. If the transmission delay of such messages is too large, the data obtained by the upper-layer application may have a large error with the current actual data, or may even be completely unavailable. Therefore, such messages can be considered to have a higher sensitivity to delay, so they can be determined as the second message. Other messages, for example, may be related to the control of the device, and a certain degree of delay has little effect on the accuracy of the control operation or related business, and has a lower sensitivity to delay, so they can be determined as the first message.
[0052] In the example, the first message and the second message can be transmitted through different DMA queues. Since the second message has a higher latency sensitivity than the first message, the DMA queue used to transmit the second message, that is, the second queue, can provide a higher message transmission speed than the first queue.
[0053] In the example, the switching chip can randomly determine or designate one or more queues among the multiple queues as the first queue and determine other queues among the multiple queues as the second queue, or randomly determine or designate one or more queues among the multiple queues except the first queue as the second queue.
[0054] In the prior art, the messages sent by each device in the vehicle network are usually preliminarily processed by the kernel protocol stack, and then sent to the software running on the controller for subsequent processing. The above-mentioned kernel protocol stack can be, for example, a kernel TCP / IP protocol stack. In an embodiment of the present disclosure, in order to provide a higher message transmission speed, the second queue can skip the kernel protocol stack through some special protocol families, such as the AF_XDP protocol family, and send the second message directly to the application. Since such transmission does not undergo preliminary processing by the kernel protocol stack, but is directly sent to the software running on the controller for processing, the transmission delay is small and the performance is high. At the same time, the operating burden of the kernel is reduced, and the kernel overhead can be reduced accordingly, and the transmission speed of various messages can be improved.
[0055] Generally speaking, all messages are directly transmitted to the application layer for unified judgment and processing without passing through the kernel TCP / IP protocol stack, such as the Data Plane Development Kit (DPDK) technology, which can be applied to cloud computing to optimize the transceiver performance of Ethernet traffic. However, this method has a very high CPU occupancy rate and poor compatibility. In addition, this method also requires the configuration of an upper-layer application protocol stack to process various types of messages. Messages that are not configured separately cannot be identified and therefore cannot be processed, so the flexibility is also very poor.
[0056] Therefore, the in-vehicle network with a wide variety of complex messages is not suitable for such a transmission method. In view of this situation, the message with less delay sensitivity, that is, the first message mentioned above, can be transmitted through the first queue different from the second queue. The first message may include, for example, some messages related to complex services such as control that need to be transmitted through the kernel TCP / IP protocol stack.
[0057] In the example, in order to ensure the stable transmission of messages of various complex services, the first queue can send the first message to the application via the kernel TCP / IP protocol stack through other protocol families different from the AF_XDP protocol family, such as the AF_INET protocol family. Since a large part of the highly latency-sensitive messages have bypassed the kernel TCP / IP protocol stack for transmission, the traffic passing through the kernel TCP / IP protocol stack is greatly reduced, so the transmission speed of the first message can also be improved to a certain extent.
[0058] According to the message transmission method of the embodiment of the present disclosure, more complex messages with low delay sensitivity are transmitted via the kernel TCP / IP protocol stack, which can ensure that a variety of complex services and functions can be supported without adding too much message processing burden to the upper-level application. At the same time, messages with simple functions but high delay sensitivity skip the kernel TCP / IP protocol stack and are directly transmitted to the upper-level application, which can greatly reduce the delay of these message data and improve the timeliness of the data and the accuracy of control. By combining the above two transmission methods, the delay of sensor data reception based on Ethernet link forwarding can be greatly reduced, the data reception and processing capabilities and overall performance of the autonomous driving system can be improved, and the resource load of the autonomous driving system is reduced.
[0059] The following further describes various aspects of the message transmission method according to the embodiments of the present disclosure.
[0060] According to some embodiments, the message transmission method 200 may further include: creating at least one virtual network card based on the physical network card; allocating at least one first queue to the physical network card; and allocating at least one second queue to the at least one virtual network card.
[0061] In the example, the physical network card can be considered to be equivalent to the network card hardware integrated in the switching chip, which needs to be registered in the kernel through the network card driver before it can work. The physical network card can transfer data between the kernel network protocol stack and the external network. The user can configure the network card interface properties for the physical network card, such as the IP address. These properties are configured in the kernel's network protocol stack. The virtual network card is a virtual network adapter constructed by simulating the network environment through software, which can realize LAN communication between virtual network cards through VPN (Virtual Private Network) technology. Therefore, the virtual network card can be used to realize the transmission of the second message without passing through the kernel protocol stack.
[0062] In the example, SR-IOV (Single Root I / O Virtualization) technology can be used to create one or more virtual network cards based on a physical network card. For this physical network card and one or more virtual network cards, a specific DMA queue and interrupt can be allocated to each of the network cards.
[0063] In the example, a first message that is relatively complex and less delay-sensitive may be transmitted by a physical network card and a DMA queue corresponding thereto. Corresponding to the first message, the DMA queue allocated to the physical network card may be one or more queues in the first queue.
[0064] Correspondingly, the second message with simple functions but high delay sensitivity can be transmitted by the virtual network card and the corresponding DMA queue. Corresponding to the second message, the DMA queue allocated to the virtual network card can be one or more queues in the second queue.
[0065] In the example, there may be multiple virtual network cards. A specific second queue and interrupt may be assigned to each virtual network card, and the second message may be randomly transmitted through these second queues. The second message may be further divided into messages with different transmission priority levels, and transmitted through different virtual network cards and second queues according to their transmission priority levels.
[0066] According to the embodiments of the present disclosure, by creating a virtual network card based on a physical network card, it is possible to facilitate independent transmission of messages between multiple queues using different protocol families, thereby ensuring stable message transmission.
[0067] According to some embodiments, when there are multiple virtual network cards and multiple second queues, the second queues in the multiple second queues assigned to each of the multiple virtual network cards may not overlap with each other.
[0068] In a possible embodiment, there may be two virtual network cards and four second queues may be obtained, and these queues may be numbered 1 to 4, for example, for easy distinction. The second queues numbered 1 and 2 may be assigned to one of the virtual network cards, and the second queues numbered 3 and 4 may be assigned to another virtual network card. Alternatively, the second queue numbered 1 may be assigned to one of the virtual network cards, and the second queues numbered 2, 3, and 4 may be assigned to another virtual network card. It can be understood that, according to actual needs, the number of virtual network cards and the number of second queues may be different from the above embodiments, and the specific correspondence between the virtual network cards and the second queues may also be appropriately adjusted.
[0069] According to the embodiment of the present disclosure, by allocating a different second queue to each virtual network card, it is possible to facilitate independent transmission of messages between multiple virtual network cards, making message transmission more controllable.
[0070] According to some embodiments, allocating at least one first queue and at least one second queue may be performed by configuring RSS (Receive Side Scaling) rules on a physical network card.
[0071] In the example, RSS is a network card driver technology that can be used for efficient allocation of network packet processing capabilities. Since the virtual network card is created based on the physical network card, RSS rules can be configured on the physical network card to transmit different types of messages through the specified network card and the specified DMA queue based on the characteristics of the message.
[0072] According to an embodiment of the present disclosure, by using the RSS rule to allocate the first queue and the second queue for message transmission, message transmission can be made more orderly and controllable, so that messages with higher delay sensitivity can obtain higher transmission priority.
[0073] Figure 3 FIG. 3 is a flow chart showing a process 300 of acquiring a message according to an embodiment of the present disclosure. Figure 3 As shown, process 300 may include steps S310 , S320 , and S330 .
[0074] In step S310, a plurality of messages to be transmitted may be obtained.
[0075] In step S320, transmission information of each of the plurality of messages may be determined. The transmission information may indicate delay sensitivity of the message.
[0076] In step S330, the message may be determined as the first message or the second message based on the transmission information of the message.
[0077] In the example, the message may include data information to be transmitted and transmission information related to the transmission address, protocol, and port. The data information can be processed after being received so that the receiving end can obtain information such as instruction content, request content, sensor data, etc. The transmission information can indicate where the message is sent from, how it is transmitted, and where it is sent. Each type of message sent by different devices has its own special transmission information, so the message can be determined as the first message or the second message based on the transmission information of the message. Since the amount of transmission information is small, the information can be identified almost without processing. Therefore, the first message and the second message can be identified efficiently and easily based on the transmission information of the message.
[0078] According to an embodiment of the present disclosure, by determining the transmission information of a message, it is possible to determine whether the message has a high delay sensitivity and needs to be assigned a higher transmission priority, thereby determining whether the message is a first message or a second message, and to which queue it should be assigned for transmission.
[0079] According to some embodiments, the transmission information may include at least one of an address, a protocol number, and a port number of the message.
[0080] In the example, different messages sent by different Ethernet devices may have their specific addresses, protocol numbers, and port numbers. Therefore, the network card can determine the type of the message by means of any one of the addresses, protocol numbers, and port numbers in the message. In some embodiments, a higher-configured network card can recognize more message transmission information, so the identification and classification of the message can be more accurate.
[0081] According to the embodiments of the present disclosure, messages can be accurately identified and classified by means of addresses, protocol numbers, and port numbers in messages.
[0082] According to some embodiments, the second message may be assigned a higher transmission priority than the first message.
[0083] According to an embodiment of the present disclosure, by assigning a higher transmission priority to the second message than to the first message, messages with higher delay sensitivity can be transmitted through a queue with faster transmission, thereby preferentially reducing the delay of these message data and improving the timeliness of the data and the accuracy of control.
[0084] Figure 4 A schematic diagram of a system using the message transmission method according to an embodiment of the present disclosure is shown.
[0085] Figure 4 An example of processing a laser radar point cloud using a virtual network card is shown. The figure includes a laser radar 430, devices 440, 450, and 460. Devices 440, 450, and 460 can be gateway devices, positioning devices, and in-vehicle center consoles, respectively. Devices 440, 450, and 460 can send various messages to the port connected to the switch chip 420 and the controller 410 to transmit to the automatic driving system 411, so as to interact with the automatic driving system 411 running on the controller 410.
[0086] In the example, see Figure 4 , the laser radar 430 can send two different messages, including a point cloud data message 431 and a control and status message 432. The point cloud data message 431 has a large flow rate and a very high delay requirement, while the control and status message 432 has a relatively small flow rate and a relatively low delay requirement.
[0087] In the example, the SR-IOV function of the network card can be used to create a virtual network card 422, which corresponds to the physical network card 421. It can be understood that Figure 4 The example shown is an example of creating only one virtual network card. In actual applications, more than 20 virtual network cards can be created according to the needs of the scenario to handle various delay-sensitive services such as lidar point cloud, positioning, etc. These network cards can transmit various messages in parallel.
[0088] In an example, the DMA queue 401 may be assigned to the virtual network card 422, and the DMA queues 402, 403, and 404 may be assigned to the physical network card 421. The virtual network card 422 may be configured to specifically receive the point cloud data packet 431 of the laser radar 430.
[0089] After the configuration is completed, the application software can be started. Two sockets can be created in the application software, one of which is configured to use the AF_XDP protocol family to bind the virtual network card 422 to receive the point cloud data message 431 of the laser radar 430, and the other socket is configured to use the AF_INET protocol family to receive the control and status message 432 of the laser radar 430, the message 441 of the device 440, the message 451 of the device 450, and the message 461 of the device 460 from the physical network card 421 or perform device configuration.
[0090] In the example, ACL (Access Control List) rules may be configured on the switch chip 420. Based on the characteristics of the point cloud data message 431 of the laser radar 430, a higher internal forwarding priority may be assigned to the point cloud data message 431 in the switch chip 420 to ensure that the internal forwarding delay of the switch chip 420 is as small as possible.
[0091] In the example, a network card may be integrated on the switch chip 420, and the flow rules may be configured using the RSS function of the network card on the switch chip 420. The flow rules may be used to control different messages to be transmitted through a specific channel.
[0092] like Figure 4 As shown, the laser radar 430 can send the point cloud data message 431 to the DMA queue 401 for transmission, and can trigger the network card packet receiving interrupt. The controller 410 can respond to the network card packet receiving interrupt, and when the point cloud data message 431 matches the packet receiving condition of the AF_XDP protocol family, the point cloud data message 431 is directly sent to the upper layer application, that is, the automatic driving system 411, without passing through the TCP / IP protocol stack 412. Therefore, the controller 410 receives the point cloud data message 431 through the socket corresponding to AF_XDP at this time, and can perform subsequent processing on it.
[0093] In the example, queues for transmission of control and status message 432 of laser radar 430, message 441 of device 440, message 451 of device 450, and message 461 of device 460 may also be set. Figure 4 As shown, the control and status message 432 of the laser radar 430 can be set to be transmitted through the DMA queue 402, the message 441 of the device 440, the message 451 of the device 450, and the message 461 of the device 460 are all transmitted through the DMA queue 403, and the DMA queue 404 can be set not to transmit any message. The transmission of messages in the DMA queue 402, the DMA queue 403, and the DMA queue 404 can all be performed via the TCP / IP protocol stack 412. It can be understood that this is only a configuration example. In actual applications, different configurations can also be set for messages and queues. Figure 4The corresponding relationship shown.
[0094] According to another aspect of the present disclosure, a message transmission device is also provided.
[0095] Figure 5 A structural block diagram of a message transmission device 500 according to an embodiment of the present disclosure is shown.
[0096] like Figure 5 As shown, the message transmission device 500 includes: an acquisition module 510, configured to acquire a first message and a second message to be transmitted and a plurality of queues for transmitting the first message and the second message, wherein the second message has a higher delay sensitivity than the first message; a first queue determination module 520, configured to determine at least one first queue among the plurality of queues, wherein at least one first queue is configured to be transmitted via a kernel protocol stack; a second queue determination module 530, configured to determine at least one second queue among the plurality of queues, wherein at least one second queue is different from at least one first queue and is configured to skip the kernel protocol stack for transmission; a first transmission module 540, configured to transmit a first message through at least one first queue; and a second transmission module 550, configured to transmit a second message through at least one second queue.
[0097] Since the acquisition module 510, the first queue determination module 520, the second queue determination module 530, the first transmission module 540, and the second transmission module 550 in the message transmission device 500 may respectively correspond to Figure 2 Therefore, the details of each aspect thereof will not be repeated here.
[0098] In addition, the message transmission device 500 and the modules included therein may further include further sub-modules, which will be described in conjunction with the following. Figure 6 Provide detailed explanation.
[0099] According to the embodiments of the present disclosure, by transmitting more complex and less delay-sensitive messages via the kernel TCP / IP protocol stack, it is possible to ensure that a variety of complex services and functions can be supported without adding too much message processing burden to the upper-layer application. At the same time, messages with simple functions but high delay sensitivity skip the kernel TCP / IP protocol stack and are directly transmitted to the upper-layer application, which can greatly reduce the delay of these message data and improve the timeliness of the data and the accuracy of control. By combining the above two transmission methods, the delay in receiving sensor data forwarded based on Ethernet links can be greatly reduced, the data receiving and processing capabilities and overall performance of the autonomous driving system can be improved, and the resource load of the autonomous driving system can be reduced.
[0100] Figure 6A structural block diagram of a message transmission device 600 according to another embodiment of the present disclosure is shown.
[0101] like Figure 6 As shown, the message transmission device 600 may include an acquisition module 610, a first queue determination module 620, a second queue determination module 630, a first transmission module 640, and a second transmission module 650. The acquisition module 610, the first queue determination module 620, the second queue determination module 630, the first transmission module 640, and the second transmission module 650 may be used as shown in FIG. Figure 5 The acquisition module 510, the first queue determination module 520, the second queue determination module 530, the first transmission module 540, and the second transmission module 550 shown correspond to each other, so their details are not repeated here.
[0102] In the example, the message transmission device 600 may also include: a virtual network card creation module 660, configured to create at least one virtual network card based on the physical network card; a first queue allocation module 670, configured to allocate at least one first queue to the physical network card; and a second queue allocation module 680, configured to allocate at least one second queue to at least one virtual network card.
[0103] In an example, when there are multiple virtual network cards and multiple second queues, the second queues in the multiple second queues assigned to each of the multiple virtual network cards may not overlap with each other.
[0104] In an example, allocating the at least one first queue and the at least one second queue may be performed by configuring a receive-side scaling rule on a physical network card.
[0105] In the example, the acquisition module 610 may include: a message acquisition module 611, configured to acquire multiple messages to be transmitted; a transmission information determination module 612, configured to determine the transmission information of each message in the multiple messages, wherein the transmission information indicates the delay sensitivity of the message; and a message category determination module 613, configured to determine the message as a first message or a second message based on the transmission information of the message.
[0106] In an example, the transmission information may include at least one of an address, a protocol number, and a port number of the message.
[0107] In an example, the second message may be assigned a higher transmission priority than the first message.
[0108] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, a computer program product and an autonomous driving vehicle are also provided.
[0109] refer to Figure 7, a block diagram of an electronic device 700 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0110] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0111] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 can be any type of device that can input information to the electronic device 700. The input unit 706 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 707 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 can include but is not limited to a disk, an optical disk. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0112] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the message transmission method. For example, in some embodiments, the message transmission method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the message transmission method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the message transmission method in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0118] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0120] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A message transmission method, comprising: Acquire a first message and a second message to be transmitted and a plurality of queues for transmitting the first message and the second message, wherein the second message has a higher delay sensitivity than the first message; determining at least one first queue of the plurality of queues, wherein the at least one first queue is configured for transmission via a kernel protocol stack; determining at least one second queue among the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is configured to skip the kernel protocol stack for transmission; Transmitting the first message through the at least one first queue; and The second message is transmitted through the at least one second queue.
2. The method according to claim 1, further comprising: Create at least one virtual network card based on the physical network card; Allocating the at least one first queue to the physical network card; as well as The at least one second queue is allocated to the at least one virtual network card.
3. The method according to claim 2, wherein: There are multiple virtual network cards and multiple second queues, and the second queues in the multiple second queues assigned to each of the multiple virtual network cards do not overlap with each other.
4. The method according to claim 2 or 3, wherein: Allocating the at least one first queue and the at least one second queue is performed by configuring a receive-side scaling rule on the physical network card.
5. The method according to any one of claims 1 to 4, wherein: The acquiring the first message and the second message to be transmitted and a plurality of queues for transmitting the first message and the second message includes: Obtain multiple messages to be transmitted; determining transmission information for each of the plurality of messages, wherein the transmission information indicates delay sensitivity of the message; and Based on the transmission information of the message, the message is determined to be the first message or the second message.
6. The method according to claim 5, wherein: The transmission information includes at least one of an address, a protocol number, and a port number of the message.
7. The method according to any one of claims 1 to 6, wherein: The second message is assigned a higher transmission priority than the first message.
8. A message transmission device, comprising: an acquisition module, configured to acquire a first message and a second message to be transmitted and a plurality of queues for transmitting the first message and the second message, wherein the second message has a higher delay sensitivity than the first message; A first queue determination module is configured to determine at least one first queue among the plurality of queues, wherein the at least one first queue is configured to be transmitted via a kernel protocol stack; A second queue determination module is configured to determine at least one second queue among the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is configured to skip the kernel protocol stack for transmission; A first transmission module, configured to transmit the first message through the at least one first queue; and The second transmission module is configured to transmit the second message through the at least one second queue.
9. The apparatus according to claim 8, further comprising: A virtual network card creation module, configured to create at least one virtual network card based on the physical network card; A first queue allocation module, configured to allocate the at least one first queue to the physical network card; as well as The second queue allocation module is configured to allocate the at least one second queue to the at least one virtual network card.
10. The device according to claim 9, wherein: There are multiple virtual network cards and multiple second queues, and the second queues in the multiple second queues assigned to each of the multiple virtual network cards do not overlap with each other.
11. The device according to claim 9 or 10, wherein: Allocating the at least one first queue and the at least one second queue is performed by configuring a receive-side scaling rule on the physical network card.
12. The device according to any one of claims 8 to 11, wherein: The acquisition module comprises: A message acquisition module, configured to acquire a plurality of messages to be transmitted; a transmission information determination module, configured to determine transmission information of each of the plurality of messages, wherein the transmission information indicates delay sensitivity of the message; and The message category determination module is configured to determine the message as the first message or the second message based on the transmission information of the message.
13. The device according to claim 12, wherein: The transmission information includes at least one of an address, a protocol number, and a port number of the message.
14. The device according to any one of claims 8 to 13, wherein: The second message is assigned a higher transmission priority than the first message.
15. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
17. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1 to 7 when executed by a processor.
18. An autonomous driving vehicle, comprising a controller, wherein the controller is configured to execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Network message delay detection method and device and electronic equipment
CN112311619A
Message processing method and device, medium and equipment
CN112422453A
Data transmission method and electronic equipment
CN112436994A
Message sending method and device and readable storage medium
CN116095028A
Communication method, apparatus, and system
WO2022160714A1