Message transmission method, device and apparatus, and autonomous vehicle

By differentiating messages with varying latency sensitivities and employing different transmission methods, the problem of high latency in sensor data in autonomous vehicles has been solved, improving system performance and data timeliness.

CN119544823BActive Publication Date: 2025-11-07BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311103116.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-11-07
Estimated Expiration
2043-08-29

AI Technical Summary

Technical Problem

The large latency in receiving and processing sensor data in autonomous vehicles leads to increased CPU utilization, affecting system performance and driving speed.

Method used

By distinguishing messages with different latency sensitivities, different transmission methods are adopted: messages with high latency sensitivity are skipped and transmitted directly, while messages with low latency sensitivity are processed by the kernel protocol stack and allocated and transmitted using the DMA queues of the virtual network card and the physical network card.

Benefits of technology

This reduces the latency of receiving and processing sensor data, alleviates CPU load, and improves the performance and data timeliness of the autonomous driving system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544823B_ABST
    Figure CN119544823B_ABST
Patent Text Reader

Abstract

The disclosure provides a message transmission method, device and equipment and an autonomous vehicle, relates to the technical field of autonomous driving and communication, and in particular to the technical field of vehicle-mounted sensor communication. The implementation scheme is as follows: obtaining a first message and a second message to be transmitted and a plurality of queues used for transmitting the first message and the second message, wherein the second message has higher time delay sensitivity than the first message; determining at least one first queue in 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 in the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is set to be transmitted by skipping the kernel protocol stack; transmitting the first message through the at least one first queue; and transmitting the second message through the at least one second queue.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of automatic driving and communication technology, in particular to the field of vehicle-mounted sensor communication technology, and specifically to a message transmission method and device, electronic equipment, computer readable storage medium, computer program product and automatic driving vehicle. BACKGROUND

[0002] With the development of automatic driving technology, the amount of sensor data of the automatic driving system of the automatic driving vehicle is becoming larger and larger. The receiving and processing delay of the sensor data directly affects the central processing unit (CPU) load of the automatic driving system, the end-to-end delay, and the maximum driving speed supported by the automatic driving system. Therefore, how to reduce the receiving and processing delay of the sensor data while ensuring the system performance has always been a hot topic in the field.

[0003] The methods described in this section can not have been previously conceived or made. Unless otherwise indicated herein, the methods described in this section are not to be assumed to have been in the prior art merely because they are described in this section. Similarly, any problems mentioned in this section should not be assumed to have been recognized in the art. SUMMARY

[0004] The present disclosure provides a message transmission method and device, electronic equipment, computer readable storage medium, computer program product and automatic driving vehicle.

[0005] According to an aspect of the present disclosure, a message transmission method is provided, comprising: 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 higher latency sensitivity than the first message; determining at least one first queue in 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 in the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is set to be transmitted by skipping the kernel protocol stack; 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, there is provided a packet transmission apparatus, comprising: an obtaining module configured to obtain a first packet and a second packet to be transmitted and a plurality of queues for transmitting the first packet and the second packet, wherein the second packet has higher latency sensitivity than the first packet; a first queue determining module configured to determine at least one first queue of the plurality of queues, wherein the at least one first queue is set to be transmitted via a kernel protocol stack; a second queue determining module configured to determine at least one second queue of the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is set to be transmitted by skipping the kernel protocol stack; a first transmission module configured to transmit the first packet through the at least one first queue; and a second transmission module configured to transmit the second packet through the at least one second queue.

[0007] According to another aspect of the present disclosure, there is provided an electronic device, comprising at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable 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 provided above.

[0008] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method provided above.

[0009] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method provided above.

[0010] According to another aspect of the present disclosure, there is provided an autonomous vehicle comprising a controller, wherein the controller is configured to perform the method provided above.

[0011] According to one or more embodiments of the present disclosure, the receiving and processing latency of sensor data can be reduced while guaranteeing system performance.

[0012] It should be understood that the descriptions of the present section are not intended to identify key or essential features of embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following descriptions. BRIEF DESCRIPTION OF DRAWINGS

[0013] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain exemplary implementations of the application. The illustrated embodiments are merely examples and do not limit the scope of the claims. In all the drawings, like reference numerals refer to like parts throughout the various figures and embodiments.

[0014] Figure 1 A schematic diagram illustrating an exemplary system in which various methods described herein can be implemented according to embodiments of the present disclosure is shown;

[0015] Figure 2 A flowchart illustrating a packet transmission method according to embodiments of the present disclosure is shown;

