Data transmission method, device, storage medium, processor and electronic device

The data transmission method enhances time synchronization and efficiency in autonomous vehicles by using PTP and openflow protocols to synchronize and prioritize sensor data transmission, overcoming existing accuracy and efficiency challenges.

CN114980005BActive Publication Date: 2024-12-27CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210529305.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2024-12-27
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

Autonomous driving vehicles face challenges with low time synchronization accuracy and data transmission efficiency due to errors in timestamp information across different sensors, which are not adequately addressed by existing data transmission methods.

Method used

A data transmission method involving precise time protocol (PTP) synchronization of master and slave clocks, followed by openflow protocol communication and scheduling algorithms to synchronize and prioritize sensor data transmission based on time sensitivity.

Benefits of technology

Improves time synchronization accuracy and data transmission efficiency by synchronizing master and slave clock times and prioritizing data transmission based on sensor sensitivity, addressing the inefficiencies in existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114980005B_ABST
    Figure CN114980005B_ABST
Patent Text Reader

Abstract

The present invention discloses a data transmission method, device, storage medium, processor and electronic device. The method includes: obtaining a first data set and a second data set, wherein the first data set is used to represent the time data to be used in the vehicle network data transmission process of the autonomous driving vehicle, and the second data set is used to represent the sensor data to be used in the vehicle network data transmission process; calculating the first data set according to the first protocol message to obtain a calculation result; based on the calculation result, forwarding the second data set using the second protocol to obtain a forwarding result; using a scheduling algorithm to transmit the forwarding result, and determining the data transmission result. The present invention solves the technical problems of low time synchronization accuracy and low data transmission efficiency in the data transmission method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving vehicle networks, and in particular to a data transmission method, device, storage medium, processor and electronic device. Background Art

[0002] When driving, autonomous vehicles often need to integrate data collected by multiple sensors to achieve environmental perception and make driving decisions. These sensors mainly include cameras, lidar, millimeter-wave radar, and controller area network (CAN) sensors used to collect vehicle chassis data. Since there are errors between the independent clocks inside cameras, millimeter-wave radars, and lidars, the errors in the timestamp information of the collected data output by different sensors often increase.

[0003] Autonomous driving usually has high requirements for time synchronization and data real-time performance. In related technologies, the data transmission method can be achieved by synchronizing with the outside through a single time synchronization box, which is then synchronized with the host, and the host is then synchronized with each sensor to achieve time synchronization, and then using an ordinary switch to transmit data. However, many data in autonomous driving vehicles have different degrees of sensitivity to time, and the data transmission of ordinary switches cannot guarantee the certainty of time, resulting in low time synchronization accuracy and low data transmission efficiency in the data transmission method.

[0004] Therefore, how to design a time synchronization solution and data transmission method to meet the needs of autonomous driving for time synchronization and data real-time performance, thereby improving the accuracy of time synchronization and the efficiency of data transmission, has become a key issue at present. No effective solution has been proposed for the above problems. Summary of the invention

[0005] Embodiments of the present invention provide a data transmission method, device, storage medium, processor and electronic device to at least solve the technical problems of low time synchronization accuracy and low data transmission efficiency in the data transmission method.

[0006] According to one embodiment of the present invention, a data transmission method is provided, comprising:

[0007] A first data set and a second data set are obtained, wherein the first data set is used to represent time data to be used in the process of transmitting data in the vehicle network of the autonomous driving vehicle, and the time data includes: time data of a master clock and time data of a slave clock, and the second data set is used to represent sensor data to be used in the process of transmitting data in the vehicle network; according to a first protocol message, the first data set is calculated to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock; based on the calculation result, the second data set is forwarded using a second protocol to obtain a forwarding result, wherein the second protocol is used for communication between a controller and a switch of the vehicle network; a scheduling algorithm is used to transmit data on the forwarding result to determine the data transmission result.

[0008] Optionally, obtaining the first data set and the second data set includes: building a target system, wherein the target system includes: a plurality of sensors, and the plurality of sensors are used to obtain sensor data; and obtaining the first data set and the second data set by starting the target system.

