Method, device and equipment for recharging data to be recharged based on vehicle component, medium and program product
By determining the wake-up time of the thread based on the end time of the data to be refilled, the problem of low accuracy of the data to be refilled by vehicle components is solved, and more efficient and accurate data refilling processing is achieved.
Patent Information
- Application Number
- CN202510043580.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-10
AI Technical Summary
During the process of data refilling by vehicle components, it is difficult for them to accurately simulate and reproduce the driving process of the vehicle, resulting in low accuracy of the refilling process.
When acquiring the data to be refilled by the vehicle component, the wake-up time of the thread is determined according to the end time of the data, and the thread is awakened at that time for refilling.
Ensure that the data processing thread to be refilled is awakened at the best time, avoiding data out of synchronization, thereby improving processing efficiency and accuracy.
Smart Images

Figure CN119938154A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a method, device, equipment, medium and program product for recharging data to be recharged based on vehicle components. Background Art
[0002] With the development and application of vehicles, it is necessary to perform a re-injection test on the vehicle data. Especially in intelligent driving technology, it is necessary to perform a re-injection test on the data generated by the vehicle during driving. Re-injection testing (i.e., re-injection processing) refers to processing the vehicle data to simulate and reproduce the vehicle's driving process.
[0003] Furthermore, there is an urgent need for a solution that can accurately process the vehicle data. Summary of the invention
[0004] One of the purposes of the present invention is to provide a method, device, equipment, medium and program product for reinjecting data to be reinjected based on vehicle components to solve the problem of low accuracy in reinjecting data to be reinjected of vehicle components when the data to be reinjected of vehicle components are processed to simulate and reproduce the driving process of the vehicle.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A method for re-injecting data to be re-injected based on a vehicle component, comprising: when the data to be re-injected of the vehicle component is obtained, determining the wake-up time of the thread corresponding to the data to be re-injected according to the end time of the data to be re-injected; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected is ended in advance; at the wake-up time, waking up the thread; and re-injecting the data to be re-injected based on the thread.
[0007] According to the above technical means, by accurately calculating the end time of the data to be refilled and determining the wake-up time of the thread accordingly, it is possible to ensure that the thread for processing the data to be refilled is awakened at the best time, avoiding the situation in which the refilled data to be refilled is out of sync with the actual data to be refilled during the refilling process of the data to be refilled, thereby improving the efficiency of processing the data to be refilled. By accurately controlling the wake-up time of the thread, it is possible to ensure that the data to be refilled is processed at the right time, thereby ensuring the accuracy of the processing of the data to be refilled.
[0008] Further, according to the end time of the data to be refilled, determining the wake-up time of the thread corresponding to the data to be refilled includes: determining the moment indicated by the end time of the data to be refilled as the wake-up time of the thread corresponding to the data to be refilled; or, extending the duration indicated by the end time of the data to be refilled at the current moment to obtain the wake-up time of the thread corresponding to the data to be refilled.
[0009] Furthermore, the data to be re-injected carries a data batch in a pre-defined data format; according to the end time of the data to be re-injected, the wake-up time of the thread corresponding to the data to be re-injected is determined, including: for the data to be re-injected belonging to the same data batch, according to the end time of the data to be re-injected, the wake-up time of the thread corresponding to the data to be re-injected is determined.
[0010] Further, waking up the thread at the wake-up time includes: determining a calling time for calling the data to be re-injected; determining a wake-up function according to the calling time and the wake-up time; and waking up the thread according to the wake-up function at the wake-up time.
[0011] Further, determining a wake-up function according to the calling time and the wake-up time includes: determining a first time and a second time according to the wake-up time; wherein the first time is less than the wake-up time, and the second time is less than the first time; determining a wake-up function according to the relationship between the calling time, the wake-up time, the first time and the second time.
[0012] Further, according to the relationship between the calling time, the wake-up time, the first time and the second time, the wake-up function is determined, including: if it is determined that the calling time is less than the wake-up time, and the calling time is greater than or equal to the first time, determining the first preset function as the wake-up function; if it is determined that the calling time is less than the first time, and the calling time is greater than or equal to the second time, determining the second preset function as the wake-up function; if it is determined that the calling time is less than the second time, determining the third preset function as the wake-up function; wherein the amount of resources consumed by the first preset function is greater than the amount of resources consumed by the second preset function, and the amount of resources consumed by the second preset function is greater than the amount of resources consumed by the third preset function.
[0013] Furthermore, the data to be re-injected is the data to be re-injected generated by the same functional component of the vehicle; different functional components correspond to different threads.
[0014] Furthermore, the data to be re-injected carries a data batch in a pre-defined data format; the method also includes: if it is determined that the data batch of the data to be re-injected is a continuous value, determining that no packet loss of the data to be re-injected occurs; if it is determined that the data batch of the data to be re-injected is a discontinuous value, determining that a packet loss of the data to be re-injected occurs, and recording the data information to be re-injected of the data to be re-injected in which the packet loss of the data to be re-injected occurs.
[0015] Further, the data to be re-injected has a data item to be re-injected, and the data item to be re-injected is used to indicate the sensitivity of the data to be re-injected; the method also includes: when it is determined that a packet loss phenomenon of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is greater than or equal to a preset threshold, then discarding the data to be re-injected; when it is determined that a packet loss phenomenon of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is less than the preset threshold, then determining that the data to be re-injected of the last re-injection processing is the data to be re-injected of the current re-injection processing.
[0016] Furthermore, before determining the wake-up time of the thread corresponding to the data to be refilled according to the end time of the data to be refilled, the method further includes: receiving a wake-up instruction sent by the main thread; wherein the wake-up instruction is used to instruct to wake up the thread corresponding to the data to be refilled.
[0017] A device for re-injecting data to be re-injected based on a vehicle component, characterized in that it includes: a determination module, which is used to determine the wake-up time of the thread corresponding to the data to be re-injected according to the end time of the data to be re-injected when the data to be re-injected of the vehicle component is obtained; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected is ended in advance; a wake-up module, which is used to wake up the thread at the wake-up time; and re-inject the data to be re-injected based on the thread.
[0018] Further, according to the end time of the data to be refilled, the wake-up time of the thread corresponding to the data to be refilled is determined, and the determination module is specifically used to determine the moment indicated by the end time of the data to be refilled as the wake-up time of the thread corresponding to the data to be refilled; or, at the current moment, extend the duration indicated by the end time of the data to be refilled to obtain the wake-up time of the thread corresponding to the data to be refilled.
[0019] Furthermore, the data to be re-injected carries a data batch in a pre-defined data format; according to the end time of the data to be re-injected, the wake-up time of the thread corresponding to the data to be re-injected is determined, and the determination module is specifically used to determine the wake-up time of the thread corresponding to the data to be re-injected according to the end time of the data to be re-injected, for the data to be re-injected belonging to the same data batch.
[0020] Further, at the wake-up time, the thread is woken up, and the wake-up module is specifically used to determine the calling time of calling the data to be re-injected; determine the wake-up function according to the calling time and the wake-up time; and at the wake-up time, wake up the thread according to the wake-up function.
[0021] Further, the wake-up module determines a wake-up function according to the calling time and the wake-up time, and the wake-up module is specifically used to determine a first time and a second time according to the wake-up time; wherein the first time is less than the wake-up time, and the second time is less than the first time; and the wake-up function is determined according to the relationship between the calling time, the wake-up time, the first time and the second time.
[0022] Further, based on the relationship between the calling time, the wake-up time, the first time and the second time, a wake-up function is determined, and the wake-up module is specifically used to: if it is determined that the calling time is less than the wake-up time, and the calling time is greater than or equal to the first time, determine the first preset function as the wake-up function; if it is determined that the calling time is less than the first time, and the calling time is greater than or equal to the second time, determine the second preset function as the wake-up function; if it is determined that the calling time is less than the second time, determine the third preset function as the wake-up function; wherein the amount of resources consumed by the first preset function is greater than the amount of resources consumed by the second preset function, and the amount of resources consumed by the second preset function is greater than the amount of resources consumed by the third preset function.
[0023] Furthermore, the data to be re-injected is the data to be re-injected generated by the same functional component of the vehicle; different functional components correspond to different threads.
[0024] Furthermore, it also includes a packet loss monitoring module, which is used to determine that if the data batch of the data to be re-injected is determined to be a continuous value, no packet loss of the data to be re-injected has occurred; if the data batch of the data to be re-injected is determined to be a discontinuous value, determine that packet loss of the data to be re-injected has occurred, and record the data information to be re-injected of the data to be re-injected in which the packet loss of the data to be re-injected has occurred.
[0025] Further, the data to be re-injected has a data item to be re-injected, and the data item to be re-injected is used to indicate the sensitivity of the data to be re-injected; the packet loss monitoring module is specifically used to, when it is determined that a packet loss phenomenon of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is greater than or equal to a preset threshold, discard the data to be re-injected; when it is determined that a packet loss phenomenon of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is less than the preset threshold, determine that the data to be re-injected of the previous re-injection processing is the data to be re-injected of the current re-injection processing.
[0026] Furthermore, it also includes a receiving device, which is used to receive a wake-up instruction sent by the main thread; wherein the wake-up instruction is used to instruct to wake up the thread corresponding to the data to be refilled.
[0027] An electronic device comprises: a processor, and a memory communicatively connected to the processor;
[0028] Memory stores computer-executable instructions;
[0029] The processor executes the computer-executable instructions stored in the memory to implement the motion estimation and compensation method as described in the first aspect of the present invention.
[0030] A computer-readable storage medium stores computer program instructions. When the computer program instructions are executed, the motion estimation compensation method as described in the first aspect of the present invention is implemented.
[0031] A computer program product comprises a computer program, and when the computer program is executed, the motion estimation compensation processing method as described in the first aspect of the present invention is implemented.
[0032] Beneficial effects of the present invention: The method, device, equipment, medium and program product for re-injecting data to be re-injected based on vehicle components provided by the present invention, when acquiring the data to be re-injected of the vehicle components, determines the wake-up time of the thread corresponding to the data to be re-injected according to the end time of the data to be re-injected; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected is ended in advance; at the wake-up time, the thread is awakened; and the data to be re-injected is re-injected based on the thread. By accurately calculating the end time of the data to be re-injected and determining the wake-up time of the thread accordingly, it can be ensured that the thread processing the data to be re-injected is awakened at the best time, avoiding the situation in which the re-injected data to be re-injected is out of sync with the actual data to be re-injected during the re-injection of the data to be re-injected, thereby improving the efficiency of the processing of the data to be re-injected. By precisely controlling the wake-up time of the thread, it can be ensured that the data to be reinjected is processed at the right time, thereby ensuring the accuracy of the processing of the data to be reinjected, so as to solve the problem of low accuracy in the processing of the data to be reinjected of vehicle components when the data to be reinjected of vehicle components are processed to simulate and reproduce the driving process of the vehicle, and effectively improve the accuracy of the processing of the data to be reinjected of vehicle components. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1 Schematic diagram of the causes of inconsistency in conventional recharging provided by an embodiment of the present invention;
[0035] Figure 2 A flow chart of a method for recharging data to be recharged based on a vehicle component provided by an embodiment of the present invention;
[0036] Figure 3 A flow chart of a method for recharging data to be recharged based on a vehicle component provided by another embodiment of the present invention;
[0037] Figure 4 is a recharging flow chart provided by an embodiment of the present invention;
[0038] Figure 5 is a schematic diagram of a wake-up function provided by an embodiment of the present invention;
[0039] Figure 6 It is a schematic diagram of the format of data to be refilled provided by an embodiment of the present invention;
[0040] Figure 7 This is a consistent principle diagram of automobile data to be recharged provided by an embodiment of the present invention;
[0041] Figure 8 This is a consistent principle diagram of automobile data to be recharged provided by an embodiment of the present invention;
[0042] Fig. 9 A schematic diagram of the structure of a data recharging device based on a vehicle component provided in one embodiment of the present invention;
[0043] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0045] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being 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 complicated.
[0046] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data to be re-injected (including but not limited to data to be re-injected for analysis, data to be re-injected for storage, data to be re-injected for display, etc.) involved in the present invention are all information and data to be re-injected that have been authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data to be re-injected need to comply with relevant laws, regulations and standards, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0047] A method for re-injecting data to be re-injected based on vehicle components. With the rapid development of computer science, artificial intelligence, sensor technology, and communication technology, intelligent driving technology has become more mature, and more and more intelligent driving algorithms have begun to appear. Intelligent driving systems need to undergo a large number of tests to verify safety and stability. At present, the main method adopted by major manufacturers is to collect experimental data to be re-injected on actual roads, and then conduct multiple re-injection tests of data to be re-injected based on the experimental data to be re-injected to reproduce all or part of the test scenarios. Re-injection of data to be re-injected refers to the process of re-injecting the driving data to be re-injected (such as sensor data to be re-injected, vehicle status data to be re-injected, environmental perception data to be re-injected, etc.) collected in the actual road environment into the intelligent driving system for simulation testing or algorithm verification.
[0048] This technical method is designed to simulate the actual road environment, evaluate the performance of the intelligent driving system, and ensure the stability and safety of the system before actual deployment. In the process of reinjecting the data to be reinjected, it is crucial to ensure the consistency of the data to be reinjected, because it directly affects the accuracy and reliability of the verification results.
[0049] However, there may be differences in hardware performance between the domain controller used in the actual vehicle and the test bench platform used for the data to be re-injected. At the same time, the number of applications running in the actual vehicle mode and the data to be re-injected mode is also very different. The overall IO load and CPU occupancy of the system also vary greatly. These factors will lead to inconsistent output results even if the input data to be re-injected and the algorithm to be tested are the same. It is difficult to reproduce the actual vehicle faults and the results of multiple re-injection tests are unstable.
[0050] Based on the above problems, the present invention provides a method for re-injecting data to be re-injected based on vehicle components. In the field of vehicle technology, a method for re-injecting consistency of data to be re-injected is provided. When the input data to be re-injected and the algorithm to be tested are the same, the output results are kept consistent, thereby solving the problem that real vehicle failures are difficult to reproduce, and the results of multiple re-injection tests are unstable, which leads to difficulty in debugging.
[0051] In the traditional method of recharging the data to be recharged, the real vehicle first collects all the published information to be recharged (topic name, timestamp, meta data to be recharged), then closes the local publishing application, and the subscriber application remains unchanged. The data to be recharged (meta data to be recharged of all publishers) collected by the real vehicle is preprocessed, and finally the data to be recharged is released again according to the frequency of the meta data to be recharged in the recorded data to simulate the real vehicle publishing application. This method can only ensure that the data to be recharged and the frequency of the publishing end in the recharge mode are consistent with those of the real vehicle, but the data to be recharged obtained by the subscriber is not guaranteed. If the subscriber has periodic fluctuations when the real vehicle is running, but runs at a stable period in the recharge mode, the data to be recharged obtained by the subscriber will be different, which leads to inconsistent recharge of the data to be recharged, such as Figure 1 As shown, Figure 1 This is a schematic diagram of the cause of inconsistency in traditional recharge provided by an embodiment of the present invention. During the actual vehicle operation, the recv component should have run in a 20ms cycle, but due to system IO load, CPU scheduling and other reasons, a delay occurred in the third cycle, causing the running time to become 40ms (this is just an assumption to illustrate the problem), and the actual delay may be longer, even up to several hundred milliseconds. For the traditional reinjection of data to be reinjected, first the real vehicle collects all published information to be reinjected (topic name, timestamp, meta data to be reinjected), then closes the local publishing application, and the subscribing application remains unchanged. The data to be reinjected (meta data to be reinjected of all publishers) collected by the real vehicle is preprocessed, and finally the data to be reinjected is published again at the frequency of the meta data to be reinjected in the data to be reinjected to simulate the real vehicle publishing application. When the data to be reinjected is reinjected, only some applications are started and the system IO load is not high. At this time, the recv component runs stably at a cycle of 20ms. As a result, the real vehicle does not obtain the data to be reinjected of the fourth cycle, but obtains the data to be reinjected of the fourth cycle when the data to be reinjected is reinjected. As a result, the reinjection of the data to be reinjected cannot truly restore the real vehicle test scenario, affecting the accuracy and reliability of the verification results.
[0052] The technical solution of the present invention is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0053] Figure 2 The present invention provides a flowchart of a method for recharging data to be recharged based on a vehicle component according to an embodiment of the present invention. The motion estimation compensation method can be executed by software and / or hardware devices. For example, the hardware device can be a device for recharging data to be recharged of a vehicle component. The device for recharging data to be recharged of a vehicle component can be an electronic device or a processing chip in the electronic device. Figure 2 As shown, the method of the embodiment of the present invention includes:
[0054] S201. When the data to be re-injected of the vehicle component is obtained, the wake-up time of the thread corresponding to the data to be re-injected is determined according to the end time of the data to be re-injected; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected is ended.
[0055] For example, when the data to be re-injected generated by the vehicle is collected and transmitted to the data to be re-injected processing system, each data item to be re-injected will be accompanied by an end time, which is the end time of the data to be re-injected of the actual vehicle equipment, and then the end time indicates when the re-injection processing of the data to be re-injected should be completed.
[0056] Based on the end time of the data to be refilled, the system calculates when the thread should be woken up to start processing the data to be refilled. For example, if the end time of the data to be refilled is 20ms from now, the thread will be woken up 20ms later. At the preset wake-up time, the thread is activated and starts executing. At this time, the thread will load the corresponding data to be refilled and perform refill processing.
[0057] S202: Wake up the thread at the wake-up time; and perform a re-injection process on the data to be re-injected based on the thread.
[0058] For example, when collecting data to be refilled, the system sets a timer according to the end time of the data to be refilled. This timer is used to trigger the thread at the specified wake-up time. The accuracy and reliability of the timer are key to ensure that the thread can be accurately woken up at the right time. When the preset wake-up time is reached, the timer triggers an event, which is responsible for waking up the corresponding refill thread.
[0059] In this embodiment, when the data to be refilled of the vehicle component is obtained, the wake-up time of the thread corresponding to the data to be refilled is determined according to the end time of the data to be refilled; wherein the data to be refilled has an end time, and the end time is used to indicate the time when the refill processing of the data to be refilled is ended in advance; at the wake-up time, the thread is woken up; and the data to be refilled is refilled based on the thread. That is to say, by accurately calculating the end time of the data to be refilled and determining the wake-up time of the thread accordingly, it can be ensured that the thread processing the data to be refilled is woken up at the best time, avoiding the situation that the refilled data to be refilled is out of sync with the actual data to be refilled during the refilling process of the data to be refilled, thereby improving the efficiency of the processing of the data to be refilled. By accurately controlling the wake-up time of the thread, it can be ensured that the data to be refilled is processed at the right time, thereby ensuring the accuracy of the processing of the data to be refilled, so as to solve the problem that the accuracy of the refilling of the data to be refilled of the vehicle component is not high when the data to be refilled of the vehicle component is processed to simulate and reproduce the driving process of the vehicle, and effectively improve the accuracy of the refilling of the data to be refilled of the vehicle component.
[0060] Figure 3 This is a flow chart of a method for recharging data to be recharged based on a vehicle component according to another embodiment of the present invention. Based on the above embodiment, the embodiment of the present invention further describes a method for recharging data to be recharged based on a vehicle component. Figure 3 As shown, the method of the embodiment of the present invention may include:
[0061] S301. When the data to be re-injected of the vehicle component is obtained, the wake-up time of the thread corresponding to the data to be re-injected is determined according to the end time of the data to be re-injected; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected ends in advance; at the wake-up time, the thread is woken up; and the data to be re-injected is re-injected based on the thread.
[0062] In one example, the moment indicated by the end time of the data to be re-injected is determined as the wake-up moment of the thread corresponding to the data to be re-injected; or, the duration indicated by the end time of the data to be re-injected is extended at the current moment to obtain the wake-up moment of the thread corresponding to the data to be re-injected.
[0063] In the context of vehicle data re-injection, determining the thread wake-up time is a crucial step, which ensures that the processing of the data to be re-injected can proceed according to the predetermined plan. The following is an example of how to determine the moment indicated by the end time of the data to be re-injected as the thread wake-up time, and how to extend the end time of the data to be re-injected at the current moment to obtain the thread wake-up time.
[0064] Example 1: Vehicle component a completed a trip at 10:00 am and uploaded a data packet to be refilled. The end time of the data packet to be refilled is marked as 10:00 am. The system sets the end time of the data packet to be refilled of vehicle component a (10:00 am) as the wake-up time of the thread. The system sets a timer to ensure that the thread processing the data to be refilled of vehicle component a is woken up at 10:00 am. At 10:00 am, the thread is woken up and starts processing the data to be refilled of vehicle component a.
[0065] Example 2: Vehicle component a completed a trip at 2:00 pm and uploaded a data packet to be re-injected. The end time of the data packet to be re-injected is marked as 2:00 pm. Determine the wake-up time: Considering that the processing of the data to be re-injected may take some time, the system decides to start processing the data to be re-injected 15 minutes after the collection of the data to be re-injected is completed. Therefore, the end time of the system is extended from 2:00 pm to 2:15 pm, and this new time is set as the wake-up time of the thread. Thread scheduling: The system sets a timer to ensure that the thread processing the data to be re-injected of vehicle component a is woken up at 2:15 pm. Processing of data to be re-injected: At 2:15 pm, the thread is awakened and starts processing the data to be re-injected of vehicle B.
[0066] In one example, for the to-be-reinjected data belonging to the same data batch, the wake-up time of the thread corresponding to the to-be-reinjected data is determined according to the end time of the to-be-reinjected data.
[0067] Vehicle components a, b, and c upload their pending data to the system in the same time period. These pending data are marked as belonging to the same batch. Assume that the end time of this batch is set to 3:00 pm. The system sets the wake-up time of the thread based on the end time of the batch (3:00 pm). This means that no matter when the pending data actually arrives, as long as they belong to the same batch, their processing will start at 3:00 pm. The system sets a timer to ensure that the thread dedicated to processing this batch of pending data is woken up at 3:00 pm. This thread will be responsible for processing all pending data marked as this batch. Processing of pending data: At 3:00 pm, the thread is woken up and starts processing the pending data of vehicle components a, b, and c. By centrally processing the pending data uploaded in the same time period, the frequent wake-up of the thread and the number of context switches can be reduced, thereby improving processing efficiency. This method is particularly suitable for scenarios where the amount of pending data is large and the processing time is relatively fixed. Processing the same batch of data to be reinjected at the same time helps to maintain the processing order and consistency of the data to be reinjected, especially when there are dependencies between the data to be reinjected.
[0068] S302, determining a calling time for calling the data to be re-injected; determining a wake-up function according to the calling time and the wake-up time; and waking up the thread according to the wake-up function at the wake-up time, and re-injecting the data to be re-injected based on the thread.
[0069] It should be noted that the accuracy and reliability of wake-up are the key. Only by ensuring that the thread can be accurately woken up at the right time can the occurrence of errors in the re-injection process be reduced as much as possible.
[0070] Optionally, in order to reduce the fluctuation of function execution cycle due to CPU scheduling and other factors during the refill process, set the scheduling policy of each thread to FIFO (first in first out), set the priority to 99, and complete the core binding (binding the thread to a fixed core CPU) operation. Figure 4 As shown, Figure 4 This is a recharging flow chart provided by an embodiment of the present invention.
[0071] First, add breakpoints and count function information: Before starting to process data, you first need to add breakpoints and count function information. This helps to understand the structure and characteristics of the data and provide a reference for subsequent processing. Then determine whether it is the last thread: determine whether the currently processed thread is the last thread. If it is, proceed directly to the next step; if not, you need to continue to process other threads. Then execute real vehicle data collection: obtain relevant data through real vehicle collection equipment. These data may include information such as vehicle driving trajectory and speed, providing basic data for subsequent analysis. After real vehicle data collection, it is also necessary to parse and store data: parse the collected data, convert it into a processable form, and store it in a suitable location for subsequent use. Further, create threads, set priorities and bind cores, and prepare data based on the parsed and stored data, that is, create multiple threads according to needs to process data in parallel, and set priorities for each thread. At the same time, it is also necessary to bind the relevant data to a specific core so that the data can be correctly accessed and used when executing the function. Then execute blocking the main thread: In some cases, it may be necessary to temporarily stop the operation of the main thread to avoid interfering with or affecting the execution of other threads. At this time, the method of blocking the main thread can be used to achieve this goal. Block the main thread and wake up the execution main thread: When the main thread is blocked, it needs to wait for a specific condition to be met before it can continue to execute. Once the condition is met, the main thread can be woken up and restored to its running state by calling the corresponding function. Execute function: After the condition is met, the main thread will be woken up and start executing related functions. These functions may include operations such as data analysis and result output, which are designed to extract useful information from the collected data and further process it. Set the wake-up time: In order to ensure that the main thread can be woken up and start executing tasks at an appropriate time, a wake-up time can be set. This can avoid the problem of resource waste or inefficiency caused by long waiting times. Wake up the main thread: When the preset wake-up time is reached, the system will automatically call the corresponding function to wake up the main thread and start executing tasks. This can ensure that the main thread can respond to external events or requests in a timely manner, improving the response speed and reliability of the system.
[0072] It should be noted that after the execution thread is created, it blocks and waits for the main thread to wake up all the execution threads. All the execution threads execute backwards at the same time to ensure the synchronization between threads. If it is the last execution thread, notify the main thread and then block. After the main thread is awakened, all the execution threads continue to execute backwards at the same time. This design is mainly to ensure the synchronization between threads. If there is multi-threaded interaction, this step is crucial. If the threads are not synchronized, then the data to be injected back obtained by multiple threads will be random, which depends entirely on which thread is executed first, which will seriously affect the consistency of the final output.
[0073] In one example, a first moment and a second moment are determined according to the wake-up moment; wherein the first moment is less than the wake-up moment, and the second moment is less than the first moment; and a wake-up function is determined according to the relationship between the calling moment, the wake-up moment, the first moment, and the second moment.
[0074] In one example, if it is determined that the calling time is less than the wake-up time, and the calling time is greater than or equal to the first time, the first preset function is determined to be the wake-up function; if it is determined that the calling time is less than the first time, and the calling time is greater than or equal to the second time, the second preset function is determined to be the wake-up function; if it is determined that the calling time is less than the second time, the third preset function is determined to be the wake-up function; wherein the amount of resources consumed by the first preset function is greater than the amount of resources consumed by the second preset function, and the amount of resources consumed by the second preset function is greater than the amount of resources consumed by the third preset function.
[0075] It should be noted that when the call time is less than the wake-up time: this means that the data to be re-injected needs to be ready before the wake-up time. In this case, the system will select the first preset function as the wake-up function. Although this function consumes the most resources, it can ensure that the data to be re-injected is processed at the earliest time, which is suitable for those scenarios with extremely high timeliness requirements.
[0076] If the calling time is less than the first time and greater than or equal to the second time, the second preset function is selected as the wake-up function. This means that before the first time, but close to or reaching the second time, the system will select a function with moderate resource consumption to execute.
[0077] If the calling time is less than the second time, the third preset function is selected as the wake-up function. This means that before the second time, the system will select the function with the smallest resource consumption to execute.
[0078] When the call time is greater than the first time and less than the second time: This means that the data to be re-injected can be processed at a later time point, but still needs to be completed before the second time. In this case, the system will select the third preset function as the wake-up function. This function consumes the least resources and is suitable for scenarios that have a certain degree of flexibility in processing time but still need to ensure efficiency.
[0079] That is to say, according to the relationship between the current time point (calling time) and the predetermined time points (wake-up time, first time point and second time point), the appropriate function is dynamically selected for execution to achieve the purpose of optimizing resource usage. By selecting appropriate functions to execute at different time points, the purpose of optimizing the overall resource usage efficiency is achieved.
[0080] In an optional embodiment, if the Sleep_until (sleep until a specified time) function is used as the wake-up function, the error is small when the calling time is far away from the set wake-up time (several milliseconds); if the calling time is close to the set wake-up time (several hundred microseconds), the error is large; if the calling time is very close to the set wake-up time (several microseconds), the error is large. The main reason for the above phenomenon is the system call, which will switch between kernel mode and user mode. The switching process will cause unstable time consumption. Figure 5 As shown, Figure 5 It is a schematic diagram of a wake-up function provided by an embodiment of the present invention.
[0081] Therefore, Sleep_until is customized. First, the remote time (equivalent to the second moment) and the near time (equivalent to the first moment) are defined. If the calling time is less than the remote time, the futex system call is called (equivalent to the third preset function); if the calling time is less than the near time, the sleep_until system call is called (equivalent to the second preset function); if the calling time is less than the wake-up time, a loop call is performed, and the CPU is released in the loop body (equivalent to the first preset function).
[0082] The pseudo code is as follows:
[0083] Step 1: First, through a large number of tests, calculate the time required for the futex system call timeout wake-up and the sleep_until system call timeout wake-up on the corresponding platform.
[0084] Step 2: Set the remote time equal to the wake-up time minus the time required for the futex system call timeout to wake up.
[0085] Step 3: Set the local time to be equal to the wake-up time minus the time required for the sleep_until system call to time out and wake up.
[0086] Step 4: Get the current time and assign it to now.
[0087] Step 5: If the current time is less than the remote time, execute the futex(FUTEX_WAIT) system call, wake up and get the current time again and assign it to now.
[0088] Step 6: If the current time is greater than the remote time but less than the local time, execute the sleep_until system call, and after waking up, get the current time again and assign it to now.
[0089] Step 7: If the current time is greater than the local time but less than the set wake-up time, execute the while loop, in which the CPU is released and the current time is obtained again and assigned to now.
[0090] This design can effectively reduce the time error caused by switching between kernel mode and user mode, and ensure the time flow more accurately.
[0091] Furthermore, in the solution provided by this embodiment, the data to be re-injected is the data to be re-injected generated by the same functional component of the vehicle; different functional components correspond to different threads.
[0092] On the basis of the above embodiments, optionally, the method for re-injecting the data to be re-injected based on vehicle components provided in the embodiments of the present invention also includes: if it is determined that the data batch of the data to be re-injected is a continuous value, determining that no packet loss of the data to be re-injected occurs; if it is determined that the data batch of the data to be re-injected is a discontinuous value, determining that packet loss of the data to be re-injected occurs, and recording the data information of the data to be re-injected in which the packet loss of the data to be re-injected occurs.
[0093] It should be noted that the information of the data to be re-injected includes at least one of the following: data batch, start time, end time, and processing method of the data to be re-injected, wherein the processing method of the data to be re-injected includes: discarding the data to be re-injected, inheriting the data to be re-injected from the last re-injection (using the data to be re-injected from the last re-injection processing as the data to be re-injected for the current re-injection processing).
[0094] In the vehicle data re-injection system, the integrity and continuity of the data to be re-injected are crucial. In order to ensure that the data to be re-injected is not lost, the system needs to monitor the data batches. When the data batches are continuous, it means that each data batch arrives in the expected order without any gaps or omissions. The system checks the numbers of each data batch to ensure that they are continuous. For example, if the data batches are numbered from 1 to 10, the system will confirm that these numbers are continuous and no number is skipped. The continuous value of the data batch indicates that there is no packet loss during the transmission of the data to be re-injected, and the integrity of the data to be re-injected is guaranteed.
[0095] When data batches are non-continuous, it means that there is a gap or missing in the data batch number. The system will check the data batch number. If it finds a jump or missing between the numbers, it will determine that the data to be reinjected has been lost. For example, if the data batch number goes from 1 to 5 and then jumps directly to 7, it can be inferred that data batch 6 is lost. Once the data to be reinjected is lost, the system will record the information of the lost data to be reinjected, including the number of the lost data batch, timestamp, etc. This helps with the subsequent recovery of the data to be reinjected or error analysis.
[0096] In one example, when it is determined that packet loss of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is greater than or equal to a preset threshold, the data to be re-injected is discarded; when it is determined that packet loss of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is less than the preset threshold, the data to be re-injected processed in the previous re-injection is determined to be the data to be re-injected processed in the current re-injection.
[0097] That is to say, for the data items to be re-injected where packet loss occurs, it is necessary to determine their sensitivity, that is, the importance of the data to be re-injected or the degree of influence on the re-injection result. If the sensitivity of the data items to be re-injected is greater than or equal to the preset threshold, it indicates that these data to be re-injected have a greater impact on the re-injection result. In order to prevent error propagation or system instability, the system will choose to discard this part of the data to be re-injected. For the data to be re-injected whose sensitivity is less than the threshold, a fault-tolerant mechanism can be adopted, that is, the data to be re-injected that was successfully re-injected last time is used as the data to be re-injected for the current re-injection. This method can reduce the impact of the loss of the data to be re-injected on the system while maintaining the continuity of the data to be re-injected. The strategy for handling the packet loss of the data to be re-injected depends on the sensitivity of the data to be re-injected and the requirements for stability. By reasonably setting the sensitivity threshold, the impact of the loss of the data to be re-injected can be minimized while ensuring the quality of the data to be re-injected.
[0098] Optionally, in the event of packet loss, a cycle may be performed to determine whether any data to be reinjected is lost in the current cycle. If so, the current execution cycle is skipped. If not, the data to be reinjected is obtained and sent normally.
[0099] In one example, a wake-up instruction sent by a main thread is received; wherein the wake-up instruction is used to instruct to wake up a thread corresponding to the data to be refilled.
[0100] Furthermore, in the solution provided in this embodiment, the data to be refilled can be in a custom format, such as Figure 6 As shown, Figure 6 It is a schematic diagram of the format of data to be recharged provided by an embodiment of the present invention.
[0101] Optionally, the format of the data to be refilled in the present invention is divided into four parts: file header, file data to be refilled, data header, and meta data to be refilled. The file header contains four fields: version, proto data size to be refilled, annotation information size, and reserved. This part of the content can indicate the protocol used by the current data to be refilled, and provide valid information of the data to be refilled (such as: what time, what place, who, and what scene of the data to be refilled); the data header to be refilled contains four fields: meta data name to be refilled, meta data size to be refilled, timestamp, and metadata batch number. This part of the content provides the publisher with valid information on the data to be refilled (what data to be refilled, the size of the data to be refilled, what time, and which frame of the data to be refilled).
[0102] It not only contains all the required information, but also can effectively verify whether the recorded data to be re-injected is continuous and whether there is any packet loss through the metadata batch number field. When the data to be re-injected is re-injected later, the corresponding metadata to be re-injected content can be quickly obtained through the metadata to be re-injected name and metadata batch number in the summary information; at the same time, the amount of data to be re-injected in the intelligent driving system is very large, so this design can also reduce the size of the recorded data to be re-injected, and reduce the disk IO or cloud storage.
[0103] Optionally, the above-mentioned data to be re-injected, metadata batch number, etc. can all be included in the summary information. In the re-injection mode, by reading all the information in the summary information, the required data to be re-injected can be prepared in advance to ensure the consistency of the data to be re-injected.
[0104] In addition, the summary information may also include breakpoint information, such as Figure 7 As shown, Figure 7 It is a schematic diagram of function summary information provided by an embodiment of the present invention.
[0105] The function summary information includes the start time and end time of each callback function execution of the thread, as well as all subscription information (name of metadata to be re-injected, number of metadata batches) and internal time breakpoints during the function execution cycle.
[0106] It should be noted that the function summary information can be applied not only to the periodic callback function in the refill process, but also to the event callback function. When the summary information is applied to the event callback function, it can also include the information carried by the time callback function. Then, when a problem occurs in the event callback function, by viewing the function summary information, the root cause of the problem can be quickly determined, thereby speeding up the debugging process.
[0107] The function summary information is recorded in the data file to be reinjected based on the function execution cycle (from the start of function execution to the end of function execution). These function summary information are very important, and the subsequent reinjection of data to be reinjected is all based on these summary information. Through the metadata name and metadata batch number recorded in the summary information, the data to be reinjected that the subscriber actually obtains on the real vehicle can be prepared in advance; at the same time, the reinjection of data to be reinjected is based on the recorded function execution start time, internal breakpoint time, and execution end time, which can restore the execution flow of the real vehicle function to the greatest extent (function execution start time-internal breakpoint time-function execution end time-function execution start time-internal breakpoint time-function execution end time...repeatedly).
[0108] For ease of use, a macro function is defined. When using it, you only need to add this macro function before the callback function. This macro function will create an object of the summary information collection class, and automatically record the function execution start time, function execution end time, subscriber-subscribed data information to be refilled, and time breakpoint information after the callback function is executed.
[0109] Through the above method, the problem of low accuracy of the data to be recharged of vehicle components during the process of simulating and reproducing the driving of the vehicle is solved, and the effect of consistent recharge of the data to be recharged of the vehicle is achieved. Figure 8 As shown, Figure 8 It is a consistent principle diagram of automobile data to be recharged provided by an embodiment of the present invention.
[0110] During the actual vehicle operation, the recv component should have run in a 20ms cycle, but due to factors such as system IO load and CPU scheduling, a delay occurred in the third cycle, causing the running time to be reduced to 40ms. The subscriber lost the data to be reinjected sent by the publisher in the fourth cycle. In the reinjection mode, according to the summary information, the data to be reinjected 1, 2, 3, 5, 6... are prepared in advance, and the execution function is scheduled according to the timeline of 0-20, 20-40, 40-80, 80-100... The final data to be reinjected is consistent with the actual vehicle.
[0111] The following are embodiments of the apparatus of the present invention, which can be used to implement the embodiments of the method of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention.
[0112] Fig. 9 A schematic diagram of a structure of a data recharging device based on a vehicle component to be recharged according to an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the device for diagnosing and processing data to be recharged based on vehicle Ethernet in the embodiment of the present invention includes: a determination module 901 and a wake-up module 902. Among them:
[0113] The determination module 901 is used to determine the wake-up time of the thread corresponding to the data to be re-injected according to the end time of the data to be re-injected when the data to be re-injected of the vehicle component is obtained; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected is ended in advance;
[0114] The wake-up module 902 is used to wake up the thread at the wake-up time; and perform a re-injection process on the data to be re-injected based on the thread.
[0115] Further, according to the end time of the data to be refilled, the wake-up time of the thread corresponding to the data to be refilled is determined, and the determination module 901 is specifically used to determine the moment indicated by the end time of the data to be refilled as the wake-up time of the thread corresponding to the data to be refilled; or, at the current moment, extend the duration indicated by the end time of the data to be refilled to obtain the wake-up time of the thread corresponding to the data to be refilled.
[0116] Furthermore, the data to be re-injected carries a data batch in a pre-defined data format; according to the end time of the data to be re-injected, the wake-up time of the thread corresponding to the data to be re-injected is determined, and the determination module 901 is specifically used to determine the wake-up time of the thread corresponding to the data to be re-injected according to the end time of the data to be re-injected, for the data to be re-injected belonging to the same data batch.
[0117] Further, at the wake-up time, the thread is woken up, and the wake-up module 902 is specifically used to determine the calling time of calling the data to be re-injected; determine the wake-up function according to the calling time and the wake-up time; and wake up the thread according to the wake-up function at the wake-up time.
[0118] Further, the wake-up module determines the wake-up function according to the calling time and the wake-up time, and the wake-up module 902 is specifically used to determine the first time and the second time according to the wake-up time; wherein the first time is less than the wake-up time, and the second time is less than the first time; and the wake-up function is determined according to the relationship between the calling time, the wake-up time, the first time and the second time.
[0119] Further, based on the relationship between the calling time, the wake-up time, the first time and the second time, a wake-up function is determined, and the wake-up module 902 is specifically used to: if it is determined that the calling time is less than the wake-up time, and the calling time is greater than or equal to the first time, determine the first preset function as the wake-up function; if it is determined that the calling time is less than the first time, and the calling time is greater than or equal to the second time, determine the second preset function as the wake-up function; if it is determined that the calling time is less than the second time, determine the third preset function as the wake-up function; wherein the amount of resources consumed by the first preset function is greater than the amount of resources consumed by the second preset function, and the amount of resources consumed by the second preset function is greater than the amount of resources consumed by the third preset function.
[0120] Furthermore, it also includes a packet loss monitoring module (not shown in the figure), which is used to determine that no packet loss of the data to be re-injected occurs if it is determined that the data batch of the data to be re-injected is a continuous value; if it is determined that the data batch of the data to be re-injected is a discontinuous value, determine that packet loss of the data to be re-injected occurs, and record the data information to be re-injected of the data to be re-injected in which the packet loss of the data to be re-injected occurs.
[0121] Further, the data to be re-injected has a data item to be re-injected, and the data item to be re-injected is used to indicate the sensitivity of the data to be re-injected; the packet loss monitoring module (not shown in the figure) is specifically used to, when it is determined that packet loss of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is greater than or equal to a preset threshold, discard the data to be re-injected; when it is determined that packet loss of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is less than the preset threshold, determine that the data to be re-injected in the previous re-injection processing is the data to be re-injected in the current re-injection processing.
[0122] Furthermore, it also includes a receiving device (not shown in the figure), which is used to receive a wake-up instruction sent by the main thread; wherein the wake-up instruction is used to instruct to wake up the thread corresponding to the data to be refilled.
[0123] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.10 As shown, the electronic device 1000 may include: at least one processor 1001 and a memory 1002 .
[0124] The memory 1002 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.
[0125] The memory 1002 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0126] The processor 1001 is used to execute the computer execution instructions stored in the memory 502 to implement the file high-load environment construction method or the vehicle-mounted system testing method described in the aforementioned method embodiment. Among them, the processor 501 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. Specifically, when implementing the file high-load environment construction method described in the aforementioned method embodiment, the electronic device may be, for example, an electronic device with processing functions such as a server; when implementing the vehicle-mounted system testing method described in the aforementioned method embodiment, the electronic device may be, for example, an electronic device with processing functions such as an electronic control unit on the vehicle.
[0127] Optionally, the electronic device 1000 may further include a communication interface 1003. In a specific implementation, if the communication interface 1003, the memory 1002 and the processor 1001 are implemented independently, the communication interface 1003, the memory 1002 and the processor 1001 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus to be fed back, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0128] Optionally, in a specific implementation, if the communication interface 1003, the memory 1002 and the processor 1001 are integrated on a chip, the communication interface 1003, the memory 1002 and the processor 1001 can communicate through an internal interface.
[0129] The present invention also provides a computer-readable storage medium, in which computer program instructions are stored. When a processor executes the computer program instructions, the above-mentioned method for constructing a high-load file environment or the method for testing a vehicle-mounted system is implemented.
[0130] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned method for building a high-load file environment or the method for testing a vehicle-mounted system.
[0131] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0132] An exemplary readable storage medium is coupled to the processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in a dedicated integrated circuit. Of course, the processor and the readable storage medium can also exist as discrete components in a file high-load environment construction device or a test device for an in-vehicle system.
[0133] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0134] Finally, it should be noted that 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 change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
[0135] 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 change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
Claims
1. A method for recharging data to be recharged based on vehicle components, characterized in that: include: When the data to be re-injected of the vehicle component is obtained, the wake-up time of the thread corresponding to the data to be re-injected is determined according to the end time of the data to be re-injected; wherein the data to be re-injected has an end time, and the end time is used to indicate the time when the re-injection processing of the data to be re-injected ends; At the wake-up time, the thread is woken up; and the data to be re-injected is re-injected based on the thread.
2. The method according to claim 1, characterized in that Determining a wake-up time of a thread corresponding to the data to be refilled according to the end time of the data to be refilled includes: Determine the time indicated by the end time of the data to be re-injected as the wake-up time of the thread corresponding to the data to be re-injected; Alternatively, the duration indicated by the end time of the data to be re-injected is extended at the current moment to obtain the wake-up time of the thread corresponding to the data to be re-injected.
3. The method according to claim 1, characterized in that The data to be refilled carries a data batch in a predefined data format; Determining a wake-up time of a thread corresponding to the data to be refilled according to the end time of the data to be refilled includes: For the to-be-reinjected data belonging to the same data batch, the wake-up time of the thread corresponding to the to-be-reinjected data is determined according to the end time of the to-be-reinjected data.
4. The method according to claim 1, characterized in that: At the wake-up time, waking up the thread includes: Determine the calling time of calling the data to be refilled; A wake-up function is determined according to the calling time and the wake-up time; and at the wake-up time, the thread is woken up according to the wake-up function.
5. The method according to claim 4, characterized in that Determining a wake-up function according to the calling time and the wake-up time includes: Determine a first moment and a second moment according to the wake-up moment; wherein the first moment is less than the wake-up moment, and the second moment is less than the first moment; A wake-up function is determined according to the relationship among the calling time, the wake-up time, the first time and the second time.
6. The method according to claim 5, characterized in that Determining a wake-up function according to the relationship between the calling time, the wake-up time, the first time, and the second time includes: if it is determined that the calling time is less than the wake-up time, and the calling time is greater than or equal to the first time, determining a first preset function as the wake-up function; If it is determined that the calling time is less than the first time, and the calling time is greater than or equal to the second time, determining a second preset function as the wake-up function; If it is determined that the calling time is less than the second time, determining a third preset function as the wake-up function; The amount of resources consumed by the first preset function is greater than the amount of resources consumed by the second preset function, and the amount of resources consumed by the second preset function is greater than the amount of resources consumed by the third preset function.
7. The method according to claim 1, characterized in that The data to be re-injected are data to be re-injected generated by the same functional component of the vehicle; different functional components correspond to different threads.
8. The method according to any one of claims 1 to 7, characterized in that The data to be refilled carries a data batch in a predefined data format; the method further includes: If it is determined that the data batch of the data to be refilled is a continuous value, it is determined that no packet loss of the data to be refilled occurs; If it is determined that the data batch of the data to be refilled is non-continuous, it is determined that packet loss of the data to be refilled occurs, and the data information of the data to be refilled in which the packet loss of the data to be refilled occurs is recorded.
9. The method according to claim 8, characterized in that The data to be refilled has a data item to be refilled, and the data item to be refilled is used to indicate the sensitivity of the data to be refilled; the method further includes: When it is determined that packet loss of the data to be re-injected occurs, if it is determined that the sensitivity indicated by the data item to be re-injected of the data to be re-injected is greater than or equal to a preset threshold, the data to be re-injected is discarded, wherein the sensitivity is positively correlated with the influence of the data item to be re-injected on the re-injection result; When it is determined that packet loss of the data to be refilled occurs, if it is determined that the sensitivity indicated by the data item to be refilled of the data to be refilled is less than a preset threshold, the data to be refilled of the last refill processing is determined as the data to be refilled of the current refill processing.
10. The method according to any one of claims 1 to 7, characterized in that Before determining the wake-up time of the thread corresponding to the data to be refilled according to the end time of the data to be refilled, the method further includes: Receive a wake-up instruction sent by the main thread; wherein the wake-up instruction is used to instruct to wake up the thread corresponding to the data to be refilled.
11. A device for recharging data to be recharged based on vehicle components, characterized in that: include: A determination module, configured to determine, when acquiring data to be re-injected of a vehicle component, a wake-up time of a thread corresponding to the data to be re-injected according to an end time of the data to be re-injected; wherein the data to be re-injected has an end time, and the end time is used to indicate a predetermined time when the re-injection processing of the data to be re-injected ends; The wake-up module is used to wake up the thread at the wake-up time; and perform re-injection processing on the data to be re-injected based on the thread.
12. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer executable instructions.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed, the method according to any one of claims 1 to 10 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed, the method according to any one of claims 1 to 10 is implemented.