[0016] Figure 3 A flowchart illustrating a process of obtaining a packet according to embodiments of the present disclosure is shown;

[0017] Figure 4 A schematic diagram illustrating a system using a packet transmission method according to embodiments of the present disclosure is shown;

[0018] Figure 5 A structural block diagram of a packet transmission apparatus according to embodiments of the present disclosure is shown;

[0019] Figure 6 A structural block diagram of a packet transmission apparatus 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 embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0021] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are meant to be exemplary and not limiting. As such, the skilled person will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Also, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.

[0022] In the present disclosure, the terms "first", "second", and the like are used to describe various elements only and do not intend to limit the positional relationship, the chronological relationship, or the importance of the elements, and such terms are used only to distinguish one element from another. In some examples, the first element and the second element can refer to the same instance of the element, and in some cases, based on the context of the description, they can also refer to different instances.

[0023] The terms used in the description of various examples in the present disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the number of elements is specifically limited, the element can be one or more than one, if the number of elements is not specifically limited, based on the context. In addition, the term "and / or" used in the present disclosure encompasses any one of the listed items and all possible combinations thereof.

[0024] With the development of automatic driving technology, the sensor data of the automatic driving system of the automatic driving vehicle is increasingly large. The receiving and processing delay of the sensor data directly affects the CPU load of the automatic driving system, the end-to-end delay, and the maximum driving speed supported by the automatic driving system.

[0025] In the related art, the entire in-vehicle Ethernet interconnection is often responsible by a switching chip. Various Ethernet devices in the vehicle can be connected to the automatic driving system through the switching chip, and the Ethernet devices can include sensors, gateways, positioning devices, central controls, etc. These devices can all send messages, and transmit the messages to the automatic driving system through the port connected to the controller by the switching chip, to realize the interaction between the devices and the automatic driving system running on the controller. The port can support multiple DMA (Direct Memory Access) queues inside. 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 automatic 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 the message to the software running on the controller through the socket interface for subsequent processing.

[0026] However, among the messages sent by the above devices, some messages can involve data of some time delay sensitive services, such as point cloud data of laser radar and position data of positioning system. These messages are mixed with a large number of other messages and transmitted together, resulting in a large transmission delay of these messages, which greatly affects the accuracy of related services. Since all messages are transmitted through the TCP / IP protocol stack, the CPU occupancy of the automatic driving system is also increased, further increasing the transmission delay of the messages. At the same time, since the messages are randomly transmitted to different CPUs for processing through different DMA queues, the cache may be frequently invalidated, thereby reducing the performance of the automatic driving system.

[0027] Therefore, there is an urgent need for a method that can reduce the receiving and processing delay of sensor data while ensuring system performance.

[0028] In view of the above technical problems, according to one aspect of the present disclosure, a message transmission method is provided.

[0029] Before describing the message transmission method according to the embodiments of the present disclosure in detail, first, the technical problems to be solved by the embodiments of the present disclosure will be described in conjunction with Figure 1 A schematic diagram of an example system in which the various methods and apparatuses described herein can be implemented is described.

[0030] Figure 1 A schematic diagram illustrating an example system 100 in which various methods and apparatus described herein can be implemented in accordance with embodiments of the present disclosure is shown. Referring to 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 embodiments of the present disclosure, the motor vehicle 110 can include a computing device in accordance with embodiments of the present disclosure and / or be configured to perform methods in accordance with embodiments of the present disclosure.

[0032] The server 120 can run one or more services or software applications that enable the methods of message transmission. In certain embodiments, the server 120 can also provide other services or software applications, which can include non-virtualized and virtualized environments. In Figure 1 In the illustrated configuration, the server 120 can include one or more components that implement the functionality performed by the server 120. These components can include software components, hardware components, or a combination thereof, executable by one or more processors. Users of the motor vehicle 110 can in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by the components. It should be understood that various different system configurations are possible, which can differ from the system 100. Thus, Figure 1 The system 100 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0033] The server 120 can include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other appropriate arrangement and / or combination. The server 120 can include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the server). In various embodiments, the server 120 can run one or more services or software applications that provide the functionality described below.

[0034] The computing units in the server 120 can run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0035] In some embodiments, the server 120 can include one or more applications to analyze and consolidate data feeds and / or event updates received from the motor vehicles 110. The server 120 can also include one or more applications to display the data feeds and / or real-time events via one or more display devices of the motor vehicles 110.

