A data playback-based vehicle bench test method, device, equipment and medium
By utilizing the timing information of communication logs in vehicle bench testing for orderly playback and automatic matching, test messages conforming to vehicle communication protocols are generated, solving the problems of low efficiency and insufficient accuracy in traditional testing, and realizing efficient and accurate vehicle function testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA FAW CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional vehicle bench testing lacks automatic log retrieval mechanisms and event-related content extraction methods, resulting in low testing efficiency, low accuracy and reliability, and an inability to accurately reproduce real vehicle operating conditions.
By acquiring communication log files under real vehicle operating conditions, and using communication timing information for orderly playback, the system automatically matches target function events and extracts status values, generates test messages that conform to the vehicle communication protocol, and sends them to the controller under test for testing.
It achieves high efficiency, accuracy, and reliability in vehicle-mounted bench testing, and can systematically reproduce real vehicle operating conditions, improving testing efficiency and meeting accuracy requirements.
Smart Images

Figure CN122385203A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle-mounted bench testing technology, and in particular to a vehicle-mounted bench testing method, apparatus, equipment and medium based on data playback. Background Technology
[0002] Traditional vehicle-mounted bench testing typically involves manually processing communication logs. This requires manually retrieving and filtering the functional events to be tested from massive amounts of communication log data, and then manually extracting the content of these events. This method is not only cumbersome and inefficient, but also highly susceptible to human error, leading to incorrect functional event matching and inaccurate content extraction.
[0003] Therefore, traditional technologies, lacking automatic log retrieval mechanisms and automatic event-related content extraction methods, cannot systematically reproduce the actual vehicle's operating conditions during vehicle bench testing, nor can they efficiently meet the needs of vehicle testing, resulting in low accuracy, reliability, and efficiency of vehicle bench testing. Summary of the Invention
[0004] The main purpose of this application is to propose a vehicle-mounted bench test method, device, equipment and medium based on data playback. Through the process of automatic log playback, automatic event matching and automatic extraction of status values, it not only meets the requirements of vehicle-mounted bench testing for efficiency and accuracy, but also improves the testing efficiency of vehicle-mounted bench testing.
[0005] To achieve the above objectives, one aspect of this application proposes a vehicle-mounted bench testing method based on data playback, the method comprising: Obtain the name of the function event to be tested, and obtain the communication log file corresponding to the vehicle under actual operating conditions; wherein, the communication log file includes: several function events, communication timing information corresponding to each function event, and status value corresponding to each function event; the function events are used to indicate the events generated when the vehicle performs onboard functions; the status values are used to describe the event content of the function events; The communication log file is replayed according to the communication timing information. The functional event with the same name as the functional event to be tested is taken as the target functional event. Then, the status value corresponding to the target functional event is extracted and used as the status value to be tested. The state value to be tested is inserted into a preset communication message structure to generate a message to be tested; wherein, the communication message structure is used to indicate the message composition form corresponding to the target function event; The message to be tested is sent to the controller under test of the vehicle bench test system, so that the controller under test can parse the message to be tested and perform the vehicle function test corresponding to the target function event.
[0006] Furthermore, in some embodiments, the communication timing information includes: the timestamp corresponding to when the functional event occurs, and the original relative time difference between the functional event and adjacent functional events; The process of extracting the state value to be measured includes: The timestamp corresponding to the first functional event in the communication log file is used as the starting reference point; Based on the starting reference point and each of the original relative time differences, add each of the functional events to the initial playback time reference axis, and output a target playback time reference axis containing all functional events; Based on the target playback time reference axis, each of the functional events is played back, and the functional event with the same name as the functional event to be tested is taken as the target functional event; Based on the time point of the target functional event on the target playback time reference axis, the extraction operation of the state value corresponding to the target functional event is triggered, and the state value to be tested is output.
[0007] Further, in some embodiments, the step of adding each of the functional events to the initial playback time reference axis based on the starting reference point and each of the original relative time differences, and outputting a target playback time reference axis containing all functional events, includes: The original relative time difference of each functional event is compared with the calibrated timing interval value corresponding to the functional event; wherein, the calibrated timing interval value is the reference adjacent time interval between the functional event and its adjacent functional events when the vehicle executes the functional event. Functional events in which the time deviation between the original relative time difference and the calibrated timing interval value is not greater than a preset deviation threshold are marked as first timing events; functional events in which the time deviation between the original relative time difference and the calibrated timing interval value is greater than a preset deviation threshold are marked as second timing events. For each of the second time series events, the calibrated time series interval value corresponding to the second time series event is used as the updated relative time difference of the second time series event; Starting from the initial reference point, the original relative time difference of the first time series event and the updated relative time difference of the second time series event are accumulated sequentially. The first time series event and the second time series event are added to the initial playback time reference axis in chronological order, and then the target playback time reference axis is output.
[0008] Furthermore, in some embodiments, the communication message structure includes: a status value field, a time deviation value field, an original timing point field, a corrected timing point field, and a timing anomaly identifier field; The step of inserting the state value to be tested into a preset communication message structure to generate a message to be tested includes: Fill the state value to be tested into the state value field, and fill the time deviation value corresponding to the target function event into the time deviation value field; Based on the target playback time reference axis, the first time series event and the second time series event, which are located before the target functional event, are marked as time series events to be processed; the original relative time differences of all time series events to be processed are accumulated in sequence to determine the cumulative time difference value corresponding to the target functional event; The sum of the starting reference point and the cumulative time difference is used as the original time series time point, and the original time series time point is filled into the original time series time point field. Fill the time point of the target function event on the target playback time reference axis into the corrected timing time point field; When the target function event is determined to be a first timing event, the timing anomaly identifier field is filled with a first type of identifier to indicate that there is no timing correction; when the target function event is determined to be a second timing event, the timing anomaly identifier field is filled with a second type of identifier to indicate that there is timing correction. Perform an integrity check on the communication message structure after all fields have been filled, and generate the test message after the check passes.
[0009] Furthermore, in some embodiments, the state value to be measured includes: functional state value, vehicle operating parameter state value, environmental perception state value, and fault diagnosis state value; the state value field includes: functional state subfield, vehicle operating parameter subfield, environmental perception subfield, and fault diagnosis subfield. The step of filling the state value to be tested into the state value field includes: When the target function event is determined to be a first time-series event, the function class status value, the vehicle operation parameter class status value, the environmental perception class status value and the fault diagnosis class status value are respectively filled into the function status subfield, the vehicle operation parameter subfield, the environmental perception subfield and the fault diagnosis subfield. When the target functional event is determined to be a second timing event, a fault warning flag is added to the target functional event to indicate that there is a timing error in the target functional event; Based on the updated relative time difference corresponding to the target functional event and the preset compensation benchmark value, the time compensation coefficient is calculated. The vehicle operation parameter subfield and the environmental perception subfield are respectively added with a first type of byte compensation bit to construct the extended vehicle operation parameter subfield and the extended environmental perception subfield; wherein, the first type of byte compensation bit is used to store the time compensation coefficient triggered by the timing correction. A second type of byte compensation bit is added to the fault diagnosis subfield to construct an extended fault diagnosis subfield; wherein, the second type of byte compensation bit is used to store the fault warning identifier; Fill the functional status value into the functional status subfield; The vehicle operation parameter class status value and the time compensation coefficient are respectively filled into the expanded vehicle operation parameter subfield; the environmental perception class status value and the time compensation coefficient are respectively filled into the expanded environmental perception subfield. The fault diagnosis status value and the fault warning identifier are respectively filled into the expanded fault diagnosis subfield.
[0010] Furthermore, in some embodiments, the communication message structure is the SOME / IP message structure corresponding to the in-vehicle Ethernet SOME / IP protocol.
[0011] Furthermore, in some embodiments, the state value to be measured corresponds to a state signal value; The step of inserting the state value to be tested into a preset communication message structure to generate a message to be tested includes: Obtain the defined variables; wherein the data type of the variables is the same as the data type of the state value to be tested; When the status signal value is updated, the updated value of the status signal value is assigned to the variable; According to the SOME / IP protocol encoding rules, the assigned variables are filled into the SOME / IP message structure, and the filled SOME / IP message structure is encapsulated into a message to be tested.
[0012] To achieve the above objectives, another aspect of this application proposes a vehicle-mounted bench testing device based on data playback, the device comprising: The data acquisition module is used to acquire the name of the function event to be tested and to acquire the communication log file corresponding to the vehicle under actual working conditions; wherein, the communication log file includes: a number of function events, communication timing information corresponding to each function event, and a status value corresponding to each function event; the function events are used to indicate the events generated when the vehicle performs onboard functions; the status values are used to describe the event content of the function events; The status value extraction module is used to replay the communication log file according to the communication timing information, take the functional event with the same name as the functional event to be tested as the target functional event, and then extract the status value corresponding to the target functional event as the status value to be tested. The message generation module is used to insert the state value to be tested into a preset communication message structure to generate a message to be tested; wherein, the communication message structure is used to indicate the message composition form corresponding to the target function event; The message transmission module is used to send the message to be tested to the controller under test of the vehicle bench test system, so that the controller under test can parse the message to be tested and perform vehicle function test corresponding to the target function event.
[0013] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned vehicle-mounted bench testing method based on data playback.
[0014] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned vehicle-mounted bench testing method based on data playback.
[0015] The embodiments of this application include at least the following beneficial effects: This application provides a vehicle-mounted bench testing method, apparatus, equipment, and medium based on data playback. After obtaining the communication log file under actual vehicle operating conditions, this solution performs time-driven, ordered, and automatic playback of the communication log file according to communication timing information, ensuring that the execution order and triggering timing of functional events are consistent with the actual vehicle. Simultaneously, based on the input name of the functional event to be tested, the solution automatically and accurately matches and filters the target functional event from the communication log, and extracts the corresponding status value as the status value to be tested. Therefore, this invention eliminates the need for manual retrieval or filtering of log data and manual extraction of status values related to event content, solving the technical problems of low efficiency and error-proneness in traditional manual filtering methods. Finally, this invention can generate a test message based on the communication message structure corresponding to the target functional event and send it to the controller under test for testing. Therefore, through the process of automatic log playback, automatic event matching, and automatic status value extraction, this invention can not only orderly restore the operating conditions of the actual vehicle but also automatically complete the testing and verification of vehicle-mounted functions, thereby improving the testing efficiency of vehicle-mounted bench testing and meeting the accuracy requirements of vehicle-mounted bench testing. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a vehicle-mounted bench testing method based on data playback, provided in an embodiment of this application. Figure 2 This is a schematic diagram of a bench test system for replaying actual vehicle SOME / IP provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a vehicle-mounted bench test device based on data playback provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0018] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0019] As used in this application, the terms "several", "each", etc., "several" include one, two or more, "each" refers to each of the corresponding plurality, and "any" refers to any one of the plurality.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0022] (1) SOME / IP, short for Scalable service-Oriented Middleware over IP, is an in-vehicle Ethernet application layer communication protocol defined in the AUTOSAR standard. It is designed for service-oriented communication between automotive electronic control units (ECUs), supports remote procedure calls, event notifications and underlying serialization mechanisms, and is the core technical specification for realizing cross-ECU service communication in intelligent in-vehicle systems.
[0023] Traditional technologies typically involve manually processing communication logs or playing back log data in an unordered manner for testing. For example, without utilizing the communication sequence information of functional events recorded in the communication logs, simply playing back the log data in an unordered manner cannot restore the actual triggering time and execution order of functional events. In the process of filtering log data and extracting status values, traditional technologies often rely on manual retrieval and filtering of relevant events from massive amounts of communication log data, and manual extraction of corresponding values.
[0024] Because traditional bench testing does not utilize communication timing information for orderly playback, there is a significant deviation between the bench test conditions and the actual operating conditions of real vehicles. The execution order and triggering timing of functional events are chaotic, resulting in the test results of vehicle functions failing to accurately reflect their actual operating status in real vehicle scenarios, thus affecting the accuracy and reliability of the tests. On the other hand, relying on manual operation not only leads to cumbersome testing procedures and low testing efficiency, but is also highly susceptible to errors in functional event matching due to human error, making it impossible to achieve targeted testing of specific vehicle functions. This may result in safety hazards in vehicle functions due to test deviations.
[0025] Therefore, traditional technologies, lacking a time-driven, precise playback mechanism and an automatic matching and extraction mechanism for functional events, cannot find the optimal balance between ensuring the authenticity of test conditions and test efficiency. Consequently, when conducting vehicle bench testing, they cannot simultaneously meet the requirements of accurately reproducing real vehicle conditions and efficiently carrying out directional testing. This results in low accuracy, reliability, and efficiency of vehicle bench testing, failing to fully leverage the role of bench testing in verifying and ensuring vehicle functions.
[0026] In view of this, this application provides a vehicle-mounted bench testing method, apparatus, equipment, and medium based on data playback. Figure 1 This is an optional flowchart of a vehicle-mounted bench testing method based on data playback provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S1 to S4: Step S1: Obtain the name of the function event to be tested, and obtain the communication log file corresponding to the vehicle under actual working conditions; wherein, the communication log file includes: several function events, communication timing information corresponding to each function event, and status value corresponding to each function event; the function events are used to indicate the events generated when the vehicle performs onboard functions; the status values are used to describe the event content of the function events; Step S2: Replay the communication log file according to each of the communication timing information, take the functional event with the same name as the functional event to be tested as the target functional event, and then extract the status value corresponding to the target functional event as the status value to be tested. Step S3: Insert the state value to be tested into a preset communication message structure to generate a message to be tested; wherein, the communication message structure is used to indicate the message composition form corresponding to the target function event; Step S4: Send the message to be tested to the controller under test of the vehicle bench test system, so that the controller under test can parse the message to be tested and perform the vehicle function test corresponding to the target function event.
[0027] The embodiments of this application, through steps S1 to S4 as shown, can utilize the communication log data of the vehicle's actual operation to complete the testing and verification of the vehicle's functions through log playback, event matching, status extraction, and message interaction, thereby efficiently and reliably completing the vehicle bench test.
[0028] This invention obtains the name of the function event to be tested and the communication log of the actual working condition, uses the communication timing information in the log to replay the communication log file in an orderly manner, automatically identifies the function event that matches the name of the function event to be tested as the target function event, directly extracts the status value corresponding to the target function event as the status value to be tested, and then generates the test message based on the matched communication message structure and sends it to the controller under test to complete the test.
[0029] This solution replaces manual retrieval, filtering, and content extraction by using a built-in automatic log retrieval mechanism and a target function event matching mechanism, thus avoiding the cumbersome processes and errors caused by manual operation. At the same time, it enables the orderly playback of logs based on communication timing information, which can realistically and orderly restore the actual vehicle operating conditions.
[0030] Therefore, this invention, by establishing an automated log retrieval, event matching, and content extraction technical solution, and in conjunction with a time-driven log playback method, overcomes the shortcomings of traditional technologies that cannot automatically process logs and cannot orderly restore real vehicle operating conditions. It meets the requirements of vehicle bench testing for high efficiency, accuracy, and reliability, and significantly improves the overall quality and testing efficiency of vehicle bench testing.
[0031] For step S1, in some embodiments, the name of the event to be tested refers to the identifier name of the vehicle function specified by the user or the test system that needs to be tested and verified on the vehicle bench. This name is used to accurately locate and filter the target event to be tested in the communication log. Examples include lane keeping assist function events, adaptive cruise control function events, and automatic emergency braking function events.
[0032] Real-world operating conditions refer to the vehicle's working state under actual road driving, idling, acceleration, deceleration, steering, and function triggering scenarios. The communication log file is a file containing all communication data collected and recorded by the vehicle bus during real-world operation, used for subsequent playback, reproduction, and testing.
[0033] Furthermore, functional events are records of actions such as triggering, running, status updating, and termination that occur when a vehicle performs a specific onboard function. Examples include lane keeping assist trigger events, lane keeping assist deactivation events, adaptive cruise control activation events, automatic emergency braking warning events, door unlocking events, light activation events, and gear shifting events.
[0034] Furthermore, each functional event corresponds to communication timing information, which describes the occurrence time, sequence, and time interval of the functional event in the time dimension, ensuring that the time sequence of the actual vehicle can be completely reproduced during log playback. Optionally, the communication timing information includes the timestamp of the functional event, the original relative time difference between the functional event and adjacent events, etc., to characterize the sequence and time interval of the events. Furthermore, each functional event also corresponds to a status value, which describes the specific content, current state, operating parameters, and result information of the corresponding functional event. This status value represents the data actually received, processed, and fed back by the vehicle controller. Optionally, the status value corresponding to a lane keeping assist function event can be: lane keeping assist function event activation status, lane keeping assist function event operating mode, vehicle lane departure distance, and lane line type, etc. The status value corresponding to an adaptive cruise control event can be: cruise control enabled status, target vehicle speed, and following distance level, etc. The status values corresponding to body control events can be: door status, headlight status, and gear position, etc. Fault status values can be: no fault, signal loss, sensor malfunction, and communication failure, etc.
[0035] By obtaining the name of the function event to be tested, the present invention clarifies the specific object of the current vehicle bench test, such as lane keeping assist or adaptive cruise control, thus avoiding the problem of vague test targets and lack of clear direction. It can be directly used to accurately retrieve and match the target function events to be tested from massive communication logs.
[0036] Moreover, the present invention obtains communication log files of vehicles under real-world conditions such as driving, idling, and acceleration on actual roads, rather than artificially constructed or simulated virtual data. This can restore the real triggering scenarios and communication status of vehicle functions during actual vehicle operation to the greatest extent possible, providing a real data source for subsequent log playback and functional testing. It effectively avoids the problem in traditional technologies where test data is detached from the real vehicle scenario, resulting in test results that cannot reflect the actual operating status of vehicle functions.
[0037] By acquiring all functional events in the communication logs, as well as the communication timing information corresponding to each type of functional event, the occurrence time, sequence, and time interval of functional events during actual vehicle operation can be completely preserved. This ensures that when the logs are replayed in subsequent steps, the execution logic and timing of functional events in the actual vehicle scenario can be fully reproduced, solving the problem of test condition distortion caused by disordered replay in traditional technologies.
[0038] Furthermore, by acquiring the status values corresponding to each type of functional event, the specific working status and parameter details of the vehicle function during actual vehicle operation can be accurately captured. These status values serve as data for generating test messages, ensuring that the data content of the test messages is consistent with the real data in the actual vehicle scenario. This ensures that the data received and parsed by the controller under test is authentic and valid, thereby avoiding the test deviation problems caused by inaccurate manual extraction of status values and invalid data in traditional technologies.
[0039] Regarding step S2, in some embodiments, when replaying timing information, the present invention can first construct a reproducible playback timeline based on the timing information of the real log. Based on restoring the actual vehicle timing, abnormal timing is automatically corrected to ensure that the timing of subsequent bench tests is both realistic and standard, avoiding test failure due to timing errors or anomalies. Therefore: The communication timing information includes: the timestamp corresponding to the occurrence of the functional event, and the original relative time difference between the functional event and adjacent functional events; optionally, the original relative time difference refers to the time interval between a functional event and its preceding adjacent event. The process of extracting the state value to be measured specifically includes: The timestamp corresponding to the first functional event in the communication log file is used as the starting reference point; Based on the starting reference point and each of the original relative time differences, add each of the functional events to the initial playback time reference axis, and output a target playback time reference axis containing all functional events; Based on the target playback time reference axis, each of the functional events is played back, and the functional event with the same name as the functional event to be tested is taken as the target functional event; Based on the time point of the target functional event on the target playback time reference axis, the extraction operation of the state value corresponding to the target functional event is triggered, and the state value to be tested is output.
[0040] In this embodiment of the invention, when constructing the target playback time reference axis, it can achieve refined processing of normal event retention and abnormal event correction. This allows for the automatic removal or correction of timing anomalies caused by factors such as bus congestion and signal delays, while preserving the true content of real-vehicle functional events. This ensures that subsequent bench playback processes can both reproduce the real-world scenario and meet the requirements of repeatable and high-precision testing. The step of adding each of the functional events to the initial playback time reference axis based on the starting reference point and each of the original relative time differences, and outputting a target playback time reference axis containing all functional events, includes: The original relative time difference of each functional event is compared with the calibrated timing interval value corresponding to the functional event; wherein, the calibrated timing interval value is the reference adjacent time interval between the functional event and its adjacent functional events when the vehicle executes the functional event. Functional events in which the time deviation between the original relative time difference and the calibrated timing interval value is not greater than a preset deviation threshold are marked as first timing events; functional events in which the time deviation between the original relative time difference and the calibrated timing interval value is greater than a preset deviation threshold are marked as second timing events. For each of the second time series events, the calibrated time series interval value corresponding to the second time series event is used as the updated relative time difference of the second time series event; Starting from the initial reference point, the original relative time difference of the first time series event and the updated relative time difference of the second time series event are accumulated sequentially. The first time series event and the second time series event are added to the initial playback time reference axis in chronological order, and then the target playback time reference axis is output.
[0041] In illustrative terms, by comparing the original relative time difference with the calibrated timing interval value, the first / second timing events can be distinguished. After correcting the second timing event with abnormal timing using the calibrated timing interval value, the final target playback time reference axis is reconstructed. This avoids both the test result fluctuations and controller parsing failures caused by using the original abnormal timing throughout, and the scene distortion caused by completely discarding real vehicle data and using virtual timing. Moreover, by correcting only the abnormal timing interval, the present invention retains the true content of the functional events themselves, such as the activation status of lane keeping assist and vehicle speed parameters. This achieves the goal of correcting the timing while ensuring the authenticity of the content, thereby improving the effectiveness and accuracy of subsequent functional tests.
[0042] Therefore, by constructing a target playback time reference axis and identifying, classifying, and standardizing the original timing data in the vehicle log, the embodiments of the present invention can organize the scattered event data collected under real working conditions, which may have timing jitter or deviation, into a playback time axis with accurate timing and stable reproducibility. While retaining the true content of the actual vehicle functional events, the invention automatically removes or corrects timing anomalies caused by factors such as bus congestion and signal delay, so that the subsequent bench playback process can restore the real scene.
[0043] Through the above-mentioned timing regularization and correction process, the problem of test condition distortion caused by traditional disordered playback or direct use of original abnormal timing can be avoided. From the time dimension, the accuracy and repeatability of vehicle bench testing can be guaranteed, thus providing a stable and reliable timing foundation for the accurate matching of subsequent target function events, state value extraction and message generation.
[0044] For step S3, in some embodiments, the communication message structure is used to indicate the standard message composition form that conforms to the vehicle communication protocol specification and is adapted to vehicle function events, including the preset field definition of the state value corresponding to the function event, the data type of each field and the field arrangement rules. In this embodiment of the invention, the communication message structure is actually a message format that can be recognized and parsed by the controller under test of the vehicle bench test system.
[0045] In some embodiments, the communication message structure includes: a status value field, a time deviation value field, an original timing point field, a corrected timing point field, and a timing anomaly identifier field; The step of inserting the state value to be tested into a preset communication message structure to generate a message to be tested includes: Fill the state value to be tested into the state value field, and fill the time deviation value corresponding to the target function event into the time deviation value field; Based on the target playback time reference axis, the first time series event and the second time series event, which are located before the target functional event, are marked as time series events to be processed; the original relative time differences of all time series events to be processed are accumulated in sequence to determine the cumulative time difference value corresponding to the target functional event; The sum of the starting reference point and the cumulative time difference is used as the original time series time point, and the original time series time point is filled into the original time series time point field. Fill the time point of the target function event on the target playback time reference axis into the corrected timing time point field; When the target function event is determined to be a first timing event, the timing anomaly identifier field is filled with a first type of identifier to indicate that there is no timing correction; when the target function event is determined to be a second timing event, the timing anomaly identifier field is filled with a second type of identifier to indicate that there is timing correction. Perform an integrity check on the communication message structure after all fields have been filled, and generate the test message after the check passes.
[0046] Indicatively, the communication message structure of this embodiment is fully aligned with the vehicle communication protocol specification. The field definitions, data types, and arrangement rules all match the parsing logic of the controller under test, ensuring that the message can be correctly identified and parsed by the controller. The timing correction process data in step S2, such as binding the original timing, corrected timing, deviation value, correction identifier, and the state value under test, is embedded in the message in a field-based form. This ensures that the final generated message not only carries functional state data but also fully records the key information of timing correction, achieving integrated transmission of data and timing.
[0047] In the final test message generated by this invention, the original timing point records the actual occurrence time of the target function event in the uncorrected original timing of the actual vehicle, preserving the original traceability basis of the actual vehicle timing. The corrected timing point records the playback time of the target function event on the standardized timeline, ensuring that the timing received by the controller is a valid timing sequence conforming to the calibration specifications. By constructing and filling the above two different timing point information in the message, the dual goals of traceable original timing and testable corrected timing can be achieved, avoiding the loss of original actual vehicle data after timing correction and facilitating subsequent problem review.
[0048] Specifically, assuming that in the current test scenario, the event sequence on the target playback time reference axis is: event 1 (door unlocking), event 2 (headlights turning on), event 3 (lane keeping assist triggered, which is the target event); the original relative time difference is: the interval between event 1 and event 2 is 50ms, and the interval between event 2 and event 3 is 25ms.
[0049] For event 2, since the original interval of 50ms is greater than the calibrated timing interval of 30ms, the deviation exceeds the threshold, so it is classified as the second timing event, and the corrected interval is 30ms.
[0050] Based on the target playback time reference axis, first find the target event (event 3), then mark all events before it on the time axis as time sequence events to be processed (event 1 + event 2); add up the original relative time difference between event 1 and event 2, and the sum is the cumulative time difference value, which represents the total interval between the target event (event 3) and the starting point in the original time sequence.
[0051] Based on the cumulative time difference between the starting reference point and the time difference obtained above, the actual occurrence time of the target event (event 3) during actual vehicle operation is obtained, that is, the original time without timing correction. This time is filled into the original timing time point field of the message to record the original time of the target event on the actual vehicle.
[0052] Then, the time point of the target event (event 3) on the target playback time reference axis is filled into the corrected timing time point field.
[0053] Therefore, since the original timing points record the actual time of the vehicle, and the corrected timing points record the standard time of the bench test, comparing the two can quickly tell how much the timing has been corrected. For example, in the example above, the difference between the original interval of 50ms and the corrected interval of 30ms is 20ms, so we can quickly conclude that the timing has been corrected by 20ms, which is convenient for subsequent analysis of whether the timing deviation affects the functional test results. When the controller under test receives the message, it can see both the original time and the corrected time, so that it can know the real scenario of the vehicle and perform the test according to the standard timing, thus taking into account both authenticity and standardization.
[0054] Furthermore, in this embodiment of the invention, a timing anomaly identifier field is constructed and recorded in the message. By using a first-class / second-class identifier, the controller / test system can quickly identify whether the event corresponding to the current message has undergone timing correction. This eliminates the need to parse complex timing data and allows for rapid classification of test results, such as distinguishing between the functional performance of normal timing scenarios and the functional performance of timing correction scenarios, thereby improving the efficiency of test analysis.
[0055] Therefore, by constructing a standardized communication message structure that includes a status value field, a time deviation value field, an original timing point field, a corrected timing point field, and a timing anomaly identifier field, and strictly following the vehicle communication protocol specifications to complete field filling and message generation, the embodiments of the present invention can ensure that the test message perfectly matches the parsing logic of the controller under test, fundamentally avoiding problems such as parsing failure or test interruption caused by non-standard message formats. At the same time, it realizes the integrated carrying and transmission of functional status data and timing correction related information. It not only completely preserves the actual occurrence time of the target functional event in the actual vehicle through the original timing point, providing a reliable original traceability basis for test data, but also ensures that the controller receives a standard timing that conforms to the calibration specifications through the corrected timing point, thus taking into account both the realism of the test scenario and the standardization of bench testing.
[0056] Furthermore, the timing anomaly marker in the message allows the controller under test to quickly identify whether the event has undergone timing correction. This eliminates the need for complex data parsing to classify and differentiate test results, significantly improving test analysis efficiency. Combined with the time deviation value field, it can also intuitively quantify the degree of timing deviation, providing key data support for subsequent fault location and problem review. Integrity verification further ensures the validity and accuracy of the message, ultimately solving the shortcomings of traditional test messages that can only transmit functional status and lack timing information, significantly improving the comprehensiveness and traceability of vehicle bench testing.
[0057] In some embodiments, when filling the state value field with the state value to be tested, the present invention can also perform different filling methods based on whether the target function event is a first time-series event or a second time-series event, resulting in: The state values to be measured include: functional state values, vehicle operating parameter state values, environmental perception state values, and fault diagnosis state values; the state value fields include: functional state subfields, vehicle operating parameter subfields, environmental perception subfields, and fault diagnosis subfields. The step of filling the state value to be tested into the state value field includes: When the target function event is determined to be a first time-series event, the function class status value, the vehicle operation parameter class status value, the environmental perception class status value and the fault diagnosis class status value are respectively filled into the function status subfield, the vehicle operation parameter subfield, the environmental perception subfield and the fault diagnosis subfield. When the target functional event is determined to be a second timing event, a fault warning flag is added to the target functional event to indicate that there is a timing error in the target functional event; Based on the updated relative time difference corresponding to the target functional event and the preset compensation benchmark value, the time compensation coefficient is calculated. The vehicle operation parameter subfield and the environmental perception subfield are respectively added with a first type of byte compensation bit to construct the extended vehicle operation parameter subfield and the extended environmental perception subfield; wherein, the first type of byte compensation bit is used to store the time compensation coefficient triggered by the timing correction. A second type of byte compensation bit is added to the fault diagnosis subfield to construct an extended fault diagnosis subfield; wherein, the second type of byte compensation bit is used to store the fault warning identifier; Fill the functional status value into the functional status subfield; The vehicle operation parameter class status value and the time compensation coefficient are respectively filled into the expanded vehicle operation parameter subfield; the environmental perception class status value and the time compensation coefficient are respectively filled into the expanded environmental perception subfield. The fault diagnosis status value and the fault warning identifier are respectively filled into the expanded fault diagnosis subfield.
[0058] In illustrative terms, this invention constructs differentiated state value field filling logic for the first and second timing events. This allows for the visualization of anomaly marking, quantitative compensation for timing deviations, and a scalable field structure filling process for the second timing event with timing anomalies, while maintaining compatibility with the original parsing logic of the vehicle controller. This avoids test data distortion caused by the mismatch between the state value after timing correction and the corrected timing, while enabling the controller to accurately perceive the impact of timing anomalies. For the first timing event with normal timing, a simplified filling method is used to ensure the lightweight and efficient nature of messages in normal scenarios.
[0059] Specifically, in this embodiment of the invention, the first time-series event is directly filled with the full state value according to the original field structure, ensuring the simplicity and parsing efficiency of the message under normal scenarios; the second time-series event is subjected to targeted extension processing, which carries the time-series abnormality related information only through the extension bits without destroying the original field function, so as to both retain the validity of the basic state value and supplement the key data for time-series correction.
[0060] Understandably, functional status values, such as lane keeping assist activation / deactivation, are core results of in-vehicle functions and are not directly affected by timing corrections. Therefore, they are directly filled in to ensure the authenticity of core data. Vehicle operating parameters and environmental perception parameters are strongly correlated with timing and need to be bound with time compensation coefficients to adapt to the corrected timing. Fault diagnosis parameters need to be superimposed with warning signs to clarify whether the fault is related to timing anomalies.
[0061] Specifically, by adding fault warning indicators to the second timing event, the timing error attributes of the second timing event can be marked intuitively, allowing the controller to quickly identify the current event as an abnormal event after timing correction without parsing the complex timing calculation process, providing a direct basis for subsequent test result classification and fault location.
[0062] Based on the updated relative time difference (i.e., the corrected timing interval) and the preset compensation benchmark value, a time compensation coefficient is derived to quantify the degree of timing correction. This coefficient is then bound and stored with vehicle operating parameters and environmental perception parameters to solve the problem of parameter values not matching the new timing rhythm after timing correction. For example, parameters such as vehicle speed and distance, which were originally adapted to a timing interval of 50ms, need to be adapted to the new interval through a compensation coefficient after being corrected to 30ms to avoid distortion in parameter interpretation.
[0063] By adding a first-class byte compensation bit to the vehicle operation parameters and environmental perception subfields, the field capabilities can be expanded without changing the original subfield definition, data type, and arrangement rules. This not only ensures compatibility with the controller's parsing logic for the original fields and prevents the controller from being unable to parse basic parameters due to changes in field structure, but also enables the carrying of timing anomaly information.
[0064] In this embodiment of the invention, from adding fault warning identifiers and calculating time compensation coefficients to byte compensation bit expansion and field filling, the entire process requires no manual intervention. This avoids the impact of manual timing judgment and errors from manually adjusting parameters, and significantly shortens the processing time for message generation, thereby improving the automation level and repeatability of bench testing.
[0065] For step S4, in some embodiments, in the vehicle bench test scenario of the present invention, the controller under test can be any electronic control unit (ECU) on the vehicle that has message parsing and function execution capabilities, such as intelligent driving domain controller, lane keeping assist controller, body controller, gateway controller, etc., specifically selected and matched according to the type of the current function event under test.
[0066] In this embodiment of the invention, the test message that has been filled in and verified for integrity in step S3 and conforms to the vehicle communication protocol can be sent to the controller under test in the vehicle bench test system. The controller under test will fully parse the functional status value, timing information, time compensation coefficient, fault warning mark and other contents in the message, and drive the execution of the vehicle function test corresponding to the target function event according to the parsed information, thereby completing the closed loop of the whole process from real vehicle log data to bench function verification.
[0067] This invention enables virtual operating scenarios, which previously only existed in log files, to be realistically reproduced and verified on a test bench. It allows the controller under test (DUT) to perform tests while simultaneously maintaining real-vehicle realism and test bench standardization. This avoids the distortion of test scenarios caused by traditional manual message construction and disordered playback, and also solves the problem of ineffective verification of functions under abnormal timing conditions, significantly improving the authenticity and reliability of test results. Furthermore, the DUT of this invention can accurately distinguish the functional operating status under normal timing and timing correction scenarios based on information such as timing anomaly identifiers and time compensation coefficients in the messages. This comprehensively covers the testing requirements of both normal and timing anomaly conditions, significantly improving the execution efficiency, stability, and coverage of on-board test benches.
[0068] In some embodiments, the communication message structure is a SOME / IP message structure corresponding to the vehicle Ethernet SOME / IP protocol.
[0069] Furthermore, this invention can also define a global variable, assign the extracted state value to the global variable, and then fill the message with the content of the global variable, thus: The state value to be measured corresponds to a state signal value; Therefore, the step of inserting the state value to be tested into the preset communication message structure to generate the message to be tested includes: Obtain the defined variables; wherein the data type of the variables is the same as the data type of the state value to be tested; When the status signal value is updated, the updated value of the status signal value is assigned to the variable; According to the SOME / IP protocol encoding rules, the assigned variables are filled into the SOME / IP message structure, and the filled SOME / IP message structure is encapsulated into a message to be tested.
[0070] As an illustration, the SOME / IP protocol has strict specifications for data types and encoding formats. Directly filling the test state value into the message structure can easily lead to message encoding failures or data distortion during controller parsing due to type incompatibility. For example, filling a floating-point vehicle speed value collected from a real vehicle into an integer field. This invention addresses this by defining a variable with the exact same data type as the test state value to receive the state signal value. This pre-adaptation of the data type is completed before filling according to the SOME / IP encoding rules, avoiding problems such as invalid messages and parsing failures caused by type mismatch. This ensures that the generated message fully complies with the SOME / IP protocol standard and is compatible with mainstream test controllers that support the SOME / IP protocol, such as intelligent driving domain controllers and vehicle gateways.
[0071] Furthermore, the status signal values of in-vehicle functions are dynamically updated, such as vehicle speed changing multiple times per second and lane departure distance being refreshed in real time. Traditional technologies, which use batch reading and one-time filling, are prone to causing the values in the message to lag behind the actual signals. However, this invention detects the update events of status signal values, assigns the latest values to variables, and fills the message, ensuring that the status values in the message are always synchronized with the actual vehicle operation data. This is especially suitable for the high real-time communication requirements of in-vehicle Ethernet, avoiding test result distortion caused by data lag. Moreover, the SOME / IP message structure contains multi-level fields. Directly manipulating the underlying fields to fill status values requires writing complex memory operation code, which is prone to errors. This invention uses global variables as the intermediate carrier between status values and the message structure. Only the simple logic of variable assignment needs to be focused on, without directly manipulating the underlying message structure. If the type or format of the status value to be tested is adjusted later (such as adding environmental perception parameters), only the variable assignment rules need to be modified, without changing the encoding and encapsulation code of the SOME / IP protocol, significantly reducing code maintenance costs.
[0072] In some embodiments, please refer to Figure 2 This application also provides a bench test system for replaying real vehicle SOME / IP, which can be divided into three main parts: hardware interaction layer, software simulation layer and data interaction hub.
[0073] The hardware interaction layer is responsible for providing physical power supply, communication connections, and the controller execution environment. It is the hardware foundation for test deployment and includes: a power module, which provides a stable power input to the controller under test (DUT) to ensure its normal operation; the DUT, i.e., the vehicle electronic control unit (ECU, such as intelligent driving domain controller, body controller, etc.), which establishes communication with the hardware bus simulation device through a physical Ethernet interface, receives test messages, and executes corresponding vehicle function verifications; and the hardware bus simulation device, which acts as a physical bridge between the PC software and the DUT, interacts with the PC simulation software through a USB interface, forwards the simulated SOME / IP test messages to the DUT, and returns the controller's response data, while also simulating physical layer characteristics such as bus level and timing.
[0074] For the software simulation layer, i.e. Figure 2 The PC-side bus simulation test software is divided into two main sub-networks: a LOG playback network and a simulation replay network. These are responsible for recreating the real vehicle scenario and generating standardized test messages, respectively. During data interaction, a global variable serves as the core data bridge between the LOG playback network and the simulation playback network. It receives the target signal value extracted by the LOG playback network and is monitored in real time by the monitoring script of the simulation playback network, realizing the real-time transmission and triggering of status values, and ensuring data synchronization and process connection between the two sub-networks.
[0075] Specifically, the LOG playback network first imports the SOME / IP communication log file collected under the actual working conditions of the vehicle. This log contains all functional events, communication timing information and status values, and at the same time, a name of the functional event to be tested is preset to lock the target test object. The simulation playback network synchronously imports the vehicle network database file, providing the SOME / IP protocol specification basis for subsequent message generation and node simulation; the communication channel consists of PC-side simulation software and hardware bus simulation equipment, which are connected to the controller under test via physical Ethernet, providing physical transmission support for the entire process.
[0076] Next, the message playback module (Replay block) in the LOG playback network constructs a playback timeline based on the log timing information, accurately replicating the triggering order and timing of the actual vehicle SOME / IP message sequence; when the playback reaches the message corresponding to the target function event, the signal triggering module automatically parses the target signal value (i.e. the value of the state to be tested) and writes it into a preset global variable to trigger the state update, completing the extraction and transmission of the state to be tested.
[0077] Subsequently, the virtual node simulation module of the simulation playback network simulates all bus nodes other than the controller under test based on the database file, and automatically completes SOME / IP service discovery to build a complete vehicle communication environment; the monitoring script of the signal injection module continuously listens to global variables, and when a status update is detected, it actively pulls the status value under test and injects it into the pre-built SOME / IP message structure to generate a test message that conforms to the protocol specification.
[0078] Finally, the simulation playback network injects the generated test messages into the communication channel, and the hardware bus simulation device sends the messages to the controller under test (DUT) via a physical Ethernet connection. The DUT parses the messages, extracts the status values and timing information, executes the corresponding vehicle function tests, and provides feedback on the results. Optionally, testers can perform software testing in this scenario, such as monitoring the controller load rate.
[0079] Therefore, the entire process of this embodiment of the invention uses a LOG playback network to restore the real vehicle timing, a simulation playback network to generate standardized test messages, and a communication channel to achieve a closed-loop design for real hardware interaction. This ensures both the authenticity of the test scenario and the standardization of the test. At the same time, it achieves real-time transmission and triggering of state values through global variables, ultimately completing the accurate and efficient verification of the vehicle controller's functions.
[0080] Please see Figure 3 This application also provides a vehicle-mounted bench testing device based on data playback, which can implement the above-mentioned vehicle-mounted bench testing method based on data playback. The device includes: The data acquisition module 501 is used to acquire the name of the function event to be tested and to acquire the communication log file corresponding to the vehicle under actual working conditions; wherein, the communication log file includes: a number of function events, communication timing information corresponding to each function event, and a status value corresponding to each function event; the function events are used to indicate the events generated when the vehicle performs on-board functions; the status values are used to describe the event content of the function events; The status value extraction module 502 is used to replay the communication log file according to the communication timing information, take the functional event with the same name as the functional event to be tested as the target functional event, and then extract the status value corresponding to the target functional event as the status value to be tested. The message generation module 503 is used to insert the state value to be tested into a preset communication message structure to generate a message to be tested; wherein, the communication message structure is used to indicate the message composition form corresponding to the target function event; The message transmission module 504 is used to send the message to be tested to the controller under test of the vehicle bench test system, so that the controller under test can parse the message to be tested and perform vehicle function test corresponding to the target function event.
[0081] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0082] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0083] Those skilled in the art will clearly understand that, for convenience and simplicity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0084] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned vehicle-mounted bench testing method based on data playback. This electronic device can include any smart terminal such as a tablet computer or an in-vehicle computer.
[0085] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0086] Please see Figure 4 , Figure 4 This illustrates the hardware structure of an electronic device according to another embodiment, the electronic device comprising: The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 602 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store the operating system and other applications. When the technical solutions provided in the embodiments of this application are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called and executed by the processor 601. The input / output interface 603 is used to implement information input and output; The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, Wi-Fi, Bluetooth, etc.). Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601, memory 602, input / output interface 603 and communication interface 604 are connected to each other within the device via bus 605.
[0087] The processor 601 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. This processor is the control center of the terminal device, connecting various parts of the terminal device via various interfaces and lines.
[0088] The memory 602 can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device or other volatile solid-state storage device.
[0089] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described vehicle-mounted bench testing method based on data playback.
[0090] It is understood that the content of the above method embodiments is applicable to the present computer storage medium embodiments. The specific functions implemented by the present computer storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0091] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described vehicle-mounted bench testing method based on data playback.
[0092] It is understood that the content of the above method embodiments is applicable to the embodiments of this computer program product. The specific functions implemented by the embodiments of this computer program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0093] Those skilled in the art will understand that all or some of the steps, apparatuses, or functional modules / units in the methods disclosed above can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0094] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A vehicle-mounted bench testing method based on data playback, characterized in that, The method includes: Obtain the name of the function event to be tested, and obtain the communication log file corresponding to the vehicle under actual operating conditions; wherein, the communication log file includes: several function events, communication timing information corresponding to each function event, and status value corresponding to each function event; the function events are used to indicate the events generated when the vehicle performs onboard functions; the status values are used to describe the event content of the function events; The communication log file is replayed according to the communication timing information. The functional event with the same name as the functional event to be tested is taken as the target functional event. Then, the status value corresponding to the target functional event is extracted and used as the status value to be tested. The state value to be tested is inserted into a preset communication message structure to generate a message to be tested; wherein, the communication message structure is used to indicate the message composition form corresponding to the target function event; The message to be tested is sent to the controller under test of the vehicle bench test system, so that the controller under test can parse the message to be tested and perform the vehicle function test corresponding to the target function event.
2. The vehicle-mounted bench testing method based on data playback according to claim 1, characterized in that, The communication timing information includes: the timestamp corresponding to when the functional event occurs, and the original relative time difference between the functional event and adjacent functional events; The process of extracting the state value to be measured includes: The timestamp corresponding to the first functional event in the communication log file is used as the starting reference point; Based on the starting reference point and each of the original relative time differences, add each of the functional events to the initial playback time reference axis, and output a target playback time reference axis containing all functional events; Based on the target playback time reference axis, each of the functional events is played back, and the functional event with the same name as the functional event to be tested is taken as the target functional event; Based on the time point of the target functional event on the target playback time reference axis, the extraction operation of the state value corresponding to the target functional event is triggered, and the state value to be tested is output.
3. The vehicle-mounted bench testing method based on data playback according to claim 2, characterized in that, The step of adding each of the functional events to the initial playback time reference axis based on the starting reference point and each of the original relative time differences, and outputting a target playback time reference axis containing all functional events, includes: The original relative time difference of each functional event is compared with the calibrated timing interval value corresponding to the functional event; wherein, the calibrated timing interval value is the reference adjacent time interval between the functional event and its adjacent functional events when the vehicle executes the functional event. Functional events in which the time deviation between the original relative time difference and the calibrated timing interval value is not greater than a preset deviation threshold are marked as first timing events; functional events in which the time deviation between the original relative time difference and the calibrated timing interval value is greater than a preset deviation threshold are marked as second timing events. For each of the second time series events, the calibrated time series interval value corresponding to the second time series event is used as the updated relative time difference of the second time series event; Starting from the initial reference point, the original relative time difference of the first time series event and the updated relative time difference of the second time series event are accumulated sequentially. The first time series event and the second time series event are added to the initial playback time reference axis in chronological order, and then the target playback time reference axis is output.
4. The vehicle-mounted bench testing method based on data playback according to claim 3, characterized in that, The communication message structure includes: a status value field, a time deviation value field, an original timing time point field, a corrected timing time point field, and a timing anomaly identifier field; The step of inserting the state value to be tested into a preset communication message structure to generate a message to be tested includes: Fill the state value to be tested into the state value field, and fill the time deviation value corresponding to the target function event into the time deviation value field; Based on the target playback time reference axis, the first time series event and the second time series event, which are located before the target functional event, are marked as time series events to be processed; the original relative time differences of all time series events to be processed are accumulated in sequence to determine the cumulative time difference value corresponding to the target functional event; The sum of the starting reference point and the cumulative time difference is used as the original time series time point, and the original time series time point is filled into the original time series time point field. Fill the time point of the target function event on the target playback time reference axis into the corrected timing time point field; When the target function event is determined to be a first timing event, the timing anomaly identifier field is filled with a first type of identifier to indicate that there is no timing correction; when the target function event is determined to be a second timing event, the timing anomaly identifier field is filled with a second type of identifier to indicate that there is timing correction. Perform an integrity check on the communication message structure after all fields have been filled, and generate the test message after the check passes.
5. The vehicle-mounted bench testing method based on data playback according to claim 4, characterized in that, The state values to be measured include: functional state values, vehicle operating parameter state values, environmental perception state values, and fault diagnosis state values; the state value fields include: functional state subfields, vehicle operating parameter subfields, environmental perception subfields, and fault diagnosis subfields. The step of filling the state value to be tested into the state value field includes: When the target function event is determined to be a first time-series event, the function class status value, the vehicle operation parameter class status value, the environmental perception class status value and the fault diagnosis class status value are respectively filled into the function status subfield, the vehicle operation parameter subfield, the environmental perception subfield and the fault diagnosis subfield. When the target functional event is determined to be a second timing event, a fault warning flag is added to the target functional event to indicate that there is a timing error in the target functional event; Based on the updated relative time difference corresponding to the target functional event and the preset compensation benchmark value, the time compensation coefficient is calculated. The vehicle operation parameter subfield and the environmental perception subfield are respectively added with a first type of byte compensation bit to construct the extended vehicle operation parameter subfield and the extended environmental perception subfield; wherein, the first type of byte compensation bit is used to store the time compensation coefficient triggered by the timing correction. A second type of byte compensation bit is added to the fault diagnosis subfield to construct an extended fault diagnosis subfield; wherein, the second type of byte compensation bit is used to store the fault warning identifier; Fill the functional status value into the functional status subfield; The vehicle operation parameter class status value and the time compensation coefficient are respectively filled into the expanded vehicle operation parameter subfield; the environmental perception class status value and the time compensation coefficient are respectively filled into the expanded environmental perception subfield. The fault diagnosis status value and the fault warning identifier are respectively filled into the expanded fault diagnosis subfield.
6. The vehicle-mounted bench testing method based on data playback according to claim 1, characterized in that, The communication message structure is the SOME / IP message structure corresponding to the vehicle Ethernet SOME / IP protocol.
7. The vehicle-mounted bench testing method based on data playback according to claim 6, characterized in that, The state value to be measured corresponds to a state signal value; The step of inserting the state value to be tested into a preset communication message structure to generate a message to be tested includes: Obtain the defined variables; wherein the data type of the variables is the same as the data type of the state value to be tested; When the status signal value is updated, the updated value of the status signal value is assigned to the variable; According to the SOME / IP protocol encoding rules, the assigned variables are filled into the SOME / IP message structure, and the filled SOME / IP message structure is encapsulated into a message to be tested.
8. A vehicle-mounted bench testing device based on data playback, characterized in that, The device includes: The data acquisition module is used to acquire the name of the function event to be tested and to acquire the communication log file corresponding to the vehicle under actual working conditions; wherein, the communication log file includes: a number of function events, communication timing information corresponding to each function event, and a status value corresponding to each function event; the function events are used to indicate the events generated when the vehicle performs onboard functions; the status values are used to describe the event content of the function events; The status value extraction module is used to replay the communication log file according to the communication timing information, take the functional event with the same name as the functional event to be tested as the target functional event, and then extract the status value corresponding to the target functional event as the status value to be tested. The message generation module is used to insert the state value to be tested into a preset communication message structure to generate a message to be tested; wherein, the communication message structure is used to indicate the message composition form corresponding to the target function event; The message transmission module is used to send the message to be tested to the controller under test of the vehicle bench test system, so that the controller under test can parse the message to be tested and perform vehicle function test corresponding to the target function event.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the vehicle-mounted bench test method based on data playback as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a vehicle-mounted bench test method based on data playback as described in any one of claims 1 to 7.