[0009] Optionally, the first protocol message includes: a first message, a second message and a third message, and the time information includes: first time information, second time information, third time information and fourth time information. According to the first protocol message, the first data set is calculated to obtain a calculation result including: obtaining the first time information based on the first message periodically sent by the master clock, wherein the first time information is used to indicate the sending time when the master clock sends the first message; in response to receiving the first message from the slave clock, recording the second time information, wherein the second time information is used to indicate the arrival time when the first message arrives at the slave clock; obtaining the third time information based on the second message sent by the slave clock, wherein the third time information is used to indicate the sending time when the slave clock sends the second message; in response to the master clock receiving the second message and sending the third message, obtaining the fourth time information, wherein the fourth time information is used to indicate the sending time when the master clock sends the third message; performing offset calculation using the first time information, the second time information, the third time information and the fourth time information to obtain the calculation result.

[0010] Optionally, the switch includes: a second protocol flow table, the second protocol flow table is used to record the execution action corresponding to the second protocol message, wherein based on the calculation result, the second data set is forwarded using the second protocol to obtain the forwarding result, including: based on the calculation result, parsing the second protocol message to obtain a parsing result; extracting keywords from the parsing result to obtain an extraction result; matching and searching the extraction result with the second protocol flow table to obtain a search result; in response to the search result satisfying a preset condition, forwarding the search result to obtain a forwarding result.

[0011] Optionally, a scheduling algorithm is used to perform data transmission on the forwarding results, and determining the data transmission results includes: performing statistical analysis on the forwarding results to obtain statistical analysis results; dividing the statistical analysis results into multiple queues to obtain queue division results; receiving a queue scheduling request in response to the queue division results, and determining the data transmission results.

[0012] Optionally, performing statistical analysis on the forwarding results to obtain statistical analysis results includes: performing statistics on the forwarding results to obtain statistical results; performing priority analysis on the statistical results using a target strategy to obtain statistical analysis results, wherein the target strategy is used to describe the sensitivity of sensor data in the statistical results to time.

[0013] According to one embodiment of the present invention, there is further provided a data transmission device, comprising:

[0014] An acquisition module is used to acquire a first data set and a second data set, wherein the first data set is used to represent time data to be used in the process of transmitting data in the vehicle network of an autonomous driving vehicle, and the time data includes: time data of a master clock and time data of a slave clock, and the second data set is used to represent sensor data to be used in the process of transmitting data in the vehicle network; a calculation module is used to calculate the first data set according to a first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock; a forwarding module is used to forward the second data set using a second protocol based on the calculation result to obtain a forwarding result, wherein the second protocol is used for communication between a controller and a switch of the vehicle network; a determination module is used to use a scheduling algorithm to perform data transmission on the forwarding result and determine the data transmission result.

[0015] According to one embodiment of the present invention, a non-volatile storage medium is provided, wherein a computer program is stored in the storage medium, wherein the computer program is configured to execute any of the aforementioned data transmission methods when running.

[0016] According to one embodiment of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program is configured to execute any of the aforementioned data transmission methods when running.

[0017] According to one embodiment of the present invention, there is also provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the aforementioned data transmission methods.

[0018] In an embodiment of the present invention, a first data set and a second data set are firstly obtained, wherein the first data set is used to represent time data to be used in the on-board network data transmission process of the autonomous driving vehicle, and the time data includes: time data of the master clock and time data of the slave clock, and the second data set is used to represent sensor data to be used in the on-board network data transmission process, and then the first data set is calculated according to the first protocol message to obtain a calculation result, wherein the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock, and then based on the calculation result, the second data set is forwarded using the second protocol to obtain a forwarding result, and finally a scheduling algorithm is used to transmit the forwarding result to determine the data transmission result, thereby achieving the purpose of synchronizing the time data of the master clock with the time data of the slave clock according to the first protocol message, thereby forwarding the sensor data to be used in the on-board network data transmission process using the second protocol, and then using the scheduling algorithm to transmit the forwarding result to transmit the data, thereby achieving the technical effect of improving the time synchronization accuracy of the data transmission method and improving the data transmission efficiency, and then solving the technical problems of low time synchronization accuracy and low data transmission efficiency of the data transmission method. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0020] Figure 1 is a flowchart of a data transmission method provided according to an embodiment of the present invention;

[0021] Figure 2 is a flowchart of an optional software-defined network forwarding data provided according to an embodiment of the present invention;