[0036] The networks 130 can be any type of networks familiar to those skilled in the art, which can support data communications using any of a variety of available protocols, including without limitation TCP / IP, SNA, IPX, etc. As examples, one or more of the networks 130 can 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 can also include one or more databases 150. In certain embodiments, these databases can be used to store data and other information. For example, one or more of the databases 150 can be used to store information such as audio files and video files. The data stores 150 can reside at various locations. For example, a data store used by the server 120 can be local to the server 120, or can be remote from the server 120 and can communicate with the server 120 via a network- or application-specific connection. The data stores 150 can be of different types. In certain embodiments, a data store used by the server 120 can be a database, such as a relational database. One or more of these databases can store, update, and retrieve data to and from the database in response to commands.

[0038] In certain embodiments, one or more of the databases 150 can also be used by applications to store application data. Databases used by applications can be different types of databases, such as key-value stores, object stores, or regular stores supported by a file system.

[0039] The motor vehicle 110 can comprise sensors 111 for perceiving the surrounding environment. The sensors 111 can comprise one or more of the following sensors: visual camera, infrared camera, ultrasonic sensor, millimeter wave radar, and laser radar (LiDAR). Different sensors can provide different detection accuracy and range. The camera can be installed at the front, rear or other positions of the vehicle. The visual camera can capture the situation inside and outside the vehicle in real time and present it to the driver and / or passenger. In addition, by analyzing the pictures captured by the visual camera, information such as traffic signal indication, intersection situation, other vehicle operating state, etc. can be obtained. The infrared camera can capture objects in night vision conditions. The ultrasonic sensor can be installed around the vehicle to measure the distance from the vehicle to the object outside the vehicle by taking advantage of the strong directivity of ultrasonic waves. The millimeter wave radar can be installed at the front, rear or other positions of the vehicle to measure the distance from the vehicle to the object outside the vehicle by taking advantage of the characteristics of electromagnetic waves. The laser radar can be installed at the front, rear or other positions of the vehicle to detect the edge and shape information of the object, thereby performing object recognition and tracking. Due to the Doppler effect, the radar device can also measure the speed change of the vehicle and the moving object.

[0040] The motor vehicle 110 can also comprise a communication device 112. The communication device 112 can comprise 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 can also comprise a module for communicating with mobile communication base stations 142, and the mobile communication network can implement any suitable communication technology, such as GSM / GPRS, CDMA, LTE, etc. current or developing wireless communication technology (e.g. 5G technology). The communication device 112 can also have a vehicle-to-everything (V2X) module configured to enable communication with the outside world, such as vehicle-to-vehicle (V2V) communication with other vehicles 143 and vehicle-to-infrastructure (V2I) communication with infrastructure 144. In addition, the communication device 112 can also have a module configured to communicate with user terminals 145 (including but not limited to smartphones, tablets or wearable devices such as watches) by using, for example, wireless local area networks or Bluetooth based on IEEE 802.11 standards. With the communication device 112, the motor vehicle 110 can also access the server 120 via the network 130.

[0041] The motor vehicle 110 can further include a control device 113. The control device 113 can include a processor, such as a central processing unit (CPU) or a graphics processing unit (GPU), or other special purpose processor, in communication with various types of computer readable storage or media. The control device 113 can include an autonomous driving system for automatically controlling various actuators in the vehicle. The autonomous driving system is configured to control the motor vehicle 110 (not shown) powertrain, steering system, and braking system, etc. via a plurality of actuators to control acceleration, steering, and braking, respectively, in response to inputs from a plurality of sensors 111 or other input devices, without or with limited human intervention. Part of the processing function of the control device 113 can be implemented by 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 the methods according to the present disclosure. Furthermore, the control device 113 can be implemented as one example of a motor vehicle side (client side) computing device according to the present disclosure.

[0042] Figure 1 The system 100 can be configured and operated in various ways to enable the application of various methods and devices described according to the present disclosure.

[0043] The following detailed description describes a message transmission method according to embodiments of the present disclosure.

[0044] Figure 2 A flowchart of a message transmission method 200 according to embodiments of the present disclosure is shown. As shown, the method 200 includes steps S210, S220, S230, S240, and S250. The method 200 can be applied to various scenarios based on Ethernet for data reception, with high requirements for performance and latency, such as sensor data transmission and control of autonomous vehicles, and reception scenarios for positioning data and / or laser radar point cloud data in vehicle-mounted networks. Figure 2

[0045] In step S210, a first message and a second message to be transmitted are obtained, and a plurality of queues for transmitting the first message and the second message are obtained, the second message having higher latency sensitivity than the first message.

