Test method and device, electronic equipment, storage medium and program product

By determining the algorithm's execution order based on the program's historical execution data during simulation testing, the problem of inconsistency between simulation test results and actual execution results is solved, achieving consistency and reliability of test results and supporting effective debugging and improvement of applications.

CN121579374APending Publication Date: 2026-02-27ZHIJIA MAINLAND (BEIJING) INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512059815.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Inconsistent simulation test results with actual operation results, and inconsistent results from multiple simulation tests, affect the reliability of application debugging and improvement.

Method used

By acquiring historical running data of the program under test on the second electronic device, the running order of the first algorithm before the second algorithm is determined, and data is fed back according to the actual running time to ensure that the running order of the first and second algorithms on the first electronic device is consistent with that on the second electronic device, thus ensuring the consistency of the test results.

Benefits of technology

This ensures consistency between simulation test results and actual operation results, improves the reliability of multiple tests, and supports effective debugging and improvement of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579374A_ABST
    Figure CN121579374A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a test method and device, electronic equipment, a storage medium and a program product. When the to-be-tested program runs on the second electronic equipment, a second algorithm of the to-be-tested program runs after the first algorithm, and a second starting moment when the second algorithm processes the second historical input data is before a first ending moment when the first algorithm processes the first historical input data. The input data of the second algorithm comprises the output data of the first algorithm, so that the first electronic equipment inputs the first historical input data into the first algorithm, and then inputs the second historical input data and the first output data of the first algorithm into the second algorithm for testing after the operation of the first algorithm is finished; and a test result is consistent with an actual operation result. Moreover, each test is carried out in the same test mode, so that the test results of each test are consistent, and the reliability of the test results is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a testing method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] To facilitate the debugging and improvement of applications, simulation testing can be performed on actual running applications through a simulation testing environment. For example, the input data of the intelligent driving program running on the vehicle terminal device can be fed back into the simulation environment (such as a server, computer, etc.) for simulation testing.

[0003] However, due to differences between the actual and simulation environments, inconsistencies may arise between simulation test results and actual runtime results, thus affecting subsequent debugging and improvement of the application. Furthermore, when performing multiple simulation tests on the application, different simulation environments may lead to varying test results, thereby impacting the reliability of the simulation tests. Summary of the Invention

[0004] This application provides a testing method, apparatus, electronic device, storage medium, and program product to solve the problem of inconsistencies between simulation test results and actual running results of applications, as well as inconsistencies between multiple simulation test results.

[0005] In a first aspect, embodiments of this application provide a testing method applied to a first electronic device. The method includes: acquiring historical running data of a program under test on a second electronic device, wherein the program under test includes a first algorithm and a second algorithm, the first algorithm and the second algorithm are run by different threads, the input data of the second algorithm includes the output data of the first algorithm, and the historical running data includes first historical input data of the first algorithm, a first end time of the first algorithm processing the first historical input data, second historical input data of the second algorithm, and a second start time of the second algorithm processing the second historical input data, wherein the first end time is earlier than the second start time; determining the running order of the first algorithm before the second algorithm based on the first end time and the second start time; running the program under test; at a first moment, inputting the first historical input data into the first algorithm to obtain the first output data of the first algorithm; in response to the end of the first algorithm's operation, inputting the second historical input data and the first output data into the second algorithm at a second moment; and in response to the end of the program under test's operation, outputting the test result of the program under test.

[0006] When the program under test (DUT) runs on the second electronic device, the second algorithm of the DUT runs after the first algorithm, and the second algorithm processes the second historical input data at a second start time before the first algorithm processes the first historical input data at a first end time. Since the input data of the second algorithm includes the output data of the first algorithm, when testing the DUT, the first electronic device first inputs the first historical input data into the first algorithm, and then, after the first algorithm finishes running, inputs the second historical input data and the first output data of the first algorithm into the second algorithm. This ensures that the running order of the first and second algorithms on the first electronic device is the same as that on the second electronic device, thus ensuring that the running results of the DUT on the first electronic device are consistent with those on the second electronic device. This allows for debugging and improvement of the DUT based on the running results (test results) on the first electronic device. Furthermore, when performing multiple tests on the DUT, each test first inputs the first historical input data into the first algorithm, and then, after the first algorithm finishes running, inputs the second historical input data into the second algorithm. This ensures the consistency of the test results each time, thereby improving the reliability of the test results.