[0022] Figure 3 It is a structural block diagram of a data transmission device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to an embodiment of the present invention, an embodiment of a data transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] The method embodiment can be executed in an electronic device or a similar computing device that includes a memory and a processor in a vehicle. Taking the operation on the electronic device of the vehicle as an example, the electronic device of the vehicle may include one or more processors (the processor may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the electronic device of the above-mentioned vehicle may also include a transmission device, an input and output device, and a display device for communication functions. It can be understood by those of ordinary skill in the art that the above-mentioned structural description is only illustrative and does not limit the structure of the electronic device of the above-mentioned vehicle. For example, the electronic device of the vehicle may also include more or fewer components than the above-mentioned structural description, or have a configuration different from the above-mentioned structural description.

[0027] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the information processing method in the embodiment of the present invention. The processor executes various functional applications and data transmission by running the computer program stored in the memory, that is, realizing the above-mentioned information processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0028] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0029] The display device may be, for example, a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contact and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.

[0030] In this embodiment, a data transmission method of an electronic device running on the above vehicle is provided. Figure 1 is a flow chart of a data transmission method provided according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0031] Step S10, obtaining a first data set and a second data set, wherein the first data set is used to represent time data to be used in the process of transmitting data in the vehicle network of the autonomous driving vehicle, the time data including: time data of the master clock and time data of the slave clock, and the second data set is used to represent sensor data to be used in the process of transmitting data in the vehicle network;

[0032] Step S12, calculating the first data set according to the first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock;

[0033] The first protocol may be a precise time protocol (PTP for short). The message may be a data unit exchanged and transmitted in a network.

[0034] Step S14, forwarding the second data set using a second protocol based on the calculation result to obtain a forwarding result, wherein the second protocol is used for communication between the controller and the switch of the vehicle network;

[0035] The second protocol may be an openflow protocol. The switch may be an openflow switch.

[0036] Step S16, using a scheduling algorithm to perform data transmission on the forwarding result and determine the data transmission result.

[0037] In an embodiment of the present invention, a first data set and a second data set are firstly obtained, wherein the first data set is used to represent time data to be used in the on-board network data transmission process of the autonomous driving vehicle, and the time data includes: time data of the master clock and time data of the slave clock, and the second data set is used to represent sensor data to be used in the on-board network data transmission process, and then the first data set is calculated according to the first protocol message to obtain a calculation result, wherein the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock, and then based on the calculation result, the second data set is forwarded using the second protocol to obtain a forwarding result, and finally a scheduling algorithm is used to transmit the forwarding result to determine the data transmission result, thereby achieving the purpose of synchronizing the time data of the master clock with the time data of the slave clock according to the first protocol message, thereby forwarding the sensor data to be used in the on-board network data transmission process using the second protocol, and then using the scheduling algorithm to transmit the forwarding result to transmit the data, thereby achieving the technical effect of improving the time synchronization accuracy of the data transmission method and improving the data transmission efficiency, and then solving the technical problems of low time synchronization accuracy and low data transmission efficiency of the data transmission method.

[0038] Optionally, in step S10, obtaining the first data set and the second data set may include the following execution steps:

[0039] Step S101, building a target system, wherein the target system includes: a plurality of sensors, and the plurality of sensors are used to obtain sensor data;

[0040] Step S102: acquiring a first data set and a second data set by starting a target system.

[0041] The target system may be an autonomous driving system. The first data set may be time data to be used in the vehicle network data transmission process of the autonomous driving vehicle, wherein the time data may include: time data of the master clock and time data of the slave clock. The second data set may be sensor data to be used in the vehicle network data transmission process, such as chassis domain control data, positioning data, camera data, radar data, ultrasonic data, headlight data, wiper data, vehicle entertainment data, etc.

[0042] Based on the above steps S101 to S102, programming technology can be used to first construct the chassis module, control module, planning module, perception module, mapping and positioning module and other modules of the autonomous driving vehicle, wherein the chassis module is the basis of the autonomous driving vehicle, and then the chassis module, control module, planning module, perception module, mapping and positioning module and other modules are constructed to form an autonomous driving system, wherein the autonomous driving system includes multiple sensors, each of the multiple sensors is used to obtain sensor data, and finally, by starting the autonomous driving system, the time data and sensor data to be used in the on-board network data transmission process of the autonomous driving vehicle can be obtained.