[0046] In step S220, at least one first queue of the plurality of queues is determined, the first queue being set to transmit via a kernel protocol stack.

[0047] In step S230, at least one second queue of the plurality of queues is determined, the second queue being different from the first queue and being set to transmit by skipping the kernel protocol stack.

[0048] In step S240, the first message is transmitted through the at least one first queue.​

[0049] In step S250, the second packet is transmitted through the at least one second queue.

[0050] In examples, the first packet and the second packet can be issued from Ethernet devices such as sensors, gateways, positioning devices, central controllers, etc. These devices can issue the first packet and the second packet, which are transmitted to the automatic driving system through the port connected with the controller by the switching chip, and interact with the automatic driving system running on the controller. Generally, the switching chip on board is a hardware device integrating a switch and a physical network card, and the switching chip can configure the transmission of the packet in the queue. The first packet and the second packet can be two packets issued from different Ethernet devices, or two packets issued from the same Ethernet device.

[0051] In examples, there can be multiple queues for the transmission of packets. The queue can be a DMA queue, for example, which can be understood as a channel for transmitting packets. In some embodiments, as the vehicle moves, some packets such as point cloud data packets of laser radar and positioning data packets have strong timeliness. If the transmission delay of such packets is too large, the data obtained by the upper application can have a large error from the current actual data, or even be completely unavailable. Therefore, such packets can be considered to have higher latency sensitivity, and thus can be determined as second packets. Some other packets may, for example, 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 services, and has lower latency sensitivity, and thus can be determined as first packets.

[0052] In examples, the first packet and the second packet can be transmitted through different DMA queues. Since the second packet has higher latency sensitivity than the first packet, the DMA queue used to transmit the second packet, i.e., the second queue described above, can provide a higher packet transmission speed than the first queue.

[0053] In examples, the switching chip can randomly determine or designate one or more of the multiple queues as the first queue, and determine the other queues in the multiple queues as the second queue, or randomly determine or designate one or more of the queues in the multiple queues other than the first queue as the second queue.

[0054] In the prior art, messages sent by devices in the vehicle network are usually initially processed via a kernel protocol stack and then sent to software running on the controller for subsequent processing. The kernel protocol stack may be, for example, a kernel TCP / IP protocol stack. In embodiments of the present disclosure, in order to provide higher message transmission speed, the second queue can skip the kernel protocol stack and directly send the second message to the application program through some special protocol family, such as the AF_XDP protocol family. Since such transmission does not undergo initial processing by the kernel protocol stack, but is directly sent to the software running on the controller and processed, the transmission delay is small, the performance is high, and the running burden of the kernel is reduced, the kernel overhead is also reduced, and the transmission speed of various messages is improved.

[0055] Generally, a method of transmitting all messages directly to the application layer without passing through the kernel TCP / IP protocol stack for unified determination and processing, such as the Data Plane Development Kit (DPDK) technology, can be applied to cloud computing to optimize the transmission and reception performance of Ethernet traffic. However, such a method has a very high CPU occupancy rate and poor compatibility. In addition, this method also needs to configure an upper-layer application protocol stack to process various types of messages. Messages that are not configured separately cannot be identified and thus cannot be processed, so the flexibility is very poor.

[0056] Therefore, the vehicle network with a large number and complexity of messages is not suitable for such a transmission method. In this case, messages with less time delay sensitivity, i.e., the first messages, can be transmitted through a first queue different from the second queue. The first messages may include, for example, some messages related to complex services such as control, which need to be transmitted through the kernel TCP / IP protocol stack.

[0057] In an example, in order to ensure stable transmission of messages of various complex services, the first queue can send the first messages to the application program via the kernel TCP / IP protocol stack through a protocol family different from the AF_XDP protocol family, such as the AF_INET protocol family. Since a large part of the messages with high time delay sensitivity have bypassed the kernel TCP / IP protocol stack for transmission, the traffic via the kernel TCP / IP protocol stack is greatly reduced, and thus the transmission speed of the first messages can be improved to a certain extent.

[0058] According to the packet transmission method of the embodiments of the present disclosure, the more complex and less latency-sensitive packets are transmitted via the kernel TCP / IP protocol stack, which can ensure that various complex services and functions can be supported without adding too much packet processing burden to the upper application program. At the same time, the packets with simple functions but high latency sensitivity are transmitted directly to the upper application program by skipping the kernel TCP / IP protocol stack, which can greatly reduce the latency of these packet data and improve the timeliness and accuracy of control. By combining the above two transmission methods, the sensor data receiving latency based on Ethernet link forwarding is greatly reduced, the receiving and processing capacity of data of the automatic driving system and the overall performance of the automatic driving system are improved, and the resource load of the automatic driving system is reduced.