[0007] In some embodiments, the first algorithm is run by a first thread of the first electronic device, and the second algorithm is run by a second thread of the first electronic device; or, both the first algorithm and the second algorithm are run by a third thread of the first electronic device.

[0008] The first algorithm and the second algorithm can run in parallel on the first electronic device, or they can run serially on the first electronic device.

[0009] In some embodiments, the historical runtime of the first algorithm on the second electronic device differs from the first runtime on the first electronic device. For example, the historical runtime of the first algorithm on the second electronic device may be less than or greater than the first runtime of the second algorithm on the first electronic device.

[0010] It is understandable that the historical runtime of the first algorithm on the second electronic device is less than the first runtime on the first electronic device, indicating that the computing power of the first electronic device is lower than that of the second electronic device, meaning the computing power of the test device is lower than that of the actual running device. In this case, when the test device runs the program under test, it runs the first algorithm first, then the second algorithm, and the second algorithm only runs after the first algorithm has finished. This avoids discrepancies between the test results and the actual running results due to the low computing power of the test device, thus ensuring the accuracy of the test results.

[0011] In some embodiments, the first electronic device includes an embedded computing device, a server, or a cloud device; the second electronic device includes a vehicle-mounted terminal device.

[0012] Testing the program under test running on the vehicle terminal device using embedded computing devices, servers, or cloud devices can improve the convenience of testing.

[0013] In some embodiments, the program under test includes an intelligent driving program.

[0014] By testing the intelligent driving program, the program can be debugged and improved based on the test results, thereby enhancing its operational performance.

[0015] Both the first historical input data and the second historical input data include at least one of the following: vehicle driving status data, vehicle sensor data, road data, and navigation data.

[0016] Secondly, embodiments of this application provide a testing apparatus, including:

[0017] The acquisition module is used to acquire historical running data of the program under test on the second electronic device. The program under test includes a first algorithm and a second algorithm, which are run by different threads. The input data of the second algorithm includes the output data of the first algorithm. The historical running data includes the first historical input data of the first algorithm, the first end time of the first algorithm processing the first historical input data, the second historical input data of the second algorithm, and the second start time of the second algorithm processing the second historical input data, wherein the first end time is earlier than the second start time.

[0018] The determination module is used to determine the execution order of the first algorithm before the second algorithm based on the first end time and the second start time.

[0019] The runtime module is used to run the program under test.

[0020] The first input module is used to input the first historical input data into the first algorithm at the first moment to obtain the first output data of the first algorithm;

[0021] The second input module is used to input the second historical input data and the first output data into the second algorithm at a second time in response to the end of the first algorithm.

[0022] The output module is used to output the test results of the program under test in response to the end of the program under test.

[0023] The beneficial effects achievable in the second aspect can be referred to the beneficial effects of the method provided in the first aspect implementation method, and will not be repeated here.

[0024] Thirdly, embodiments of this application provide an electronic device, including: a memory for storing instructions; and a processor, which, when executing the instructions in the memory, causes the electronic device to perform the method described in the first aspect of this application. The beneficial effects achievable in this third aspect can be referred to the beneficial effects of the method provided in the first aspect embodiment, and will not be repeated here.

[0025] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method provided in the first aspect embodiment. The beneficial effects achievable in the third aspect can be found in the beneficial effects of the method provided in the first aspect embodiment, and will not be repeated here.

[0026] Fifthly, embodiments of this application provide a computer program product containing program code that, when executed by a computer or processor, causes the computer or processor to perform the method provided in the first aspect embodiment. The beneficial effects achievable in the fifth aspect can be referred to the beneficial effects of the method provided in the first aspect embodiment, and will not be repeated here. Attached Figure Description

[0027] Figure 1 An exemplary application scenario diagram is shown;

[0028] Figure 2A This diagram illustrates the actual runtime sequence of an intelligent driving program.