[0043] Optionally, the first protocol message includes: a first message, a second message and a third message, and the time information includes: first time information, second time information, third time information and fourth time information. In step S12, calculating the first data set according to the first protocol message to obtain the calculation result may include the following execution steps:

[0044] Step S121, acquiring first time information based on a first message periodically sent by the master clock, wherein the first time information is used to indicate a sending time when the master clock sends the first message;

[0045] Step S122, in response to receiving the first message from the slave clock, recording second time information, wherein the second time information is used to indicate the arrival time when the first message arrives at the slave clock;

[0046] Step S123, acquiring third time information based on the second message sent from the clock, wherein the third time information is used to indicate the sending time of the second message sent from the clock;

[0047] Step S124, in response to the master clock receiving the second message and sending the third message, recording fourth time information, wherein the fourth time information is used to indicate the arrival time of the second message arriving at the master clock;

[0048] Step S125, performing offset calculation using the first time information, the second time information, the third time information and the fourth time information to obtain a calculation result.

[0049] The first protocol may be a precise time protocol (PTP for short). The message may be a data unit exchanged and transmitted in a network. The first message may be a sync message. The second message may be a delay_req message. The third message may be a delay_resp message. The calculation result may be a clock deviation and a network delay between a master clock and a slave clock.

[0050] Based on the above steps S121 to S125, first, the master clock periodically sends a sync synchronization message and records the precise sending time when the sync synchronization message leaves the master clock, which is recorded as t1. Then, the slave clock receives the sync synchronization message and records the precise arrival time when the sync synchronization message arrives at the slave clock, which is recorded as t2. Secondly, the slave clock sends a delay_req delay request message and records the precise sending time when the delay_req delay request message leaves the slave clock, which is recorded as t3. Then, the master clock receives the delay_req delay request message and sends a delay_resp delay request response message to the slave clock, and records the precise arrival time when the delay_req delay request message arrives at the master clock, which is recorded as t4. Therefore, the slave clock can obtain four precise message sending and receiving times of t1, t2, t3 and t4. Finally, the four precise message sending and receiving times of t1, t2, t3 and t4 are used to perform offset calculation to obtain the clock deviation and network delay of the master clock and the slave clock, thereby synchronizing the network time.

[0051] Specifically, the clock deviation and network delay between the master clock and the slave clock are calculated as shown in the following formulas (1) to (3):

[0052] t ms =t2-t1=delay+offset (1)

[0053] t sm =t4-t3=delay-offset (2)

[0054]

[0055] In formulas (1) to (3), tms Indicates the difference between the precise arrival time of the sync message at the slave clock and the precise sending time from the master clock, t sm It indicates the difference between the precise arrival time of the delay_req delay request message at the master clock and the precise sending time from the slave clock. Offset indicates the clock deviation between the master clock and the slave clock. Delay indicates the network delay.

[0056] Optionally, the switch includes: a second protocol flow table, the second protocol flow table is used to record the execution action corresponding to the second protocol message. In step S14, based on the calculation result, the second data set is forwarded using the second protocol, and obtaining the forwarding result may include the following execution steps:

[0057] Step S141, based on the calculation result, the second protocol message is parsed to obtain a parsing result;

[0058] Step S142, extracting keywords from the parsing results to obtain extraction results;

[0059] Step S143, matching and searching the extraction result with the second protocol flow table to obtain a search result;

[0060] Step S144, in response to the search result satisfying the preset condition, forwarding the search result to obtain a forwarding result.

[0061] The above-mentioned switch can be an openflow switch, wherein the switch is a network device for forwarding electrical (optical) signals, which can provide an exclusive electrical signal path for any two network nodes connected to the switch. The above-mentioned second protocol can be an openflow protocol, wherein the openflow protocol is a standard protocol between the controller and the switch, and is also a protocol of the Software Defined Network (SDN). The above-mentioned second protocol flow table can be an openflow flow table, wherein the openflow flow table contains multiple flow table entries. The above-mentioned execution action can be forwarding or discarding. The above-mentioned preset condition can be a successful match between the keyword and the openflow flow table entry. In addition, SDN is a new type of network innovation architecture and an implementation method of network virtualization. The core technology of SDN, openflow, separates the control plane from the data plane of the network device, thereby realizing flexible control of network traffic, making the network as a pipeline more intelligent, and providing a good platform for the innovation of core networks and applications.