[0059] The various aspects of the packet transmission method according to the embodiments of the present disclosure are further described below.

[0060] According to some embodiments, the packet transmission method 200 can further include creating at least one virtual network card based on the physical network card, assigning at least one first queue to the physical network card, and assigning at least one second queue to the at least one virtual network card.

[0061] In an example, the physical network card can be considered as a network card hardware integrated in a switch chip, which needs to be registered in the kernel through a network card driver before it can work. The physical network card can transfer data between the kernel network protocol stack and the outside network, and the user can configure network card interface properties such as IP address for the physical network card, which are configured in the kernel network protocol stack. The virtual network card is a virtual network adapter constructed by simulating a network environment through software, which can realize local area network 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 packet without passing through the kernel protocol stack.

[0062] In an example, one or more virtual network cards can be created based on the physical network card by means of SR-IOV (Single Root I / O Virtualization) technology. For the one physical network card and one or more virtual network cards, a specific DMA queue and an interrupt can be assigned to each of the network cards.

[0063] In an example, the more complex and less latency-sensitive first packets can be transmitted by the physical network card and the DMA queue corresponding thereto. The DMA queue assigned to the physical network card corresponding to the first packet can be one or more queues in the first queue.

[0064] Correspondingly, the second packets, which are simple in function but high in latency sensitivity, can be transmitted by the virtual network cards and the DMA queues corresponding thereto. The DMA queues allocated to the virtual network cards corresponding to the second packets can be one or more of the second queues.

[0065] In an example, there can be multiple virtual network cards. Each of the virtual network cards can be allocated a specific second queue and an interrupt, and the second packets can be transmitted through these second queues randomly. The second packets can be further divided into packets with different priority transmission levels, and transmitted through different virtual network cards and second queues according to their priority transmission levels.

[0066] According to embodiments of the present disclosure, by creating virtual network cards based on physical network cards, it is convenient to independently transmit packets among multiple queues of different protocol families, and to ensure the stability of packet transmission.

[0067] According to some embodiments, in the case where there are multiple virtual network cards and multiple second queues, the second queues allocated to each of the multiple virtual network cards can not coincide with each other.

[0068] In a possible embodiment, there can be two virtual network cards and four second queues, which can be numbered 1-4, for example, for easy identification. The second queues numbered 1 and 2 can be allocated to one of the virtual network cards, and the second queues numbered 3 and 4 can be allocated to the other virtual network card. Alternatively, the second queue numbered 1 can be allocated to one of the virtual network cards, and the second queues numbered 2, 3 and 4 can be allocated to the other virtual network card. It can be understood that according to actual needs, the number of virtual network cards and the number of second queues can be different from the above embodiment, and the specific correspondence between the virtual network cards and the second queues can also be adjusted appropriately.

[0069] According to embodiments of the present disclosure, by allocating different second queues to each virtual network card, it is convenient to independently transmit packets among multiple virtual network cards, making the packet transmission more controllable.

[0070] According to some embodiments, allocating at least one first queue and at least one second queue can be performed by configuring an RSS (Receive Side Scaling) rule on the physical network card.

[0071] In an example, RSS is a network card driver technology that can be used for efficient allocation of network packet processing capabilities. Since the virtual network cards are created on the basis of the physical network cards, the RSS rule can be configured on the physical network card, and different types of packets can be transmitted through the specified network card and the specified DMA queue based on the characteristics of the packets.

[0072] According to an embodiment of the present disclosure, by allocating the first queue and the second queue for packet transmission by using the RSS rule, the packet transmission can be made more orderly and controllable, so that the packet with higher time delay sensitivity can obtain higher transmission priority.

[0073] Figure 3 A flow chart of a process 300 of obtaining a packet according to an embodiment of the present disclosure is shown. As shown, the process 300 can include steps S310, S320 and S330. Figure 3

[0074] In step S310, a plurality of packets to be transmitted can be obtained.

[0075] In step S320, transmission information of each of the plurality of packets can be determined. The transmission information can indicate time delay sensitivity of the packet.

[0076] In step S330, the packet can be determined as a first packet or a second packet based on the transmission information of the packet.