[0029] Figure 2B A timing diagram for a simulation test of an intelligent driving program is shown;

[0030] Figure 3A According to one embodiment of this application, an actual runtime sequence diagram of an intelligent driving program is shown;

[0031] Figure 3B According to one embodiment of this application, a simulation test timing diagram of an intelligent driving program is shown;

[0032] Figure 4 A schematic diagram of a thread scheduling method is shown according to some embodiments of this application;

[0033] Figure 5 According to some embodiments of this application, a flowchart of a testing method is shown;

[0034] Figure 6 According to some embodiments of this application, an interaction diagram of an in-vehicle terminal device, a cloud device, and an embedded computing device is shown;

[0035] Figure 7According to some embodiments of this application, an interaction diagram of an embedded computing device and a cloud device is shown;

[0036] Figure 8 According to some embodiments of this application, a testing apparatus is shown;

[0037] Figure 9 According to some embodiments of this application, a schematic diagram of the structure of an electronic device is shown. Detailed Implementation

[0038] The illustrative embodiments of this application include, but are not limited to, test methods, apparatuses, electronic devices, storage media, and program products.

[0039] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0040] Figure 1 An exemplary application scenario diagram is shown.

[0041] like Figure 1 As shown, the same intelligent driving program is deployed on the vehicle-mounted terminal equipment of vehicle 100 and on computer 200. The intelligent driving program deployed on the vehicle-mounted terminal equipment is used to control vehicle 100 to perform intelligent driving based on real vehicle data such as vehicle driving status data, vehicle sensor data, road data and / or navigation data collected by vehicle 100 during driving. The intelligent driving program deployed on computer 200 is used for simulation testing. For example, real vehicle data collected by vehicle 100 during driving can be fed back into the intelligent driving program deployed on computer 200 to perform simulation testing on the intelligent driving program, so as to debug and improve the intelligent driving program based on the simulation test results.

[0042] In some embodiments, the real vehicle data to be tested can be fed back into the various algorithms of the intelligent driving program in computer 200 for simulation testing based on the initial running time interval between the input of each real vehicle data to the various algorithms of the intelligent driving program, so as to reproduce the actual operating environment as closely as possible. However, the actual operating environment of the vehicle terminal device differs from the simulation environment of computer 200. For example, the computing power, load, and busy level of the vehicle terminal device and computer 200 may differ, which may lead to inconsistencies between the simulation test results and the actual operating results.

[0043] For example, Figure 2A This diagram illustrates the actual runtime sequence of an intelligent driving program. Figure 2B A timing diagram for a simulation test of an intelligent driving program is shown.

[0044] like Figure 2AAs shown, during the operation of the intelligent driving program by the on-board terminal device of vehicle 100, the on-board terminal device inputs data A into algorithm 0, which runs on a linear path of 0, at time t0, and inputs data B into algorithm 1, which runs on a linear path of 1, at time t1. The time interval between time t0 and time t1 is T1. The running time of algorithm 1 is also T1, and the running result of algorithm 1 depends on the running result of algorithm 0. That is to say, the input data of algorithm 1 includes the output data Y1 of algorithm 0.

[0045] like Figure 2B As shown, during the simulation test of the intelligent driving program, computer 200 inputs data A into algorithm 0 at time t2 (time t2 is after time t1) and inputs data B into algorithm 1 at time t3 for simulation testing. The interval between time t2 and time t3 is T1. However, due to the lower computing power of computer 200 compared to the vehicle terminal device, or due to a higher load on computer 200 causing a decrease in running speed, or other reasons, the running time of algorithm 0 on computer 200 reaches T2, ending at time t4, exceeding the running time T1 on the vehicle terminal device. Thus, when algorithm 1 starts running at time t3, algorithm 0 has not yet finished running. In this situation, computer 200 may input historical output data of algorithm 0 (such as the output data from the previous simulation test) or default data (such as empty data) into algorithm 1. This will cause errors in the running results of algorithm 1, resulting in inconsistencies between the simulation test results and the actual running results of the intelligent driving program, affecting subsequent debugging and improvement of the intelligent driving program.

