Test case generation method, server and vehicle
By analyzing the operating conditions of the vehicle, a test case is generated that is more in line with the actual scenario, the problem of insufficient accuracy of test cases in the prior art is solved, and the testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411222204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art cannot accurately generate test cases that fit the actual scenario, resulting in the vehicle being unable to detect defects during the test phase.
By obtaining the status data, driver's intention data and scene data uploaded by the vehicle, combining the timestamp, the vehicle's operating conditions distribution is analyzed, and a test case is generated based on this distribution.
It improves the efficiency and accuracy of test cases generation, avoids the experience limitations of testers, and ensures that the test cases are more in line with the actual working conditions.
Smart Images

Figure CN119201694A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of vehicle technology, and specifically to a test case generation method, a server and a vehicle. Background Art
[0002] In order to meet the changing market demand and the rapid pace of technological iteration, the development cycle of today's vehicles is getting shorter and shorter, and the development and testing time of the entire vehicle has also been greatly compressed.
[0003] In the current testing process, test cases consisting of some hypothetical scenarios and operations are mainly developed based on the experience of the testing team. This leads to deviations in vehicle testing, and vehicle defects may not be discovered during the testing phase. Summary of the invention
[0004] In view of the above problems, an embodiment of the present invention provides a test case generation method, a server and a vehicle, which are used to solve the problem that the prior art cannot obtain more accurate test cases that fit the actual scenario.
[0005] According to one aspect of an embodiment of the present invention, a method for generating a test case is provided, which is applied to a server, and the method includes:
[0006] Acquire first data uploaded by the vehicle and a timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data;
[0007] Determining an operating condition distribution of the vehicle according to the first data and a timestamp of the first data;
[0008] At least one test case is determined according to the operating condition distribution.
[0009] According to another aspect of an embodiment of the present invention, a method for generating a test case is provided, which is applied to a vehicle, and the method includes:
[0010] Acquire third data collected by at least one sensor and a timestamp corresponding to the third data, wherein the third data includes fourth data of at least one dimension: vehicle operation data, driver operation data, and environment perception data;
[0011] Preprocessing the third data and a timestamp corresponding to the third data to obtain first data and a timestamp corresponding to the first data, wherein the first data includes second data of at least one dimension: vehicle state data, driver intention data, and vehicle scene data;
[0012] The first data and a timestamp corresponding to the first data are uploaded to a server, so that the server generates at least one test case according to the first data.
[0013] According to another aspect of an embodiment of the present invention, there is provided a device for generating a test case, which is applied to a server, and the device includes:
[0014] An acquisition module, configured to acquire first data uploaded by a vehicle and a timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data;
[0015] A first determining module, configured to determine a running condition distribution of the vehicle according to the first data and a timestamp of the first data;
[0016] The second determination module is used to determine at least one test case according to the operating condition distribution.
[0017] According to another aspect of an embodiment of the present invention, a test case generation device is provided, which is applied to a vehicle, and the device includes:
[0018] an acquisition module, configured to acquire third data acquired by at least one sensor and a timestamp corresponding to the third data, wherein the third data includes fourth data of at least one dimension: vehicle operation data, driver operation data, and environment perception data;
[0019] a processing module, configured to pre-process the third data and a timestamp corresponding to the third data to obtain first data and a timestamp corresponding to the first data, wherein the first data includes second data of at least one dimension: vehicle state data, driver intention data, and vehicle scene data;
[0020] A sending module is used to upload the first data and a timestamp corresponding to the first data to a server, so that the server generates at least one test case according to the first data.
[0021] According to another aspect of an embodiment of the present invention, there is provided a server, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0022] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the test case generation method applied to the server.
[0023] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0024] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the test case generation method applied to the vehicle.
[0025] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, wherein the executable instruction enables a server / vehicle to perform the following test case generation method operations.
[0026] The embodiment of the present invention uses a test case generation method, a server and a vehicle. The server can perform analysis based on the acquired vehicle status data, driver intention data, vehicle scene data, and corresponding timestamps to obtain a distribution of vehicle operating conditions in actual scenarios, so as to better fit the variability of the actual vehicle usage conditions, avoid factors such as the experience limitations of testers when writing test cases, and improve the efficiency and accuracy of test case generation.
[0027] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0029] Figure 1 A schematic diagram of the architecture of a test case generation system provided by an embodiment of the present invention is shown;
[0030] Figure 2 A flow chart showing a first embodiment of a method for generating a test case provided by the present invention;
[0031] Figure 3 A flow chart showing a second embodiment of the method for generating a test case provided by the present invention;
[0032] Figure 4 A flowchart of a third embodiment of the method for generating a test case provided by the present invention is shown;
[0033] Figure 5A schematic diagram showing the structure of a first embodiment of a device for generating a test case according to the present invention;
[0034] Figure 6 A schematic diagram showing the structure of a second embodiment of a device for generating test cases of the present invention;
[0035] Figure 7 A schematic structural diagram of an embodiment of the electronic device of the present invention is shown. DETAILED DESCRIPTION
[0036] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0037] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0038] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the embodiments provided below are partial embodiments for implementing the present invention, rather than providing all embodiments for implementing the present invention. In the absence of conflict, the technical solutions recorded in the embodiments of the present invention can be implemented in any combination.
[0039] It should be noted that, in the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements (such as steps in a method or modules in an apparatus, such as a module that can be a part of a circuit, a part of a processor, a part of a program or software, etc.) in the method or apparatus including the element.
[0040] For example, the test case generation method provided in the embodiment of the present invention includes a series of steps, but the test case generation method provided in the embodiment of the present invention is not limited to the steps described in this document. Similarly, the test case generation device provided in the embodiment of the present invention includes a series of modules, but the test case generation device provided in the embodiment of the present invention is not limited to including the modules explicitly described, and may also include modules required to obtain relevant information or perform processing based on information.
[0041] Before introducing the test case generation method, the application background of the present invention is first explained.
[0042] In order to meet the changing market demand and the rapid pace of technological iteration, the vehicle development cycle is getting shorter and shorter, and the development and testing time of the entire vehicle is also greatly compressed.
[0043] The common testing process at present is to write vehicle test cases based on the experience of the test team to verify the quality of vehicle functions and performance. However, due to the variability of the actual use conditions of the vehicle and the experience limitations of the testers, it is difficult to write reasonable, complete and complete test cases for specific functions and components in a short period of time, so that vehicle defects may not be discovered during the testing phase.
[0044] That is, the embodiment of the present invention aims to solve the following technical problem: it is impossible to determine a more accurate test case that fits the actual scenario.
[0045] Based on the above technical problems, the technical conception of the present invention is as follows: the above is generally written based on the experience of testers and cannot take into account the variability of actual scenarios. In this case, the actual operation-related data and corresponding timestamps collected by the vehicle can be used, and then the big data platform analyzes these data to obtain the operating condition distribution, and the operating condition distribution can guide the writing of test cases, that is, the operating condition distribution is transmitted to the automated testing platform to generate test cases.
[0046] The technical solution of the present invention is described in detail below through specific embodiments. The execution subject of the present invention is a vehicle or a server.
[0047] Figure 1 The schematic diagram of the architecture of the test case generation system provided by the embodiment of the present invention is shown as follows: Figure 1 As shown, the test case generation system includes: a vehicle and a server.
[0048] In one possible implementation, the vehicle obtains vehicle operation data, driver operation data, and environmental perception data, and processes them in real time, and uploads the processing results (such as vehicle status data, driver intention data, and vehicle scene data) to the server. The server performs big data analysis to obtain analysis results (such as operating condition distribution), and then generates test cases.
[0049] The generated implementation includes real vehicle test cases of the automated test platform and single component test cases of the automated test platform.
[0050] The above is only a simple description of the system, and the following is the details of the embodiments of the present invention. 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.
[0051] Figure 2 The flowchart of the first embodiment of the method for generating a test case provided by the present invention is shown, and the method is executed by a server (that is, it can be a big data platform in the cloud). Figure 2 As shown, the method comprises the following steps:
[0052] Step 21, obtaining the first data uploaded by the vehicle and the timestamp of the first data;
[0053] The first data includes at least one dimension of second data: vehicle status data, driver intention data, and vehicle scene data;
[0054] In this step, at least one of the vehicle status data, the driver's intention data, and the vehicle's scene data uploaded by the vehicle is obtained, and each of the obtained data has a corresponding time stamp.
[0055] Optionally, the timestamp of the first data may be the timestamp of the first data determined at the vehicle end. Therefore, in the subsequent uploading stage, due to network failure and other situations, the time information carried by the obtained data itself will not be affected, and a reference can be provided for subsequent processing.
[0056] In a possible implementation, the first data carrying the timestamp may be uploaded sequentially via a cellular network or wireless fidelity (WIFI).
[0057] For the second data of the above dimension, the examples are as follows:
[0058] 1. Vehicle status data: vehicle nodding, raising, tilting and other motion postures, vehicle mode, function on / off status;
[0059] 2. Driver intention data: actions such as opening the door, starting, accelerating, decelerating, turning, changing lanes, parking, and reversing;
[0060] 3. Vehicle scene data: speed, distance, acceleration information of surrounding vehicles / obstacles; road types such as highways, urban roads, rural roads, viaducts, tunnels, ramps, road adhesion coefficient, etc.; natural environment types such as day, night, rain, snow, temperature, altitude, etc.
[0061] It should be understood that on the server side, the source of the data obtained, that is, the vehicle, can be one or more, and there is no limitation on the vehicle configuration or power architecture (pure electric, extended range, plug-in hybrid, pure fuel).
[0062] That is to say, in the generation and implementation of subsequent test cases, it has strong applicability and can adapt to vehicles with different vehicle configurations and different power configurations.
[0063] Step 22: Determine the operating condition distribution of the vehicle according to the first data and the timestamp of the first data;
[0064] In this step, since the first data obtained are all data carrying timestamps, the first data can be analyzed at this time, and the operating conditions of the vehicle can be determined based on the time node to obtain the operating condition distribution of the vehicle.
[0065] In a possible implementation, the operating condition distribution includes: proportion data corresponding to different operating conditions, and / or dependency data between different operating conditions.
[0066] Step 23: Determine at least one test case based on the operating condition distribution.
[0067] In this step, after the operating condition distribution of the vehicle is obtained, the operating condition distribution is transmitted to the automated testing platform to generate at least one test case.
[0068] Furthermore, the generated test cases can be added to the test case library to provide case support for the testers' tests.
[0069] Optionally, the implementation of step 23 can be divided into the following:
[0070] The first method is to determine a test case corresponding to at least one preset vehicle function according to at least one preset vehicle function and operating condition distribution;
[0071] In this implementation, for different vehicle functions, based on the distribution of operating conditions, the automatic testing platform can automatically generate vehicle test cases based on actual vehicle operations.
[0072] For example, the operating condition distribution may be: the user accelerates, and then the vehicle slips; the vehicle runs on dry roads 80%, uphill 10%, and wet roads 10%.
[0073] Assuming that the function of the vehicle anti-skid system is tested, the test cases can be determined as follows: 80% of the time on dry roads to test how the system maintains stability; 10% of the time on uphill roads to test how the system handles slope friction; 10% of the time on wet roads to test how the system prevents skidding. Under each working condition, there are acceleration, skidding, etc. to record the performance and adjustment strategies of the system to ensure effective operation under various conditions.
[0074] In some implementations, the granularity of the preconditions, operating steps, expected results, etc. in the generated test cases matches the first data, including factors such as the road environment of the vehicle, the tester's operations, and the dynamic / static state of the vehicle; the type, quantity, and proportion of the generated test cases, as well as the execution order between different test cases match the distribution of operating conditions.
[0075] The second type is to determine the test cases for the components corresponding to at least one vehicle-side controller based on at least one vehicle-side controller and the distribution of operating conditions.
[0076] In this implementation, for different vehicle-side controllers, component test cases based on component monomers can be automatically generated through the automatic testing platform based on the distribution of operating conditions.
[0077] For example, the operating profile may be: acceleration 50% of the time, deceleration 50% of the time.
[0078] Assume that a certain component is tested, that is, a durability test case of the component under conditions of 50% acceleration and 50% deceleration. Configure the vehicle-side controller on the automatic test platform and simulate the distribution of operating conditions to generate test cases for the component.
[0079] In this implementation, the scene data of the vehicle in the first data may not be considered.
[0080] Exemplarily, the test case for any component can also be implemented as follows: convert the test case of the component into a signal in a format corresponding to the corresponding vehicle-side controller, and test the component according to the signal in the format corresponding to the vehicle-side controller.
[0081] In this implementation, the format of the component test case can be converted into a format such as CAN signal, Ethernet signal or hard-wire signal recognizable by the controller in combination with the annotated vehicle simulation model and vehicle communication protocol, and the model of this format can be executed, thereby triggering the automated execution of the single-sided test of the component.
[0082] Furthermore, the following implementation may be possible: according to the distribution of operating conditions, the predetermined test cases are modified to obtain target test cases.
[0083] In one possible implementation, for a predetermined test case, if there is a certain operating condition that frequently appears in the operating condition distribution, the proportion of the operating condition in the test case is increased to make it more consistent with the actual operating condition distribution, so as to obtain the target test case.
[0084] In the method for generating test cases provided in the embodiment of the present invention, the server obtains first data uploaded by the vehicle and the timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data, and determines the vehicle's operating condition distribution based on the first data and the timestamp of the first data, and then determines at least one test case based on the operating condition distribution. In this embodiment, the server can analyze based on the acquired vehicle status data, driver intention data, vehicle scene data, and corresponding timestamps to obtain a distribution of vehicle operating conditions that can represent the actual scenario, so as to better fit the variability of the actual use conditions of the vehicle, avoid factors such as the experience limitations of testers when writing test cases, and improve the efficiency and accuracy of test case generation.
[0085] Based on the above embodiments, Figure 3 FIG. 2 is a flow chart of a second embodiment of a method for generating a test case provided by the present invention, wherein the method is executed by a server. Figure 3 As shown, step 22 may include the following steps:
[0086] It should be understood that step 31 and step 32 can be performed either alone or both based on actual conditions.
[0087] Step 31: for each dimension of the second data, determine the proportion data corresponding to different operating conditions of the vehicle under the dimension corresponding to the second data according to the second data and the timestamp of the second data;
[0088] In this step, for the second data of each dimension, based on the timestamp, the time information of each operating condition in the second data of this dimension can be determined, thereby determining the proportion data corresponding to different operating conditions.
[0089] Exemplary:
[0090] 1. Take the second data of the driver operation dimension as an example, such as turning, acceleration, deceleration, cruise control and other working conditions; based on the timestamp, the proportion of the operating time or the proportion of the number of different working conditions within a period of time can be calculated;
[0091] 2. Take the second data of the road environment dimension as an example, such as flat ground, snow, curves, mountain roads, slippery conditions, etc.; based on the timestamp, the operating time proportion and cycle proportion of each condition within a period of time can be calculated;
[0092] 3. Take the second data of the vehicle status dimension as an example, for example, stable operation, roll, turning, nodding, acceleration mode, sports mode and other working conditions; based on the timestamp, the operating time proportion and cycle proportion of each working condition within a period of time can be calculated.
[0093] Step 32: Determine the dependency data of the vehicle between different operating conditions according to all the second data and the timestamps respectively corresponding to all the second data.
[0094] In this step, for all the second data, based on the timestamp, the execution or appearance order between the various operating conditions in the second data can be determined, thereby determining the dependent data between different operating conditions.
[0095] For example, before the vehicle skids, are there any sudden acceleration, sudden braking, or sudden steering?
[0096] The operating condition distribution includes: proportion data corresponding to different operating conditions, and / or dependency data between different operating conditions.
[0097] The test case generation method provided in the embodiment of the present invention is that the server determines the proportion data corresponding to different operating conditions of the vehicle under the dimension corresponding to the second data according to the second data and the timestamp of the second data for each dimension; and determines the dependency data between different operating conditions of the vehicle according to all the second data and the timestamps corresponding to all the second data. Among them, the operating condition distribution includes: the proportion data corresponding to different operating conditions, and / or the dependency data between different operating conditions. In this embodiment, the server performs statistics and analysis on the acquired first data to obtain the proportion data corresponding to different operating conditions, and / or the dependency data between different operating conditions, which can greatly highlight the variability of the actual use conditions of the vehicle and improve the completeness, comprehensive coverage, and accuracy of the test cases.
[0098] Based on the above embodiments, Figure 4 FIG. 1 is a flow chart showing a third embodiment of a method for generating a test case provided by the present invention, wherein the method is executed by a vehicle. Figure 4 As shown, the following steps may be included:
[0099] Step 41: Acquire third data collected by at least one sensor and a timestamp corresponding to the third data;
[0100] The third data includes at least one of the following fourth data dimensions: vehicle operation data, driver operation data, and environment perception data;
[0101] In this step, the vehicle's sensors will collect at least one of the vehicle's operating data, driver's operating data, and environmental perception data in real time. These data are the vehicle's original data and will carry corresponding time information, i.e., a timestamp, when collected.
[0102] Exemplary:
[0103] 1. Vehicle operation data, such as power battery voltage, current, remaining SOC; motor speed, torque, current; vehicle wheel speed, three-axis acceleration, three-axis angular velocity, vehicle speed and other dynamic information; brake master cylinder pressure, wheel cylinder pressure, parking mechanism status, steering mechanism status and other signals;
[0104] 2. Driver operation data, such as accelerator pedal position; brake pedal position, brake master cylinder pressure; steering wheel angle, angular velocity, torque; shift lever position; driver screen operation; car key status and position; door, seat, seat belt status and other signals;
[0105] 3. Environmental perception data, such as images around the vehicle, millimeter-wave radar reflection information around the vehicle, lidar reflection information around the vehicle, vehicle GPS location and other signals.
[0106] Step 42: pre-process the third data and the timestamp corresponding to the third data to obtain the first data and the timestamp corresponding to the first data;
[0107] The first data includes at least one dimension of second data: vehicle status data, driver intention data, and vehicle scene data;
[0108] In this step, at the vehicle end, the third data carrying the timestamp may be pre-processed by screening and real-time calculation to obtain the first data carrying the timestamp.
[0109] Optionally, the third data is directly measured by various sensors, and the first data is direct reference data generated based on the third data and can be used to generate test cases.
[0110] Optionally, the implementation of step 42 can be divided into the following steps:
[0111] 1. Determine the vehicle status data according to the vehicle operation data, and use the time point corresponding to the vehicle operation data as the timestamp of the vehicle status data;
[0112] 2. Determine the driver's intention data based on the driver's operation data, and use the time point corresponding to the driver's operation data as the timestamp of the driver's intention data;
[0113] 3. Determine the scene data of the vehicle based on the environmental perception data, and use the time point corresponding to the environmental perception data as the timestamp of the scene data of the vehicle.
[0114] For example, a visual sensor acquires an image of a road surface, and after preprocessing, it can be concluded that the road surface is flat. For another example, a radar sensor acquires a point cloud around a vehicle, and after preprocessing, it can be concluded that there are other vehicles around the vehicle.
[0115] In addition, the timestamp is added in real time when it is acquired.
[0116] Step 43: Upload the first data and the timestamp corresponding to the first data to the server, so that the server generates at least one test case according to the first data.
[0117] In this step, the first data carrying the timestamp is uploaded to the server.
[0118] The method for generating a test case provided by an embodiment of the present invention is that the vehicle obtains the third data and the timestamp corresponding to the third data collected by at least one sensor, wherein the third data includes the fourth data of at least one dimension as follows: vehicle operation data, driver operation data, and environmental perception data, and pre-processes the third data and the timestamp corresponding to the third data to obtain the first data and the timestamp corresponding to the first data, wherein the first data includes the second data of at least one dimension as follows: vehicle status data, driver intention data, and vehicle scene data, and uploads the first data and the timestamp corresponding to the first data to the server, so that the server generates at least one test case based on the first data. In this embodiment, the vehicle operation data, driver operation data, environmental perception data and other information collected by the vehicle itself are preliminarily processed to be converted into the preliminary real operating conditions of the vehicle, providing data support for multiple operating conditions for the test cases generated by the subsequent server.
[0119] The following are device embodiments related to the embodiments of the present invention:
[0120] Figure 5 FIG. 1 is a schematic diagram showing the structure of a first embodiment of a device for generating test cases of the present invention. Figure 5 As shown, the device comprises:
[0121] An acquisition module 51 is used to acquire first data uploaded by the vehicle and a timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data;
[0122] A first determination module 52, configured to determine a vehicle operating condition distribution according to the first data and a timestamp of the first data;
[0123] The second determination module 53 is used to determine at least one test case according to the operating condition distribution.
[0124] In one or more embodiments, the first determination module 52 is specifically configured to:
[0125] For each dimension of the second data, determine, according to the second data and the timestamp of the second data, the proportion data corresponding to different operating conditions of the vehicle under the dimension corresponding to the second data;
[0126] Determining dependent data of the vehicle between different operating conditions according to all the second data and the timestamps respectively corresponding to all the second data;
[0127] The operating condition distribution includes: proportion data corresponding to different operating conditions, and / or dependency data between different operating conditions.
[0128] In one or more embodiments, the second determining module 53 is specifically configured to:
[0129] Determine a test case corresponding to at least one preset whole vehicle function according to at least one preset whole vehicle function and operating condition distribution;
[0130] and / or,
[0131] Based on at least one vehicle-side controller and the distribution of operating conditions, test cases for components corresponding to at least one vehicle-side controller are determined.
[0132] In one or more embodiments, the second determining module 53 is further configured to:
[0133] For any component test case, convert the component test case into a signal in the format corresponding to the vehicle-side controller;
[0134] Test the components according to the signal format corresponding to the vehicle-side controller.
[0135] In one or more embodiments, the first determining module 52 is further configured to:
[0136] According to the distribution of operating conditions, the predetermined test cases are modified to obtain the target test cases.
[0137] From the above, it can be seen that the test case generation device provided in the embodiment of the present invention is applied to the server. It can be analyzed based on the acquired vehicle status data, driver intention data, vehicle scene data, and corresponding timestamps to obtain a distribution of vehicle operating conditions in actual scenarios, so as to be more in line with the variability of the actual vehicle usage conditions, avoid factors such as the experience limitations of testers when writing test cases, and improve the efficiency and accuracy of test case generation.
[0138] Figure 6 FIG. 2 is a schematic diagram showing the structure of the second embodiment of the test case generation device of the present invention. Figure 6 As shown, the device comprises:
[0139] An acquisition module 61 is used to acquire third data collected by at least one sensor and a timestamp corresponding to the third data, where the third data includes fourth data of at least one dimension: vehicle operation data, driver operation data, and environment perception data;
[0140] A processing module 62 is used to pre-process the third data and the timestamp corresponding to the third data to obtain the first data and the timestamp corresponding to the first data, wherein the first data includes at least one dimension of the second data: vehicle state data, driver intention data, and vehicle scene data;
[0141] The sending module 63 is used to upload the first data and the timestamp corresponding to the first data to the server, so that the server generates at least one test case according to the first data.
[0142] In one or more embodiments, the processing module 62 is specifically configured to:
[0143] Determine the vehicle status data according to the vehicle operation data, and use the time point corresponding to the acquisition of the vehicle operation data as the timestamp of the vehicle status data;
[0144] Determine the driver's intention data according to the driver's operation data, and use the time point corresponding to the acquisition of the driver's operation data as the timestamp of the driver's intention data;
[0145] The scene data of the vehicle is determined based on the environmental perception data, and the time point corresponding to the acquisition of the environmental perception data is used as the timestamp of the scene data of the vehicle.
[0146] From the above, it can be seen that the test case generation device provided in the embodiment of the present invention is applied to a vehicle, and can perform preliminary processing on the vehicle operation data, driver operation data, environmental perception data and other information collected by the vehicle itself to convert them into the vehicle's preliminary real operating conditions, thereby providing data support for multiple operating scenarios for the test cases generated subsequently on the server side.
[0147] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, all or part of them can be integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements. They can also be implemented in the form of hardware. Some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0148] Figure 7 A schematic structural diagram of an embodiment of an electronic device of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device, which may be the above-mentioned server or vehicle.
[0149] like Figure 7 As shown, the electronic device may include: a processor (processor) 702 , a communication interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .
[0150] The processor 702, the communication interface 704, and the memory 706 communicate with each other via the communication bus 708. The communication interface 704 is used to communicate with other devices such as a client or other server network elements. The processor 702 is used to execute the program 710, which can specifically execute the relevant steps in the above method embodiment.
[0151] Specifically, the program 710 may include program code including computer executable instructions.
[0152] The processor 702 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the device may be processors of the same type, such as one or more CPUs. They may also be processors of different types, such as one or more CPUs and one or more ASICs.
[0153] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0154] Program 710 can be specifically called by processor 702 to enable the electronic device to perform the following operations:
[0155] 1. When the electronic device is a server:
[0156] Acquire first data uploaded by the vehicle and a timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data;
[0157] Determining an operating condition distribution of the vehicle according to the first data and a timestamp of the first data;
[0158] At least one test case is determined according to the operating condition distribution.
[0159] In one or more embodiments, determining the operating condition distribution of the vehicle according to the first data and the timestamp of the first data includes:
[0160] For each dimension of the second data, determining, according to the second data and the timestamp of the second data, the proportion data corresponding to different operating conditions of the vehicle in the dimension corresponding to the second data;
[0161] Determining dependency data of the vehicle between different operating conditions according to all the second data and the timestamps respectively corresponding to all the second data;
[0162] The operating condition distribution includes: proportion data corresponding to different operating conditions, and / or dependency data between different operating conditions.
[0163] In one or more embodiments, determining at least one test case according to the operating condition distribution includes:
[0164] Determining a test case corresponding to the at least one preset whole vehicle function according to the at least one preset whole vehicle function and the operating condition distribution;
[0165] and / or,
[0166] Based on at least one vehicle-side controller and the operating condition distribution, test cases for components corresponding to the at least one vehicle-side controller are determined.
[0167] In one or more embodiments, the following is also performed:
[0168] For any test case of a component, convert the test case of the component into a signal in a format corresponding to the corresponding vehicle-side controller;
[0169] The components are tested according to the signal in the format corresponding to the vehicle-side controller.
[0170] In one or more embodiments, the following is also performed:
[0171] According to the operating condition distribution, the predetermined test cases are modified to obtain target test cases.
[0172] 2. When the electronic device is a vehicle:
[0173] Acquire third data collected by at least one sensor and a timestamp corresponding to the third data, wherein the third data includes fourth data of at least one dimension: vehicle operation data, driver operation data, and environment perception data;
[0174] Preprocessing the third data and a timestamp corresponding to the third data to obtain first data and a timestamp corresponding to the first data, wherein the first data includes second data of at least one dimension: vehicle state data, driver intention data, and vehicle scene data;
[0175] The first data and a timestamp corresponding to the first data are uploaded to a server, so that the server generates at least one test case according to the first data.
[0176] In one or more embodiments, preprocessing the third data and the timestamp corresponding to the third data to obtain the first data and the timestamp corresponding to the first data includes:
[0177] Determine the vehicle status data according to the vehicle operation data, and use the time point corresponding to the acquisition of the vehicle operation data as the timestamp of the vehicle status data;
[0178] Determining the driver intention data according to the driver operation data, and using a time point corresponding to obtaining the driver operation data as a timestamp of the driver intention data;
[0179] The scene data of the vehicle is determined according to the environmental perception data, and the time point corresponding to the environmental perception data is obtained as the timestamp of the scene data of the vehicle.
[0180] From the above, it can be seen that the server provided by the embodiment of the present invention can analyze based on the acquired vehicle status data, driver intention data, and vehicle scene data, as well as the corresponding timestamp, to obtain a distribution of vehicle operating conditions in actual scenarios, so as to be more in line with the variability of the actual use conditions of the vehicle, avoid factors such as the experience limitations of testers when writing test cases, and improve the efficiency and accuracy of test case generation. The vehicle provided by the embodiment of the present invention can perform preliminary processing on the vehicle operation data, driver operation data, environmental perception data and other information collected by the vehicle itself, so as to convert them into preliminary real operating conditions of the vehicle, and provide data support for multiple operating conditions for the test cases generated by the subsequent server.
[0181] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a test case generation device / vehicle / server, the device / vehicle / server executes the test case generation method in any of the above method embodiments.
[0182] The executable instructions may be specifically used to cause the test case generation device / vehicle / server to perform the following operations:
[0183] 1. When the electronic device is a server, or the test case generation device is a server device:
[0184] Acquire first data uploaded by the vehicle and a timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data;
[0185] Determining an operating condition distribution of the vehicle according to the first data and a timestamp of the first data;
[0186] At least one test case is determined according to the operating condition distribution.
[0187] In one or more embodiments, determining the operating condition distribution of the vehicle according to the first data and the timestamp of the first data includes:
[0188] For each dimension of the second data, determining, according to the second data and the timestamp of the second data, the proportion data corresponding to different operating conditions of the vehicle in the dimension corresponding to the second data;
[0189] Determining dependency data of the vehicle between different operating conditions according to all the second data and the timestamps respectively corresponding to all the second data;
[0190] The operating condition distribution includes: proportion data corresponding to different operating conditions, and / or dependency data between different operating conditions.
[0191] In one or more embodiments, determining at least one test case according to the operating condition distribution includes:
[0192] Determining a test case corresponding to the at least one preset whole vehicle function according to the at least one preset whole vehicle function and the operating condition distribution;
[0193] and / or,
[0194] Based on at least one vehicle-side controller and the operating condition distribution, test cases for components corresponding to the at least one vehicle-side controller are determined.
[0195] In one or more embodiments, the following is also performed:
[0196] For any test case of a component, convert the test case of the component into a signal in a format corresponding to the corresponding vehicle-side controller;
[0197] The components are tested according to the signal in the format corresponding to the vehicle-side controller.
[0198] In one or more embodiments, the following is also performed:
[0199] According to the operating condition distribution, the predetermined test cases are modified to obtain target test cases.
[0200] 2. When the electronic device is a vehicle, or the device generating the test case is a device of a vehicle:
[0201] Acquire third data collected by at least one sensor and a timestamp corresponding to the third data, wherein the third data includes fourth data of at least one dimension: vehicle operation data, driver operation data, and environment perception data;
[0202] Preprocessing the third data and a timestamp corresponding to the third data to obtain first data and a timestamp corresponding to the first data, wherein the first data includes second data of at least one dimension: vehicle state data, driver intention data, and vehicle scene data;
[0203] The first data and a timestamp corresponding to the first data are uploaded to a server, so that the server generates at least one test case according to the first data.
[0204] In one or more embodiments, preprocessing the third data and the timestamp corresponding to the third data to obtain the first data and the timestamp corresponding to the first data includes:
[0205] Determine the vehicle status data according to the vehicle operation data, and use the time point corresponding to the acquisition of the vehicle operation data as the timestamp of the vehicle status data;
[0206] Determining the driver intention data according to the driver operation data, and using a time point corresponding to obtaining the driver operation data as a timestamp of the driver intention data;
[0207] The scene data of the vehicle is determined according to the environmental perception data, and the time point corresponding to the environmental perception data is obtained as the timestamp of the scene data of the vehicle.
[0208] From the above, it can be seen that the server / device in the server provided by the embodiment of the present invention can be analyzed based on the acquired vehicle status data, driver intention data, and vehicle scene data, as well as the corresponding timestamps, to obtain a distribution of vehicle operating conditions that can represent the actual scene, so as to be more in line with the variability of the actual use conditions of the vehicle, avoid factors such as the experience limitations of testers when writing test cases, and improve the efficiency and accuracy of test case generation. The vehicle / device in the vehicle provided by the embodiment of the present invention can perform preliminary processing through the vehicle operation data, driver operation data, environmental perception data and other information collected by the vehicle itself, so as to convert them into the preliminary real operating conditions of the vehicle, and provide data support for multiple operating conditions for the test cases generated by the subsequent server.
[0209] An embodiment of the present invention provides a computer program product, including a computer program, which implements the operations of the above-mentioned test case generation method when executed by a processor.
[0210] Its implementation principle and technical effects are shown in the above disclosure.
[0211] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0212] The methods disclosed in the various method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0213] The features disclosed in the various product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.
[0214] The features disclosed in the various method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0215] It should be noted that the computer-readable storage medium may be a ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM). It may also be various vehicles including one or any combination of the above memories.
[0216] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0217] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0218] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus necessary general hardware nodes, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, vehicle terminal or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0219] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A method for generating a test case, characterized in that: Applied to a server, the method comprises: Acquire first data uploaded by the vehicle and a timestamp of the first data, wherein the first data includes second data of at least one dimension: vehicle status data, driver intention data, and vehicle scene data; Determining an operating condition distribution of the vehicle according to the first data and a timestamp of the first data; At least one test case is determined according to the operating condition distribution.
2. The method according to claim 1, characterized in that: The determining, according to the first data and the timestamp of the first data, the operating condition distribution of the vehicle includes: For each dimension of the second data, determining, according to the second data and the timestamp of the second data, the proportion data corresponding to different operating conditions of the vehicle in the dimension corresponding to the second data; Determining dependency data of the vehicle between different operating conditions according to all the second data and the timestamps respectively corresponding to all the second data; The operating condition distribution includes: proportion data corresponding to different operating conditions, and / or dependency data between different operating conditions.
3. The method according to claim 1 or 2, characterized in that: Determining at least one test case according to the operating condition distribution includes: Determining a test case corresponding to the at least one preset whole vehicle function according to the at least one preset whole vehicle function and the operating condition distribution; and / or, Based on at least one vehicle-side controller and the operating condition distribution, test cases for components corresponding to the at least one vehicle-side controller are determined.
4. The method according to claim 3, characterized in that The method further comprises: For any test case of a component, convert the test case of the component into a signal in a format corresponding to the corresponding vehicle-side controller; The components are tested according to the signal in the format corresponding to the vehicle-side controller.
5. The method according to claim 1 or 2, characterized in that: The method further comprises: According to the operating condition distribution, the predetermined test cases are modified to obtain target test cases.
6. A method for generating a test case, characterized in that: Applied to a vehicle, the method comprises: Acquire third data collected by at least one sensor and a timestamp corresponding to the third data, wherein the third data includes fourth data of at least one dimension: vehicle operation data, driver operation data, and environment perception data; Preprocessing the third data and a timestamp corresponding to the third data to obtain first data and a timestamp corresponding to the first data, wherein the first data includes second data of at least one dimension: vehicle state data, driver intention data, and vehicle scene data; The first data and a timestamp corresponding to the first data are uploaded to a server, so that the server generates at least one test case according to the first data.
7. The method according to claim 6, characterized in that The preprocessing of the third data and the timestamp corresponding to the third data to obtain the first data and the timestamp corresponding to the first data includes: Determine the vehicle status data according to the vehicle operation data, and use the time point corresponding to the acquisition of the vehicle operation data as the timestamp of the vehicle status data; Determining the driver intention data according to the driver operation data, and using a time point corresponding to obtaining the driver operation data as a timestamp of the driver intention data; The scene data of the vehicle is determined according to the environmental perception data, and the time point corresponding to the environmental perception data is obtained as the timestamp of the scene data of the vehicle.
8. A server, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the test case generation method as described in any one of claims 1-5.
9. A vehicle, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the test case generation method as described in claim 6 or 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on the server / vehicle, the server / vehicle executes the operation of the test case generation method as described in any one of claims 1-7.
Citation Information
Cited By
Range extender working condition generation method and device and vehicle
CN120577031A