[0077] In an example, the packet can include data information to be transmitted and transmission information related to address, protocol, port of transmission. The data information can be received and processed so that the receiving end obtains information such as instruction content, request content, sensing data, etc. The transmission information can indicate where the packet is sent from, how to transmit, and where to send. Different types of packets sent by different devices have their special transmission information, so the packet can be determined as a first packet or a second packet based on the transmission information of the packet. Since the transmission information has a small amount of data and almost no information needs to be processed, the first packet and the second packet can be efficiently and simply identified based on the transmission information of the packet.

[0078] According to an embodiment of the present disclosure, by determining the transmission information of the packet, it can be determined whether the packet has higher time delay sensitivity and needs to be allocated higher transmission priority, so that it can be determined whether the packet is a first packet or a second packet and should be allocated to which queue for transmission.

[0079] According to some embodiments, the transmission information can include at least one of address, protocol number, and port number of the packet.

[0080] In an example, different packets sent by different Ethernet devices can have their specific address, protocol number, and port number. Therefore, the network card can determine the type of the packet by means of any one of the address, protocol number, and port number in the packet. In some embodiments, a network card with higher configuration can recognize more packet transmission information, so that the identification and classification of the packet can be more accurate.

[0081] ​According to an embodiment of the present disclosure, the address, the protocol number, and the port number in the packet can be used to accurately identify and classify the packet.

[0082] According to some embodiments, the second packet can be assigned a higher transmission priority than the first packet.

[0083] According to an embodiment of the present disclosure, by assigning the second packet a higher transmission priority than the first packet, the packet with higher latency sensitivity can be transmitted through a faster queue, thereby reducing the latency of the packet data and improving the timeliness and accuracy of control.

[0084] Figure 4 A schematic diagram of a system using the packet transmission method according to an embodiment of the present disclosure is shown.

[0085] Figure 4 An example of processing laser radar point cloud using a virtual network card is shown. The diagram includes a laser radar 430, devices 440, 450, and 460. The devices 440, 450, and 460 may, for example, be a gateway device, a positioning device, and an in-vehicle center console, respectively. The devices 440, 450, and 460 can send various packets to the automatic driving system 411 through the port connected to the controller 410 via the switch chip 420 to interact with the automatic driving system 411 running on the controller 410.

[0086] In an example, referring to Figure 4 , the laser radar 430 can send two different packets, including a point cloud data packet 431 and a control and status packet 432. The point cloud data packet 431 has a large traffic and requires a very high latency, while the control and status packet 432 has a relatively small traffic and requires a lower latency.

[0087] In an example, a virtual network card 422 can be created by means of the SR-IOV function of the network card, and the corresponding physical network card 421. It can be understood that Figure 4 An example of creating only one virtual network card is shown. In actual applications, more than twenty virtual network cards can be created at most according to the needs of the scene to process various latency-sensitive services such as laser radar point cloud, positioning, etc. These network cards can transmit various packets in parallel.

[0088] In an example, the DMA queue 401 can be allocated to the virtual network card 422, and the DMA queues 402, 403, and 404 can be allocated to the physical network card 421. The virtual network card 422 can 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. The application software can create two sockets, one of which is configured to bind the virtual network card 422 using the AF_XDP protocol family to receive the point cloud data packets 431 of the lidar 430, and the other is configured to receive the control and status packets 432 of the lidar 430, the packets 441 of the device 440, the packets 451 of the device 450, and the packets 461 of the device 460 from the physical network card 421 using the AF_INET protocol family or perform device configuration.

[0090] In an example, an ACL (Access Control list) rule can be configured on the switch chip 420. The switch chip 420 can be configured to assign a higher internal forwarding priority to the point cloud data packets 431 based on the characteristics of the point cloud data packets 431 of the lidar 430 to ensure that the internal forwarding delay of the switch chip 420 is as small as possible.

[0091] In an example, the switch chip 420 can be integrated with a network card, and a traffic rule can be configured on the switch chip 420 using the RSS function of the network card. The traffic rule can be used to control different packets to be transmitted through a specific channel.

[0092] As shown in Figure 4 , the lidar 430 can send the point cloud data packets 431 to the DMA queue 401 for transmission, and can trigger a network card packet reception interrupt at the same time. The controller 410 can respond to the network card packet reception interrupt, and when the point cloud data packets 431 match the packet reception conditions of the AF_XDP protocol family, the point cloud data packets 431 are directly sent to the upper-layer application, i.e., the autonomous driving system 411, without passing through the TCP / IP protocol stack 412. Thus, the controller 410 receives the point cloud data packets 431 through the socket corresponding to the AF_XDP at this time, and can perform subsequent processing on the point cloud data packets 431.