[0062] Figure 2 is an optional flowchart of software-defined network forwarding data provided by an embodiment of the present invention, such as Figure 2As shown, first, after synchronizing the network time according to the clock deviation and network delay of the master clock and the slave clock, the openflow protocol message is parsed to obtain the input port number, MAC source address, MAC destination address, IP source address, IP destination address, IP source port, IP destination port and other information, then, extract keywords from the parsing results, wherein the keywords can be MAC source address, MAC destination address, IP source address, IP destination address, etc., secondly, match and search the extracted keywords with the openflow flow table entry, wherein the keywords depend on the type of data packet in the openflow message, and obtain the search result, and finally, in response to the search result satisfying the preset condition, that is, the keyword and the openflow flow table entry match successfully, the search result is forwarded to obtain the forwarding result. Optionally, if the keyword and the openflow flow table entry do not match successfully, the data packet corresponding to the keyword is discarded.

[0063] Optionally, in step S16, a scheduling algorithm is used to perform data transmission on the forwarding result, and determining the data transmission result may include the following execution steps:

[0064] Step S161, performing statistical analysis on the forwarding result to obtain a statistical analysis result;

[0065] Step S162, dividing the statistical analysis results into multiple queues to obtain a queue division result;

[0066] Step S163, in response to receiving a queue scheduling request based on the queue division result, determining a data transmission result.

[0067] The above scheduling algorithm may be a queue scheduling algorithm. The above statistical analysis may be traffic statistics and priority analysis.

[0068] Based on the above steps S161 to S163, firstly, the forwarding result is subjected to traffic statistics, wherein the traffic statistics result can be used to view the abnormal result and current state of the flow table through special instructions, for example: view the current state of the flow table through show ip fpm statics, and view the abnormal statistical results of the output of the flow table through show ip fpm counters. Then, the traffic statistics result is subjected to priority analysis according to the sensitivity of the sensor data to time, and the statistical analysis result is obtained. Secondly, the output gating mechanism in the queue scheduling algorithm is used to divide the statistical analysis result into multiple output queues according to the priority, wherein each output queue is respectively provided with a switch. Finally, when the switch of each output queue is turned on, the queue scheduling request can be received, and the scheduling request in the queue can be responded to, thereby determining the data transmission result. In addition, the queue is an ordered list, which can be implemented by an array or a linked list. The queue follows the principle of first-in, first-out, that is, the data first stored in the queue is taken out first, and the data stored in the queue later is taken out later.

[0069] Optionally, in step S161, statistical analysis is performed on the forwarding result, and obtaining the statistical analysis result includes the following execution steps:

[0070] Step S1611, counting the forwarding results to obtain statistical results;

[0071] Step S1612: Performing a priority analysis on the statistical results using a target strategy to obtain a statistical analysis result, wherein the target strategy is used to describe the sensitivity of the sensor data in the statistical results to time.

[0072] The target strategy may be a selection strategy. The statistical result may be a flow statistical result. The statistical analysis result may be a priority statistical analysis result.

[0073] Based on the above steps S1611 to S1612, firstly, the forwarding results are counted for traffic, and then the selection strategy is used to perform priority analysis on the sensitivity of sensor data to time in the traffic statistics results. Specifically, the sensitivity of sensor data to time is divided into two parts: external priority and internal priority. Among them, the external priority is divided into 4 levels, 3 levels, 2 levels, and 1 levels from high to low. Among them, level 4 data is the most sensitive to time, such as chassis domain control data, positioning data, etc., level 3 data is such as camera data, radar data, ultrasonic data, etc., level 2 data is such as car light data, wiper data, etc., and level 1 data is the least sensitive to time, such as vehicle entertainment data, etc. The internal priority is mainly based on the data arrival time, and the expected arrival time is supplemented. Among them, the expected arrival time is calculated by summing the forwarding delay of the data and the current time. Finally, the priority statistical analysis result is obtained. Optionally, if the expected arrival time is the same, the external priority is considered, and the output queue with a higher external priority is output first. If the expected arrival time is the same and the external priority is also the same, the data received first will be output first.