[0046] Similarly, when conducting multiple simulation tests on the intelligent driving program using a computer 200, the environment of each simulation test may be different, such as load and busy level. This may lead to inconsistent simulation test results, resulting in poor reliability of the simulation test and affecting subsequent debugging and improvement of the intelligent driving program.

[0047] In view of this, the present application provides a testing method that no longer re-feeds data according to the initial running time interval between the various algorithms of the application, but determines the running order of each algorithm according to the actual running time of each algorithm, and then re-feeds data according to the running order of each algorithm.

[0048] Specifically, the first electronic device acquires historical running data of the program under test (DUT) on the second electronic device. The DUT includes a first algorithm and a second algorithm, which are run by different threads. The input data of the second algorithm includes the output data of the first algorithm. The historical running data includes the first historical input data of the first algorithm, the first end time of the first algorithm processing the first historical input data, the second historical input data of the second algorithm, and the second start time of the second algorithm processing the second historical input data, wherein the first end time is earlier than the second start time. Based on the first end time and the second start time, the first electronic device determines that the first algorithm runs before the second algorithm and runs the DUT. At the first moment, it inputs the first historical input data into the first algorithm to obtain the first output data. Then, in response to the end of the first algorithm's execution, the first electronic device inputs the second historical input data and the first output data into the second algorithm at the second moment. Finally, in response to the end of the DUT's execution, the first electronic device outputs the test result of the DUT. This ensures that the running order of the first and second algorithms on the first electronic device is consistent with the running order on the second electronic device, thereby ensuring that the actual running result of the DUT is consistent with the simulation test result. In addition, when the program under test is tested multiple times, the first historical input data is first input into the first algorithm for each test, and then the second historical input data is input into the second algorithm after the first algorithm finishes running. This ensures that the test results are consistent each time.

[0049] For example, such as Figure 3A As shown, for Figure 2A As shown, when computer 200 (as an example of the first electronic device) runs an intelligent driving program (as an example of the program under test) for simulation testing, thread 0 (as the first thread) first inputs data A (as the first historical input data) into algorithm 0 (as the first algorithm) at time t2 (as the first time). Then, thread 1 (as the second thread) waits for algorithm 0 to finish running, and at time t4 (as the second time), inputs data B and the output data Y1 of algorithm 0 (as the first output data) into algorithm 1. This ensures the consistency between the simulation test results and the actual running results of the intelligent driving program.

[0050] For example, such as Figure 3B As shown, when the computer 200 runs the intelligent driving program for simulation testing, Algorithm 0 and Algorithm 1 can also be executed serially by thread 2. For example, thread 2 first inputs data A into Algorithm 0 at time t2, and then waits for Algorithm 0 to finish running before inputting data B and the output data of Algorithm 0 into Algorithm 1 at time t4.

[0051] In some embodiments, when the intelligent driving program is running on the vehicle terminal device, the vehicle terminal can record the running data of the intelligent driving program, such as the start time, end time, input data, output data, and threads running each algorithm of the intelligent driving program, and generate an algorithm scheduling table based on the recorded running data, and send the algorithm scheduling table to the test device so that the test device can perform simulation tests on the intelligent driving program according to the algorithm scheduling table.

[0052] In some embodiments, when the test device is running an intelligent driving program, the algorithm scheduling process of the test device can schedule the various algorithms of the intelligent driving program to run in the order specified in the scheduling table by querying the algorithm scheduling table.

[0053] For example, such as Figure 4 As shown, the intelligent driving program includes Algorithm 0, Algorithm 1, Algorithm 2, and Algorithm 3. When the intelligent driving program runs on the in-vehicle terminal device, Algorithm 0 is run by thread 0, Algorithm 1 is run by thread 1, and Algorithms 2 and 3 are run by thread 2, in the order of Algorithm 0, Algorithm 1, Algorithm 2, and Algorithm 3. When the intelligent driving program runs on the test device, the algorithm scheduling process of the test device can query the algorithm scheduling table, first calling thread 0 to run Algorithm 0, then calling thread 1 to run Algorithm 1, and then calling thread 2 to run Algorithms 1 and 3 in sequence.

