Data transmission control method, system, computer equipment and storage medium
By using the target counter to control the transmission time of mission data and combining it with the time-sensitive network control gateway, the problems of vehicle mission data transmission delay and low efficiency are solved, and efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510085153.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-01-20
AI Technical Summary
The mission data transmission delay on the vehicle is long and the transmission efficiency is low. The existing technology uses time stamp control through time windows, which reduces the transmission reliability.
The count value of the target counter indicating the end time and start time of the corresponding task is used to control the opening and closing of the gate in the gate list, and the task data is transmitted through the time-sensitive network control gateway to avoid the use of time window timestamp control.
It improves the real-time and reliability of mission data transmission on the vehicle, reduces transmission delay, and improves transmission efficiency and system reliability.
Smart Images

Figure CN119911219B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a data transmission control method, system, computer equipment and storage medium. Background Art
[0002] Vehicle mission execution relies on mission data. Control over the transmission of mission data on the vehicle is essential. In related technologies, this control is achieved through control operations performed by the transmitting party involved in the task data transmission. This results in long transmission delays and low transmission efficiency. Improving the transmission efficiency of task data on the vehicle has become a pressing issue. Summary of the Invention
[0003] One of the purposes of the present invention is to provide a data transmission control method, system, computer device and storage medium to solve the problem of how to improve the transmission efficiency of mission data on a vehicle.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] A data transmission control method, comprising:
[0006] In response to a count value of a target counter on the target vehicle reaching a count value indicating a target end time of the target task, closing a gate corresponding to a gating priority of the target task in the gating list to stop transmitting task data of the target task through the time-sensitive network control gateway;
[0007] Opening a gate corresponding to a gating priority of a task to be executed next in the gating list, so as to transmit task data of the task to be executed next through a time-sensitive network control gateway, wherein the target end time is the end time of a process of executing the target task, the target end time is the target start time of the task to be executed next, and the target start time of the task to be executed next is the start time of a process of executing the task to be executed next;
[0008] The count value of the target counter indicating the target end time of the target task is used as the count value of the target counter indicating the target start time of the task to be executed next.
[0009] According to the above technical means, on the one hand, a time-sensitive network control gateway, which can achieve high real-time data transmission, is used to control the transmission of mission data to the target vehicle, thereby reducing the transmission latency and improving the transmission efficiency of the mission data to the target vehicle. This improves the reliability and performance of the entire vehicle system of the target vehicle. The value of a counter is used to control the opening and closing of gates in the gate control list, thereby more accurately controlling the opening and closing of gates in the gate control list of the time-sensitive network control gateway.
[0010] On the other hand, in the data transmission control method provided in the embodiment of the present invention, the reason why the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task are used to control the opening and closing of the corresponding gate in the gate list is due to the consideration that: the method of controlling data transmission in the related art, that is, transmitting the task data corresponding to the time window within the time window, and using the time stamp of the time window to control the start and stop of the transmission of the task data will lead to a reduction in the reliability of the transmission of the task data on the vehicle. When the start and stop of the transmission of the task data is controlled by the time stamp of the time window in the related art, for each time window, the vehicle engineer sets the time stamp of each time window based on the time length required for transmitting the preset data amount of the task data corresponding to the time window within the time window under normal circumstances as determined by the vehicle engineer. When the time reaches the timestamp of a time window, an attempt is made to transmit the preset data amount of the task data corresponding to the next time window within the next time window.
[0011] However, the timestamps of time windows are set based on the time required by vehicle engineers to transmit the amount of task data corresponding to the time window under normal circumstances. In unusual circumstances, such as when the equipment used to transmit task data within a time window is heavily loaded, the time required to transmit the amount of task data corresponding to the time window may be greater than the time between the timestamp of this time window and the timestamp of the previous time window. Consequently, the timestamp set by the vehicle engineers for this time window is earlier than the time at which task data transmission for this task should cease. In reality, the data corresponding to this time window will only be transmitted at a certain point after the timestamp of this time window. However, because the start and stop of task data transmission is controlled by the timestamps of the time window, the transmission of the data corresponding to this time window is stopped when the timestamp of a time window is reached. This results in the transmission of the task data corresponding to this time window being prematurely stopped before the task data transmission actually completes. This causes anomalies in the vehicle systems that rely on the transmission of the task data corresponding to this time window to operate. This reduces the reliability of task data transmission on the vehicle.
[0012] In the data transmission control method provided in an embodiment of the present invention, a time-sensitive network is used to control the gateway to transmit task data, and the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task are used to control the opening and closing of the corresponding gate in the gating list. The opening or closing of the corresponding gate in the gating list will trigger the time-sensitive network to start or stop transmitting the task data of the corresponding task.
[0013] That is to say, in the data transmission control method provided by the embodiment of the present invention, the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task are used to control the start and stop of the transmission of the task data of the corresponding task. In the data transmission control method provided by the embodiment of the present invention, the information unrelated to the timestamp of the time window, namely the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task, is used to control the start and stop of the transmission of the task data corresponding to the time window, without using the timestamp of the time window to control the start and stop of the transmission of the task data corresponding to the time window. This can avoid the above-mentioned related art using the timestamp of the time window to control the start and stop of the transmission of the task data corresponding to the time window, resulting in the transmission of the task data corresponding to the time window being stopped in advance and the system on the vehicle that relies on the transmission of the task data corresponding to the time window to perform corresponding operations being abnormal. Through the data transmission control method provided by the embodiment of the present invention, the reliability of the transmission of task data on the vehicle is improved.
[0014] Furthermore, the method also includes: the time-sensitive network control gateway responds to the count value of the target counter on the target vehicle reaching the count value indicating the target start time of the target task, and determines the count value indicating the target end time of the target task based on the count value of the target counter indicating the target start time of the target task and the preset execution duration of the target task.
[0015] Furthermore, the target task is a task of sending data corresponding to a target system-level chip on the target vehicle by a target electronic control unit on the target vehicle; the method also includes: during the execution of the target task, the time-sensitive network control gateway receives data corresponding to the target system-level chip from the target electronic control unit, and sends data corresponding to the target system-level chip on the target vehicle to the target system-level chip on the target vehicle.
[0016] Further, the gating priority of the target task is the same as the quality of service priority of the target task; and sending data corresponding to the target system-on-chip on the target vehicle to the target system-on-chip on the target vehicle includes:
[0017] The time-sensitive network control gateway determines whether a quality of service priority in a target message received from a target system-on-chip is a gating priority of a target task, wherein the target message includes: data corresponding to a target system-on-chip on a target vehicle;
[0018] If so, the time-sensitive network control gateway sends the target message to the target system-level chip on the target vehicle.
[0019] Furthermore, the time-sensitive network control gateway, the target electronic control unit, and the target system-on-chip are integrated into a vehicle domain controller of the target vehicle.
[0020] Furthermore, the method further comprises:
[0021] The target electronic control unit periodically synchronizes its clock with the time-sensitive network control gateway and each of the target system-on-chip according to a preset synchronization time interval, wherein the clock of the target electronic control unit is pre-configured as a master clock source, and the clock of the time-sensitive network control gateway and the clock of the target system-on-chip are each pre-configured as a slave clock source.
[0022] Furthermore, the target counter is a system counter of the AUTOSAR architecture.
[0023] Furthermore, the method further comprises:
[0024] When the count value of the target counter on the target vehicle reaches the count value indicating the target end time of the target task, the time-sensitive network control gateway instructs the expiration point in the Autosar architecture to set the state of the target task to the end state to trigger the end of execution of the target task, wherein the expiration point is a module for setting attribute information of the task.
[0025] A control system for data transmission, the control system for data transmission includes: a time-sensitive network control gateway, the system being configured to, in response to a count value of a target counter on a target vehicle reaching a count value indicating a target end time of a target task, close the gate corresponding to the gating priority of the target task in the gating list to stop transmitting task data of the target task through the time-sensitive network control gateway; open the gate corresponding to the gating priority of the task to be executed next in the gating list to transmit task data of the task to be executed next through the time-sensitive network control gateway, wherein the target end time is the end time of the process of executing the target task, the target end time is the target start time of the task to be executed next, and the target start time of the task to be executed next is the start time of the process of executing the task to be executed next; and use the count value of the target counter indicating the target end time of the target task as the count value of the target counter indicating the target start time of the task to be executed next.
[0026] Further, the time-sensitive network control gateway responds to the count value of the target counter on the target vehicle reaching the count value indicating the target start time of the target task, and determines the count value indicating the target end time of the target task based on the count value of the target counter indicating the target start time of the target task and the preset execution duration of the target task.
[0027] Furthermore, the data transmission control system also includes: a target electronic control unit on the target vehicle, a target system-level chip on the target vehicle, and the target task is a task for the target electronic control unit on the target vehicle to send data corresponding to the target system-level chip on the target vehicle; during the execution of the target task, the time-sensitive network control gateway receives data corresponding to the target system-level chip from the target electronic control unit, and sends data corresponding to the target system-level chip on the target vehicle to the target system-level chip on the target vehicle.
[0028] Furthermore, the gating priority of the target task is the same as the service quality priority of the target task; the time-sensitive network control gateway determines whether the service quality priority in the target message received from the target system-level chip is the gating priority of the target task, wherein the target message includes: data corresponding to the target system-level chip on the target vehicle; if so, the time-sensitive network control gateway sends the target message to the target system-level chip on the target vehicle.
[0029] Furthermore, the time-sensitive network control gateway, the target electronic control unit, and the target system-on-chip are integrated into a vehicle domain controller of the target vehicle.
[0030] Furthermore, the target electronic control unit periodically synchronizes its clock with the time-sensitive network control gateway and each of the target system-on-chip according to a preset synchronization time interval, wherein the clock of the target electronic control unit is pre-configured as a master clock source, and the clock of the time-sensitive network control gateway and the clock of the target system-on-chip are each pre-configured as a slave clock source.
[0031] Furthermore, the target counter is a system counter of the AUTOSAR architecture.
[0032] Further, when the count value of the target counter on the target vehicle reaches the count value indicating the target end time of the target task, the time-sensitive network control gateway instructs the expiration point in the Autosar architecture to set the state of the target task to the end state to trigger the end of execution of the target task, wherein the expiration point is a module for setting attribute information of the task.
[0033] Beneficial effects of the present invention:
[0034] On the one hand, a time-sensitive network control gateway, which can achieve high real-time data transmission, controls the transmission of mission data to the target vehicle, reducing the transmission latency and improving the transmission efficiency. This improves the reliability and performance of the entire vehicle system. The value of a counter is used to control the opening and closing of gates in the gate control list, allowing for more accurate control of the opening and closing of gates in the time-sensitive network control gateway's gate control list.
[0035] On the other hand, in the data transmission control method provided in the embodiment of the present invention, the reason why the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task are used to control the opening and closing of the corresponding gate in the gate list is due to the consideration that: the method of controlling data transmission in the related art, that is, transmitting the task data corresponding to the time window within the time window, and using the time stamp of the time window to control the start and stop of the transmission of the task data will lead to a reduction in the reliability of the transmission of the task data on the vehicle. When the start and stop of the transmission of the task data is controlled by the time stamp of the time window in the related art, for each time window, the vehicle engineer sets the time stamp of each time window based on the time length required for transmitting the preset data amount of the task data corresponding to the time window within the time window under normal circumstances as determined by the vehicle engineer. When the time reaches the timestamp of a time window, an attempt is made to transmit the preset data amount of the task data corresponding to the next time window within the next time window.
[0036] However, the timestamps of time windows are set based on the time required by vehicle engineers to transmit the amount of task data corresponding to the time window under normal circumstances. In unusual circumstances, such as when the equipment used to transmit task data within a time window is heavily loaded, the time required to transmit the amount of task data corresponding to the time window may be greater than the time between the timestamp of this time window and the timestamp of the previous time window. Consequently, the timestamp set by the vehicle engineers for this time window is earlier than the time at which task data transmission for this task should cease. In reality, the data corresponding to this time window will only be transmitted at a certain point after the timestamp of this time window. However, because the start and stop of task data transmission is controlled by the timestamps of the time window, the transmission of the data corresponding to this time window is stopped when the timestamp of a time window is reached. This results in the transmission of the task data corresponding to this time window being prematurely stopped before the task data transmission actually completes. This causes anomalies in the vehicle systems that rely on the transmission of the task data corresponding to this time window to operate. This reduces the reliability of task data transmission on the vehicle.
[0037] In the data transmission control method provided in an embodiment of the present invention, a time-sensitive network is used to control the gateway to transmit task data, and the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task are used to control the opening and closing of the corresponding gate in the gating list. The opening or closing of the corresponding gate in the gating list will trigger the time-sensitive network to start or stop transmitting the task data of the corresponding task.
[0038] That is, in the data transmission control method provided in an embodiment of the present invention, the start and stop of the transmission of task data of the corresponding task are controlled by using the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task.
[0039] In the data transmission control method provided by the embodiment of the present invention, information unrelated to the timestamp of the time window, namely the count value of the target counter indicating the corresponding end time of the corresponding task and the count value indicating the corresponding start time of the corresponding task, is used to control the start and stop of the transmission of the task data corresponding to the time window, without using the timestamp of the time window to control the start and stop of the transmission of the task data corresponding to the time window. This can avoid the situation in the above-mentioned related art where the timestamp of the time window is used to control the start and stop of the transmission of the task data corresponding to the time window, resulting in the transmission of the task data corresponding to the time window being stopped in advance and the system on the vehicle that relies on the transmission of the task data corresponding to the time window to perform corresponding operations being abnormal. The data transmission control method provided by the embodiment of the present invention improves the reliability of the transmission of task data on the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a flow chart of a data transmission control method provided in an embodiment of the present invention;
[0041] Figure 2 A schematic diagram showing an example of start time and end time of a task executed in a cyclic execution process corresponding to multiple tasks during the execution of the task;
[0042] Figure 3 A schematic flow chart of another data transmission control method provided by an embodiment of the present invention;
[0043] Figure 4 A schematic diagram of an example architecture for controlling data transmission that may be applied to an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following describes the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art will readily appreciate the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments, and the various details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are intended only to illustrate the present invention and are not intended to limit the scope of protection of the present invention.
[0046] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.
[0047] refer to Figure 1 , which shows a flow chart of a data transmission control method provided by an embodiment of the present invention. It should be noted that steps S101 through S103 can be executed in parallel. Once the target counter on the target vehicle reaches the target end time of the target task, execution of steps S101 through S103 is triggered.
[0048] In step S101, in response to the count value of the target counter on the target vehicle reaching the count value indicating the target end time of the target task, the gate corresponding to the gating priority of the target task in the gating list is closed to stop transmitting the task data of the target task through the time-sensitive network control gateway on the target vehicle.
[0049] The target task can be any one of multiple tasks. Each task in the multiple tasks has a different gating priority. The gating priority of each task in the multiple tasks can be pre-set.
[0050] It should be noted that step S101 may be executed by a time-sensitive network (TSN) control gateway on the target vehicle.
[0051] The TSN control gateway is a network device that supports protocols such as IEEE 802.1qbv and IEEE 802.1as. It can also provide gated queue control functionality. Any two data transmission parties on a target vehicle transmitting data over a TSN can receive or send data according to any of these protocols. The TSN forwards data according to any of these protocols. The TSN control gateway supports gate control lists (GCLs) for each of these protocols. These GCLs are used to control the transmission of data with high real-time requirements, namely time-sensitive traffic. For this data, the TSN control gateway determines a time window on the timeline indicating when the data can be transmitted. Only within this time window can the data be transmitted.
[0052] It should be noted that, for task i among the multiple tasks, task i has an end time during the t-th execution of the task and a start time during the t-th execution of the task.
[0053] The process of executing the task for the tth time is: the process of executing the task when the task executed at any time is task i.
[0054] The end time of task i during the t-th task execution process is: the end time of the t-th task execution process is the time when task i is finished during the t-th task execution process.
[0055] The starting time of task i in the process of executing the task for the tth time is: the starting time of the process of executing the task for the tth time is the time when task i starts to be executed in the process of executing the task for the tth time.
[0056] It should be noted that the target end time of task i does not specifically refer to the time when task i is completed. The target end time of task i can be the end time of the task execution process that meets the preset conditions. The preset conditions include: the task execution process is the end time of the task execution process.
[0057] The process of task i and the process of executing the task are not the process of the last task executed.
[0058] It should be noted that, in the embodiment of the present invention, for task i among multiple tasks, opening a gate corresponding to the gating priority of task i in the gating list may refer to setting the gate corresponding to the gating priority of task i in the gating list to an open state. Closing a gate corresponding to the gating priority of task i in the gating list may refer to setting the state of the gate corresponding to the gating priority of task i in the gating list to a closed state.
[0059] In one possible implementation, the state value of the gate corresponding to each gating priority indicates whether the gate corresponding to the gating priority is in one of the following states: open state and closed state. For a gating priority, when the gate corresponding to the gating priority is in the open state, the state value of the gate corresponding to the gating priority is 1. When the gate corresponding to the gating priority is in the closed state, the state value of the gate corresponding to the gating priority is 0.
[0060] For task i among multiple tasks, when the gate corresponding to the gating priority of task i in the gating list is opened, the state value of the gate corresponding to the gating priority of task i in the gating list is set to 1. When the gate corresponding to the gating priority of task i in the gating list is closed, the state value of the gate corresponding to the gating priority of task i in the gating list is set to 0.
[0061] In an embodiment of the present invention, the target task may be a data transmission task. During execution of the target task, components on the target vehicle used to perform the target task may periodically transmit task data for the target task. The time-sensitive network control gateway receives the task data for the target task and transmits the task data to other components.
[0062] In the embodiment of the present invention, the count value of the target counter on the target vehicle is periodically updated. The count value of the target counter on the target vehicle is periodically updated, for example, by a system clock on the target vehicle used for time synchronization.
[0063] In step S102 , the gate corresponding to the gating priority of the task to be executed next in the gating list is opened to transmit the task data of the task to be executed next through the time-sensitive network control gateway.
[0064] In one possible implementation, upon detecting that the count value of the target counter on the target vehicle has reached the target end time of the target task, a module on the target vehicle for detecting the count value of the target counter on the target vehicle may send an instruction to the time-sensitive network on the target vehicle, instructing the count value of the target counter on the target vehicle to reach the target end time of the target task. Thus, the time-sensitive network on the target vehicle may determine that the count value of the target counter on the target vehicle has reached the target end time of the target task.
[0065] It should be noted that the data transmission control method provided by the embodiment of the present invention can be executed in a cyclic execution process corresponding to multiple tasks. In the cyclic execution process corresponding to multiple tasks, each of the multiple tasks can be executed periodically.
[0066] In the embodiment of the present invention, the cyclic execution process corresponding to the plurality of tasks has execution order information corresponding to the plurality of tasks.
[0067] The execution order information corresponding to the multiple tasks can be preset. The cyclic execution process corresponding to the multiple tasks includes: n processes of executing tasks in the multiple tasks.
[0068] The execution order information corresponding to the plurality of tasks indicates which task is executed during the mth execution of the task, wherein the mth execution is any one of the n executions.
[0069] In an embodiment of the present invention, before starting the cyclic execution process corresponding to multiple tasks, the start time and the end time of the m-th task execution process can be determined. The start time and the end time of the m-th task execution process can be determined based on the start time of the cyclic execution process corresponding to the multiple tasks and the duration of each task execution process before the m-th task execution process.
[0070] In an embodiment of the present invention, the cyclic execution process corresponding to the multiple tasks may include: multiple sub-cyclic execution processes. The sub-cyclic execution process includes: h processes for executing tasks in the multiple tasks, wherein the multiple tasks are h tasks.
[0071] For a sub-cycle execution process, during the sub-cycle execution process, each of the multiple tasks is executed in sequence according to a preset task execution order of the sub-cycle execution process.
[0072] For task i among multiple tasks, the position of task i in the task execution order of a sub-cycle execution process corresponds to the priority of task i.
[0073] Task i can be any one of the multiple tasks. The higher the priority of task i, the earlier it is placed in the task execution order of the sub-cycle execution process. The lower the priority of task i, the later it is placed in the task execution order of the sub-cycle execution process.
[0074] For task i among multiple tasks, the position j of task i in the task execution order of a sub-cycle execution process indicates that task i is the jth task executed in the sub-cycle execution process.
[0075] Once the task execution order of each sub-cycle execution process in the plurality of sub-cycle execution processes is preset, the execution sequence information corresponding to the plurality of tasks can be determined.
[0076] It should be noted that the target start time of the next task to be executed does not specifically refer to the time when the next task to be executed starts. The target start time of the next task to be executed is determined based on the target end time of the target task.
[0077] The task to be executed next time may refer to a task to be executed during the process of executing the next task.
[0078] The next task execution process may refer to a task execution process that is next to the task execution process whose end time is the target end time in step S101 .
[0079] For task i among multiple tasks, if task i is the target task, the target end time of task i is the end time of the kth task execution process. Then, the next task to be executed is the task executed during the k+1th task execution process, and the target start time of the next task to be executed is the start time of the k+1th task execution process. At the same time, the target start time of the next task to be executed is the end time of the kth task execution process. The task executed during the kth task execution process is task i.
[0080] In step S103 , the count value of the target counter indicating the target end time of the target task is used as the count value of the target counter indicating the target start time of the task to be executed next.
[0081] refer to Figure 2 , which is a schematic diagram showing an example of start time and end time of a task executed in a cyclic execution process of multiple tasks during the execution of the task.
[0082] In the cyclic execution process corresponding to multiple tasks, the first task executed is TaskA, the second task executed is TaskB, the third task executed is Task C, the fourth task executed is TaskA, the fifth task executed is TaskB, and the sixth task executed is TaskC.
[0083] In this example, in the cyclic execution process corresponding to multiple tasks, the first task execution process is the process of executing TaskA, and the end time of the first task execution process, that is, the end time of TaskA in the first task execution process, is: t1, and the count value indicating the end time of the first task execution process is counter1.
[0084] In this example, in the cyclic execution process corresponding to multiple tasks, the process of executing the task for the second time is the process of executing TaskB. The starting time of the process of executing the task for the second time, that is, the starting time of TaskB in the process of executing the task for the second time, is: t1. The ending time of the process of executing the task for the second time, that is, the ending time of TaskB in the process of executing the task for the second time, is: t2. The count value indicating the starting time of the process of executing the task for the second time is counter1, and the count value indicating the ending time of the process of executing the task for the second time is counter2.
[0085] In this example, in the cyclic execution process corresponding to multiple tasks, the process of executing the task for the third time is the process of executing TaskC. The starting time of the process of executing the task for the third time, that is, the starting time of TaskC in the process of executing the task for the third time, is t2. The ending time of the process of executing the task for the third time, that is, the ending time of TaskC in the process of executing the task for the third time, is t3. The count value indicating the starting time of the process of executing the task for the third time is counter3, and the count value indicating the ending time of the process of executing the task for the third time is counter4.
[0086] In this example, in the cyclic execution process corresponding to multiple tasks, the process of executing the task for the fourth time is the process of executing TaskA. The starting time of the process of executing the task for the fourth time, that is, the starting time of TaskA in the process of executing the task for the fourth time, is: t3. The ending time of the process of executing the task for the fourth time, that is, the ending time of TaskA in the process of executing the task for the fourth time, is: t4. The count value indicating the starting time of the process of executing the task for the fourth time is counter4, and the count value indicating the ending time of the process of executing the task for the fourth time is counter5.
[0087] In this example, in the cyclic execution process corresponding to multiple tasks, the process of executing the task for the 5th time is the process of executing TaskB. The starting time of the process of executing the task for the 5th time, that is, the starting time of TaskB in the process of executing the task for the 5th time, is: t4. The ending time of the process of executing the task for the 5th time, that is, the ending time of TaskB in the process of executing the task for the 5th time, is: t5. The count value indicating the starting time of the process of executing the task for the 5th time is counter5, and the count value indicating the ending time of the process of executing the task for the 5th time is counter6.
[0088] In this example, in the cyclic execution process corresponding to multiple tasks, the process of executing the task for the 6th time is the process of executing TaskC. The starting time of the process of executing the task for the 6th time, that is, the starting time of TaskC in the process of executing the task for the 6th time, is t5. The ending time of the process of executing the task for the 6th time, that is, the ending time of TaskC in the process of executing the task for the 6th time, is t6. The count value indicating the starting time of the process of executing the task for the 6th time is counter6, and the count value indicating the ending time of the process of executing the task for the 6th time is counter7.
[0089] refer to Figure 3 , which shows a flow chart of another data transmission control method provided by an embodiment of the present invention.
[0090] In step S301, in response to the count value of the target counter on the target vehicle reaching the count value indicating the target end time of the target task, the gate corresponding to the gating priority of the target task in the gating list is closed to stop transmitting the task data of the target task through the time-sensitive network control gateway on the target vehicle, wherein the target task is a task for the target electronic control unit on the target vehicle to send data corresponding to the target system-level chip on the target vehicle.
[0091] Among them, during the execution of the target task, the time-sensitive network control gateway receives data corresponding to the target system-level chip from the target electronic control unit (Microcontroller Unit, referred to as MCU), and sends data corresponding to the target system-level chip on the target vehicle to the target system-on-Chip (SoC) on the target vehicle.
[0092] In one possible implementation, the time-sensitive network control gateway, the target electronic control unit, and the target system-on-chip are integrated into a vehicle domain controller of the target vehicle.
[0093] During execution of the target mission, the target electronic control unit on the target vehicle may periodically send data corresponding to the target system-on-chip on the target vehicle.
[0094] The data corresponding to the target system-level chip on the target vehicle may include at least one of the following items: a signal read by the target electronic control unit from the controller area network (CAN) bus on the target vehicle, a signal obtained by the target electronic control unit by processing the signal read from the controller area network bus, and a signal obtained by the target electronic control unit by processing other signals.
[0095] The target electronic control unit on the target vehicle encapsulates the data corresponding to the target system-on-chip on the target vehicle into a User Datagram Protocol (UDP) message, and sends the UDP message including the data corresponding to the target system-on-chip on the target vehicle to the target system-on-chip on the target vehicle.
[0096] refer to Figure 4 , which shows a schematic diagram of an example architecture for controlling data transmission that can be applied to an embodiment of the present invention.
[0097] The target MCU on the target vehicle can periodically send data corresponding to the target SoC on the target vehicle. The time-sensitive network control gateway can periodically receive data corresponding to the target SoC on the target vehicle, and the time-sensitive network control gateway sends the data corresponding to the target SoC on the target vehicle to the target SoC on the target vehicle. The target SoC on the target vehicle can send data corresponding to the target MCU on the target vehicle, and the time-sensitive network control gateway can receive data corresponding to the target MCU on the target vehicle, and the time-sensitive network control gateway sends the data corresponding to the target MCU on the target vehicle to the target MCU on the target vehicle.
[0098] In one possible implementation, the time-sensitive network control gateway may determine, in response to a count value of a target counter on a target vehicle reaching a count value indicating a target start time of a target task, a count value indicating a target end time of the target task based on the count value of the target counter indicating the target start time of the target task and a preset execution duration of the target task. The target start time of the target task is the start time of a process of executing the task whose end time is the target end time.
[0099] The preset execution duration of the target task is: the duration of the process of executing the target task.
[0100] The time-sensitive network control gateway can respond to the count value of the target counter on the target vehicle reaching the count value indicating the target start time of the target task, add the count value of the target counter indicating the target start time of the target task to the value indicating the preset execution duration of the target task, and obtain the count value indicating the target end time of the target task.
[0101] In one possible implementation, the gating priority of the target task is the same as the service quality priority of the target task; and sending data corresponding to the target system-level chip on the target vehicle to the target system-level chip on the target vehicle includes: the time-sensitive network control gateway determines whether the service quality priority in the target message received from the target system-level chip is the gating priority of the target task; if the time-sensitive network control gateway determines that the service quality priority in the target message received from the target system-level chip is the gating priority of the target task, the time-sensitive network control gateway sends the target message to the target system-level chip on the target vehicle.
[0102] When the time-sensitive network control gateway determines that the quality of service priority in the message received from the target SoC is the gating priority of the target task, the time-sensitive network control gateway can send data corresponding to the target SoC on the target vehicle to the target SoC on the target vehicle. This ensures that during the transmission of the data corresponding to the target SoC on the target vehicle to the target SoC on the target vehicle, the data sent to the target SoC on the target vehicle is data with the quality of service priority of the target task, avoiding the possibility that the data sent to the target SoC does not meet the quality of service priority of the target task, and improving the accuracy of the data transmission of the task data on the target vehicle.
[0103] In one possible implementation, the target electronic control unit periodically synchronizes its clock with each of the time-sensitive network control gateway and the target system-on-chip according to a preset synchronization time interval, wherein the clock of the target electronic control unit is pre-configured as a master clock source, and the clock of the time-sensitive network control gateway and the clock of the target system-on-chip are each pre-configured as a slave clock source.
[0104] The TSN control gateway connects to the target electronic control unit and the target system-on-chip (SoC) on the target vehicle via an Ethernet interface. Each of these interfaces supports IEEE 802.1qbv, IEEE 802.1as, and other protocols. Time synchronization based on the corresponding IEEE 802.1qbv or IEEE 802.1as protocols is achieved. The target ECU serves as the master clock source, while the TSN control gateway and target SoC serve as slave clock sources. This ensures microsecond-level control of the target vehicle's mission data transmission, improving the accuracy of the data transmission.
[0105] In one possible implementation, the target counter is a system counter (OSCounter) of the Autosar architecture. The system counter of the Autosar architecture is a hardware-based OSCounter in the Autosar architecture. The counting accuracy of the system counter of the Autosar architecture is high, and the OSCounter in the Autosar architecture is used for more accurate counting.
[0106] In one possible implementation, it also includes: when the count value of the target counter on the target vehicle reaches the count value indicating the target end time of the target task, the time-sensitive network control gateway instructs the expiration point in the Autosar architecture to set the state of the target task to the end state to trigger the end of execution of the target task, wherein the expiration point is a module for setting attribute information of the task.
[0107] A control system for data transmission is also provided in an embodiment of the present invention, which is used to implement the above-mentioned method embodiments and preferred implementation methods, and will not be repeated hereafter. As used below, the term "unit" can implement a combination of software and / or hardware for a predetermined function. Although the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and conceived. The system in the embodiment of the present invention is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0108] The control system for data transmission includes: a time-sensitive network control gateway, which is configured to close the gate corresponding to the gating priority of the target task in the gating list in response to the count value of the target counter on the target vehicle reaching the count value indicating the target end time of the target task, so as to stop transmitting the task data of the target task through the time-sensitive network control gateway; open the gate corresponding to the gating priority of the task to be executed next time in the gating list, so as to transmit the task data of the task to be executed next time through the time-sensitive network control gateway, wherein the target end time is the end time of the process of executing the target task, the target end time is the target start time of the task to be executed next time, and the target start time of the task to be executed next time is the start time of the process of executing the task to be executed next time; and use the count value of the target counter indicating the target end time of the target task as the count value of the target counter indicating the target start time of the task to be executed next time.
[0109] In one possible implementation, the time-sensitive network control gateway responds to the count value of the target counter on the target vehicle reaching the count value indicating the target start time of the target task, and determines the count value indicating the target end time of the target task based on the count value of the target counter indicating the target start time of the target task and the preset execution duration of the target task.
[0110] In one possible implementation, the data transmission control system also includes: a target electronic control unit on the target vehicle, a target system-level chip on the target vehicle, and the target task is a task for the target electronic control unit on the target vehicle to send data corresponding to the target system-level chip on the target vehicle; during the execution of the target task, the time-sensitive network control gateway receives data corresponding to the target system-level chip from the target electronic control unit, and sends data corresponding to the target system-level chip on the target vehicle to the target system-level chip on the target vehicle.
[0111] In one possible implementation, the gating priority of the target task is the same as the service quality priority of the target task; the time-sensitive network control gateway determines whether the service quality priority in the target message received from the target system-level chip is the gating priority of the target task, wherein the target message includes: data corresponding to the target system-level chip on the target vehicle; if the time-sensitive network control gateway determines that the service quality priority in the target message received from the target system-level chip is the gating priority of the target task, the time-sensitive network control gateway sends the target message to the target system-level chip on the target vehicle.
[0112] In one possible implementation, the time-sensitive network control gateway, the target electronic control unit, and the target system-on-chip are integrated into a vehicle domain controller of the target vehicle.
[0113] In one possible implementation, the target electronic control unit periodically synchronizes its clock with each of the time-sensitive network control gateway and the target system-on-chip according to a preset synchronization time interval, wherein the clock of the target electronic control unit is pre-configured as a master clock source, and the clock of the time-sensitive network control gateway and the clock of the target system-on-chip are each pre-configured as a slave clock source.
[0114] In a possible implementation, the target counter is a system counter of the AUTOSAR architecture.
[0115] In one possible implementation, when the count value of the target counter on the target vehicle reaches the count value indicating the target end time of the target task, the time-sensitive network control gateway instructs the expiration point in the Autosar architecture to set the state of the target task to the end state to trigger the end of execution of the target task, wherein the expiration point is a module for setting attribute information of the task.
[0116] refer to Figure 5 , Figure 51 is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. The computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in or on the memory for displaying graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used with multiple memories and multiple storage devices. Similarly, multiple vehicles can be connected, with each device providing some of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). The processor 10 can be a central processing unit, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof. The memory 20 stores instructions executable by at least one processor 10, causing the at least one processor 10 to perform the methods described in the above embodiments. The memory 20 may include a program storage area and a data storage area. The program storage area may store an operating system and applications required for at least one function; the data storage area may store data generated based on vehicle usage. Furthermore, the memory 20 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some optional embodiments, the memory 20 may optionally include memory remote from the processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The memory 20 may include volatile memory, such as random access memory; non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; or a combination of these types of memory. The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected via a bus or other means. The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc.The output device 40 may include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor). The display device includes, but is not limited to, a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device may be a touch screen.
[0117] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0118] A portion of the embodiments of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0119] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or modification made by those skilled in the art based on the present invention is within the protection scope of the present invention.
Claims
1. A data transmission control method, characterized in that: The method comprises: In response to a count value of a target counter on the target vehicle reaching a count value indicating a target end time of the target task, closing a gate corresponding to a gating priority of the target task in the gating list to stop transmitting task data of the target task through the time-sensitive network control gateway on the target vehicle; Opening a gate corresponding to a gating priority of a task to be executed next in the gating list, so as to transmit task data of the task to be executed next through a time-sensitive network control gateway, wherein the target end time is the end time of a process of executing the target task, the target end time is the target start time of the task to be executed next, and the target start time of the task to be executed next is the start time of a process of executing the task to be executed next; The count value of the target counter indicating the target end time of the target task is used as the count value of the target counter indicating the target start time of the task to be executed next.
2. The method according to claim 1, wherein: The method further comprises: The time-sensitive network control gateway responds to the count value of the target counter on the target vehicle reaching the count value indicating the target start time of the target task, and determines the count value indicating the target end time of the target task based on the count value of the target counter on the target vehicle indicating the target start time of the target task and the preset execution duration of the target task.
3. The method according to claim 1, wherein: The target task is a task of sending data corresponding to a target system-level chip on the target vehicle to a target electronic control unit on the target vehicle; And the method further comprises: During execution of a target task, the time-sensitive network control gateway receives data corresponding to the target system-on-chip from the target electronic control unit, and sends the data corresponding to the target system-on-chip to the target system-on-chip.
4. The method according to claim 3, wherein: The gating priority of the target task is the same as the quality of service priority of the target task; And sending data corresponding to the target system-on-chip to the target system-on-chip includes: The time-sensitive network control gateway determines whether the quality of service priority in a target message received from the target system-on-chip is a gating priority of the target task, wherein the target message includes: data corresponding to the target system-on-chip; If so, the time-sensitive network control gateway sends the target message to the target system-on-chip.
5. The method according to claim 3, wherein: The time-sensitive network control gateway, the target electronic control unit, and the target system-on-chip are integrated into a vehicle domain controller of a target vehicle.
6. The method according to claim 3, wherein: The method further comprises: The target electronic control unit periodically synchronizes its clock with the time-sensitive network control gateway and each of the target system-on-chip according to a preset synchronization time interval, wherein the clock of the target electronic control unit is pre-configured as a master clock source, and the clock of the time-sensitive network control gateway and the clock of the target system-on-chip are each pre-configured as a slave clock source.
7. The method according to any one of claims 1 to 6, characterized in that: The target counter is a system counter of the AUTOSAR architecture.
8. The method according to claim 7, wherein: The method further comprises: When the count value of the target counter on the target vehicle reaches the count value indicating the target end time of the target task, the time-sensitive network control gateway instructs the expiration point in the Autosar architecture to set the state of the target task to the end state to trigger the end of execution of the target task, wherein the expiration point is a module for setting attribute information of the task.
9. A data transmission control system, characterized in that: The system includes: a time-sensitive network control gateway, which is configured to, in response to a count value of a target counter on a target vehicle reaching a count value indicating a target end time of a target task, close the gate corresponding to the gate priority of the target task in the gate list to stop transmitting task data of the target task through the time-sensitive network control gateway on the target vehicle; open the gate corresponding to the gate priority of the task to be executed next in the gate list to transmit task data of the task to be executed next through the time-sensitive network control gateway, wherein the target end time is the end time of the process of executing the target task, the target end time is the target start time of the task to be executed next, and the target start time of the task to be executed next is the start time of the process of executing the task to be executed next; and use the count value of the target counter indicating the target end time of the target task as the count value of the target counter indicating the target start time of the task to be executed next.
10. A computer device installed on a vehicle, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 8 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Tracking a relative arrival order of events being stored in multiple queues using a counter
CN103870245A
Data transmission method and device, server and storage medium
CN112968933A