[0074] In this embodiment, a data transmission device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0075] Figure 3 is a structural block diagram of a data transmission device provided according to an embodiment of the present invention. Figure 3 As shown, the data transmission device 30 includes: an acquisition module 31, which is used to acquire a first data set and a second data set, wherein the first data set is used to represent the time data to be used in the on-board network data transmission process of the autonomous driving vehicle, and the time data includes: the time data of the master clock and the time data of the slave clock, and the second data set is used to represent the sensor data to be used in the on-board network data transmission process; a calculation module 32, which is used to calculate the first data set according to the first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock; a forwarding module 33, which is used to forward the second data set based on the calculation result using the second protocol to obtain a forwarding result, wherein the second protocol is used for communication between the controller and the switch of the on-board network; a determination module 34, which is used to use a scheduling algorithm to perform data transmission on the forwarding result and determine the data transmission result.

[0076] Optionally, the acquisition module 31 is further used to build a target system, wherein the target system includes: a plurality of sensors, and the plurality of sensors are used to acquire sensor data; and the first data set and the second data set are acquired by starting the target system.

[0077] Optionally, the calculation module 32 is also used to obtain first time information based on a first message periodically sent by the master clock, wherein the first time information is used to indicate the sending time when the master clock sends the first message; in response to receiving the first message from the slave clock, record second time information, wherein the second time information is used to indicate the arrival time when the first message arrives at the slave clock; obtain third time information based on the second message sent by the slave clock, wherein the third time information is used to indicate the sending time when the slave clock sends the second message; in response to the master clock receiving the second message and sending the third message, obtain fourth time information, wherein the fourth time information is used to indicate the sending time when the master clock sends the third message; use the first time information, the second time information, the third time information and the fourth time information to perform offset calculation to obtain a calculation result.

[0078] Optionally, the forwarding module 33 is also used to parse the second protocol message based on the calculation result to obtain a parsing result; extract keywords from the parsing result to obtain an extraction result; match the extraction result with the second protocol flow table to obtain a search result; in response to the search result satisfying a preset condition, forward the search result to obtain a forwarding result.

[0079] Optionally, the determination module 34 is further used to perform statistical analysis on the forwarding results to obtain statistical analysis results; divide the statistical analysis results into multiple queues to obtain queue division results; receive a queue scheduling request in response to the queue division results, and determine the data transmission result.

[0080] Optionally, the determination module 34 is further used to count the forwarding results to obtain statistical results; and to perform priority analysis on the statistical results using a target strategy to obtain statistical analysis results, wherein the target strategy is used to describe the sensitivity of the sensor data in the statistical results to time.

[0081] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0082] An embodiment of the present invention further provides a non-volatile storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0083] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0084] Step S1, obtaining a first data set and a second data set, wherein the first data set is used to represent time data to be used in a vehicle network data transmission process of an autonomous driving vehicle, the time data including: time data of a master clock and time data of a slave clock, and the second data set is used to represent sensor data to be used in a vehicle network data transmission process;

[0085] Step S2, calculating the first data set according to the first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock;

[0086] Step S3, based on the calculation result, forwarding the second data set using a second protocol to obtain a forwarding result, wherein the second protocol is used for communication between the controller and the switch of the vehicle network;

[0087] Step S4, using a scheduling algorithm to perform data transmission on the forwarding result and determine the data transmission result.

[0088] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0089] An embodiment of the present invention further provides a processor, which is configured to run a computer program to execute the steps in any of the above method embodiments.

[0090] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0091] Step S1, obtaining a first data set and a second data set, wherein the first data set is used to represent time data to be used in a vehicle network data transmission process of an autonomous driving vehicle, the time data including: time data of a master clock and time data of a slave clock, and the second data set is used to represent sensor data to be used in a vehicle network data transmission process;

[0092] Step S2, calculating the first data set according to the first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock;

[0093] Step S3, based on the calculation result, forwarding the second data set using a second protocol to obtain a forwarding result, wherein the second protocol is used for communication between the controller and the switch of the vehicle network;

[0094] Step S4, using a scheduling algorithm to perform data transmission on the forwarding result and determine the data transmission result.

[0095] An embodiment of the present invention further provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0096] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0097] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0098] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0099] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units can be a logical function division, and there can be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

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

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