[0054] The testing methods provided in the embodiments of this application are described below with reference to the flowchart.

[0055] Figure 5 According to some embodiments of this application, a flowchart of a testing method is shown. Each step of the method is performed by a first electronic device, which will not be described in detail below.

[0056] like Figure 5 As shown, the method includes:

[0057] S101: Obtain historical running data of the program under test on the second electronic device, wherein the program under test includes a first algorithm and a second algorithm, the first algorithm and the second algorithm are run by different threads, the input data of the second algorithm includes the output data of the first algorithm, and the historical running data includes the first historical input data of the first algorithm, the first end time of the first algorithm processing the first historical input data, the second historical input data of the second algorithm and the second start time of the second algorithm processing the second historical input data, wherein the first end time is earlier than the second start time.

[0058] The first historical input data is the data input by the second electronic device to the first algorithm of the program under test when the program under test is running on the second electronic device, including but not limited to vehicle driving status data, vehicle sensor data, road data, and navigation data.

[0059] The second historical input data is the data input by the second electronic device to the second algorithm of the program under test when the program under test is running on the second electronic device, including but not limited to vehicle driving status data, vehicle sensor data, road data and navigation data.

[0060] The first end time is the moment when the second electronic device runs the first algorithm to process the first historical input data, and the moment when the first algorithm finishes running.

[0061] The second start moment is the moment when the second electronic device inputs the second historical input data into the second algorithm.

[0062] It is understood that the program under test may include other algorithms besides the first and second algorithms; for example, there is no limitation on this.

[0063] In some embodiments, the program under test includes an intelligent driving program. In other embodiments, the program under test may also include a natural language processing program or an intelligent cockpit program, etc., and there is no limitation thereto.

[0064] Taking the program under test as an intelligent driving program as an example, the first algorithm can be the perception algorithm of the intelligent driving program, and the second algorithm can be the decision algorithm of the intelligent driving program. The running result of the second algorithm depends on the running result of the first algorithm.

[0065] In some embodiments, the first electronic device includes, but is not limited to, embedded computing devices (such as computers, mobile phones, tablets, etc.), servers, or cloud platforms, and the second electronic device includes, but is not limited to, vehicle-mounted terminal devices, embedded computing devices, or industrial terminal devices.

[0066] Taking an example where the first electronic device is an embedded computing device, the second electronic device is an in-vehicle terminal device, and the program under test is an intelligent driving program:

[0067] In some embodiments, such as Figure 6 As shown, the in-vehicle terminal device can upload the data to be tested (such as the aforementioned first and second historical input data) to a cloud device for storage. Then, the cloud device can distribute this data to an embedded computing device deployed within the intelligent driving program, where the embedded computing device performs the test. This enables automated testing of the program under test, reducing manual operation and improving testing efficiency.

[0068] In some embodiments, when the program under test is running on the second electronic device, the first algorithm can be run by the first thread and the second algorithm can be run by the second thread, wherein the first thread and the second thread are different threads, that is, the first algorithm and the second algorithm of the program under test run in parallel on the second electronic device.

[0069] In some embodiments, the historical runtime of the first algorithm on the second electronic device is different from the first runtime of the first algorithm on the first electronic device.

