Vehicle control signal transmission method and device, electronic equipment and storage medium
By deciding whether to use event transmission mode based on vehicle speed and calculation time in the vehicle control system, the problem of delay in vehicle control signal transmission is solved, driving risk is reduced and control response speed is improved.
Patent Information
- Application Number
- CN202510021674.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-06
Smart Images

Figure CN119928746A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a vehicle control signal transmission method, device, electronic device and storage medium. Background Art
[0002] At present, with the popularization of intelligent driving technology, in related technologies, the vehicle's system-level chip (such as SOC, System on a Chip) is usually used to execute complex algorithm functions such as perception decision planning to obtain the control parameters required for the current scenario, and the main controller (such as MCU) is used to receive the control parameters, and then arbitrate the real-time vehicle control requests according to the received control parameters and other related information to determine the priority of the vehicle control request, and obtain the control command according to the vehicle control request and control parameters, and send the control command to the corresponding control component through the CAN bus or other communication protocols, so as to realize the control of the vehicle.
[0003] However, in the related technology, since there is a high time delay in the data from the entire perception decision-making planning stage to the control stage, it may cause a large spatial distance delay in the lateral and longitudinal control of the vehicle body, which makes the vehicle driving process have a higher risk. Summary of the invention
[0004] In view of this, the embodiments of the present application propose a vehicle control signal transmission method, device, electronic device and storage medium, which can determine whether to adopt an event-based transmission method for the lateral and longitudinal control parameters of the vehicle body based on the long calculation time and the current vehicle speed, and immediately trigger the sending of data packets when it is determined that the lateral and longitudinal control parameters of the vehicle body are adopted. This reduces the time delay from the generation of the lateral and longitudinal control parameters to the sending of control commands to the lateral and longitudinal control components, thereby effectively reducing the control distance delay of the vehicle's lateral and longitudinal control parameters, thereby reducing the risk of vehicle driving.
[0005] In a first aspect, an embodiment of the present application provides a vehicle control signal transmission method, which is applied to a system-level chip of a vehicle, and the method includes:
[0006] Obtain the vehicle body's lateral and longitudinal control parameters, the calculation time for generating the vehicle body's lateral and longitudinal control parameters using a control algorithm, and the current speed of the vehicle; determine a first transmission mode of the system-level chip for the vehicle body's lateral and longitudinal control parameters based on the current speed and the calculation time, the first transmission mode including an event-based transmission mode; if the first transmission mode is an event-based transmission mode, the event-based transmission mode is used to transmit a data packet including the vehicle body's lateral and longitudinal control parameters to the vehicle's main controller, so that the vehicle's main controller sends the data packet to the vehicle's lateral and longitudinal control components.
[0007] In a second aspect, an embodiment of the present application provides a vehicle control signal transmission method, which is applied to a main controller of a vehicle, the method comprising: receiving a data packet including lateral and longitudinal control parameters of a vehicle body sent by a system-level chip of the vehicle, the lateral and longitudinal control parameters of the vehicle body being generated by the main controller using a control algorithm, and the data packet carrying a timestamp when the main controller generates the lateral and longitudinal control parameters of the vehicle body using the control algorithm; determining a second transmission mode of the data packet by the main controller based on the reception time of the data packet, the timestamp, and whether the data packet carries a priority processing flag; if the second transmission mode is an interrupt triggered mode, the lateral and longitudinal control components of the vehicle send the data packet using the interrupt triggered transmission mode.
[0008] In a third aspect, an embodiment of the present application provides a vehicle control signal transmission device, which is applied to a system-level chip of a vehicle, and the device includes: a data acquisition module, which is used to obtain the lateral and longitudinal control parameters of the vehicle body, the calculation time of generating the lateral and longitudinal control parameters of the vehicle body by a control algorithm, and the current speed of the vehicle; a first transmission mode determination module, which is used to determine the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body according to the current vehicle speed and the calculation time; a first data transmission module, which is used to transmit a data packet including the lateral and longitudinal control parameters of the vehicle body to the main controller of the vehicle by an event-type transmission mode when the first transmission mode is an event-type transmission mode, so that the main controller of the vehicle sends the data packet to the lateral and longitudinal control components of the vehicle.
[0009] In one possible implementation, a control algorithm node and at least one application algorithm node are deployed in the system-level chip, and the data acquisition module is also used to call the application algorithm node to use the corresponding application algorithm to calculate the data collected by the vehicle's perception device to obtain an application output value; call the control algorithm node to use the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the lateral and longitudinal control parameters of the vehicle body.
[0010] In one possible implementation, the system-level chip of the vehicle is deployed with output flags corresponding to multiple application algorithm nodes, and the vehicle control signal transmission device also includes an adjustment module, which is used to call the application algorithm node in the current cycle to use the corresponding application algorithm to calculate the data collected by the sensing device of the vehicle to obtain an application output value, and then call the application algorithm node to adjust the value of its corresponding output flag from a first value to a second value, and the first value indicates that the application algorithm node has not calculated the application output value in the current cycle; the data acquisition module is also used to call the control algorithm node according to the assignment of the output flag corresponding to each application algorithm node, to determine whether each application algorithm node calculates the application output value in the current cycle; if it is determined that multiple application algorithm nodes have calculated the application output value in the current cycle, call the control algorithm node to use the corresponding control algorithm to calculate the application output value of each application algorithm node in the current cycle to obtain the transverse and longitudinal control parameters of the vehicle body; the value adjustment module is also used to call the control algorithm node to use the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the transverse and longitudinal control parameters of the vehicle body, and then adjust the flag value corresponding to the application algorithm node from the second value to the first value.
[0011] In one embodiment, the data acquisition module is also used to determine that there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value in the current cycle, and obtain the application output value of the target application algorithm node in the current cycle according to the application output values corresponding to each of the multiple historical cycles before the current cycle.
[0012] In one possible implementation, threads corresponding to each of the application algorithm nodes are running in the system-level chip, and the vehicle control signal transmission device also includes a timing module, a timing duration judgment module and a priority enhancement module. The timing module is used to call the control algorithm node according to the assignment of the output flag bit corresponding to each of the application algorithm nodes, and start timing when determining whether each of the application algorithm nodes has calculated the application output value within the current cycle; the timing duration judgment module is used to determine whether there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value within the current cycle, and determine whether the timing duration reaches a preset duration; the priority enhancement module is used to enhance the priority of the thread corresponding to the target application algorithm node when the preset duration is not reached.
[0013] In one possible implementation, a signal forwarding node is also deployed in the system-level chip, the data transmission protocol between the nodes in the system-level chip is a first protocol, and the data transmission protocol between the system-level chip and the main controller is a second protocol; the first data transmission module is also used to call the control algorithm node to adopt an event-type transmission method to transmit a data packet including the lateral and longitudinal control parameters of the vehicle body to the signal forwarding node; call the signal forwarding node to convert the transmission protocol of the data packet from the first protocol to the second protocol, obtain the data packet after the protocol conversion, and send the data packet after the protocol conversion to the main controller using an event-type transmission method.
[0014] In one possible implementation, the vehicle control signal transmission device also includes: an identification adding module, used to add a priority processing identification to the data packet including the lateral and longitudinal control parameters of the vehicle body, so that when the main controller of the vehicle receives the data packet, it uses an interrupt triggering method based on the priority processing identification to send the data packet to the lateral and longitudinal control components of the vehicle through the CAN bus.
[0015] In one possible implementation, the first transmission mode determination module is also used to determine whether the current vehicle speed is greater than a preset vehicle speed threshold, and to determine whether the calculation time is greater than a preset calculation time threshold; if the current vehicle speed is greater than the preset vehicle speed threshold or the calculation time is greater than the preset calculation time threshold, it is determined that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is an event-based transmission mode; if the current vehicle speed is not greater than the preset vehicle speed threshold and the calculation time is not greater than the preset calculation time threshold, it is determined that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is a periodic transmission mode.
[0016] In a fourth aspect, an embodiment of the present application provides a vehicle control signal transmission device, which is applied to a main controller of a vehicle, and the device includes: a data receiving module, which is used to receive a data packet including vehicle body lateral and longitudinal control parameters sent by a system-level chip of the vehicle, wherein the vehicle body lateral and longitudinal control parameters are generated by the main controller using a control algorithm, and the data packet carries a timestamp when the main controller generates the vehicle body lateral and longitudinal control parameters using the control algorithm; a second transmission mode determination module, which is used to determine the second transmission mode of the data packet by the main controller according to the reception time of the data packet, the timestamp and whether the data packet carries a priority processing flag; and a second data transmission module, which is used to send the data packet to the lateral and longitudinal control components of the vehicle using an interrupt triggered transmission mode when the second transmission mode is an interrupt triggered mode.
[0017] In one possible implementation, the second transmission mode determination module is also used to determine whether the duration between the receiving time and the timestamp exceeds a preset duration, and to determine whether the data packet carries a priority processing flag; if it exceeds the preset duration or carries a priority processing flag, it is determined that the second transmission mode of the main controller for the data packet is an interrupt triggered transmission mode; if it does not exceed the preset duration and does not carry a priority processing flag, it is determined that the second transmission mode of the main controller for the data packet is a periodic transmission mode.
[0018] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above method.
[0019] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, wherein the above method is executed when the program code is executed by a processor.
[0020] The embodiments of the present application provide a vehicle control signal transmission method, device, electronic device and storage medium. The method includes: obtaining the vehicle body transverse and longitudinal control parameters, using the control algorithm to generate the calculation time of the vehicle body transverse and longitudinal control parameters and the current speed of the vehicle; according to the current vehicle speed and the calculation time, determining the first transmission mode of the system-level chip for the vehicle body transverse and longitudinal control parameters; if the first transmission mode is an event-based transmission mode, the event-based transmission mode is used to transmit the data packet including the vehicle body transverse and longitudinal control parameters to the main controller of the vehicle, so that the main controller of the vehicle sends the control command corresponding to the data packet to the transverse and longitudinal control component of the vehicle. Through the above method, it is possible to use the event-based transmission mode to transmit the vehicle body transverse and longitudinal control parameters in the case of high vehicle speed or long calculation time, thereby reducing the time delay from the generation of the transverse and longitudinal control parameters to the sending of the control command to the transverse and longitudinal control component, thereby effectively reducing the spatial distance delay of the control component based on the transverse and longitudinal control parameters of the vehicle body to perform transverse and longitudinal control, thereby reducing the risk of vehicle driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a process flow of a vehicle control signal transmission method provided in an embodiment of the present application is shown;
[0023] Figure 2 Shows Figure 1 Schematic diagram of the process of step S110;
[0024] Figure 3 Shows Figure 1 Another schematic diagram of the process of step S110;
[0025] Figure 4 Shows Figure 1 Another flow chart of step S130;
[0026] Figure 5 A schematic flow chart of a vehicle control signal transmission method provided in another embodiment of the present application is shown;
[0027] Figure 6 A structural block diagram of a vehicle provided by an embodiment of the present application is shown;
[0028] Figure 7 A schematic diagram showing the relationship between various nodes in a system-on-chip proposed in an embodiment of the present application is shown;
[0029] Figure 8 Another schematic diagram of a process of transmitting a vehicle control signal according to an embodiment of the present application is shown;
[0030] Fig. 9 Another schematic diagram of a process of another vehicle control signal transmission method proposed in an embodiment of the present application is shown;
[0031] Fig.10 A connection block diagram of a vehicle control signal transmission device proposed in an embodiment of the present application is shown;
[0032] Fig.11 Another connection block diagram of a vehicle control signal transmission device proposed in an embodiment of the present application is shown;
[0033] Fig.12 A structural block diagram of an electronic device for executing the method of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0035] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0036] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0037] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0038] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0039] It should also be noted that in the embodiments of the present application, the collection, use, processing and storage of application information are all subject to the user's permission and must comply with the regulations of the region.
[0040] In related technologies, intelligent driving faces complex working conditions and the need to continuously superimpose neural network algorithms, which leads to high computing power requirements. At present, the above problems are mainly solved by the coordinated operation of system-level chips SOC and main controller MCU. Among them, the SOC side usually deploys algorithm functions such as perception prediction, decision planning and control, and the MCU side is responsible for arbitration control due to its good real-time performance. Among them, application algorithms such as decision planning and control are deployed on the operating system of the SOC side at the same time, and each algorithm node is scheduled in parallel on the operating system to execute the corresponding algorithm to obtain the control parameters required for the current scenario.
[0041] Among them, the algorithm nodes related to parking decision planning are all operated periodically. The mainstream operation cycles are 100ms / 50ms / 20ms, taking the 20ms cycle as an example. Due to the large number of intelligent driving algorithms and functional application modules, and in complex traffic scenes of people and vehicles, algorithms such as perception decision-making will increase resource consumption, the system is very busy, and it will take nearly 20ms for the control calculation signal to be sent. The signal is published to the signal transfer module in the form of a communication middleware topic (for example, DDS communication protocol) on the Linux application side. The signal transfer module runs in a 10ms cycle and forwards the calculation structure to the MCU side. Among them, multi-core heterogeneous uses the IPC protocol, and non-multi-core heterogeneous usually uses SPI or SOMEIP protocol communication. The control arbitration SWC (software component) on the MCU side runs in a 20ms cycle, and it may also be possible to process the calculated value at the end of a cycle, that is, there is a cycle delay of nearly 20ms. Finally, the cycle sent to the CAN bus is also 20ms, and there is also a similar cycle delay scenario.
[0042] The above 20ms (SOC-side algorithm cycle delay) + 10ms (inter-core communication cycle delay) + 20ms (MCU-side control arbitration delay) + 20ms (CAN message cycle sending delay) totals about 70ms delay. Calculated at a vehicle speed of 120km / s, a delay of 70ms brings an error of 2.33m. Calculated at a vehicle speed of 100km / s, 70ms results in an error of about 1.94m. Obviously, an error of about 2 meters manifests as untimely braking in longitudinal vehicle control and straddling two lanes in lateral vehicle control. Therefore, the above errors will lead to great risks. In addition, even if a compensation scheme is adopted, such as linear interpolation prediction, it will not reduce the above delays, and thus cannot cope with emergencies such as emergency braking or steering.
[0043] Based on this, an embodiment of the present application provides a vehicle control signal transmission method, which obtains the lateral and longitudinal control parameters of the vehicle body, generates the calculation time of the lateral and longitudinal control parameters of the vehicle body using a control algorithm, and the current speed of the vehicle; according to the current vehicle speed and the calculation time, determines the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body, and the first transmission mode includes a periodic transmission mode or an event-based transmission mode; if the first transmission mode is an event-based transmission mode, the event-based transmission mode is used to transmit a data packet including the lateral and longitudinal control parameters of the vehicle body to the main controller of the vehicle, so that the main controller of the vehicle sends a control command corresponding to the data packet to the lateral and longitudinal control components of the vehicle. Through the above method, it is possible to achieve the transmission of the lateral and longitudinal control parameters of the vehicle body using an event-based transmission mode under high vehicle speeds or long calculation times, thereby reducing the time delay from the generation of the lateral and longitudinal control parameters to the sending of the control commands to the lateral and longitudinal control components, thereby effectively reducing the spatial distance delay of the lateral and longitudinal control of the corresponding control components based on the lateral and longitudinal control parameters of the vehicle body, thereby reducing the vehicle driving risk.
[0044] The specific implementation of this embodiment is as follows:
[0045] Figure 1 The vehicle control signal transmission method of the present application is specifically shown, and the method can be applied to a system-level chip of a vehicle, and the method includes:
[0046] Step S110: obtaining vehicle body lateral and longitudinal control parameters, the calculation time of generating the vehicle body lateral and longitudinal control parameters by using a control algorithm, and the current vehicle speed of the vehicle.
[0047] The vehicle body lateral and longitudinal control parameters refer to various control parameters used to adjust and optimize the vehicle's lateral and longitudinal motion behaviors. The longitudinal direction is mainly related to acceleration and deceleration, and the control parameters involved include acceleration, deceleration, following distance, and speed setting; the lateral direction is mainly related to vehicle steering, and the control parameters involved include turning radius, steering wheel angle, and lateral acceleration of the vehicle when turning.
[0048] It is worth mentioning that vehicles are usually equipped with a series of vehicle perception devices, such as GPS, IMU (inertial measurement unit), wheel speed sensor, steering angle sensor, camera, radar, etc. These perception devices continuously provide the vehicle's position, speed, acceleration, direction, environmental information, etc.
[0049] In an operative embodiment, the above step S110 may be to receive data collected by the vehicle sensing device, and generate the vehicle body transverse and longitudinal control parameters based on the data collected by the vehicle sensing device using the control algorithm. Accordingly, the calculation time consumed for generating the vehicle body transverse and longitudinal control parameters using the control algorithm refers to obtaining the start timestamp of the control algorithm when receiving the data collected by the sensing device, and obtaining the end timestamp when outputting the vehicle body transverse and longitudinal control parameters, and calculating the duration between the start timestamp and the end timestamp, which is the calculation time consumed for generating the vehicle body transverse and longitudinal control parameters based on the control algorithm.
[0050] See also Figure 2 As shown, in another possible implementation, the above step S110 includes:
[0051] Step S111: calling the application algorithm node to adopt the corresponding application algorithm to calculate the data collected by the perception device of the vehicle to obtain an application output value.
[0052] Among them, the application algorithm nodes are mainly responsible for receiving data from various sensors (such as cameras, radars, lidars, ultrasonic sensors, etc.), and preprocessing, analyzing and interpreting them. For example, by running specific application algorithms such as object recognition, lane detection, traffic sign interpretation, etc., these nodes can understand and parse the surrounding environment and provide a high-level description of the vehicle's current road conditions and potential obstacles.
[0053] The above-mentioned application algorithm nodes may include one or more of target detection and classification nodes, lane line detection nodes, and traffic signal recognition nodes, wherein the target detection and classification nodes perform target detection and classification based on the image data collected by the camera and the point cloud data collected by the lidar to obtain a target detection result; the lane line detection node is used to perform lane line recognition based on the image data collected by the camera and the point cloud data collected by the lidar to obtain a lane line recognition result; the traffic signal recognition node is used to perform traffic signal recognition based on the image data collected by the camera and the point cloud data collected by the lidar to obtain a traffic signal recognition result.
[0054] Step S112: calling the control algorithm node and using the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the lateral and longitudinal control parameters of the vehicle body.
[0055] The control algorithm node outputs the vehicle body lateral and longitudinal control parameters representing specific driving decisions based on the intermediate output values provided by the application algorithm node. In some embodiments, when making driving decisions, the vehicle body lateral and longitudinal control parameters representing specific driving decisions can be output based on the intermediate output values and combined with the vehicle's own state (e.g., one or more of the current speed, acceleration, steering angle, etc.). For example, acceleration, deceleration, steering, etc., to ensure safe and efficient driving behavior.
[0056] For example, if the control algorithm determines that there is an obstacle ahead and the distance is shortening based on the application output values of each application algorithm node, the lateral and longitudinal control parameters for changing lanes (lateral turning), deceleration or parking may be output, such as setting the deceleration to -2m / s 2 .
[0057] In this way, the calculation time for generating the lateral and longitudinal control parameters of the vehicle body using the control algorithm can be obtained by: obtaining the start timestamp when the control algorithm node is called to start reading the application output value of the application algorithm node and the end timestamp when the control algorithm node outputs the lateral and longitudinal control parameters of the vehicle body; and taking the duration between the start timestamp and the end timestamp as the calculation time for generating the lateral and longitudinal control parameters of the vehicle body using the control algorithm.
[0058] Considering that each application algorithm node and control algorithm node are usually calculated in a periodic manner, for example, a calculation is performed every preset time interval, such as every 10ms, 20ms or 30ms, etc., to ensure that the data used by the control algorithm node during the calculation process are all the data output by each application algorithm node in the current cycle.
[0059] See also Figure 3 As shown, in one possible implementation, the system-level chip of the vehicle is deployed with output flags corresponding to multiple application algorithm nodes, and the method further includes:
[0060] If the application algorithm node is called in the current cycle to adopt the corresponding application algorithm to calculate the data collected by the vehicle's perception device to obtain an application output value, step S113 is executed: calling the application algorithm node to adjust the value of its corresponding output flag bit from the first value to the second value.
[0061] The first value indicates that the application algorithm node has not calculated an application output value in the current cycle, and the second value indicates that the application algorithm node has calculated an application output value in the current cycle.
[0062] The first numerical value may be -1, 0 or 1, etc., and the second numerical value may be any value different from the first numerical value. For example, in one embodiment, the first numerical value is -1 and the second numerical value is 0. That is, when the application algorithm node obtains the application output value after calculation, the value of the corresponding flag bit is set to 0, so that the control algorithm node can determine whether the application algorithm has output the application output value in the current cycle according to the value of the flag bit corresponding to the application algorithm node. If the value of the flag bit is determined to be 0, the application output value is output, and the output value of the application algorithm node can be directly read to participate in the calculation of the control algorithm in the current cycle.
[0063] The above-mentioned step S112 includes: step S112a: calling the control algorithm node to determine whether each of the application algorithm nodes has calculated the application output value within the current cycle according to the assignment of the output flag bit corresponding to each of the application algorithm nodes; if it is determined that multiple application algorithm nodes have calculated the application output value within the current cycle, then step S112b: calling the control algorithm node to use the corresponding control algorithm to calculate the application output value of each of the application algorithm nodes in the current cycle to obtain the lateral and longitudinal control parameters of the vehicle body.
[0064] The method further includes step S114: adjusting the flag value corresponding to the application algorithm node from the second value to the first value.
[0065] By adjusting the flag bit value corresponding to the application algorithm node from the second value to the first value, when the next cycle comes, the control algorithm node can determine and correctly identify which application algorithm nodes have updated their outputs.
[0066] By adopting the above steps S111-S114, the flags of all application algorithm nodes can be reset to the first value (e.g. -1) at the beginning of each calculation cycle. This means that these nodes have not yet generated new outputs in the new cycle. When an application algorithm node completes the calculation and generates a new application output value, it will set its flag to the second value (e.g. 0), indicating that there has been a new output in this cycle. In this way, the control algorithm can determine which nodes' data is the latest and valid, ensuring that the control algorithm always makes decisions based on the latest application output value in the current cycle, thereby improving the real-time and accuracy of the system. Subsequently, by checking the flag, the control algorithm can quickly determine whether there are any new application output values that need to be processed. Once it is found that all associated application algorithm nodes have updated their flags, the latest data can be used for calculation immediately without having to wait for the end of the entire cycle or other unrelated nodes to complete the calculation, thereby greatly improving the response speed.
[0067] In one possible implementation, the above-mentioned step S112 also includes: step S112c: if it is determined that there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value within the current cycle, the application output value of the target application algorithm node in the current cycle is obtained according to the application output values corresponding to each of the multiple historical cycles before the current cycle.
[0068] The multiple historical periods before the current period are multiple historical periods within a preset time period before the start time of the current period.
[0069] The above method of obtaining the application output value of the target application algorithm node in the current cycle based on the application output values corresponding to the target application algorithm node in multiple historical cycles can be to determine the mean or median of the application output values corresponding to the target application algorithm node in multiple historical cycles as the application output value of the target application algorithm node in the current cycle. It can also be to set a weight for each historical cycle, and perform a weighted summation of the application output values corresponding to the target application algorithm node in multiple historical cycles to obtain the application output value of the target application algorithm in the current cycle, wherein the weight of each historical cycle is negatively correlated with the duration between the start time of the historical cycle and the start time of the current cycle.
[0070] In one possible implementation, the method of obtaining the application output value of the target application algorithm node in the current cycle based on the application output values corresponding to the target application algorithm node in multiple historical cycles can also be to obtain the application output value of the target application algorithm node in the current cycle based on the application output values corresponding to the target application algorithm node in multiple historical cycles using the least square method. The control algorithm node is called to use the corresponding control algorithm to calculate the application output value of each application algorithm node in the current cycle to obtain the lateral and longitudinal control parameters of the vehicle body.
[0071] Specifically, the application output values corresponding to the target application algorithm nodes in multiple historical periods can be arranged in chronological order to form a time series. Define an error function, such as E(a,b)=∑(y i -(ax i +b))2, where y i represents the actual output value of the ith cycle, and x i represents the cycle number or timestamp of the i-th cycle, a and b are parameters, and the error function is differentiated using calculus methods, and the derivative is set equal to zero to solve the parameters a and b that minimize the error. Once the optimal parameters of the model are determined, they can be used to predict the application output value of the next cycle (i.e., the current cycle). For example, in a linear model, if we get a and b, we can use y current =ax current +b to calculate the expected output y of the current cycle current , where x current is the number or timestamp of the current cycle.
[0072] By adopting the above method, when the target application algorithm does not output data in the current cycle, a reasonable prediction is made by obtaining the application output value of the target application algorithm in the current cycle based on the application output values corresponding to the target application algorithm in multiple historical cycles, thereby avoiding the problem of overall vehicle performance degradation due to a single application algorithm point failure.
[0073] It is worth mentioning that a plurality of threads are running in the system-on-chip (SoC), each thread corresponds to an application algorithm node, and is responsible for processing a specific type of sensor data or performing a specific computing task. The system-on-chip has threads corresponding to each of the application algorithm nodes running in it, and the method further includes:
[0074] The timing starts when the control algorithm node is called to determine whether each of the application algorithm nodes has calculated an application output value in the current cycle according to the assignment of the output flag bit corresponding to each of the application algorithm nodes.
[0075] If it is determined that there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value within the current cycle, step S115: determining whether the timing duration reaches a preset duration.
[0076] If the preset time is not reached, step S116 is executed: the priority of the thread corresponding to the target application algorithm node is increased, and the process returns to step S111: calling the application algorithm node to use the corresponding application algorithm to calculate the data collected by the vehicle's sensing device;
[0077] If the preset duration is reached, step S112c is executed: a step of obtaining the application output value of the target application algorithm node in the current cycle according to the application output values corresponding to each of the multiple historical cycles before the current cycle.
[0078] By adopting the above steps S115-S116, when it is detected that a certain application algorithm node fails to complete the calculation in time, by increasing the priority of its thread, it can obtain the required resources faster and complete the task as soon as possible. This helps to reduce delays and ensure that the vehicle can respond to environmental changes in the first time. Furthermore, if a thread fails to complete the calculation within a cycle, it will no longer wait after a preset period of time, but will make predictions based on historical data. This method avoids the risk of stagnation in the calculation of the lateral and longitudinal control parameters of the entire vehicle body due to the jamming of a single application algorithm node, and enhances the robustness and stability of the vehicle.
[0079] Step S120: determining a first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body according to the current vehicle speed and the calculation time.
[0080] In one possible implementation, the first transmission mode may include an event-based transmission mode or a periodic transmission mode.
[0081] In one possible implementation, the above-mentioned step S120 includes: obtaining a vehicle speed score based on the current vehicle speed, and obtaining a time score based on the calculation time, wherein the current vehicle speed is positively correlated with the vehicle speed score, and the calculation time is positively correlated with the time score; weighted calculation of the vehicle speed score and the time score is performed to obtain a scoring score, and if the scoring score is greater than a preset score, determining that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is an event-based transmission mode; if the scoring score is not greater than a preset score, determining that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is a periodic transmission mode.
[0082] For example, if the current vehicle speed is 100KM / h, the corresponding score is 10 points. If the calculation time is 5 milliseconds, the corresponding calculation time score is 5 points. When the weighted sum of the vehicle speed score and the time score reaches 6 points, the event-based transmission method is adopted. If it does not reach 6 points, the periodic transmission method is adopted.
[0083] In another possible implementation, the above-mentioned step S120 includes: determining whether the current vehicle speed is greater than a preset vehicle speed threshold, and determining whether the calculation time is greater than a preset time threshold. If the current vehicle speed is greater than the preset vehicle speed threshold or the calculation time is greater than the preset time threshold, determining that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is an event-based transmission mode; if the current vehicle speed is not greater than the preset vehicle speed threshold and the calculation time is not greater than the preset calculation time threshold, determining that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is a periodic transmission mode.
[0084] Among them, the preset vehicle speed threshold can be 60KM / h, 80KM / h or 90KM / h, etc., which can be set according to actual needs. The preset time threshold can be 5ms, 6ms or 8ms, etc., which can be set according to actual needs.
[0085] Exemplarily, it is possible to determine whether the current vehicle speed is greater than 60 km / h, and whether the calculation time is greater than 5 ms. When the vehicle speed is greater than 60 km / h or the calculation time is greater than 5 ms, the first transmission mode is the event-based transmission mode.
[0086] If the first transmission mode is an event-based transmission mode, execute step S130: use the event-based transmission mode to transmit the data packet including the vehicle body lateral and longitudinal control parameters to the main controller of the vehicle, so that the main controller of the vehicle sends the data packet to the lateral and longitudinal control components of the vehicle.
[0087] Among them, when an event-based transmission method is used to transmit a data packet including the lateral and longitudinal control parameters of the vehicle body to the main controller of the vehicle, it means that a trigger condition is defined according to the vehicle speed and the calculation time. When it is determined that the trigger condition is met according to the current vehicle speed and the calculation time, it is determined to adopt an event-based transmission method. Under the event-based transmission method, the lateral and longitudinal control parameters of the vehicle body and some related data (such as the event type, the timestamp for generating the lateral and longitudinal control parameters of the vehicle body, a priority identifier indicating that the current data needs to be sent first, etc.) are immediately packaged to obtain a data packet, and the data packet is sent to the main controller of the vehicle through an appropriate communication protocol (such as CAN bus, Ethernet, etc.).
[0088] In one possible implementation, a signal forwarding node is further deployed in the system-level chip, the data transmission protocol between the nodes in the system-level chip is a first protocol, and the data transmission protocol between the system-level chip and the main controller is a second protocol; wherein the first protocol may be a bus protocol, a serial communication protocol or an internal custom protocol, such as a DDS protocol (Data Distribution Service), and the second protocol may be a CAN protocol (Controller Area Network), an Ethernet protocol, an IPC protocol (Inter-Process Communication), a SOMEIP protocol (Scalable service-Oriented Middleware over IP) or an SPI protocol (Serial Peripheral Interface), etc.
[0089] See also Figure 4 As shown, the above step S130 includes:
[0090] Step S132: calling the control algorithm node to transmit a data packet including the vehicle body lateral and longitudinal control parameters to the signal forwarding node using an event-based transmission method.
[0091] Step S134: calling the signal forwarding node to convert the transmission protocol of the data packet from the first protocol to the second protocol, obtaining a data packet after protocol conversion, and sending the data packet after protocol conversion to the main controller using an event-based transmission method.
[0092] It is worth mentioning that when the signal forwarding node determines that the data packet is transmitted by the control algorithm node using an event-based transmission method, such as when it determines that the data packet carries a priority processing identifier or event type, the signal forwarding node can use an event-based transmission method to send the protocol-converted data packet to the main controller.
[0093] It should be understood that if the first transmission mode is a periodic transmission mode, a data packet including the lateral and longitudinal control parameters of the vehicle body is transmitted to the main controller of the vehicle using a periodic transmission mode, so that the main controller of the vehicle sends the data packet to the lateral and longitudinal control components of the vehicle.
[0094] By adopting the above-mentioned implementation mode, it is possible to select the most appropriate data transmission method according to the current vehicle speed and the calculation time of the vehicle body's lateral and longitudinal control parameters. That is, in the case of high vehicle speed or long calculation time, an event-based transmission method is adopted to transmit the vehicle body's lateral and longitudinal control parameters, thereby reducing the time delay from the generation of the lateral and longitudinal control parameters to the sending of control commands to the lateral and longitudinal control components, thereby effectively reducing the spatial distance delay of the corresponding control components executing lateral and longitudinal control based on the vehicle body's lateral and longitudinal control parameters, thereby reducing the vehicle driving risk.
[0095] Under the condition of low vehicle speed and short calculation time, the vehicle body lateral and longitudinal control parameters are transmitted to the main controller in a periodic transmission manner.
[0096] That is, the vehicle control signal transmission method provided in the present application can realize timely transmission of the lateral and longitudinal control parameters of the vehicle body to the main controller when the vehicle speed is high and the generation process takes too long, and can save resources and improve overall performance under normal circumstances.
[0097] In order to further reduce the driving risk of the vehicle, in one feasible embodiment, a priority processing flag is added to the data packet including the lateral and longitudinal control parameters of the vehicle body, so that when the main controller of the vehicle receives the data packet, it uses an interrupt triggering method based on the priority processing flag to send the data packet to the lateral and longitudinal control components of the vehicle through the CAN bus.
[0098] By adopting the above settings, when the vehicle's main controller receives a data packet with a priority processing mark, it will immediately interrupt the current task execution process and give priority to the high-priority data packet. This means that key control commands can be transmitted to the lateral and longitudinal control components in the shortest time, reducing delays. In the event of safety-related events (such as emergency braking and obstacle avoidance operations), the latest control parameters can be quickly conveyed to the actuator, improving the vehicle's ability to respond to emergencies and reducing the risk of accidents.
[0099] See also Figure 5 As shown, this embodiment provides a vehicle control signal transmission method, which is applied to a main controller of a vehicle, and the method includes:
[0100] Step S210: Receive a data packet including vehicle body lateral and longitudinal control parameters sent by the vehicle's system-level chip, where the vehicle body lateral and longitudinal control parameters are generated by the main controller using a control algorithm, and the data packet carries a timestamp when the main controller generates the vehicle body lateral and longitudinal control parameters using the control algorithm.
[0101] For the detailed description of the vehicle body transverse and longitudinal control parameters and data packets, please refer to the detailed description of the aforementioned embodiment 1, which will not be repeated here.
[0102] Step S220: Determine the second transmission mode of the data packet by the main controller according to the reception time of the data packet, the timestamp, and whether the data packet carries a priority processing identifier.
[0103] The second transmission mode may include an interrupt-triggered transmission mode or a periodic transmission mode.
[0104] In one possible implementation, the step S220 includes: determining whether the duration between the receiving time and the timestamp exceeds a preset duration, and determining whether the data packet carries a priority processing flag.
[0105] If the preset time is exceeded or a priority processing mark is carried, the second transmission mode of the data packet by the main controller is determined to be an interrupt-triggered transmission mode. If the preset time is not exceeded and no priority processing mark is carried, the second transmission mode of the data packet by the main controller is determined to be a periodic transmission mode.
[0106] Step S230: If the second transmission mode is an interruption-triggered mode, the data packet is sent to the lateral and longitudinal control components of the vehicle using the interruption-triggered transmission mode.
[0107] Among them, the interrupt-driven transmission mode is a data transmission mechanism that allows the system to process the corresponding task immediately when a specific event occurs, rather than relying on fixed periodic checks. When the main controller detects that the time between the receiving time and the timestamp exceeds the preset time or the data packet carries a priority processing mark, the main controller stops executing the current task and executes the interrupt service program to parse the data packet, extract the latest lateral and longitudinal control parameters, and send them to the lateral and longitudinal control components through the CAN bus or other communication protocols. After receiving the instructions, the lateral and longitudinal control components immediately perform corresponding actions, such as adjusting the steering angle to avoid obstacles, or slowing down to avoid rear-end collisions, etc.
[0108] By adopting the above method, the main controller can immediately interrupt the current task and give priority to sending the data packet when it receives a data packet with a priority processing mark or finds that the time between the reception time of the data packet and its timestamp exceeds the preset threshold (that is, when the transmission time is too long), thereby improving the response speed and reliability of the system and effectively reducing driving risks.
[0109] It is worth mentioning that when the controller receives a data packet including the lateral and longitudinal control parameters of the vehicle body sent by the system-level chip of the vehicle, it can also perform control arbitration to determine whether the data packet needs to be sent to the lateral and longitudinal control components to guide EPS (electric power steering), VCU (vehicle control unit), ESP (electronic stability program) and other related components to complete real-time vehicle control.
[0110] like Figure 6 As shown, taking the vehicle's system-level chip as an example, a control algorithm node, a signal forwarding node, and multiple application algorithm nodes are deployed. The multiple application algorithm nodes are respectively used to receive the perception data collected by the vehicle's perception equipment, and perform prediction, decision-making, and planning tasks. After the control node obtains the vehicle's body lateral and longitudinal data based on the output of each application node, the signal forwarding node converts the data packet including the body and longitudinal data into a protocol and sends it to the main controller, so that the main controller performs control arbitration to determine whether the data packet needs to be sent to the lateral and longitudinal control components, such as EPS (electric power steering), VCU (vehicle control unit), and ESP (electronic stability program).
[0111] Specifically, Figure 7 As shown, taking multiple application algorithm nodes including app1 algorithm node, app2 algorithm node, app3 algorithm node and app4 algorithm node as an example, the application algorithm node is used as the upstream node of the control algorithm node, and the Linux system in the system-on-chip SOC runs the threads corresponding to each node (including the application algorithm node and the control algorithm node) in parallel to execute the corresponding algorithm, and in the initial state, the thread priority corresponding to each node is the same; wherein input1-4 represents the input parameters required by the control algorithm node, and refers to the application output value of each application algorithm node. For example, the application output value of the appK algorithm node is inputK, and K is an integer between 1 and 4. Flag1-4 represents the value of the flag bit corresponding to each application algorithm node, and the flag bit of the appK algorithm node is FlagK.
[0112] Please refer to Figure 8When calling the above-mentioned system-level chip to generate the vehicle body transverse and longitudinal control parameters, FlagX is first initialized, and the flag bit FlagX (Flag1\Flag2\Flag3\Flag4) used to identify whether the key input data has been updated is equal to the default value -1. Since the priority of each process is consistent in the default state, the operating system in the SOC calls each application algorithm node and the control algorithm node in parallel to perform the corresponding task. Specifically, the application algorithm node is called to execute the corresponding application algorithm. If the application output value is output, the corresponding flag bit is assigned to 0. When the control algorithm node executes the corresponding control algorithm, it is first determined whether each application algorithm node outputs the application output value according to the value of the flag bit of each application algorithm node. At the same time, the timer counter_timer is called to start timing to prevent waiting too long from affecting the output of the vehicle body transverse and longitudinal control parameters. Among them, when the value of the flag bit corresponding to the application algorithm node is equal to 0, it indicates that the application output value of the application algorithm node in the current cycle has been updated. If it is determined that the FlagX value corresponding to the appX algorithm node is -1, it indicates that the appX algorithm node has not completed the calculation. At this time, it is determined whether the timing duration of the timer has reached the preset duration. If it has not reached If the preset duration is reached, it is necessary to increase the priority of the thread corresponding to the appX algorithm node so that the appX algorithm node uses the corresponding application algorithm to calculate the data collected by the perception device of the vehicle, so that the subsequent control algorithm node can again determine whether the appX algorithm node outputs the application output value according to the value of the flag bit of the appX algorithm node. If it outputs, the control algorithm node is called to use the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the lateral and longitudinal control parameters of the vehicle body; if the timer duration reaches the preset duration, the least squares method is used to calculate the application output value of the target application algorithm node in the current cycle according to the application output value corresponding to each of the five most recent historical cycles before the current cycle.
[0113] After obtaining the application output value of each application algorithm node in the current cycle, the control algorithm node is called to use the control algorithm to obtain the vehicle body lateral and longitudinal control parameters based on the application output value of each application algorithm node in the current cycle.
[0114] Thereafter, the flag value corresponding to each of the application algorithm nodes may be adjusted from 0 to -1.
[0115] Please refer to Fig. 9When the control parameter node calculates the transverse and longitudinal control parameter values of the vehicle body, the calculation time_consum can be obtained according to the start timestamp of the timer and the timestamp when the vehicle body longitudinal control parameters are output. Determine whether the calculation time_consum is greater than 5ms and whether the current vehicle speed is greater than 60km / h. When the calculation time_consum>5ms indicates that the current time consumption is high, or the current vehicle speed>60km / h indicates that the current vehicle speed is high, the obtained vehicle body transverse and longitudinal control parameters can be adjusted from the conventional transmission mode periodic transmission mode to the event transmission mode, and the priority processing mark Prority_Flag and the timestamp when the control algorithm node outputs the vehicle body transverse and longitudinal control parameters are added to the data packet including the vehicle body transverse and longitudinal control parameters. The data packet is transmitted to the signal forwarding node using the event transmission mode. When the signal forwarding node determines that there is a priority processing mark in the data packet, it also uses the event transmission mode to send the data packet to the main controller.
[0116] If it is determined that time_consum is not greater than 5ms and the current vehicle speed is not greater than 60km / h, the periodic transmission method is maintained to send a data packet including the lateral and longitudinal control parameters of the vehicle body to the signal forwarding node. The data packet carries the timestamp when the control algorithm node outputs the lateral and longitudinal control parameters of the vehicle body. When the signal forwarding node receives the data packet, it converts the transmission protocol of the data packet from the first protocol to the second protocol to obtain the data packet after the protocol conversion, and uses a periodic transmission method to send the data packet after the protocol conversion to the main controller to reduce resource consumption.
[0117] It is worth mentioning that when it is determined that data can be transmitted using a periodic transmission method, if the control algorithm node runs a cycle of 20ms, even if the calculation function is executed within 1ms and the lateral and longitudinal control parameters of the vehicle body are calculated, it may wait until the 20ms to be sent downstream to reduce CPU resource consumption.
[0118] When the main controller receives a data packet, it determines whether the data packet carries a priority processing flag, and whether the difference dif_timeStamp between the time when the main controller receives the data packet and the timestamp in the data packet is greater than 10ms. Then, the vehicle body transverse and longitudinal control parameters in the data packet are arbitrated by interruption, and the transverse and longitudinal control components sent to the vehicle are accelerated by interruption triggering to achieve efficient vehicle control. If there is no priority processing flag, or the difference dif_timeStamp between the time when the main controller receives the data packet and the timestamp in the data packet is not greater than 10ms. The main controller maintains the original cycle (such as every 20ms) to perform the corresponding arbitration forwarding task to send the data packet to the transverse and longitudinal control components of the vehicle, reducing the system resource consumption on the MCU side.
[0119] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0120] See also Fig.10 Another embodiment of the present application provides a vehicle control signal transmission device 300, which is applied to a system-level chip of a vehicle. The vehicle control signal transmission device 300 includes: a data acquisition module 310, which is used to obtain the lateral and longitudinal control parameters of the vehicle body, the calculation time of generating the lateral and longitudinal control parameters of the vehicle body by using a control algorithm, and the current speed of the vehicle; a first transmission mode determination module 320, which is used to determine the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body according to the current vehicle speed and the calculation time; a first data transmission module 330, which is used to transmit the data packet including the lateral and longitudinal control parameters of the vehicle body to the main controller of the vehicle by using an event-type transmission mode when the first transmission mode is an event-type transmission mode, so that the main controller of the vehicle sends the data packet to the lateral and longitudinal control components of the vehicle.
[0121] In one possible implementation, a control algorithm node and at least one application algorithm node are deployed in the system-level chip, and the data acquisition module 310 is also used to call the application algorithm node to use the corresponding application algorithm to calculate the data collected by the vehicle's perception device to obtain an application output value; call the control algorithm node to use the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the lateral and longitudinal control parameters of the vehicle body.
[0122] In one possible implementation, the system-level chip of the vehicle is deployed with output flags corresponding to multiple application algorithm nodes, and the vehicle control signal transmission device 300 also includes an adjustment module, which is used to call the application algorithm node in the current cycle to use the corresponding application algorithm to calculate the data collected by the sensing device of the vehicle to obtain an application output value, and then call the application algorithm node to adjust the value of the corresponding output flag from a first value to a second value, and the first value indicates that the application algorithm node has not calculated the application output value in the current cycle; the data acquisition module is also used to call the control algorithm node according to the corresponding The output flag bit of the control algorithm node is assigned a value to determine whether each of the application algorithm nodes has calculated the application output value within the current cycle; if it is determined that multiple application algorithm nodes have calculated the application output value within the current cycle, the control algorithm node is called to adopt the corresponding control algorithm to calculate the application output value of each of the application algorithm nodes in the current cycle to obtain the lateral and longitudinal control parameters of the vehicle body; the value adjustment module is also used to adjust the flag bit value corresponding to the application algorithm node from the second value to the first value after the control algorithm node is called to adopt the corresponding control algorithm to calculate the application output value of each of the application algorithm nodes to obtain the lateral and longitudinal control parameters of the vehicle body.
[0123] In one embodiment, the data acquisition module 310 is also used to determine that there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value in the current cycle, and obtain the application output value of the target application algorithm node in the current cycle according to the application output values corresponding to each of the multiple historical cycles before the current cycle; call the control algorithm node to use the corresponding control algorithm to calculate the application output value of each of the application algorithm nodes in the current cycle to obtain the lateral and longitudinal control parameters of the vehicle body.
[0124] In one possible implementation, threads corresponding to each of the application algorithm nodes are running in the system-level chip, and the vehicle control signal transmission device 300 also includes a timing module, a timing duration judgment module and a priority enhancement module. The timing module is used to call the control algorithm node according to the assignment of the output flag bit corresponding to each of the application algorithm nodes, and start timing when determining whether each of the application algorithm nodes has calculated the application output value within the current cycle; the timing duration judgment module is used to determine whether there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value within the current cycle, and determine whether the timing duration reaches a preset duration; the priority enhancement module is used to enhance the priority of the thread corresponding to the target application algorithm node when the preset duration has not been reached.
[0125] In one possible implementation, a signal forwarding node is also deployed in the system-level chip, the data transmission protocol between the nodes in the system-level chip is a first protocol, and the data transmission protocol between the system-level chip and the main controller is a second protocol; the first data transmission module 320 is also used to call the control algorithm node to adopt an event-type transmission method to transmit a data packet including the lateral and longitudinal control parameters of the vehicle body to the signal forwarding node; call the signal forwarding node to convert the transmission protocol of the data packet from the first protocol to the second protocol, obtain the data packet after the protocol conversion, and send the data packet after the protocol conversion to the main controller using an event-type transmission method.
[0126] In one possible implementation, the vehicle control signal transmission device 300 also includes: an identification adding module, used to add a priority processing identification to the data packet including the lateral and longitudinal control parameters of the vehicle body, so that when the main controller of the vehicle receives the data packet, it uses an interrupt triggering method based on the priority processing identification to send the data packet to the lateral and longitudinal control components of the vehicle through the CAN bus.
[0127] In one possible implementation, the first transmission mode determination module 320 is also used to determine whether the current vehicle speed is greater than a preset vehicle speed threshold, and to determine whether the calculation time is greater than a preset calculation time threshold; if the current vehicle speed is greater than the preset vehicle speed threshold or the calculation time is greater than the preset calculation time threshold, it is determined that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is an event-based transmission mode; if the current vehicle speed is not greater than the preset vehicle speed threshold and the calculation time is not greater than the preset calculation time threshold, it is determined that the first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body is a periodic transmission mode.
[0128] See also Fig.11 As shown, an embodiment of the present application provides a vehicle control signal transmission device 400, which is applied to the main controller of the vehicle, and the vehicle control signal transmission device 400 includes: a data receiving module 410, which is used to receive a data packet including the lateral and longitudinal control parameters of the vehicle body sent by the system-level chip of the vehicle, the lateral and longitudinal control parameters of the vehicle body are generated by the main controller using a control algorithm, and the data packet carries a timestamp when the main controller generates the lateral and longitudinal control parameters of the vehicle body using the control algorithm; a second transmission mode determination module 420, which is used to determine the second transmission mode of the data packet by the main controller according to the reception time of the data packet, the timestamp and whether the data packet carries a priority processing identifier; a second data transmission module 430, which is used to send the data packet to the lateral and longitudinal control components of the vehicle using an interrupt trigger transmission mode when the second transmission mode is an interrupt trigger mode.
[0129] In one possible implementation, the second transmission mode determination module 420 is also used to determine whether the duration between the receiving time and the timestamp exceeds a preset duration, and to determine whether the data packet carries a priority processing flag; if it exceeds the preset duration or carries a priority processing flag, it is determined that the second transmission mode of the main controller for the data packet is an interrupt triggered transmission mode; if it does not exceed the preset duration and does not carry a priority processing flag, it is determined that the second transmission mode of the main controller for the data packet is a periodic transmission mode.
[0130] Each module in the above-mentioned device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules. It should be noted that the device embodiment in this application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment, which will not be repeated here.
[0131] The following will be combined Fig.12 An electronic device provided by the present application is described.
[0132] See also Fig.12 Based on the vehicle control signal transmission method provided in the above embodiment, the embodiment of the present application also provides another electronic device 100 including a processor 102 that can execute the above method, and the electronic device 100 can be a vehicle.
[0133] The electronic device 100 further includes a memory 104 . The memory 104 stores a program that can execute the contents of the aforementioned embodiments, and the processor 102 can execute the program stored in the memory 104 .
[0134] Among them, the processor 102 may include one or more cores for processing data and a message matrix unit. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Optionally, the processor 102 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 102 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented separately through a communication chip.
[0135] In this embodiment, the processor 102 includes a main controller and a system-on-chip to implement the aforementioned method steps.
[0136] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data obtained by the electronic device 100 during use, etc.
[0137] The electronic device 100 may also include a network module and a screen. The network module is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices, such as communicating with an audio playback device. The network module may include various existing circuit components for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, and the like. The network module may communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices via wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The screen may display interface content and perform data interaction, such as displaying the aforementioned interface, and triggering operations via the screen.
[0138] In some embodiments, the electronic device 100 may further include: a peripheral interface 106 and at least one peripheral device. The processor 102, the memory 104 and the peripheral interface 106 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral interface via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency component 108, a positioning component 112, a camera 114, an audio component 116, a display screen 118 and a power supply 122.
[0139] The peripheral interface 106 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 102 and the memory 104. In some embodiments, the processor 102, the memory 104, and the peripheral interface 106 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 102, the memory 104, and the peripheral interface 106 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.
[0140] The radio frequency component 108 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency component 108 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency component 108 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency component 108 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency component 108 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency component 108 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0141] The positioning component 112 is used to locate the current geographic location of the electronic device to implement navigation or LBS (Location Based Service). The positioning component 112 can be a positioning component based on the US GPS (Global Positioning System), Beidou system or Galileo system.
[0142] The camera 114 is used to capture images or videos. Optionally, the camera 114 includes a front camera and a rear camera. Usually, the front camera is arranged on the front panel of the electronic device 100, and the rear camera is arranged on the back of the electronic device 100. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera 114 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0143] The audio component 116 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 102 for processing, or input them into the RF component 108 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there can be multiple microphones, which are respectively arranged at different parts of the electronic device 100. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 102 or the RF component 108 into sound waves. The speaker can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio component 114 may also include a headphone jack.
[0144] The display screen 118 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 118 is a touch display screen, the display screen 118 also has the ability to collect touch signals on the surface or above the surface of the display screen 118. The touch signal can be input to the processor 102 as a control signal for processing. At this time, the display screen 118 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 118 can be one, and the front panel of the electronic device 100 is set; in other embodiments, the display screen 118 can be at least two, which are respectively set on different surfaces of the electronic device 100 or are folded; in some other embodiments, the display screen 118 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 100. Even, the display screen 118 can also be set as a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 118 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, machine light-emitting diode).
[0145] The power supply 122 is used to power various components in the electronic device 100. The power supply 122 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 122 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0146] The embodiment of the present application also provides a structural block diagram of a computer-readable storage medium. The computer-readable medium stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0147] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program codes that execute any of the method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0148] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the method described in the above various optional implementations.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A vehicle control signal transmission method, characterized in that: A system-level chip applied to a vehicle, the method comprising: Obtaining vehicle body lateral and longitudinal control parameters, the calculation time of generating the vehicle body lateral and longitudinal control parameters using a control algorithm, and the current vehicle speed of the vehicle; Determining, according to the current vehicle speed and the calculation time, a first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body; If the first transmission mode is an event-based transmission mode, the event-based transmission mode is used to transmit a data packet including the vehicle body lateral and longitudinal control parameters to the vehicle's main controller, so that the vehicle's main controller sends the data packet to the vehicle's lateral and longitudinal control components.
2. The method according to claim 1, characterized in that The system-level chip is deployed with a control algorithm node and at least one application algorithm node, and the acquisition of the vehicle body lateral and longitudinal control parameters includes: Calling the application algorithm node to use the corresponding application algorithm to calculate the data collected by the sensing device of the vehicle to obtain an application output value; The control algorithm node is called to adopt the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the lateral and longitudinal control parameters of the vehicle body.
3. The method according to claim 2, characterized in that The system-level chip of the vehicle is deployed with output flags corresponding to a plurality of application algorithm nodes, and the method further includes: If the application algorithm node is called in the current cycle to use the corresponding application algorithm to calculate the data collected by the perception device of the vehicle to obtain an application output value, the application algorithm node is called to adjust the value of the corresponding output flag bit from a first value to a second value, wherein the first value indicates that the application algorithm node has not calculated the application output value in the current cycle, and the second value indicates that the application algorithm node has calculated the application output value in the current cycle; The calling of the control algorithm node uses the corresponding control algorithm to calculate the application output value of each application algorithm node to obtain the vehicle body transverse and longitudinal control parameters, including: Calling the control algorithm node to determine whether each of the application algorithm nodes has calculated an application output value in the current cycle according to the value of the output flag bit corresponding to each of the application algorithm nodes; If it is determined that a plurality of the application algorithm nodes have calculated application output values in the current cycle, the control algorithm node is called to use the corresponding control algorithm to calculate the application output values of each application algorithm node in the current cycle to obtain the vehicle body lateral and longitudinal control parameters; After the control algorithm node is called to calculate the application output value of each application algorithm node using the corresponding control algorithm to obtain the vehicle body lateral and longitudinal control parameters, the method further includes: The flag value corresponding to the application algorithm node is adjusted from the second value to the first value.
4. The method according to claim 3, characterized in that: The calling of the control algorithm node to calculate the application output value of each application algorithm node using the corresponding control algorithm to obtain the vehicle body transverse and longitudinal control parameters also includes: If it is determined that there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value in the current cycle, the application output value of the target application algorithm node in the current cycle is obtained according to the application output values corresponding to each of the multiple historical cycles before the current cycle.
5. The method according to claim 4, characterized in that The system-on-chip runs threads corresponding to the application algorithm nodes, and the method further includes: The timing starts when the control algorithm node is called to determine whether each of the application algorithm nodes has calculated the application output value in the current cycle according to the assignment of the output flag bit corresponding to each of the application algorithm nodes; If it is determined that there is a target application algorithm node among the multiple application algorithm nodes that has not calculated the application output value within the current cycle, determining whether the timing duration reaches a preset duration; If the preset duration is not reached, the priority of the thread corresponding to the target application algorithm node is increased, and the process returns to the step of calling the application algorithm node to calculate the data collected by the vehicle's sensing device using the corresponding application algorithm; If the preset duration is reached, a step is executed to obtain the application output value of the target application algorithm node in the current cycle according to the application output values corresponding to each of the multiple historical cycles before the current cycle.
6. The method according to claim 2, characterized in that A signal forwarding node is also deployed in the system-level chip, the data transmission protocol between the nodes in the system-level chip is a first protocol, and the data transmission protocol between the system-level chip and the main controller is a second protocol; The method of transmitting the data packet including the vehicle body lateral and longitudinal control parameters to the main controller of the vehicle by adopting an event-based transmission method includes: Calling the control algorithm node to transmit a data packet including the vehicle body lateral and longitudinal control parameters to the signal forwarding node in an event-based transmission manner; The signal forwarding node is called to convert the transmission protocol of the data packet from the first protocol to the second protocol to obtain the data packet after protocol conversion, and the data packet after protocol conversion is sent to the main controller using an event-based transmission method.
7. The method according to claim 1, characterized in that Before transmitting the vehicle body lateral and longitudinal control parameters to the main controller of the vehicle in an event-based transmission manner, the method further includes: A priority processing flag is added to the data packet including the vehicle body lateral and longitudinal control parameters, so that when the vehicle's main controller receives the data packet, it uses an interrupt trigger method based on the priority processing flag to send the data packet to the vehicle's lateral and longitudinal control components through the CAN bus.
8. The method according to any one of claims 1 to 7, characterized in that: The determining, according to the current vehicle speed and the calculation time, a first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body includes: Determining whether the current vehicle speed is greater than a preset vehicle speed threshold, and determining whether the calculation time is greater than a preset calculation time threshold; If the current vehicle speed is greater than a preset vehicle speed threshold or the calculation time is greater than a preset calculation time threshold, determining that the first transmission mode of the system-level chip for the vehicle body lateral and longitudinal control parameters is an event-based transmission mode; If the current vehicle speed is not greater than a preset vehicle speed threshold and the calculation time is not greater than a preset calculation time threshold, it is determined that the first transmission mode of the system-level chip for the vehicle body lateral and longitudinal control parameters is a periodic transmission mode.
9. A vehicle control signal transmission method, characterized in that: Applied to a main controller of a vehicle, the method comprises: receiving a data packet including vehicle body lateral and longitudinal control parameters sent by the system-level chip of the vehicle, wherein the vehicle body lateral and longitudinal control parameters are generated by the main controller using a control algorithm, and the data packet carries a timestamp when the main controller generates the vehicle body lateral and longitudinal control parameters using the control algorithm; Determining, according to the reception time of the data packet, the timestamp, and whether the data packet carries a priority processing identifier, a second transmission mode of the data packet by the main controller; If the second transmission mode is an interruption-triggered mode, the data packet is sent to the lateral and longitudinal control components of the vehicle using the interruption-triggered transmission mode.
10. The method according to claim 9, characterized in that The determining, according to the reception time of the data packet, the timestamp, and whether the data packet carries a priority processing identifier, the second transmission mode of the data packet by the main controller includes: Determine whether the duration between the receiving time and the timestamp exceeds a preset duration, and determine whether the data packet carries a priority processing flag; If the preset time is exceeded or the data packet carries a priority processing mark, determining that the second transmission mode of the data packet by the main controller is an interrupt-triggered transmission mode; If it does not exceed the preset time length and does not carry a priority processing mark, it is determined that the second transmission mode of the main controller for the data packet is a periodic transmission mode.
11. A vehicle control signal transmission device, characterized in that: A system-level chip applied to a vehicle, the device comprising: A data acquisition module, used to acquire the lateral and longitudinal control parameters of the vehicle body, the calculation time of generating the lateral and longitudinal control parameters of the vehicle body by using a control algorithm, and the current speed of the vehicle; A first transmission mode determination module, used for determining a first transmission mode of the system-level chip for the lateral and longitudinal control parameters of the vehicle body according to the current vehicle speed and the calculation time; The first data transmission module is used to transmit a data packet including the lateral and longitudinal control parameters of the vehicle body to the main controller of the vehicle using an event-based transmission method when the first transmission method is an event-based transmission method, so that the main controller of the vehicle sends the data packet to the lateral and longitudinal control components of the vehicle.
12. A vehicle control signal transmission device, characterized in that: A main controller for a vehicle, the device comprising: a data receiving module, configured to receive a data packet including vehicle body lateral and longitudinal control parameters sent by the system-level chip of the vehicle, wherein the vehicle body lateral and longitudinal control parameters are generated by the main controller using a control algorithm, and the data packet carries a timestamp when the main controller generates the vehicle body lateral and longitudinal control parameters using the control algorithm; A second transmission mode determination module, configured to determine a second transmission mode of the data packet by the main controller according to the reception time of the data packet, the timestamp, and whether the data packet carries a priority processing identifier; The second data transmission module is used to send the data packet to the lateral and longitudinal control components of the vehicle by using an interrupt-triggered transmission mode when the second transmission mode is an interrupt-triggered transmission mode.
13. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method as described in any one of claims 1-8 or 9-10.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the program code can be called by a processor to execute the method as claimed in any one of claims 1-8 or 9-10.
Citation Information
Patent Citations
Event-driven processor and operating method thereof
CN104375820A
Periodic data message transmission method, system and device and storage medium
CN109861791A
Data communication method and device, electronic equipment and storage medium
CN114640703A
Data transmission method and device
CN114817110A
Data transmission method and device, micro-control unit and automatic driving vehicle
CN116257010A