Test method, electronic device, storage medium, and program product
By building an automated testing architecture and intelligent log analysis algorithm, the problems of low efficiency and insufficient dynamic scenario coverage in existing OTA testing methods have been solved. This has enabled remote and automated OTA testing, improved testing efficiency and the accuracy of anomaly detection, and reduced labor costs and version release risks.
Patent Information
- Application Number
- CN202611289529.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-27
AI Technical Summary
Existing OTA testing methods rely on manual operation, which is inefficient, lacks coverage of dynamic scenarios, has a high rate of missed anomalies, lacks standardization in test reports, makes it difficult to make horizontal comparisons, limits the frequency of stress testing, and poses a high risk to version release.
By building an automated testing architecture, combining dynamic operating condition simulation and intelligent log analysis algorithms, we can achieve remote test task distribution, automated log collection and analysis, anomaly classification based on rule engine and parameter baseline, and generation of standardized test reports.
It has enabled the automation and remote testing of OTA upgrades, improved testing efficiency and comprehensiveness, significantly reduced labor costs, accurately covered dynamic working conditions, improved the accuracy of anomaly detection and the standardization of reports, and reduced the risk of version release.
Smart Images

Figure CN123178256A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle testing technology, and more particularly to a testing method, electronic device, storage medium, and program product. Background Technology
[0002] With the rapid development of intelligent connected vehicle technology, automobiles have evolved from traditional mechanical products into intelligent mobile terminals driven by a large amount of software code. Against this backdrop, Over-the-Air (OTA) technology has become one of the core capabilities of intelligent vehicles. OTA technology allows automakers to remotely upgrade the software or firmware of the vehicle's Electronic Control Unit (ECU) via wireless networks, enabling features additions, performance optimizations, defect fixes, and security patch pushes. This not only greatly enhances the user experience, making vehicles "always up-to-date," but also reduces the costs of large-scale offline recalls for automakers and spawns new business models such as software subscriptions.
[0003] To ensure the security and stability of the OTA upgrade process, thorough testing must be conducted before vehicle release. Existing OTA testing methods primarily rely on a limited number of upgrade verifications in laboratories or specific locations. These tests are typically performed under ideal static conditions with the vehicle stationary, focusing mainly on whether the upgrade process itself can be successfully completed, such as downloading, verification, flashing, and restarting. Testers pre-set some standard operating conditions, then execute the upgrade, and manually or through scripts check whether the basic functions are normal after the upgrade. While this method can identify some obvious and inevitable software defects to a certain extent, its testing scenarios are limited, its coverage is narrow, and it is highly dependent on manual intervention, resulting in low efficiency. Summary of the Invention
[0004] This application provides a testing method, electronic device, storage medium, and program product. By constructing an automated testing architecture and combining dynamic operating condition simulation and intelligent log analysis algorithms, it solves the problems of existing OTA testing scenarios being too limited, making it difficult to detect long-term performance degradation, and locating anomalies.
[0005] In a first aspect, this application provides a testing method applied to a control terminal, comprising: sending a test task to an in-vehicle terminal; the test task instructing the in-vehicle terminal to load at least one cyclic operating condition and perform over-the-air (OTA) stress testing at specific operating condition nodes in each cyclic operating condition; obtaining a set of test logs reported by the in-vehicle terminal; the test logs include at least one of vehicle status logs, OTA stress test logs, and electronic control unit (ECU) logs.
[0006] The technical solution provided in this application brings at least the following beneficial effects: By remotely issuing test tasks from the control terminal to the vehicle terminal, the testing process is automated and remote, eliminating the need for manual on-site operation, significantly improving testing efficiency and reducing labor costs; The test task instructs the vehicle terminal to load at least one cyclic operating condition and execute OTA stress testing at specific operating condition nodes, so that OTA upgrade testing is no longer limited to a static ideal environment, but can be accurately triggered and executed under various dynamic operating conditions faced by the vehicle in actual operation, effectively covering potential problems that may be caused by the coupling of operating conditions and OTA upgrades in real vehicle scenarios, and significantly improving the comprehensiveness and reliability of the test; The control terminal obtains a set of test logs reported by the vehicle terminal, including at least one of the vehicle status log, OTA stress test log, and ECU log, realizing multi-dimensional collection of OTA stress test full-link operation data, which can completely restore the vehicle behavior during the test process from three levels: the overall vehicle status, the OTA upgrade process itself, and the underlying electronic control unit, providing a sufficient and rich data foundation for subsequent anomaly detection, fault location, and performance evaluation.
[0007] In one possible implementation, the method further includes: determining a target test log from a set of test logs based on a preset rule engine; the target test log represents the test log that has an anomaly; extracting test parameters from the target test log and determining the anomaly type based on a preset parameter baseline; wherein, one test parameter corresponds to one parameter baseline, the parameter baseline is related to the vehicle model, ECU type and cyclic operating conditions, and the anomaly type includes transient anomalies and degradation anomalies.
[0008] In one possible implementation, the test task includes OTA load testing rounds. Each execution of the test task corresponds to one OTA load testing round. Test parameters are extracted from the target test log, and the anomaly type is determined based on a preset parameter baseline. This includes: extracting target test parameters from the target test log; the target test parameter is any test parameter in the target test log; if the difference between the value of the target test parameter and the value of the parameter baseline is greater than an anomaly threshold, and the difference is not greater than the anomaly threshold in adjacent OTA load testing rounds, then the anomaly type is determined to be a transient anomaly; the anomaly threshold is determined based on the 3σ criterion or the median absolute deviation algorithm; if the difference is not greater than the anomaly threshold, and the difference increases with the increase of OTA load testing rounds, then the anomaly type is determined to be a degradation anomaly.
[0009] In one possible implementation, after extracting test parameters from the target test log and determining the anomaly type based on a preset parameter baseline, the method further includes: generating a test report based on the target test log and the anomaly type; and generating comparative data based on multiple test reports for different vehicle terminals when multiple test reports exist.
[0010] Secondly, this application provides a testing method applied to an in-vehicle terminal, comprising: acquiring a test task issued by a control terminal; based on the test task, loading at least one cyclic operating condition and performing OTA stress testing at a specific operating condition node in each cyclic operating condition; reporting a set of test logs to the control terminal and storing the logs in a circular buffer of the in-vehicle terminal; the set of test logs includes at least one of vehicle status logs, OTA stress test logs, and electronic control unit (ECU) logs.
[0011] In one possible implementation, the test task includes a test priority; before loading at least one cyclic operating condition and performing over-the-air (OTA) stress testing at a specific operating condition node in each cyclic operating condition, the method further includes: when multiple test tasks are obtained from the control terminal, determining the execution order of the multiple test tasks based on the priority corresponding to each test task; if the number of test tasks is greater than a preset number, sending a queue blocking alarm to the control terminal; loading at least one cyclic operating condition and performing OTA stress testing at a specific operating condition node in each cyclic operating condition, based on the test task, includes: determining a target test task from the multiple test tasks; the target test task represents the highest priority unexecuted task; and loading at least one cyclic operating condition specified by the target test task and performing OTA stress testing at a specific operating condition node in each cyclic operating condition, based on the target test task.
[0012] In one possible implementation, OTA stress testing includes full upgrade, differential upgrade, and firmware rollback; when performing over-the-air (OTA) stress testing at a specific working node of each cycle of stress testing, the method further includes: checking the OTA stress testing process based on preset check items, and terminating the OTA stress testing if the OTA stress testing process does not meet the check items.
[0013] Thirdly, this application provides a testing apparatus, comprising: The sending module is used to send test tasks to the vehicle terminal; the test tasks are used to instruct the vehicle terminal to load at least one cyclic operating condition and to perform over-the-air (OTA) stress testing at specific operating condition nodes in each cyclic operating condition. The acquisition module is used to acquire the set of test logs reported by the vehicle terminal; the test logs include at least one of the following: vehicle status log, OTA stress test log, and electronic control unit (ECU) log.
[0014] Fourthly, this application also provides a testing apparatus, comprising: The task scheduling module is used to obtain test tasks issued by the control terminal; The working condition execution module is used to load at least one cyclic working condition based on the test task and perform OTA stress testing on specific working condition nodes in each cyclic working condition. The log acquisition module is used to report the test log set to the control terminal and store the logs in the circular buffer of the vehicle terminal; the test log set includes at least one of the vehicle status log, OTA stress test log and electronic control unit (ECU) log.
[0015] Fifthly, this application provides an electronic device, comprising: a processor and a memory, the processor being coupled to the memory; the memory being used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the methods of the first or second aspect described above.
[0016] In a sixth aspect, this application provides a computer-readable storage medium comprising: computer software instructions; which, when executed in an electronic device, cause the electronic device to implement the methods described in the first or second aspect.
[0017] In a seventh aspect, this application provides a computer program product comprising a computer program; when the computer program is run in an electronic device, it causes the electronic device to implement the methods described in the first or second aspect above.
[0018] The beneficial effects of the second to seventh aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0019] Figure 1 A schematic diagram of the architecture of a testing system provided in an embodiment of this application; Figure 2 A flowchart illustrating a testing method provided in an embodiment of this application; Figure 3 A flowchart illustrating an anomaly analysis provided in an embodiment of this application; Figure 4 A flowchart illustrating a testing method provided in an embodiment of this application; Figure 5 A schematic diagram of a log collection process provided in an embodiment of this application; Figure 6 This application provides a schematic diagram of an OTA stress test timing process. Figure 7 This is a schematic diagram of the structure of a testing device provided in an embodiment of this application; Figure 8 This is a schematic diagram of another testing device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0021] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0022] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0023] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0024] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0025] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0026] Current OTA load testing solutions mainly have the following problems: Manual operation is inefficient and the testing cycle is lengthy: Traditional OTA stress testing relies heavily on manual intervention. Testers need to manually trigger upgrade commands, manually drive vehicles to simulate operating conditions, and manually capture and export relevant logs before and after the upgrade. This cumbersome serial operation mode often results in a single stress test taking several hours, which seriously slows down the overall testing progress and cannot meet the needs of agile development and high-frequency iteration of modern intelligent vehicles.
[0027] Insufficient coverage of dynamic scenarios and high rate of anomaly detection: Real-world driving environments are extremely complex, involving various cyclical operating conditions such as urban congestion, highways, and mixed road conditions. Limited by manpower and time, manual testing cannot comprehensively cover these diverse dynamic scenarios in a short period of time, resulting in the omission of many hidden faults that are only triggered under specific operating conditions and when coupled with OTA upgrades, greatly reducing the comprehensiveness and reliability of the test.
[0028] Log analysis relies excessively on experience, is highly subjective, and prone to errors: OTA stress testing generates massive amounts of vehicle status logs, ECU logs, and OTA-specific logs. Currently, the identification of abnormal logs mainly relies on testers manually checking each log individually, which is not only time-consuming and labor-intensive but also highly dependent on individual technical experience. This highly subjective analysis method can easily lead to critical anomaly information being overlooked or misjudged, making it difficult to accurately pinpoint the root cause of the problem.
[0029] The lack of standardization in test reports hinders cross-sectional comparisons: After each stress test, testers must manually collect data and write test reports. The lack of a unified automated data processing template results in inconsistent report formats and data dimensions. This not only increases the burden of data processing but also makes it difficult to conduct intuitive cross-sectional comparisons and systematic evaluations of test results from different vehicle models, versions, or operating conditions.
[0030] The frequency of load testing is severely limited, leading to high risks in version releases: Due to the high cost and time-consuming nature of the aforementioned manual operations, the actual frequency of OTA load testing that can be performed is far lower than the ideal frequency required to ensure software quality. Insufficient testing depth directly results in potential defects not being fully exposed before release, allowing software versions with hidden problems to enter the market, significantly increasing the failure rate and after-sales recall risks after vehicle mass production.
[0031] Based on this, this application provides a testing method that sends an OTA stress test task to the vehicle terminal via a control terminal, performing the test at specific operating conditions, and obtaining test logs including vehicle status, OTA data, and ECU information. This addresses the problem in existing technologies of lacking effective stress testing for OTA upgrades under dynamic vehicle operation and complex operating conditions.
[0032] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0033] Figure 1 This application provides a schematic diagram of the architecture of a testing system, as shown in the embodiments. Figure 1 As shown, the test system 100 includes a control terminal 110, an on-board terminal 120, and a task terminal 130.
[0034] The control terminal 110 includes an anomaly analysis module and a report generation module. The anomaly analysis module receives test logs uploaded by the vehicle terminal and analyzes stress test faults based on the test logs. The report generation module automatically generates test reports and fault statistics reports.
[0035] The vehicle terminal 120 includes a task scheduling module, a working condition execution module, and a log collection module. The task scheduling module is used to trigger OTA upgrades at specific working condition nodes according to the test tasks issued by the control terminal 110. The working condition execution module is used to control the vehicle to execute cyclic working conditions. The log collection module collects logs generated by various parts of the vehicle during stress testing.
[0036] Task terminal 130 is used to provide upgrade packages to vehicle terminal 120.
[0037] The aforementioned control terminal 110, vehicle terminal 120, and task terminal 130 can be electronic devices, and the three can interact with the vehicle's vehicle communication module via a remote communication network.
[0038] The aforementioned control terminal 110 and task terminal 130 can specifically be servers, such as a server cluster consisting of multiple servers, a single server, a computer, or a processor or processing chip within a server or computer. The aforementioned vehicle terminal 120 can specifically be a vehicle controller, such as a cockpit domain controller (CDC), an in-vehicle host, or a central gateway. It should be noted that this application embodiment does not limit the specific device form of the control terminal 110 and the vehicle terminal 120.
[0039] In one implementation, the control terminal 110 can be deployed outside the vehicle or jointly deployed inside the vehicle with the vehicle terminal 120. Alternatively, the control terminal 110 can be a local terminal deployed in the same network environment as the vehicle. This deployment method is suitable for offline OTA stress testing scenarios in closed factory intranet environments and environments without external networks. It can be tested normally in a network-disconnected environment and has a faster local response speed.
[0040] Figure 2 This is a flowchart illustrating a testing method provided in an embodiment of this application. Figure 2 As shown, the test method provided in this application can be implemented through the above-mentioned control terminal, specifically including S201~S204.
[0041] S201, Send test tasks to the vehicle terminal.
[0042] By remotely sending test tasks from the control terminal to the vehicle terminal, the testing process is automated and remote, eliminating the need for on-site operation by test personnel. It can support 24-hour uninterrupted operation, significantly improving testing efficiency and reducing labor costs.
[0043] The test task is a structured instruction set generated by the control terminal. Its format can be YAML or JSON, and it must contain at least the following elements: the type of cyclic operating condition to be loaded, the specific operating condition node for performing OTA stress testing under each cyclic operating condition (i.e., the time point or condition for triggering the upgrade), the OTA stress test rounds, etc. The test task is used to instruct the vehicle terminal to load at least one cyclic operating condition and to perform OTA stress testing at the specific operating condition node for each cyclic operating condition.
[0044] A driving cycle refers to a standardized driving cycle that simulates the vehicle's operating state in real-world driving scenarios. Examples include preset cycles such as the China Light-duty Vehicle Test Cycle (CLTC), the Worldwide Harmonized Light Vehicles Test Cycle (WLTC), the New European Driving Cycle (NEDC), highway cruising, urban congestion, alternating hot and cold weather, hill start-stop, and weak / outage / switching network conditions. Each driving cycle corresponds to different power states (e.g., power start-stop, sleep / wake-up, low-voltage power-off), driving states (e.g., standard driving cycles like NEDC / WLTC), and network states (weak network signal, outage, network switching). Driving cycles can be predefined using templates or customized by the user.
[0045] Specific operating condition nodes refer to pre-set time points or state conditions used to trigger OTA stress testing during cyclic operating conditions. Examples include the third time a vehicle idles in urban conditions or after 30 minutes of continuous driving on highways. The purpose of selecting specific nodes is to verify the reliability of OTA upgrades under different dynamic environments.
[0046] OTA stress testing involves stress testing the OTA upgrade process. By repeatedly and continuously executing upgrade operations, it verifies the stability and reliability of the vehicle under high-frequency and multi-condition conditions. OTA stress testing typically covers various upgrade scenarios, such as full upgrades, differential upgrades, and version rollbacks (downgrading from a higher version to a lower version / upgrading from a lower version to a higher version).
[0047] For example, the control terminal sends structured test task instructions to the vehicle terminal via an OTA server interface using remote communication methods (such as 4G / 5G cellular networks or Wi-Fi). The test task explicitly specifies the type of cyclic operating conditions to be loaded (such as urban, highway, and comprehensive), as well as the specific operating condition nodes for performing OTA stress testing under each operating condition. After receiving the task, the vehicle terminal automatically loads the corresponding cyclic operating conditions according to the instructions (which can be achieved through bench simulation or actual vehicle operation), and automatically triggers the OTA stress testing process when it reaches the preset specific operating condition node, including the complete chain of requesting the upgrade package from the task terminal, downloading, verifying, flashing, and restarting.
[0048] S202. Obtain the set of test logs reported by the vehicle terminal.
[0049] During OTA stress testing, various vehicle subsystems generate massive amounts of operational data, including the overall vehicle status, details of the OTA upgrade process, and underlying response information of each ECU. Without a systematic log collection mechanism, testers would need to manually review each log entry, which is not only time-consuming and labor-intensive but also highly dependent on personal experience, subjective, and prone to overlooking crucial anomalies. Therefore, this step automatically collects and reports multi-dimensional test logs through the onboard terminal, achieving fully automated end-to-end data collection and providing a sufficient and standardized data foundation for subsequent anomaly detection, fault location, and performance evaluation.
[0050] The test logs include at least one of the following: vehicle status log, OTA stress test log, and ECU log. The vehicle status log records data on the overall operating status of the vehicle, including but not limited to vehicle speed, engine / motor speed, battery voltage / charge, vehicle temperature, network signal strength, and power status (power-on / power-off / sleep). These logs reflect the external environmental conditions the vehicle was in during the OTA stress test and are crucial for determining whether anomalies are related to specific operating conditions.
[0051] OTA stress test logs record data on the operational status of each stage of the OTA upgrade process, including but not limited to upgrade package download progress, download speed, digital signature verification results, flashing progress, flashing response status of each ECU, upgrade success / failure results, and upgrade time. These logs are core data for determining whether the OTA upgrade process is executing normally. ECU logs record data on the underlying operational status of each electronic control unit in the vehicle during the OTA stress test, including but not limited to the ECU's software version number, diagnostic response codes, communication bus message status, data interaction records during flashing, and ECU restart status. ECU logs can delve into the microscopic level of individual controllers, helping to pinpoint which specific ECU encountered a problem during the upgrade process.
[0052] For example, during OTA stress testing, the vehicle-mounted terminal records vehicle status logs, OTA stress test logs, and ECU logs in real time. Log collection can be achieved in several ways: vehicle status logs can be monitored and signals acquired via the vehicle bus; OTA stress test logs can be obtained through interfaces built into the vehicle-mounted terminal; and ECU logs can be read from each ECU. The collected log data is stored in the vehicle-mounted terminal's circular buffer and reported to the control terminal via a mobile communication network. The control terminal receives and stores the test log sets from one or more vehicle-mounted terminals, forming a complete dataset that can be used for subsequent analysis.
[0053] Based on the implementation methods of S201-S202 described above, test tasks are remotely issued from the control terminal to the vehicle terminal, realizing the automation and remoteness of the testing process. This eliminates the need for on-site manual operation, significantly improving testing efficiency and reducing labor costs. The test tasks instruct the vehicle terminal to load at least one cyclic operating condition and execute OTA stress testing at specific operating condition nodes. This allows OTA upgrade testing to move beyond static ideal environments and be precisely triggered and executed under various dynamic operating conditions encountered by the vehicle in actual operation. This effectively covers potential problems that may arise from the coupling of operating conditions and OTA upgrades in real-world vehicle scenarios, significantly improving the comprehensiveness and reliability of the test. The control terminal acquires a set of test logs reported by the vehicle terminal, including at least one of the following: vehicle status log, OTA stress test log, and ECU log. This enables multi-dimensional collection of OTA stress test operation data across the entire chain, allowing for a complete reconstruction of vehicle behavior during the test from three levels: overall vehicle status, the OTA upgrade process itself, and the underlying electronic control unit. This provides a sufficient and rich data foundation for subsequent anomaly detection, fault location, and performance evaluation.
[0054] In one implementation, the above method further includes S203-S204: S203. Based on the preset rule engine, determine the target test log from the test log set.
[0055] During OTA stress testing, the vehicle terminal reports massive amounts of test logs, including vehicle status logs, OTA stress test logs, and ECU logs. The data volume is enormous and the information density is uneven. If testers manually check each log individually, it is not only time-consuming and labor-intensive, but also highly dependent on personal experience, subjective, and prone to missing crucial anomalies. By using a pre-defined rule engine to automatically filter the log set, the target test logs representing anomalies can be accurately located from the massive data. This reduces the workload of manual analysis from a full-scale check to a focused analysis of anomalies, significantly improving the efficiency and accuracy of anomaly detection while eliminating subjective biases in human judgment.
[0056] A rule engine refers to a set of preset, programmable logical judgment rules used for automated matching and filtering of log data. The rule engine defines various anomaly criteria, such as OTA upgrade failure status codes, ECU diagnostic fault codes (DTCs), write timeouts, communication bus abnormal messages, and upgrade time exceeding thresholds. When a log entry matches any one or more anomaly rules in the rule engine, it is marked as a target test log. Table 1 is a fault comparison table provided in an embodiment of this application.
[0057] Table 1
[0058] The target test logs refer to the log records that have been identified as abnormal after being filtered by the rule engine. It is not the full log, but a key subset of data extracted from the test log set that is directly related to potential failures. It serves as the direct input for subsequent anomaly classification and root cause analysis.
[0059] For example, after receiving the test log set reported by the vehicle terminal, the control terminal inputs it into a preset rule engine. The rule engine scans the log data one by one or in batches according to pre-configured anomaly matching rules. For example, the rule engine can check whether there are upgrade failure status codes (such as verification failure, flashing timeout, etc.) in the OTA stress test logs, whether there are abnormal diagnostic fault codes (DTC) in the ECU logs, and whether there are abnormal signals such as voltage drop or communication interruption in the vehicle status logs. When a log matches any anomaly rule in the rule engine, the log is marked as a target test log and enters the next anomaly classification process. The rules of the rule engine can be flexibly configured and continuously iterated by test engineers based on vehicle characteristics and historical fault experience to adapt to the needs of different test scenarios.
[0060] S204. Extract the test parameters from the target test log and determine the anomaly type based on the preset parameter baseline.
[0061] Identifying anomalies is insufficient; further identification of their specific types is necessary. Anomalies encountered during OTA load testing are not all of the same type. Some anomalies occur sporadically at specific times and resolve themselves in the next test round, classifying them as transient anomalies. Others, however, show a continuous worsening trend with each test round, classifying them as degradation anomalies. The nature, causes, and handling strategies for these two types of anomalies are drastically different: transient anomalies may be caused by occasional factors such as network fluctuations or electromagnetic interference, usually requiring no immediate attention; while degradation anomalies suggest deeper system problems such as memory leaks, resource exhaustion, or hardware aging, requiring timely remediation. Without refined anomaly classification, testers may ignore severe degradation issues as occasional faults or overreact to transient anomalies, wasting troubleshooting resources. By introducing parameter baselines and multi-round comparative analysis, accurate anomaly type classification is achieved, providing a scientific basis for subsequent fault handling decisions.
[0062] Test parameters refer to specific numerical indicators extracted from the target test logs that can quantify system behavior. Examples include OTA upgrade time, upgrade package download speed, ECU flashing response time, battery voltage fluctuation, CPU utilization, and memory usage. A parameter baseline refers to a pre-defined reference standard value or range for a specific test parameter; one parameter corresponds to one parameter baseline. Parameter baselines are not globally uniform but are closely related to three dimensions: vehicle model (different models have different hardware configurations and software architectures), ECU type (cockpit domain controllers, powertrain domain controllers, body domain controllers, etc., each have different performance characteristics), and cyclic operating conditions (different load conditions under urban, highway, and combined operating conditions). Baselines can be constructed using multiple rounds of valid historical stress test data.
[0063] For example, the control unit extracts the test parameters to be analyzed (such as OTA upgrade time, ECU response time, etc.) from the target test log, and then finds the corresponding parameter baseline. The parameter baseline search process comprehensively considers three dimensions: the model of the vehicle under test, the type of ECU involved, and the current cyclic operating condition, and matches the most accurate reference value from the pre-stored baseline database. Subsequently, the actual value of the test parameter is compared with the parameter baseline, and the difference between the two is calculated. Based on this, anomaly classification is performed by combining the changing trend of the parameter in adjacent OTA stress test cycles: if the difference exceeds the threshold in a certain cycle but returns to normal in adjacent cycles, it is judged as a transient anomaly; if the difference continues to rise with the increase of stress test cycles, it is judged as a degradation anomaly. Through this method combining parameter baseline and multi-cycle trend analysis, the system can automatically, objectively, and accurately complete anomaly classification, providing a reliable basis for subsequent test report generation and fault handling.
[0064] Based on the implementation methods of S203-S204 described above, test logs are automatically filtered and abnormal logs are located through a preset rule engine. This reduces the need for full manual inspection to targeted analysis, significantly improving detection efficiency and eliminating the risk of omissions caused by subjective human judgment. Furthermore, by extracting parameters and comparing them with baseline parameters of related vehicle models, ECU types, and cyclic operating conditions, refined adaptation of anomaly judgment standards is achieved, effectively avoiding misjudgments and omissions caused by uniform thresholds. Moreover, distinguishing between transient anomalies caused by occasional factors and deterioration anomalies that indicate cumulative system defects provides a scientific basis for fault handling. This prevents serious deterioration problems from being ignored and avoids overreacting to transient anomalies, significantly improving the depth and reliability of OTA stress testing.
[0065] In one implementation, the test task includes OTA load testing rounds, with each execution of the test task corresponding to one OTA load testing round. The above S204 can be implemented through S2041-S2043: S2041. Extract the target test parameters from the target test log.
[0066] The target test log may contain various types of test parameters, such as OTA upgrade time, download speed, ECU response time, CPU utilization, and memory usage. Different parameters reflect different dimensions of the system's operating status. They need to be extracted one by one and compared with the corresponding parameter baselines in order to comprehensively evaluate the health status of each level of the system during the OTA stress test.
[0067] The target test parameter refers to any quantifiable test metric extracted from the target test log. "Any one" means that the method is not limited to the analysis of a single parameter, but can perform subsequent anomaly judgment processes for each parameter in the log separately, achieving multi-dimensional and comprehensive anomaly detection.
[0068] For example, the control unit parses the target test logs and extracts values one by one according to predefined parameter types. For instance, it extracts upgrade time and download speed from OTA stress test logs; it extracts flashing response time and diagnostic response codes from ECU logs; and it extracts battery voltage and CPU utilization from vehicle status logs. Each time a parameter is extracted, the system proceeds to the subsequent anomaly detection process.
[0069] S2042. If the difference between the value of the target test parameter and the value of the parameter baseline is greater than the abnormal threshold, and the difference is not greater than the abnormal threshold in adjacent OTA stress test rounds, then the abnormality type is determined to be an instantaneous abnormality.
[0070] S2043. If the difference is not greater than the abnormal threshold and the difference increases with the number of OTA stress test rounds, then the abnormality type is determined to be a degradation abnormality.
[0071] After identifying anomalous parameters, it is necessary to further determine the nature of the anomaly. Different types of anomalies correspond to different handling priorities: transient anomalies are usually caused by occasional factors and the system can recover on its own, so they have a lower priority; degradation anomalies, on the other hand, indicate cumulative defects and may lead to system collapse if not handled in time, so they have a higher priority. If anomalies are judged based solely on a single deviation, occasional fluctuations may be falsely reported as serious problems; if only the magnitude of a single deviation is considered while ignoring trend changes, slowly deteriorating degradation problems may be missed. By introducing statistical methods to determine anomaly thresholds and combining this with multiple rounds of trend analysis, accurate classification of the nature of anomalies can be achieved.
[0072] Each execution of a test task corresponds to one OTA load test round. This multi-round design allows the system to observe the changing trends of parameters over time, rather than relying solely on a single snapshot for judgment.
[0073] The anomaly threshold is a critical value used to determine whether a test parameter deviates from the normal range. This threshold is not a fixed, manually set value, but rather dynamically calculated based on statistical methods, specifically using one of the following two algorithms: The 3σ criterion assumes that the parameters follow a normal distribution. Centered on the mean, the range exceeding the mean ± 3 standard deviations is defined as the outlier interval. This method is suitable for scenarios with relatively symmetrical data distributions.
[0074] Median Absolute Deviation (MAD) algorithm: This algorithm measures dispersion using the median as the center and the median absolute deviation as the scale. Compared to the 3σ criterion, MAD is more robust to outliers and is suitable for scenarios where data contains extreme values or is not normally distributed.
[0075] For each target test parameter, the control unit first finds its corresponding baseline value and calculates the difference between the actual value of the test parameter in the current round and the baseline. Then, two parallel judgments are performed: First, it checks whether the difference in the current round is greater than the anomaly threshold, and simultaneously checks whether the differences in adjacent rounds are all less than the anomaly threshold; if these conditions are met, it is judged as a transient anomaly. Second, it checks whether the difference in the current round is less than the anomaly threshold, and simultaneously checks whether the difference shows an increasing trend with each round; if these conditions are met, it is judged as a degradation anomaly. The anomaly threshold is automatically calculated by the system based on historical data using the 3σ criterion or the MAD algorithm, requiring no manual setting and ensuring the objectivity and statistical rationality of the threshold setting.
[0076] Figure 3 This is a flowchart illustrating an anomaly analysis provided in an embodiment of this application. This flowchart can be used as an implementation of the above-described S2041-S2043, such as... Figure 3 As shown: The target test logs are input into the rule engine for initial evaluation. The rule engine constructs a rule base, and the target test logs, after being filtered by the rule engine, are further filtered based on parameter baselines. The parameter baselines are determined based on a historical baseline distribution library. The historical baseline distribution library is a structured database. The parameter baselines in the library are obtained based on the analysis of historical stress test data and represent the standard parameters corresponding to various test parameters. The parameter baselines in the historical baseline distribution library can be organized and stored according to three dimensions: vehicle model, ECU type, and cycle operating conditions. The parameter baselines include, but are not limited to, OTA upgrade time, upgrade package download rate, ECU flashing response time, battery voltage fluctuation range, processor utilization, and memory utilization. For each parameter, the library can store its statistical distribution characteristics, such as mean, standard deviation, and median.
[0077] Based on the implementation methods of S2041-S2043 above, the abnormal threshold is automatically calculated by introducing the 3σ criterion or the median absolute deviation algorithm, replacing the method of manually setting a fixed threshold based on experience. This allows the threshold to be adaptively adjusted according to the data distribution characteristics, significantly improving the objectivity and accuracy of abnormality judgment. By combining multi-round trend analysis to distinguish between instantaneous abnormalities and deterioration abnormalities, false alarms caused by single deviations and missed alarms due to the neglect of trend deterioration are avoided. This achieves accurate classification of sporadic faults and cumulative defects, providing a reliable basis for subsequent fault handling priority ranking.
[0078] In one implementation, the method further includes S205-S206: S205. Generate a test report based on the target test log and exception type.
[0079] After OTA load testing, testers need to manually collect data and write test reports, which is not only time-consuming and labor-intensive, but also results in inconsistent report formats and data dimensions, making it difficult to make intuitive horizontal comparisons of test results from different vehicle models, versions, or operating conditions. By automatically integrating target test logs and anomaly types into structured test reports, the standardization and automation of report output are achieved, eliminating the efficiency bottlenecks and format inconsistencies caused by manual data processing.
[0080] A test report is a structured document automatically generated in a standardized format, which includes at least the following core contents: basic information of the vehicle under test (vehicle model, vehicle identification number, etc.), the type of cyclic operating condition executed, OTA stress test round information, key data summary of the target test log, specific values of abnormal parameters and their deviation from the parameter baseline, anomaly type (transient anomaly or degradation anomaly), and the time point and operating condition context of the anomaly occurrence.
[0081] For example, after determining the anomaly type, the control unit automatically integrates key data from the target test log (such as anomaly parameter name, actual value, parameter baseline value, and deviation) with the anomaly type (transient anomaly or degradation anomaly) in a structured manner, and generates a test report according to a predefined report template. The report also includes contextual information such as the cycle in which the anomaly occurred, the operating condition type, and the ECU type, enabling testers to quickly understand the complete background of the anomaly.
[0082] S206. When there are multiple test reports for different vehicle terminals, generate comparative data based on the multiple test reports.
[0083] In actual testing, it is often necessary to simultaneously perform the same OTA stress test on multiple vehicles with different configurations (such as different models, different ECU hardware versions, and different software versions) to evaluate the universality and compatibility of the upgrade solution. If the test results of each vehicle are scattered in separate reports, testers need to review and manually compare them one by one, which is extremely inefficient and prone to overlooking differences. By automatically aggregating multiple test reports and generating comparative data, testers can clearly identify the performance differences and anomaly distribution patterns between different vehicle terminals, and quickly locate common and unique problems of specific models or ECUs.
[0084] Comparative data refers to comprehensive analytical data generated by horizontally summarizing multiple test reports for different vehicle-mounted terminals. Comparative data may include, but is not limited to: statistics on the number of anomalies for each vehicle-mounted terminal, distribution of anomaly types (ratio of instantaneous anomalies to degradation anomalies), comparison of deviations of various test parameters between different terminals, and ranking of anomaly rates for each terminal under specific operating conditions.
[0085] For example, once the control unit accumulates multiple test reports from different vehicle-mounted terminals, it automatically performs horizontal aggregation and statistical analysis on the key indicators in the reports. For instance, it compares and ranks the deviation values of the same test parameter from each terminal under the same cyclic operating condition, generating bar charts or trend graphs; it statistically analyzes the number and type distribution of anomalies for each terminal, generating an anomaly rate ranking table; and it identifies common problems that repeatedly occur on multiple terminals, as well as unique problems on individual terminals. Finally, the comparative data is output in the form of visual charts or structured tables for testers to make quick decisions.
[0086] Based on the implementation methods of S205-S206 described above, by automatically integrating target test logs and anomaly types into standardized test reports, the automation and format unification of report output are achieved, eliminating the efficiency bottleneck and format inconsistency problems caused by manual data processing. On this basis, by automatically summarizing and comparing multiple test reports from different vehicle terminals, testers can quickly discover performance differences and anomaly distribution patterns between different vehicle models and different ECUs, accurately locate common and individual problems, and significantly improve the analysis efficiency and decision-making quality in multi-vehicle parallel testing scenarios.
[0087] Figure 4 This is a flowchart illustrating a testing method provided in an embodiment of this application. Figure 4 As shown, the testing method provided in this application can be implemented through the above-mentioned vehicle terminal, specifically including S401~S403.
[0088] S401. Obtain the test task issued by the control terminal.
[0089] For the same reasons as in the above embodiments, by receiving test tasks remotely issued by the control terminal through the vehicle terminal, the vehicle terminal is transformed from a passive tool into an intelligent execution node with task awareness capabilities, laying the foundation for subsequent automated testing processes.
[0090] The vehicle-mounted terminal establishes a communication connection with the control terminal through an onboard communication module (such as a 4G / 5G cellular network or Wi-Fi), and listens for and receives test task instructions issued by the control terminal. The vehicle-mounted terminal parses and verifies the received task instructions, and after confirming that the task content is complete and executable, it proceeds to the next step of the working condition loading and stress test execution process.
[0091] In real-world testing scenarios, the control unit may simultaneously issue multiple test tasks to the same in-vehicle terminal. These tasks may correspond to different cyclic operating conditions, different OTA upgrade versions, or different test objectives. If tasks are executed sequentially based on their arrival order, high-priority urgent test tasks may be placed after low-priority tasks, delaying the verification of critical issues. For example, when an urgent OTA rollback requirement arises for a particular vehicle model, the corresponding load testing task should be executed before the load testing tasks for regular version iterations. Therefore, in one implementation, the method includes S501-S502 before S402: S501. When multiple test tasks are received from the control terminal, the execution order of the multiple test tasks is determined based on the priority of each test task.
[0092] Test priority is a priority identifier attached by the control terminal when issuing test tasks, used to characterize the urgency or importance of the task. Priority can be comprehensively evaluated by the control terminal based on factors such as the type of test task (e.g., emergency rollback verification, first test of a new version, regression testing, etc.) and the market urgency of the associated vehicle model. Execution order refers to the queuing order of multiple test tasks on the vehicle terminal, determined by the order of priority from highest to lowest.
[0093] For example, after receiving multiple test tasks from the control terminal, the vehicle terminal parses the priority identifier carried in each task, sorts all tasks according to priority from high to low, and generates an execution queue. The highest priority task is placed at the beginning of the queue, and the lowest priority task is placed at the end.
[0094] S502. If the number of test tasks exceeds the preset number, send a queue blocking alarm to the control terminal.
[0095] Vehicle-mounted terminals have limited computing resources, storage space, and communication bandwidth. When the number of test tasks to be executed is too large, it may lead to task queue backlog and intensified resource contention, thereby affecting the execution quality and data accuracy of load testing. If the control end is not notified in a timely manner, it may continue to issue new tasks, further exacerbating resource constraints. By setting a preset number threshold and introducing a queue blocking alarm mechanism, the vehicle-mounted terminal can proactively report to the control end when tasks are backlogged, triggering task scheduling optimization on the control end (such as pausing the issuance of new tasks, diverting some tasks to other idle vehicle-mounted terminals, etc.), thus avoiding overload of a single terminal.
[0096] For example, after receiving a new test task or completing a task, the vehicle terminal checks the length of the current queue of tasks to be executed. If the queue length exceeds a preset threshold, the vehicle terminal sends a queue blocking alarm message to the control terminal through the communication module. The message may carry information such as the current queue length and the priority of each task, so that the control terminal can make subsequent scheduling decisions.
[0097] S402. Based on the test task, load at least one cyclic operating condition and perform OTA stress test on a specific operating condition node in each cyclic operating condition.
[0098] By automatically loading various cyclic operating conditions according to the test task through the vehicle terminal, and triggering OTA stress test at preset specific operating condition nodes, the OTA upgrade function is fully verified in dynamic real-world scenarios, which significantly improves the test scenario coverage and defect detection rate.
[0099] For example, after parsing the test task, the vehicle-mounted terminal automatically loads the specified cyclic operating conditions (which can be implemented through bench simulation or actual vehicle operation). During the operation of the operating conditions, the current status is continuously monitored. When a preset specific operating condition node is reached, the OTA stress test process is automatically triggered, including the complete chain of requesting the upgrade package from the OTA cloud, downloading, verifying, flashing, and restarting. The test task can specify multiple cyclic operating conditions, which are executed sequentially or alternately by the vehicle-mounted terminal to ensure that the OTA upgrade under each operating condition is fully verified.
[0100] In one implementation, OTA stress testing includes full upgrade, differential upgrade, and firmware rollback; during the execution of S402, the method also includes S601: S601. The OTA stress test process is checked based on preset check items. If the OTA stress test process does not meet the check items, the OTA stress test is terminated.
[0101] OTA upgrades are not limited to full installations in practical applications. Full upgrades are suitable for major version upgrades or scenarios where differential packages cannot cover the changes. Differential upgrades are suitable for minor version iterations to save bandwidth and time. Firmware rollbacks are used for emergency recovery after upgrade failures. The execution process, resource consumption, and risk levels of these three upgrade methods differ, and their potential failure modes also vary significantly. Testing only one method cannot fully cover all scenarios that OTA upgrades may encounter in actual operation. By including all three upgrade methods in the OTA stress testing scope, the stability and reliability of the vehicle terminal under various upgrade strategies are fully verified.
[0102] Furthermore, OTA stress testing is a process involving multiple consecutive steps (such as downloading, verification, flashing, rebooting, and self-testing). If a significant anomaly occurs at any stage (such as flashing verification failure, ECU communication interruption, or abnormal voltage), continuing to execute subsequent stages will not only fail to obtain valid test data but may also cause irreversible damage to the vehicle terminal. For example, flashing incorrect firmware may cause the ECU to crash, or continuing to flash under low voltage conditions may lead to data corruption. By setting checkpoints for real-time monitoring during the stress testing process, the stress testing is immediately terminated upon detection of an anomaly, acting as a safety circuit breaker. This protects the hardware security of the vehicle terminal and avoids wasting resources through ineffective testing. In addition, the vehicle terminal can also verify the downloaded upgrade package by checking its SHA-256 hash value (in conjunction with routine OTA verification work), refusing to execute tasks for invalid packages.
[0103] The check items refer to a pre-defined set of process check conditions used to verify the system status in real time at various key stages of OTA stress testing. Check items may include, but are not limited to: whether the upgrade package integrity check passes, whether ECU communication is normal, whether the battery voltage meets the minimum flashing requirements, whether flashing timeout is triggered, whether the self-test after reboot passes, and regulatory checks such as ISO26262 and UNECER155 / R156, ensuring that the stress testing process and upgrade results comply with functional safety and cybersecurity standards.
[0104] During OTA stress testing, the vehicle terminal performs full upgrades, differential upgrades, and firmware rollbacks according to the upgrade type specified in the test task. Each upgrade method is triggered at specific nodes in each cycle to verify the performance of different upgrade strategies in dynamic real-world scenarios. During OTA stress testing, the vehicle terminal automatically performs corresponding checks at each preset checkpoint. For example, after downloading, it checks if the integrity checksum of the upgrade package matches; before flashing, it checks if the battery voltage is above a safety threshold; after flashing, it checks if the ECU returns a correct flashing confirmation response; and after restarting, it checks if the ECU self-test passes. If any check fails, the vehicle terminal immediately terminates the current OTA stress test process and reports the termination reason and current status information to the control terminal, facilitating subsequent fault analysis and handling decisions.
[0105] Based on the aforementioned S601 implementation, this solution incorporates all three upgrade methods—full upgrade, differential upgrade, and firmware rollback—into the OTA stress test scope, achieving comprehensive verification of the entire OTA upgrade strategy and avoiding scenario omissions caused by testing only a single upgrade method. By setting up check items for real-time process monitoring during stress testing, the stress test is immediately terminated upon detection of any anomalies, effectively preventing the spread of anomalies and causing irreversible damage to the vehicle terminal. At the same time, it avoids the waste of computing resources and time due to invalid testing, ensuring the safety of the stress testing process and the validity of the test data.
[0106] In one implementation, when there are multiple test tasks to be executed, S402 can be implemented through S4021-S4022: S4021. Determine the target test task from multiple test tasks.
[0107] The target test task is the highest priority task in the current queue that has not yet been executed. After the vehicle terminal completes a task, it automatically selects the highest priority unexecuted task from the remaining tasks as the next target test task.
[0108] For example, the vehicle terminal selects the first task (i.e., the highest priority unexecuted task) from the sorted task execution queue as the target test task. Then, according to the cyclic operating condition type and specific operating condition node specified in the target test task, it automatically loads the corresponding cyclic operating condition and performs OTA stress testing when the preset node is reached. After the current target test task is completed, the vehicle terminal automatically removes the task from the queue and selects the next highest priority unexecuted task to continue execution until the queue is empty.
[0109] S4022. Based on the target test task, load at least one cyclic operating condition specified by the target test task and perform over-the-air (OTA) stress test on a specific operating condition node in each cyclic operating condition.
[0110] The vehicle-mounted terminal selects the first task (the highest priority unexecuted task) from the sorted task execution queue as the target test task. Then, according to the specified cyclic operating condition type and specific operating condition node in the target test task, it automatically loads the corresponding cyclic operating condition and executes OTA stress testing when the preset node is reached. After the current target test task is completed, the vehicle-mounted terminal automatically removes the task from the queue and selects the next highest priority unexecuted task to continue execution until the queue is empty.
[0111] By introducing a test priority mechanism, the vehicle terminal can rationally arrange the execution order according to the importance of the tasks, ensuring that urgent or critical test tasks are responded to first, and avoiding the blocking of high-priority tasks by low-priority tasks. By setting a task queue length threshold and introducing a queue blocking alarm mechanism, the vehicle terminal can proactively notify the control end when tasks are backlogged, triggering task scheduling optimization or diversion, effectively preventing the test quality degradation caused by task overload of a single terminal. By selecting only the highest priority unexecuted task for execution each time, the clarity of execution logic and the orderly use of resources in multi-task scenarios are ensured, avoiding resource conflicts and result chaos caused by multi-task parallelism.
[0112] S403. Report the test log collection to the control terminal and store the logs in the circular buffer of the vehicle terminal.
[0113] During OTA stress testing, various vehicle subsystems generate massive amounts of operational data. Relying solely on remote data retrieval from the control terminal can lead to data loss during network instability or disconnections; conversely, relying solely on local storage on the in-vehicle terminal is limited by space constraints. A dual mechanism of reporting and local caching is employed: on the one hand, real-time reporting ensures the control terminal can promptly obtain data for analysis and decision-making; on the other hand, a circular buffer retains the latest log data locally on the in-vehicle terminal, preventing permanent data loss even during network interruptions and ensuring the integrity and reliability of test data. The circular buffer is a fixed-size, circular overwrite storage structure. When the buffer is full, newly written data automatically overwrites the oldest data, ensuring that the latest log records are always retained within the limited in-vehicle storage space, preventing storage overflow and system anomalies.
[0114] The test log set includes at least one of the following: vehicle status logs, OTA stress test logs, and electronic control unit (ECU) logs. A circular buffer, also called a circular buffer, is a data structure that efficiently stores the latest test logs within limited storage space. On the vehicle terminal, a fixed-size storage space is pre-allocated as a circular buffer.
[0115] Logs generated during OTA stress testing (such as vehicle status and ECU logs) are continuously written to this buffer. When this storage space is full, new log data will not cause errors; instead, it will automatically overwrite the oldest logs. For troubleshooting, the most recent logs before and after the anomaly occurred are the most valuable. The circular buffer ensures that it stores logs from the most recent period by automatically overwriting old data, preventing the loss of critical information due to the storage space being filled with outdated and irrelevant logs. Furthermore, since the buffer size is fixed, the storage space it occupies is also constant. This effectively prevents the storage resources of the vehicle terminal from being exhausted due to the infinite growth of logs, avoiding the risk of system instability or even crash.
[0116] For example, during OTA stress testing, the vehicle terminal collects vehicle status logs, OTA stress test logs, and ECU logs in real time. Log collection can be achieved through message monitoring and signal acquisition via the vehicle bus, or by reading data from each ECU via the UDS diagnostic protocol or the DoIP protocol. The collected log data is simultaneously reported to the control terminal in real time via the mobile communication network and written to a local circular buffer on the vehicle terminal. When the buffer is full, new data automatically overwrites the oldest data, ensuring that the latest logs are always retained and traceable.
[0117] Figure 5 This is a schematic diagram of a log collection process provided in an embodiment of this application, such as... Figure 5As shown, Android / Linux system logs, including application crashes, unresponsiveness, and fatal system errors, are obtained through Android Debug Bridge (ADB) / Secure Shell (SSH) protocol; application layer logs, including business exception stack traces, are extracted through Logact / Journald service; CAN bus signals, including vehicle speed, torque, and battery voltage, are recorded through Controller Area Network (CAN) tool; OTA upgrade logs, including download progress, flashing status, and signature verification results, are obtained through T-BOX logs; and diagnostic messages, including fault code changes, are obtained through Unified Diagnostic Services (UDS).
[0118] The logs are timestamped using Network Time Protocol (NTP) and bound with condition tags. They are then stored in a circular buffer. Within the circular buffer, a decision is made regarding whether to continue caching the logs. If so, the logs are stored and reported to the control unit; otherwise, redundant logs are discarded. The condition tag can be understood as identifying the current test log. In autonomous driving and vehicle testing, the same code or parameter (such as braking response time) has completely different standards in different driving scenarios. To ensure that the subsequent rule engine and historical baseline distribution library can accurately analyze these logs, it is necessary to clearly define the environment in which the log was generated. This environment description is the condition tag. For example, the condition tag can include one or more pieces of information: environmental information (such as weather, lighting, road conditions, etc.), vehicle status (such as vehicle speed, steering wheel angle, vehicle load, etc.), road type (such as urban roads, highways, rural roads, etc.), and perception conditions (such as whether the camera is obstructed, image quality, etc.).
[0119] Specifically, the decision to continue caching can be based on the log caching time, i.e., discarding the earliest stored logs and retaining the latest stored logs. In one implementation, the vehicle terminal can also perform a coarse inspection of the logs to preliminarily identify logs that may be abnormal, automatically extract logs within a preset time window (e.g., 5 minutes before and after the abnormality) and add timestamps and operating condition tags, then upload them to the control terminal.
[0120] In another implementation, log collection can be achieved by using an external log acquisition device to monitor the vehicle's CAN bus and Ethernet signals, without consuming the original vehicle ECU's computing power. This avoids the log collection process affecting the operation of the vehicle's original functions and is suitable for high-load ECU testing scenarios.
[0121] Based on the implementation methods of S401-S403 described above, the vehicle terminal automatically acquires test tasks and loads various cyclic operating conditions according to instructions, and automatically executes OTA stress tests at specific operating condition nodes. This achieves unattended and fully automated operation of the testing process, eliminating the inefficient mode of traditional manual triggering of upgrades and manual driving conditions, and significantly improving testing efficiency and stress test frequency. At the same time, through the dual data protection mechanism of "real-time reporting + local caching of the circular buffer", it ensures that the control end can obtain test data in a timely manner for online analysis, and also ensures the integrity of the data in abnormal situations such as network interruption, providing a reliable data foundation for subsequent full-link anomaly detection and fault location.
[0122] The testing methods provided in the embodiments of this application will be described below in conjunction with practical applications. Figure 6 A schematic diagram of an OTA stress test timing process provided in an embodiment of this application is shown below. Figure 6 As shown, it includes: S1. The control terminal issues test tasks.
[0123] The control unit sends the test task to the task scheduling module of the vehicle terminal, instructing the vehicle terminal to execute cyclic operating conditions and perform OTA stress testing at specific operating condition nodes.
[0124] S2. The vehicle-mounted terminal responds to the test task and executes the cyclic operating condition.
[0125] The on-board terminal's operating condition execution module executes the cyclic operating conditions specified in the task package.
[0126] S3. When a specific operating condition node is reached, the vehicle terminal triggers an OTA request.
[0127] When the execution module reaches a specific working condition node in the cyclic working condition, it sends an OTA request to the task scheduling module, requesting the download of the OTA upgrade package to the task terminal.
[0128] S4. The task scheduling module of the vehicle terminal requests an OTA upgrade package.
[0129] The task scheduling module sends a request to the task client to download the OTA upgrade package for OTA stress testing.
[0130] S5, the task terminal returns the OTA upgrade package.
[0131] The task server receives the request and returns an OTA upgrade package.
[0132] S6. Vehicle terminal execution log collection.
[0133] During the process of the task scheduling module downloading the OTA upgrade package, the log collection module of the vehicle terminal collects logs from multiple components of the vehicle.
[0134] S7, the vehicle terminal provides real-time update status feedback.
[0135] The onboard terminal's task scheduling module will provide real-time upgrade status feedback to the control terminal, including upgrade progress and download speed.
[0136] S8, vehicle terminal uploads logs.
[0137] The log collection module of the vehicle terminal will align all the logs collected after the upgrade with timestamps to form a log collection and upload it to the control terminal.
[0138] This application embodiment can divide the following device into functional modules based on the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0139] In some embodiments, this application also provides a testing apparatus. The apparatus may include one or more functional modules for implementing the methods described in the above embodiments. For example, Figure 7 This is a schematic diagram of the structure of a testing device 700 provided in an embodiment of this application. Figure 7 As shown, the testing apparatus 700 includes: The sending module 710 is used to send test tasks to the vehicle terminal; the test tasks are used to instruct the vehicle terminal to load at least one cyclic operating condition and to perform over-the-air (OTA) stress testing at specific operating condition nodes in each cyclic operating condition. The acquisition module 720 is used to acquire the set of test logs reported by the vehicle terminal; the test logs include at least one of the following: vehicle status log, OTA stress test log, and electronic control unit (ECU) log.
[0140] In one implementation, the testing device 700 further includes a determination module 730, which is used to determine a target test log from the test log set based on a preset rule engine; the target test log represents the test log that has an anomaly; extract test parameters from the target test log, and determine the anomaly type based on a preset parameter baseline; wherein, one test parameter corresponds to one parameter baseline, the parameter baseline is related to the vehicle model, ECU type and cyclic operating conditions, and the anomaly type includes transient anomaly and degradation anomaly.
[0141] In one implementation, the determination module 730 is further used to extract target test parameters from the target test log; the target test parameter is any test parameter in the target test log; if the difference between the value of the target test parameter and the value of the parameter baseline is greater than the abnormal threshold, and the difference is not greater than the abnormal threshold in adjacent OTA stress test rounds, then the abnormality type is determined to be an instantaneous abnormality; the abnormal threshold is determined based on the 3σ criterion or the median absolute deviation algorithm; if the difference is not greater than the abnormal threshold, and the difference increases with the increase of OTA stress test rounds, then the abnormality type is determined to be a degradation abnormality.
[0142] In one implementation, the determination module 730 is also used to generate test reports based on target test logs and exception types; when there are multiple test reports for different vehicle terminals, comparative data is generated based on the multiple test reports.
[0143] In some embodiments, this application also provides a testing apparatus. The apparatus may include one or more functional modules for implementing the methods described in the above embodiments. For example, Figure 8 This is a schematic diagram of another testing device 800 provided in an embodiment of this application. Figure 8 As shown, it includes: The task scheduling module 810 is used to obtain test tasks issued by the control terminal; The working condition execution module 820 is used to load at least one cyclic working condition based on the test task and perform OTA stress test on a specific working condition node in each cyclic working condition stress test. The log acquisition module 830 is used to report the test log set to the control terminal and store the logs in the circular buffer of the vehicle terminal; the test log set includes at least one of the vehicle status log, OTA stress test log and electronic control unit (ECU) log.
[0144] In some embodiments, the test task includes a test priority; based on the test task, the task scheduling module 810 is further configured to, when multiple test tasks are received from the control terminal, determine the execution order of the multiple test tasks based on the priority corresponding to each test task; if the number of test tasks is greater than a preset number, send a queue blocking alarm to the control terminal; determine the target test task from the multiple test tasks; the target test task represents the highest priority unexecuted task. The working condition execution module 820 is further configured to, based on the target test task, load at least one cyclic working condition specified by the target test task and perform over-the-air (OTA) stress testing on a specific working condition node in each cyclic working condition.
[0145] In some embodiments, OTA stress testing includes full upgrade, differential upgrade and firmware rollback. The operating condition execution module 820 is also used to check the OTA stress testing process based on preset check items. If the OTA stress testing process does not meet the check items, the OTA stress testing is terminated.
[0146] When the methods of the above embodiments are implemented in hardware, this embodiment of the invention provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 9 As shown, the electronic device 900 includes: a processor 902, a communication interface 903, and a bus 904. Optionally, the electronic device 900 may also include a memory 901.
[0147] Processor 902 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 902 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 902 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0148] The communication interface 903 is used to connect to other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0149] The memory 901 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0150] In one possible implementation, the memory 901 can exist independently of the processor 902. The memory 901 can be connected to the processor 902 via a bus 904 and is used to store instructions or program code. When the processor 902 calls and executes the instructions or program code stored in the memory 901, it can implement the method provided in the embodiments of the present invention.
[0151] In another possible implementation, the memory 901 can also be integrated with the processor 902.
[0152] The 904 bus can be an Extended Industry Standard Architecture (EISA) bus, etc. The 904 bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0153] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the above device is divided into different functional modules to complete all or part of the functions described above.
[0154] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The computer-readable storage medium can also be an external storage device of the above-described device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the above-described device. Further, the computer-readable storage medium can include both internal storage units and external storage devices of the above-described device. The computer-readable storage medium is used to store the above-described computer program and other programs and data required by the above-described device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0155] This application also provides a computer program product comprising a computer program that, when run on a computer, causes the computer to perform the methods provided in the above embodiments.
[0156] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A testing method, characterized in that, Applied to the control terminal, the method includes: A test task is sent to the vehicle terminal; the test task is used to instruct the vehicle terminal to load at least one cyclic operating condition and to perform over-the-air (OTA) stress test at a specific operating condition node in each cyclic operating condition. Obtain the set of test logs reported by the vehicle terminal; the test logs include at least one of the following: vehicle status log, OTA stress test log, and electronic control unit (ECU) log.
2. The method according to claim 1, characterized in that, The method further includes: Based on a preset rule engine, target test logs are determined from the test log set; the target test logs represent test logs that have experienced anomalies. Extract test parameters from the target test log and determine the anomaly type based on a preset parameter baseline; wherein, one test parameter corresponds to one parameter baseline, the parameter baseline is related to the vehicle model, ECU type and the cycle condition, and the anomaly type includes transient anomaly and degradation anomaly.
3. The method according to claim 1, characterized in that, The test task includes OTA load testing rounds, with each execution of the test task corresponding to one OTA load testing round. Extracting test parameters from the target test logs and determining the anomaly type based on a preset parameter baseline includes: Extract the target test parameters from the target test log; the target test parameters can be any type of test parameter from the target test log. If the difference between the value of the target test parameter and the value of the parameter baseline is greater than the abnormal threshold, and the difference is not greater than the abnormal threshold in any adjacent OTA stress test round, then the abnormality type is determined to be an instantaneous abnormality; the abnormal threshold is determined based on the 3σ criterion or the median absolute deviation algorithm. If the difference is not greater than the abnormal threshold, and the difference increases with the number of OTA stress test rounds, then the abnormality type is determined to be a degradation abnormality.
4. The method according to claim 1, characterized in that, After extracting the test parameters from the target test log and determining the anomaly type based on a preset parameter baseline, the method further includes: Generate a test report based on the target test logs and the exception types; When multiple test reports exist for different in-vehicle terminals, comparative data is generated based on the multiple test reports.
5. A testing method, characterized in that, Applied to vehicle-mounted terminals, the method includes: Obtain the test tasks issued by the control terminal; Based on the test task, at least one cyclic operating condition is loaded, and OTA stress testing is performed on specific operating condition nodes in each cyclic operating condition. The test log set is reported to the control terminal and stored in the circular buffer of the vehicle terminal; the test log set includes at least one of vehicle status log, OTA stress test log and electronic control unit (ECU) log.
6. The method according to claim 5, characterized in that, The test task includes a test priority; based on the test task, before loading at least one cyclic load condition and performing over-the-air (OTA) load testing at specific load condition nodes in each cyclic load condition, the method further includes: When multiple test tasks are received from the control terminal, the execution order of the multiple test tasks is determined based on the priority of each test task. If the number of test tasks exceeds the preset number, a queue blocking alarm is sent to the control terminal; The step of loading at least one cyclic operating condition based on the test task and performing over-the-air (OTA) stress testing at specific operating condition nodes in each cyclic operating condition includes: A target test task is determined from the plurality of test tasks; the target test task represents the highest priority unexecuted task. Based on the target test task, at least one cyclic operating condition specified by the target test task is loaded, and an over-the-air (OTA) stress test is performed on a specific operating condition node in each cyclic operating condition.
7. The method according to claim 5, characterized in that, The OTA stress test includes full upgrade, differential upgrade, and firmware rollback; When performing over-the-air (OTA) stress testing at specific operating point of each cyclic load test, the method further includes: The OTA stress test process is checked based on preset check items. If the OTA stress test process does not meet the check items, the OTA stress test is terminated.
8. An electronic device, characterized in that, It includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to perform the method as described in any one of claims 1 to 4 or 5 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 4 or 5 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 4 or 5 to 7.