[0093] In an example, the queues for transmitting the control and status packets 432 of the lidar 430, the packets 441 of the device 440, the packets 451 of the device 450, and the packets 461 of the device 460 can also be set. As shown in Figure 4 , the control and status packets 432 of the lidar 430 can be set to be transmitted through the DMA queue 402, the packets 441 of the device 440, the packets 451 of the device 450, and the packets 461 of the device 460 can be set to be transmitted through the DMA queue 403, and the DMA queue 404 can be set to not transmit any packets. The transmission of the packets in the DMA queue 402, the DMA queue 403, and the DMA queue 404 can be performed through the TCP / IP protocol stack 412. It can be understood that this is only one configuration example. In actual applications, different configurations can also be set for the packets and the queues. Figure 4The corresponding relationship is shown.

[0094] According to another aspect of the present disclosure, a packet transmission device is also provided.

[0095] Figure 5 A structural block diagram of a packet transmission device 500 according to an embodiment of the present disclosure is shown.

[0096] As Figure 5 shown, the packet transmission device 500 includes: an acquisition module 510 configured to acquire a first packet and a second packet to be transmitted and a plurality of queues for transmitting the first packet and the second packet, wherein the second packet has higher latency sensitivity than the first packet; a first queue determination module 520 configured to determine at least one first queue in 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 530 configured to determine at least one second queue in the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is set to be transmitted by skipping the kernel protocol stack; a first transmission module 540 configured to transmit the first packet through the at least one first queue; and a second transmission module 550 configured to transmit the second packet through the 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 packet transmission device 500 can correspond to steps S210 to S250 as Figure 2 shown, details of each aspect thereof will not be repeated here.

[0098] In addition, the packet transmission device 500 and the modules included therein can also include further sub-modules, which will be described in detail below in conjunction with Figure 6 .

[0099] According to an embodiment of the present disclosure, the more complex and less latency-sensitive packets 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 packet processing burden to the upper layer application program. At the same time, the functionally simple but highly latency-sensitive packets are transmitted directly to the upper layer application program by skipping the kernel TCP / IP protocol stack, which can greatly reduce the latency of these packet data and improve the timeliness and accuracy of control. By combining the above two transmission methods, the sensor data reception latency based on Ethernet link forwarding is greatly reduced, the reception and processing capacity of data of the autonomous driving system and the overall performance are improved, and the resource load of the autonomous driving system is reduced.

[0100] Figure 6A structural block diagram of a packet transmission apparatus 600 according to another embodiment of the present disclosure is shown.

[0101] As shown in Figure 6 The packet transmission apparatus 600 can include an obtaining module 610, a first queue determining module 620, a second queue determining module 630, a first transmission module 640, and a second transmission module 650. The obtaining module 610, the first queue determining module 620, the second queue determining module 630, the first transmission module 640, and the second transmission module 650 can correspond to the obtaining module 510, the first queue determining module 520, the second queue determining module 530, the first transmission module 540, and the second transmission module 550 as shown in Figure 5 The details thereof will not be described herein again.

[0102] In an example, the packet transmission apparatus 600 can further include a virtual network card creating module 660 configured to create at least one virtual network card based on the physical network card, a first queue allocating module 670 configured to allocate at least one first queue to the physical network card, and a second queue allocating module 680 configured to allocate at least one second queue to the at least one virtual network card.

[0103] In an example, in a case where there are multiple virtual network cards and multiple second queues, the second queue of the multiple second queues allocated to each of the multiple virtual network cards can not coincide with each other.

[0104] In an example, the allocating of the at least one first queue and the at least one second queue can be performed by configuring a receiving end scaling rule on the physical network card.

[0105] In an example, the obtaining module 610 can include a packet obtaining module 611 configured to obtain multiple packets to be transmitted, a transmission information determining module 612 configured to determine transmission information of each of the multiple packets, wherein the transmission information indicates a latency sensitivity of the packet, and a packet category determining module 613 configured to determine the packet as a first packet or a second packet based on the transmission information of the packet.

[0106] In an example, the transmission information can include at least one of an address, a protocol number, and a port number of the packet.

[0107] In an example, the second packet can be assigned a higher transmission priority than the first packet.

[0108] According to embodiments of the present disclosure, an electronic device, a readable storage medium, a computer program product, and an autonomous vehicle are also provided.