[0070] Taking an embedded computing device (such as the aforementioned computer 200) as the first electronic device and an in-vehicle terminal device as the second electronic device, and assuming that the computing power of the embedded computing device is lower than that of the in-vehicle terminal device: Because the computing power of the embedded computing device is lower than that of the in-vehicle terminal device, when running the intelligent driving program, the embedded computing device runs faster and for a shorter duration than the in-vehicle terminal device. Thus, the historical runtime of the first algorithm of the intelligent driving program on the embedded computing device (e.g., ...) Figure 2B The T1 shown is greater than the first running time on the vehicle terminal device (e.g., Figure 2B (as shown in T2).

[0071] Taking the first electronic device as a cloud device and the second electronic device as an in-vehicle terminal device, and with the computing power of the cloud device being higher than that of the in-vehicle terminal device as an example: Although the computing power of the cloud device is higher than that of the in-vehicle terminal device, there may be a situation where the cloud device has a high load when running the first algorithm, which leads to a decrease in the running speed. As a result, the historical running time of the first algorithm of the intelligent driving program on the cloud device is less than the first running time on the in-vehicle terminal device.

[0072] S102: Based on the first end time and the second start time, determine the running order of the first algorithm before the second algorithm.

[0073] Since the first end time of the first algorithm of the program under test is earlier than the second start time of the second algorithm, the first electronic device determines that the running order of the first algorithm is before that of the second algorithm.

[0074] S103: Run the program to be tested.

[0075] The first electronic device runs the program under test.

[0076] S104: At the first moment, input the first historical input data into the first algorithm to obtain the first output data of the first algorithm.

[0077] At the first moment, the first electronic device inputs the first historical input data into the first algorithm and obtains the first output data of the first algorithm.

[0078] For example, such as Figure 3A or Figure 3B As shown, at time t2, computer 200 (as an example of the first electronic device) inputs data A (as the first historical input data) into algorithm 0 (as the first algorithm) and obtains data C output by algorithm 0.

[0079] S105: In response to the end of the first algorithm, at the second moment, the second historical input data and the first output data are input into the second algorithm.

[0080] In response to the end of the first algorithm's operation, the first electronic device inputs the second historical input data of the second algorithm and the first output data of the first algorithm into the second algorithm at a second moment.

[0081] For example, such as Figure 3A or Figure 3B As shown, after Algorithm 0 finishes running, computer 200 inputs data B (as the second historical input data) and data C into Algorithm 1 (as the second algorithm) at time t4 to obtain the output result of Algorithm 1.

[0082] S106: In response to the end of the program under test, output the test results of the program under test.

[0083] After the first electronic device finishes running the program under test, it obtains the running result output by the program under test and then outputs the running result as the test result.

[0084] In some embodiments, when the first electronic device runs the program under test, the first algorithm of the program under test can be run by a first thread, the second algorithm of the program under test can be run by a second thread, or both the first and second algorithms of the program under test can be run by a third thread. That is, the first and second algorithms of the program under test can run in parallel on the first electronic device or run serially on the first electronic device.

[0085] For example, such as Figure 3A As shown, when the computer 200 runs the intelligent driving program, algorithm 0 of the intelligent driving program is run by thread 0 (as the first thread), and algorithm 1 is run by thread 1 (as the second thread).

[0086] For example, such as Figure 3B As shown, when the computer 200 runs the intelligent driving program, both Algorithm 0 and Algorithm 1 of the intelligent driving program are run by Thread 2 (as the third thread).

[0087] Continuing with the example of the first electronic device being an embedded computing device, the second electronic device being an in-vehicle terminal device, and the program under test being an intelligent driving program:

[0088] In some embodiments, such as Figure 6 As shown, after the embedded computing device completes the test of the intelligent driving program, it can upload the test results to the cloud device, so that other devices (downstream devices) can obtain the running results of the intelligent driving program from the cloud device.

[0089] In some embodiments, the cloud device also stores the installation package of the intelligent driving program, enabling other devices to obtain the installation package of the intelligent driving program from the cloud device for running or testing.

[0090] In some embodiments, the embedded computing device can also upload the data to be tested to a cloud device for testing. For example... Figure 7 As shown, embedded computing devices 1 to n (n is a positive integer) upload their respective test data to containers 1 to n on the cloud device where the test program is deployed for testing. Then, containers 1 to n can store their respective test results in the cloud storage space.

[0091] In this embodiment, when the program under test (SUB) runs on the second electronic device, the second algorithm of the SUB runs after the first algorithm of the SUB, and the second start time of the second algorithm processing the second historical input data is before the first end time of the first algorithm processing the first historical input data. Since the input data of the second algorithm includes the output data of the first algorithm, when testing the SUB, the first electronic device first inputs the first historical input data into the first algorithm, and then inputs the second historical input data and the first output data of the first algorithm into the second algorithm after the first algorithm finishes running. This ensures that the running order of the first algorithm and the second algorithm on the first electronic device is the same as the running order on the second electronic device, thereby ensuring that the running result of the SUB on the first electronic device is consistent with the running result on the second electronic device. This allows the SUB to be debugged and improved based on the running result (test result) of the SUB on the first electronic device.

[0092] Figure 8 According to some embodiments of this application, a testing apparatus is shown.

[0093] like Figure 8 As shown, the testing device 50 includes an acquisition module 51, a determination module 52, a running module 53, a first input module 54, a second input module 55, and an output module 56.

[0094] The acquisition module 51 is used to acquire historical running data of the program under test on the second electronic device. The program under test includes a first algorithm and a second algorithm, which are run by different threads. The input data of the second algorithm includes the output data of the first algorithm. The historical running data includes the first historical input data of the first algorithm, the first end time of the first algorithm processing the first historical input data, the second historical input data of the second algorithm, and the second start time of the second algorithm processing the second historical input data. The first end time is earlier than the second start time.

[0095] The determination module 52 is used to determine the running order of the first algorithm before the second algorithm based on the first end time and the second start time.

[0096] Module 53 is used to run the program under test.

[0097] The first input module 54 is used to input the first historical input data into the first algorithm at the first moment to obtain the first output data of the first algorithm.

[0098] The second input module 55 is used to input the second historical input data and the first output data into the second algorithm at a second time in response to the end of the first algorithm.

[0099] Output module 56 is used to output the test results of the program under test in response to the end of the program under test.

[0100] It should be noted that the information interaction and execution process between the modules of the above-mentioned testing device 50 are based on the same concept as the method embodiment of this application, and the resulting technical effects are the same as those of the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and will not be repeated here.

[0101] It is understood that, as used herein, the term “module” may refer to or include, or be part of, an application-specific integrated circuit (ASIC), electronic circuitry, a processor (shared, dedicated, or grouped) and / or memory that executes one or more software or firmware programs, combinational logic circuitry, and / or other suitable hardware components that provide the described functionality.

[0102] The vehicle-mounted terminal devices involved in the above embodiments are described below.

[0103] For example, Figure 9 According to some embodiments of this application, a schematic diagram of an electronic device is shown. This electronic device can be either the aforementioned first electronic device used to implement the testing methods provided in the foregoing embodiments, or the aforementioned second electronic device.

[0104] like Figure 9 As shown, the electronic device 1000 includes one or more processors 101, system memory 102, non-volatile memory (NVM) 103, communication interface 104, input / output device 105, and system control logic unit 106 for coupling the processor 101, system memory 102, NVM 103, communication interface 104, and input / output device 105. Wherein:

[0105] Processor 101 may include one or more processing units, such as processing modules or circuits that include a central processing unit (CPU), graphics processing unit (GPU), digital signal processor (DSP), microprocessor (MCU), artificial intelligence (AI) processor, field programmable gate array (FPGA), neural network processing unit (NPU), etc., and may include one or more single-core or multi-core processors. In some embodiments, the CPU may be used to optimize a neural network model to be run, and the NPU may be used to run the neural network model to be run.

[0106] System memory 102 is volatile memory, such as random-access memory (RAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc. System memory is used for temporary storage of data and / or instructions. For example, in some embodiments, system memory 102 can be used to store the aforementioned object code, executable files, executable instructions, etc., and can also be used to store instructions for the test methods provided in the foregoing embodiments.

[0107] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), compact disc (CD), digital versatile disc (DVD), solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card. In other embodiments, the non-volatile memory 103 may be used to store instructions for the test methods provided in the foregoing embodiments.

[0108] Specifically, system memory 102 and non-volatile memory 103 may each include a temporary copy and a permanent copy of instruction 107. Instruction 107 may include, when executed by at least one of processors 101, causing electronic device 1000 to implement the test methods provided in the embodiments of this application.

[0109] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the electronic device 1000, thereby enabling communication with any other suitable device via one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the electronic device 1000, for example, the communication interface 104 may be integrated into the processor 101. In some embodiments, the electronic device 1000 may communicate with other devices through the communication interface 104, for example, the electronic device 1000 may obtain required data from other vehicle-mounted terminal devices through the communication interface 104.

[0110] The input / output device 105 can be an input device such as a keyboard or mouse, or an output device such as a monitor. Users can interact with the electronic device 1000 through the input / output device 105.

[0111] The system control logic unit 106 may include any suitable interface controller to provide any suitable interface to other modules of the electronic device 1000. For example, in some embodiments, the system control logic unit 106 may include one or more memory controllers to provide an interface to the system memory 102 and the non-volatile memory 103.

[0112] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic unit 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated on the same chip with the logic of one or more controllers for the system control logic unit 106 to form a system-on-chip (SoC).

[0113] Understandable. Figure 9 The structure of the electronic device 1000 shown is merely an example. In other embodiments, the electronic device 1000 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0114] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods provided in the foregoing embodiments.