[0103] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data transmission method, comprising: Acquire a first data set and a second data set, wherein the first data set is used to represent time data to be used in a vehicle network data transmission process of the autonomous driving vehicle, the time data comprising: time data of a master clock and time data of a slave clock, and the second data set is used to represent sensor data to be used in the vehicle network data transmission process; Calculating the first data set according to the first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock; Based on the calculation result, the second data set is forwarded using a second protocol to obtain a forwarding result, wherein the second protocol is used for communication between the controller and the switch of the vehicle network, and the switch includes: a second protocol flow table, and the second protocol flow table is used to record the execution action corresponding to the second protocol message; Based on the calculation result, forwarding the second data set using the second protocol, obtaining the forwarding result further includes: parsing the second protocol message based on the calculation result to obtain a parsing result; extracting keywords from the parsing result to obtain an extraction result; matching and searching the extraction result with the second protocol flow table to obtain a search result; in response to the search result satisfying a preset condition, forwarding the search result to obtain the forwarding result; A scheduling algorithm is used to perform data transmission on the forwarding result to determine the data transmission result.

2. The method according to claim 1, wherein: Acquiring the first data set and the second data set includes: Building a target system, wherein the target system includes: a plurality of sensors, wherein the plurality of sensors are used to obtain the sensor data; The first data set and the second data set are acquired by starting the target system.

3. The method according to claim 1, wherein the first protocol message comprises: The first message, the second message and the third message, the time information includes: first time information, second time information, third time information and fourth time information, wherein, according to the first protocol message, the first data set is calculated, and the calculation result obtained includes: Acquire the first time information based on the first message periodically sent by the master clock, wherein the first time information is used to indicate a sending time when the master clock sends the first message; In response to the slave clock receiving the first message, recording the second time information, wherein the second time information is used to indicate the arrival time of the first message arriving at the slave clock; Acquire the third time information based on the second message sent by the slave clock, wherein the third time information is used to indicate the sending time when the second message is sent by the slave clock; In response to the master clock receiving the second message and sending the third message, acquiring the fourth time information, wherein the fourth time information is used to indicate the arrival time of the second message arriving at the master clock; An offset calculation is performed using the first time information, the second time information, the third time information, and the fourth time information to obtain the calculation result.

4. The method according to claim 1, wherein: The forwarding result is transmitted using the scheduling algorithm, and determining the data transmission result includes: Performing statistical analysis on the forwarding results to obtain statistical analysis results; Dividing the statistical analysis results into multiple queues to obtain a queue division result; A queue scheduling request is received in response to the queue division result, and the data transmission result is determined.

5. The method according to claim 4, wherein: Performing statistical analysis on the forwarding result, the statistical analysis result obtained includes: Performing statistics on the forwarding results to obtain statistical results; The statistical results are prioritized by adopting a target strategy to obtain the statistical analysis results, wherein the target strategy is used to describe the sensitivity of the sensor data in the statistical results to time.

6. A data transmission device, comprising: an acquisition module, configured to acquire a first data set and a second data set, wherein the first data set is used to represent time data to be used in a vehicle network data transmission process of the autonomous driving vehicle, the time data comprising: time data of a master clock and time data of a slave clock, and the second data set is used to represent sensor data to be used in the vehicle network data transmission process; a calculation module, configured to calculate the first data set according to the first protocol message to obtain a calculation result, wherein the first protocol message is used to record time information, and the calculation result is used to synchronize the time data of the master clock with the time data of the slave clock; a forwarding module, configured to forward the second data set using a second protocol based on the calculation result to obtain a forwarding result, wherein the second protocol is used for communication between the controller and the switch of the vehicle network, and the switch includes: a second protocol flow table, wherein the second protocol flow table is used to record execution actions corresponding to the second protocol message; The forwarding module is also used to parse the second protocol message based on the calculation result to obtain a parsing result; extract keywords from the parsing result to obtain an extraction result; match the extraction result with the second protocol flow table to obtain a search result; in response to the search result satisfying a preset condition, forward the search result to obtain the forwarding result; and the determination module is used to use a scheduling algorithm to perform data transmission on the forwarding result and determine the data transmission result.

7. A non-volatile storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the data transmission method described in any one of claims 1 to 5 when running.

8. A processor, characterized in that: The processor is used to run a program, wherein the program is configured to execute the data transmission method described in any one of claims 1 to 5 when running.

9. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the data transmission method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Automobile sensor time synchronization method based on PTP protocol as well as system

    CN109462454A

  • Method, vehicle, computer device and computer readable storage medium for time synchronization of plurality of auxiliary devices in autonomous vehicle

    CN113273105A