[0109] Reference Figure 7The present invention describes a structural block diagram of an electronic device 700 that can serve as a server or client of the present disclosure, 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, workstations, 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 processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0110] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on 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. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0111] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 707 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, hard disk and optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0112] The computing unit 701 can be various general and / or special purpose 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 specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, and the like. The computing unit 701 performs various methods and processes described above, such as the packet transmission method. For example, in some embodiments, the packet transmission method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the packet transmission method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the packet transmission method by any other suitable means, such as by means of firmware.

[0113] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0114] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0115] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0116] To provide for interaction with a user, the systems and techniques described here 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.

[0117] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end 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] The computer system can include clients and servers. This relationship can be remote or on-site. The servers can be cloud servers, servers of a distributed system, or servers combined with a blockchain.

[0119] It should be understood that the various forms of flow shown above can be used to reorder, add, or delete steps. For example, the steps described in the present disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which are not limited herein.

[0120] Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-described methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present disclosure is not limited by these embodiments or examples, but is only limited by the granted claims and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples can be combined in various ways. It is important that many of the elements described herein can be replaced by equivalent elements that appear after the present disclosure as technology evolves.

Claims

1. A method for packet transmission, comprising: obtaining a first packet and a second packet to be transmitted and a plurality of queues for transmitting the first packet and the second packet, wherein the second packet has higher latency sensitivity than the first packet; determining at least one first queue of the plurality of queues, wherein the at least one first queue is configured to be transmitted via a kernel protocol stack; determining at least one second queue of the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is configured to be transmitted by skipping the kernel protocol stack; creating at least one virtual network card based on a physical network card; allocating the at least one first queue to the physical network card; allocating the at least one second queue to the at least one virtual network card, wherein the allocation of 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; transmitting the first packet through the at least one first queue; and transmitting the second packet through the at least one second queue.

2. The method of claim 1, wherein, There are a plurality of virtual network cards and a plurality of second queues, and the second queue of the plurality of second queues allocated to each of the plurality of virtual network cards does not coincide with each other.

3. The method of claim 1 or 2, wherein, The obtaining of the first packet and the second packet to be transmitted and the plurality of queues for transmitting the first packet and the second packet comprises: obtaining a plurality of packets to be transmitted; determining transmission information of each of the plurality of packets, wherein the transmission information indicates latency sensitivity of the packet; and determining the packet as the first packet or the second packet based on the transmission information of the packet.

4. The method of claim 3, wherein, The transmission information comprises at least one of an address, a protocol number, and a port number of the packet.

5. The method of claim 1 or 2, wherein, The second packet is given a higher transmission priority than the first packet. 6.A device for packet transmission, comprising: an obtaining module configured to obtain a first packet and a second packet to be transmitted and a plurality of queues for transmitting the first packet and the second packet, wherein the second packet has higher latency sensitivity than the first packet; a first queue determining module configured to determine at least one first queue of the plurality of queues, wherein the at least one first queue is configured to be transmitted via a kernel protocol stack; a second queue determining module configured to determine at least one second queue of the plurality of queues, wherein the at least one second queue is different from the at least one first queue and is configured to be transmitted by skipping the kernel protocol stack; a virtual network card creating module configured to create at least one virtual network card based on a physical network card; a first queue allocating module configured to allocate the at least one first queue to the physical network card; a second queue allocating module configured to allocate the at least one second queue to the at least one virtual network card, wherein the allocation of 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; The first transmission module is configured to transmit the first packet through the at least one first queue; and The second transmission module is configured to transmit the second packet through the at least one second queue.

7. The apparatus of claim 6, wherein, There are a plurality of virtual network cards and a plurality of second queues, and the second queue of the plurality of second queues allocated to each virtual network card of the plurality of virtual network cards does not coincide with each other.

8. The apparatus of claim 6 or 7, wherein, The obtaining module comprises: The packet obtaining module is configured to obtain a plurality of packets to be transmitted; The transmission information determining module is configured to determine transmission information of each of the plurality of packets, wherein the transmission information indicates the latency sensitivity of the packet; and The packet category determining module is configured to determine the packet as the first packet or the second packet based on the transmission information of the packet.

9. The apparatus of claim 8, wherein, The transmission information comprises at least one of an address, a protocol number, and a port number of the packet.

10. The apparatus of claim 6 or 7, wherein, The second packet is assigned a higher transmission priority than the first packet.

11. An electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being 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-5.

12. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method according to any one of claims 1-5.

13. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-5.

14. An autonomous vehicle comprising a controller, wherein, The controller is configured to perform the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Message sending method and device and readable storage medium

    CN116095028A

  • Communication method, apparatus, and system

    WO2022160714A1