[0115] This application also provides a computer program product containing program code that, when executed by a computer or processor, causes the computer or processor to perform the methods provided in the foregoing embodiments.

[0116] Various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or combinations of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0117] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application-specific integrated circuit, or a microprocessor.

[0118] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0119] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried on or stored thereon by one or more transient or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media can include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, compact disc-read-only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0120] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0121] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0122] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0123] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A testing method, characterized in that, Applied to a first electronic device, the method includes: The historical running data of the program under test on a second electronic device is obtained. The program under test includes a first algorithm and a second algorithm, which are run by different threads. The input data of the second algorithm includes the output data of the first algorithm. The historical running data includes the first historical input data of the first algorithm, the first end time of the first algorithm processing the first historical input data, the second historical input data of the second algorithm, and the second start time of the second algorithm processing the second historical input data, wherein the first end time is earlier than the second start time. Based on the first end time and the second start time, the execution order of the first algorithm is determined to be before the second algorithm; Run the program under test; At the first moment, the first historical input data is input into the first algorithm to obtain the first output data of the first algorithm; In response to the end of the first algorithm's execution, at a second moment, the second historical input data and the first output data are input into the second algorithm; In response to the completion of the program under test, the test results of the program under test are output.

2. The test method according to claim 1, characterized in that, The first algorithm is run by a first thread of the first electronic device, and the second algorithm is run by a second thread of the first electronic device; or, Both the first algorithm and the second algorithm are run by the third thread of the first electronic device.

3. The test method according to claim 2, characterized in that, The historical runtime of the first algorithm on the second electronic device is different from the first runtime of the first algorithm on the first electronic device.

4. The test method according to claim 3, characterized in that, The first electronic device includes an embedded computing device, a server, or a cloud device; The second electronic device includes an in-vehicle terminal device.

5. The test method according to claim 4, characterized in that, The program to be tested includes intelligent driving programs.

6. The test method according to claim 1, characterized in that, Both the first historical input data and the second historical input data include at least one of the following: vehicle driving status data, vehicle sensor data, road data, and navigation data.

7. A testing apparatus, characterized in that, include: The acquisition module is used to acquire historical running data of the program under test on a second electronic device. The program under test includes a first algorithm and a second algorithm, which are run by different threads. The input data of the second algorithm includes the output data of the first algorithm. The historical running data includes the first historical input data of the first algorithm, the first end time of the first algorithm processing the first historical input data, the second historical input data of the second algorithm, and the second start time of the second algorithm processing the second historical input data, wherein the first end time is earlier than the second start time. The determining module is used to determine the execution order of the first algorithm before the second algorithm based on the first end time and the second start time; The runtime module is used to run the program under test; The first input module is used to input the first historical input data into the first algorithm at a first moment to obtain the first output data of the first algorithm; The second input module is used to input the second historical input data and the first output data into the second algorithm at a second moment in response to the end of the first algorithm's operation. The output module is used to output the test results of the program under test in response to the end of the program under test.

8. An electronic device, characterized in that, include: Memory, used to store instructions; A processor, when executing instructions in the memory, causes the electronic device to perform the test method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the test method of any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product contains program code that, when executed by a computer or processor, causes the computer or processor to perform the test method according to any one of claims 1 to 6.