OTA pressure test method and device, vehicle, electronic equipment and storage medium
By responding to the test start command in the OTA stress test, querying the vehicle status and sending corresponding instructions, the problem of failure to conduct full-link test in the user scenario in the prior art is solved, ensuring that the vehicle can sleep after the OTA is completed, and the implementation of More accurate test.
Patent Information
- Application Number
- CN202310848926.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-01-14
AI Technical Summary
In the prior art, OTA stress test failed to conduct full-link test in actual user scenarios, especially the sleep wake-up process and breakpoint continuous transmission process during the download process, which could not verify whether the vehicle could sleep after the OTA ended, resulting in Power consumption.
Provide an OTA stress testing method, which can query whether the vehicle is in a dormant state by responding to the test startup command, send a wake-up command and query the task status, push the baseline download task, judge the status of the upgrade package to switch after the download is completed, send preset upgrade commands and record the upgrade The number of times is to ensure that the corresponding commands are executed under different task states, and simulate user scenarios to conduct full-link stress tests.
The full-link stress test of OTA in actual user scenarios is realized, ensuring that the vehicle can sleep after the upgrade is completed, avoiding power consumption, and enhancing the practicality and accuracy of the test.
Smart Images

Figure CN119309819A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of OTA stress testing, and in particular to an OTA stress testing method, device, vehicle, electronic device, and computer-readable storage medium. Background Art
[0002] Currently, after the production of factory vehicles is completed, the vehicles need to be upgraded OTA before they can be delivered. Over the Air Technology (OTA) refers to the upgrade and update of vehicle-level controllers such as chassis suspension, assisted driving, body control, and infotainment. OTA full-link upgrade mainly includes task push, baseline download, scheduled upgrade, waiting for upgrade, upgrade execution, result feedback and other links. In the actual user environment, users often lock the car and sleep during the download process, so the breakpoint resume function is also a common function. In addition, when actually upgrading, users will choose the upgrade method of scheduled upgrade, for example, OTA upgrade in the early morning. However, after the OTA upgrade is completed, if the vehicle cannot sleep, power feeding will occur, resulting in vehicle power consumption.
[0003] In the related technology, although OTA stress testing includes stress testing of the entire OTA link, it does not include the sleep and wake-up process during the download process and the breakpoint-resume process after the download process is dormant, nor does it verify whether the actual vehicle can sleep after the OTA is completed. In other words, the OTA stress test in the prior art is not completed based on actual user scenarios.
[0004] Therefore, how to implement OTA stress testing of the vehicle controller in actual user scenarios is an issue that needs to be solved urgently. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an OTA stress testing method, which solves the problem in the prior art that OTA stress testing is not based on actual user scenarios.
[0006] In order to achieve the above objectives, the embodiments of the present disclosure provide the following technical solutions:
[0007] In a first aspect, an embodiment of the present disclosure provides an OTA stress testing method, the method comprising:
[0008] Respond to the test start command and query whether the target vehicle is in a dormant state;
[0009] When the target vehicle is in a dormant state, a wake-up command is sent to the target vehicle, and the task status of the target vehicle is queried; the task status includes: downloading status, prompting status, upgrading status, and no task status;
[0010] When the task state of the target vehicle is a no-task state, pushing a target baseline download task to the target vehicle; the target baseline download task is used to instruct the target vehicle to download the target baseline;
[0011] Determining whether the multiple task upgrade packages have been downloaded according to whether the target vehicle is in a dormant state;
[0012] When the download of the multiple task upgrade packages is completed, the task state is triggered to switch to a prompt state, and the target vehicle is queried whether it is in a dormant state;
[0013] When the target vehicle is in a dormant state, sending a preset upgrade instruction to the target vehicle;
[0014] Upgrading the target vehicle according to the preset upgrade instruction and recording the upgrade times;
[0015] Whether the test task is completed is determined based on the upgrade times and the preset upgrade times.
[0016] As an optional implementation of the embodiment of the present disclosure, before responding to the test start command and querying whether the target vehicle is in a dormant state, the method further includes:
[0017] Create a stress test task and configure stress test information;
[0018] The stress test information includes: preset upgrade times, preset upgrade vehicles, preset upgrade baselines, and preset upgrade methods; the preset upgrade methods include: immediate upgrade and scheduled upgrade;
[0019] A test start command is triggered, where the test start command is used to start a stress test task.
[0020] As an optional implementation of the embodiment of the present disclosure, the responding to the test start command and querying whether the target vehicle is in a dormant state further includes:
[0021] When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
[0022] As an optional implementation of the embodiment of the present disclosure, the querying of the task status of the target vehicle further includes:
[0023] When the task status of the target vehicle is any one of a downloading status, a prompting status, and an upgrading status, the task status of the target vehicle is queried again after a preset time interval.
[0024] As an optional implementation of the embodiment of the present disclosure, the method further includes:
[0025] When the task status of the target vehicle is a downloading status and the target vehicle is in an awake state, the task status of the target vehicle is queried at preset intervals to determine whether the target baseline corresponding to the target baseline download task has been downloaded.
[0026] As an optional implementation of the embodiment of the present disclosure, when the task state of the target vehicle is the prompt state, querying whether the target vehicle is in a dormant state further includes:
[0027] When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
[0028] As an optional implementation of the embodiment of the present disclosure, the upgrade status includes: upgrading, upgrading successfully, and upgrading failed; the upgrading of the target vehicle according to the preset upgrade instruction and recording the upgrade times include:
[0029] After a first preset time interval, querying the mission status of the target vehicle;
[0030] When the task status is upgrade success or upgrade failure in the upgrade status, record the upgrade times;
[0031] When the upgrade status is upgrading, the task status of the target vehicle is queried again after a preset time interval.
[0032] As an optional implementation of the embodiment of the present disclosure, after the first preset time interval, querying the task status of the target vehicle includes:
[0033] When the task state of the target vehicle is a prompt state and the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle.
[0034] In a second aspect, an embodiment of the present disclosure provides an OTA stress testing device, including:
[0035] A start module, used to respond to a test start command and query whether the target vehicle is in a dormant state;
[0036] A wake-up module is used to send a wake-up instruction to the target vehicle when the target vehicle is in a dormant state, and query the task status of the target vehicle; the task status includes: downloading status, prompting status, upgrading status, and no task status;
[0037] A download module, used for pushing a target baseline download task to the target vehicle when the task state of the target vehicle is a no-task state; the target baseline download task is used to instruct the target vehicle to download the target baseline;
[0038] A judgment module, used to determine whether the download of the plurality of task upgrade packages is completed according to whether the target vehicle is in a dormant state;
[0039] A prompt module, used for triggering the task state to switch to a prompt state when the download of the multiple task upgrade packages is completed, and querying whether the target vehicle is in a dormant state;
[0040] An upgrade module, used for sending a preset upgrade instruction to the target vehicle when the target vehicle is in a dormant state;
[0041] A recording module, used to upgrade the target vehicle according to the preset upgrade instruction and record the number of upgrades;
[0042] The end module is used to determine whether the test task is ended according to the upgrade times and the preset upgrade times.
[0043] As an optional implementation of the embodiment of the present disclosure, the device further includes a configuration module, which is specifically used to:
[0044] Create a stress test task and configure stress test information;
[0045] The stress test information includes: preset upgrade times, preset upgrade vehicles, preset upgrade baselines, and preset upgrade methods; the preset upgrade methods include: immediate upgrade and scheduled upgrade;
[0046] A test start command is triggered, where the test start command is used to start a stress test task.
[0047] As an optional implementation of the embodiment of the present disclosure, the startup module is further used to:
[0048] When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
[0049] As an optional implementation of the embodiment of the present disclosure, the wake-up module is further used to:
[0050] When the task status of the target vehicle is any one of a downloading status, a prompting status, and an upgrading status, the task status of the target vehicle is queried again after a preset time interval.
[0051] As an optional implementation of the embodiment of the present disclosure, the judgment module is specifically used to:
[0052] When the task status of the target vehicle is a downloading status and the target vehicle is in an awake state, the task status of the target vehicle is queried at preset intervals to determine whether the target baseline corresponding to the target baseline download task has been downloaded.
[0053] As an optional implementation of the embodiment of the present disclosure, the prompt module is further used to:
[0054] When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
[0055] As an optional implementation of the embodiment of the present disclosure, the upgrade status includes: upgrading, upgrade success, and upgrade failure; the recording module includes:
[0056] A query unit, used for querying the mission status of the target vehicle after a first preset time interval;
[0057] A recording unit, configured to record the number of upgrades when the task status is an upgrade success or an upgrade failure in the upgrade status;
[0058] The processing unit is used to query the task status of the target vehicle again after a preset time interval when the upgrade status is upgrading.
[0059] As an optional implementation of the embodiment of the present disclosure, the query unit is further used to:
[0060] When the task state of the target vehicle is a prompt state and the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle.
[0061] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the OTA stress testing method described in the first aspect or any embodiment of the first aspect is implemented.
[0062] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the OTA stress testing method described in the first aspect or any implementation of the first aspect is implemented.
[0063] The OTA stress test method provided by the present disclosure responds to the test start command and queries whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle and the task status of the target vehicle is queried; when the task status of the target vehicle is a no-task state, a target baseline download task is pushed to the target vehicle; wherein the target baseline download task is used to instruct the target vehicle to download the target baseline; if the task status of the target vehicle is a downloading state and the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle and the task status of the target vehicle is queried; when the task status of the target vehicle is a prompting state, it is queried whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle, the target vehicle is upgraded according to the preset upgrade instruction, and the upgrade number is recorded, and whether the test task is completed according to the upgrade number and the preset upgrade number. Since the dormant function test after the upgrade is completed and before the first upgrade is completed by responding to the test start command, and since the task status of the target vehicle is a downloading state and the target vehicle is in a dormant state, the dormancy wake-up test during the download process is completed by sending a wake-up instruction to the target vehicle and querying the task status of the target vehicle. Therefore, by executing different instructions in different task states, an OTA full-link stress test simulating user scenarios is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0066] Figure 1 Schematic diagram of the OTA stress testing method in the embodiment of the present disclosure;
[0067] Figure 2 This is a schematic diagram of the structure of an OTA pressure testing device in an embodiment of the present disclosure;
[0068] Figure 3 It is a schematic diagram of the structure of the electronic device described in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0069] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0070] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0071] Relational terms such as “first” and “second” in the description and claims of the present disclosure are merely used to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0072] In the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0073] Stress testing is to test the performance of the system under stress by continuously applying "stress" to the system under test, examine the maximum load that the system can withstand under the current software and hardware environment, and help find the system bottleneck. In other words, it can simulate a huge workload to see how the application performs under peak usage. The purpose of stress testing is, first, to test whether the application will report errors or whether the process will crash under high concurrency; second, to test the application's ability to withstand stress, estimate the application's carrying capacity, and provide a basis for subsequent operation and maintenance.
[0074] Breakpoint resume means that when downloading or uploading, the download or upload task (a file or a compressed package) is artificially divided into several parts, and each part is uploaded or downloaded using a thread. If a network failure occurs, the upload or download of the unfinished part can be continued from the part that has been uploaded or downloaded, without having to upload or download from the beginning.
[0075] Baseline refers to the combination of vehicle controller versions. If the vehicle is in a certain baseline, that is, the software version of each controller in the vehicle is consistent with the software version corresponding to the controller contained in this baseline. For example, for the target vehicle, if baseline A is successfully upgraded, then the target vehicle is in baseline A, and the version of each controller in the vehicle is consistent with baseline A. If it is a baseline in a certain upgrade task, it represents the upgrade package of the corresponding version of the controller in this baseline. For example, the target vehicle is downloading a certain baseline, that is, the target vehicle is downloading the upgrade package corresponding to a certain baseline. For a vehicle, there are dozens or hundreds of controllers in the vehicle, and each controller has an upgrade package, so the baseline is used to unify the upgrade package. A baseline is a combination of upgrade packages for dozens or hundreds of controllers. Assume that the target vehicle includes three controllers A, B, and C, among which the software version of controller A is 0001, the software version of controller B is 0002, and the software version of controller C is 0003. The target baseline is 4.5.0. After the target vehicle successfully upgrades the target baseline, the versions of controllers A, B, and C of the target vehicle are A-0001, B-0002, and C-0003, respectively.
[0076] The upgrade tasks include: the cloud server sends the baseline, the vehicle downloads the baseline, the vehicle upgrades, and the vehicle returns success / failure.
[0077] After the production of the current factory vehicle is completed, the vehicle needs to be upgraded OTA before it can be delivered. Automotive OTA technology is used in various maps, applications, entertainment systems, and electronic control units. For the automotive industry, safety is very important. If there is a problem with OTA technology, it is likely to cause serious safety accidents. The reliability and stability of the technology must be fully verified before it is put on the market, including component verification of key devices and system integration verification. Therefore, it is very necessary to realize OTA test verification of the vehicle controller in actual user scenarios.
[0078] In one embodiment, Figure 1 As shown, an OTA stress testing method is provided, and the OTA stress testing method is applied to an OTA cloud server, including the following steps S11-S18:
[0079] S11, responding to the test start command, querying whether the target vehicle is in a dormant state.
[0080] Among them, the dormant state of the vehicle refers to the overall low-power state of the in-vehicle controller to avoid static high power consumption. When the vehicle is dormant, the in-vehicle controller only retains a simple monitoring function, waiting to be awakened, and shuts down some power-consuming functions. Correspondingly, when the target vehicle is in a non-dormant state, that is, the awakened state. The car's awakening methods include waking up PEPS (Passive Entry Passive Start, keyless entry & start system) by key unlocking, polling, etc., and then waking up the entire vehicle.
[0081] Specifically, in response to a test start command on the stress test platform of the OTA cloud server, the stress test task is started, and the stress test platform calls an interface to query whether the target vehicle is in a dormant state.
[0082] In some embodiments, before executing step S11 (responding to the test start command and querying whether the target vehicle is in a dormant state), the following steps are further executed:
[0083] a. Create a stress test task and configure stress test information.
[0084] The stress test information includes: preset upgrade times, preset upgrade vehicles, preset upgrade baselines, and preset upgrade methods.
[0085] The preset number of upgrades can be set according to actual test requirements, for example, it can be set to 10 times, 100 times, or other reasonable times, and no specific restrictions are made here.
[0086] The preset upgrade vehicle refers to a target vehicle, which may include one or more vehicles. In the embodiment of the present disclosure, according to actual test requirements, the preset upgrade vehicle is set to one.
[0087] The preset upgrade baseline refers to the upgrade package that meets the content of this stress test upgrade.
[0088] The preset upgrade methods include: immediate upgrade and scheduled upgrade.
[0089] A stress test task includes a download task and an upgrade task.
[0090] Specifically, a stress test task is created on the stress test platform of the OTA cloud server with the task ID as the identifier, and the configuration of the number of upgrades, upgraded vehicles, stress test baseline, upgrade method, etc. is completed. Among them, the stress test baseline can be understood as the preset upgrade baseline in this upgrade task, or the target upgrade baseline. A baseline that conforms to the content of this stress test upgrade is created in the OTA management background. The upgrade package includes fixed defects or new features added. The upgrade package is stored in the OTA cloud server platform, which has various types and versions of update packages. After receiving the update request, the upgrade package is downloaded to the appropriate vehicle module and specific ECU (Electronic Control Unit) through the network.
[0091] b. Trigger a test start command, where the test start command is used to start a stress test task.
[0092] Specifically, the test start command is triggered by pressing the test start control on the stress test platform.
[0093] In some embodiments, when the target vehicle is in the awake state, the target vehicle is queried again at a preset time interval to see whether it is in the dormant state.
[0094] Among them, the preset time length can be set according to actual test requirements. The preset time length can be set to 3 minutes, 5 minutes, or other reasonable time lengths, and no specific restrictions are made here.
[0095] Specifically, when the target vehicle is in a non-sleeping state, that is, in an awake state, the target vehicle is queried again at an interval of 3 minutes to see if it is in a sleeping state, thereby verifying whether the vehicle has the ability to sleep before the OTA stress test. If the vehicle is in a sleeping state, step S12 is executed.
[0096] S12: When the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle, and a mission status of the target vehicle is queried.
[0097] The task status includes: download status, prompt status, upgrade status, and no task status. The download status is used to indicate that the target vehicle is downloading the preset upgrade baseline; the prompt status is used to indicate that the target vehicle has completed downloading the preset upgrade baseline; the upgrade status is used to indicate that the target vehicle is upgrading according to the preset upgrade baseline; and the no task status is used to indicate that the target vehicle is currently in an idle state.
[0098] Specifically, when the target vehicle is in a dormant state, a wake-up command is sent to the target vehicle to wake up the target vehicle, and the task status of the target vehicle is queried. For a stress test task, since one stress test task includes one download task and one upgrade task, the task status includes: download status, prompt status, upgrade status, and no task status. When the target vehicle is in a no task status, step S13 is executed.
[0099] S13: When the task state of the target vehicle is a no-task state, push the target baseline download task to the target vehicle.
[0100] The target baseline download task is used to instruct the target vehicle to download the target baseline, which includes software upgrade packages of multiple controllers.
[0101] Specifically, when the task status of the target vehicle is no task status, that is, the target vehicle status is not in any of the download status, prompt status, and upgrade status, it can be understood that the target vehicle is in an idle state. At this time, the interface is called to push the stress test baseline to the vehicle, that is, to push the target baseline download task to the target vehicle. The preset time interval is used to determine whether the software upgrade packages of multiple controllers corresponding to the target baseline are downloaded by judging whether the task status of the target vehicle is the prompt status.
[0102] For example, when the task status of the target vehicle is no task, the stress test baseline can be pushed to the target vehicle, that is, multiple task upgrade packages are sent to the target vehicle to trigger the download. At intervals of 3 minutes, check whether the task status of the target vehicle is a prompt state to determine whether the download task has been completed.
[0103] In some embodiments, when the task status of the target vehicle is any one of a downloading status, a prompting status, and an upgrading status, the task status of the target vehicle is queried again at a preset time interval.
[0104] Exemplarily, when the task status of the target vehicle is any one of the downloading status, the prompting status, and the upgrading status, the task status of the target vehicle is queried again after an interval of 3 minutes, and this step is executed repeatedly until it is determined that the task status of the target vehicle is the no-task status.
[0105] S14: If the task status of the target vehicle is a downloading status and the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle, and the task status of the target vehicle is queried.
[0106] Specifically, if the task status of the target vehicle is not in the prompt state, it means that the current target vehicle is still executing the download task, that is, the task status of the target vehicle is still in the download state. If the target vehicle is in a dormant state due to no command control during the download process, the stress test platform calls the interface to send a wake-up command to the target vehicle to verify the breakpoint resume capability of the upgrade package.
[0107] S15. When the task state of the target vehicle is a prompt state, query whether the target vehicle is in a dormant state.
[0108] Specifically, when the task status of the target vehicle is in the prompt status, the stress testing platform calls an interface to query whether the target vehicle is in a dormant state.
[0109] In some embodiments, when the target vehicle is in the awake state, the target vehicle is queried again at a preset time interval to see whether it is in the dormant state.
[0110] Exemplarily, if the target vehicle is in the awake state, wait for 3 minutes and then query again whether the target vehicle is in the dormant state; the process is repeated until the target vehicle is in the dormant state, and then step S16 is executed.
[0111] S16: When the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle.
[0112] The preset upgrade instruction is used to instruct that after a preset upgrade time has passed, the multiple task upgrade packages are upgraded in a scheduled upgrade manner.
[0113] Specifically, when the target vehicle has entered the prompt state and is in a dormant state, the stress test platform calls the interface to wake up the vehicle and then issues a preset upgrade instruction. The preset upgrade duration is set based on a sufficient duration for the vehicle to be dormant. For example, the preset upgrade duration can be set after 20 minutes, or after 30 minutes, or other reasonable durations, which are not specifically limited here.
[0114] After the tester manually creates the upgrade baseline and stress testing tasks, he can implement OTA stress testing in the vehicle controller upgrade scenario. In addition, this method does not require the configuration of additional test equipment on the actual vehicle, but only requires the actual vehicle to meet the prerequisites for OTA upgrades. Among them, the preconditions can be set according to the actual test tasks. For example, the preconditions may include but are not limited to the vehicle speed being 0, the gear being in P gear, and the target vehicle being in a power-off state. According to the scheduled upgrade duration, determine whether the target vehicle meets the upgrade preconditions. If so, execute the upgrade steps. If not, return to the prompt state, and the cloud server makes another reservation based on the prompt state.
[0115] S17. Upgrade the target vehicle according to the preset upgrade instruction, and record the number of upgrades.
[0116] The upgrade status includes: upgrading, successful upgrade, and failed upgrade.
[0117] In some embodiments, step S17 (upgrading the target vehicle according to the preset upgrade instruction and recording the upgrade times) can be implemented as follows:
[0118] After a first preset time interval, querying the mission status of the target vehicle;
[0119] When the task status is upgrade success or upgrade failure in the upgrade status, record the upgrade times;
[0120] When the upgrade status is upgrading, the task status of the target vehicle is queried again after a preset time interval.
[0121] The first preset duration can be set according to actual test requirements. For multiple task upgrade packages, the time required to complete the upgrade is different. Therefore, it can be specifically set according to the actual situation. For example, the first preset duration can be set to 5 minutes, 10 minutes, 20 minutes, or other reasonable durations, which are not specifically limited here.
[0122] Specifically, after a first preset time interval, the stress test platform calls the interface to query the task status of the target vehicle. If the upgrade status is upgrade success or upgrade failure, the current upgrade times and current upgrade results are recorded. If the upgrade status is upgrading, it means that the upgrade is still in progress, and the task status of the target vehicle is queried again after a preset time interval.
[0123] For example, after an interval of 20 minutes, the upgrade status of the target vehicle is queried. If the upgrade status is "upgrade successful", the upgrade result is recorded as "successful" and the upgrade count is increased by 1; if the upgrade status is "upgrade failed", the upgrade result is recorded as "failed", the upgrade count is increased by 1, and the interface is called to query the reason for the upgrade failure, and the error reason is recorded in the upgrade result.
[0124] Further, when the task state of the target vehicle is a prompt state and the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle.
[0125] Specifically, if the upgrade status is the prompt status, return to step S16.
[0126] S18. Determine whether the test task is completed according to the upgrade times and the preset upgrade times.
[0127] In some embodiments, when the upgrade number is less than the preset upgrade number, steps S11-S17 are continued.
[0128] Exemplarily, if the number of upgrades is 5 and the preset number of upgrades is 10, steps S11-S17 are executed again until the number of upgrades is the same as the preset number of upgrades, and the loop execution of steps S11-S17 is stopped.
[0129] In some embodiments, when the upgrade times are equal to the preset upgrade times, it is determined that the test task is completed and a stress test report is generated.
[0130] Among them, the preset number of upgrades can be set according to actual test requirements. The preset number of upgrades can be set to 5 times, 10 times, 100 times, etc., or to other reasonable times. No specific restrictions are made here.
[0131] Specifically, the stress testing platform queries whether the number of upgrades counted by the stress testing counter is the same as the preset number of upgrades when creating the stress testing task. If the current number of upgrades is less than the preset number of upgrades, the next stress testing task cycle is entered; if the current number of upgrades is equal to the preset number of upgrades, the stress testing task is ended and a stress testing report is generated.
[0132] Exemplarily, if the current upgrade number is 10 and the preset upgrade number is 10, it is determined that the test task is completed and a stress test report is generated.
[0133] The OTA stress test method provided by the present disclosure responds to the test start command and queries whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle and the task status of the target vehicle is queried; when the task status of the target vehicle is a no-task state, a target baseline download task is pushed to the target vehicle; wherein the target baseline download task is used to instruct the target vehicle to download the target baseline; if the task status of the target vehicle is a downloading state and the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle and the task status of the target vehicle is queried; when the task status of the target vehicle is a prompting state, it is queried whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle, the target vehicle is upgraded according to the preset upgrade instruction, the upgrade number is recorded, and whether the test task is completed according to the upgrade number and the preset upgrade number. Since the dormant function test after the upgrade is completed and before the first upgrade is completed by responding to the test start command and querying whether the target vehicle is in a dormant state, and the dormant wake-up test during the download process is completed by sending a wake-up instruction to the target vehicle and querying the task status of the target vehicle when the task status of the target vehicle is a downloading state and the target vehicle is in a dormant state. Therefore, by executing different instructions in different task states, an OTA full-link stress test simulating user scenarios is achieved.
[0134] In some embodiments, the breakpoint-resume capability of the verification upgrade package may be implemented in the following manner:
[0135] a. When the task status of the target vehicle is a downloading status and the target vehicle is in an awake state, query the task status of the target vehicle at preset intervals to determine whether the target baseline corresponding to the target baseline download task has been downloaded.
[0136] Specifically, when the task status of the target vehicle is in the downloading state and the target vehicle is in the awakening state, the task status of the target vehicle is queried at a preset interval. When the task status of the target vehicle is in the downloading state, it is determined that multiple task upgrade packages have not been downloaded; when the task status of the target vehicle is in the prompting state, it is determined that multiple task upgrade packages have been downloaded.
[0137] When the task status of the target vehicle is in the downloading state and the target vehicle is in the dormant state, the interface is first called to send a wake-up command to wake up the target vehicle, and then the task status of the target vehicle is queried at preset intervals. When the task status of the target vehicle is in the downloading state, it is determined that multiple task upgrade packages have not been downloaded; when the task status of the target vehicle is in the prompting state, it is determined that multiple task upgrade packages have been downloaded.
[0138] By simulating the breakpoint-resume transfer of the user scenario in the above manner, problems that occur during the breakpoint-resume transfer process can be effectively discovered.
[0139] The OTA stress test method provided by the present disclosure responds to the test start command and queries whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle and the task status of the target vehicle is queried; when the task status of the target vehicle is a no-task state, a target baseline download task is pushed to the target vehicle; wherein the target baseline download task is used to instruct the target vehicle to download the target baseline; if the task status of the target vehicle is a downloading state and the target vehicle is in a dormant state, a wake-up instruction is sent to the target vehicle and the task status of the target vehicle is queried; when the task status of the target vehicle is a prompting state, it is queried whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle, the target vehicle is upgraded according to the preset upgrade instruction, the upgrade number is recorded, and whether the test task is completed according to the upgrade number and the preset upgrade number. Since the dormant function test after the upgrade is completed and before the first upgrade is completed by responding to the test start command and querying whether the target vehicle is in a dormant state, and the dormant wake-up test during the download process is completed by sending a wake-up instruction to the target vehicle and querying the task status of the target vehicle when the task status of the target vehicle is a downloading state and the target vehicle is in a dormant state. Therefore, by executing different instructions in different task states, an OTA full-link stress test simulating user scenarios is achieved.
[0140] In one embodiment, Figure 2 As shown, an OTA stress testing device 200 is provided, comprising:
[0141] The start module 210 is used to respond to the test start command and query whether the target vehicle is in a dormant state;
[0142] The wake-up module 220 is used to send a wake-up instruction to the target vehicle when the target vehicle is in a dormant state, and query the task status of the target vehicle; the task status includes: downloading status, prompting status, upgrading status, and no task status;
[0143] The download module 230 is used to push a target baseline download task to the target vehicle when the task state of the target vehicle is a no-task state; the target baseline download task is used to instruct the target vehicle to download the target baseline;
[0144] The judgment module 240 is used to send a wake-up instruction to the target vehicle and query the task status of the target vehicle if the task status of the target vehicle is a downloading status and the target vehicle is in a dormant state;
[0145] The prompt module 250 is used to query whether the target vehicle is in a dormant state when the task state of the target vehicle is a prompt state;
[0146] An upgrade module 260, configured to send a preset upgrade instruction to the target vehicle when the target vehicle is in a dormant state;
[0147] A recording module 270, configured to upgrade the target vehicle according to the preset upgrade instruction and record the number of upgrades;
[0148] The end module 280 is used to determine whether the test task is ended according to the upgrade times and the preset upgrade times.
[0149] As an optional implementation of the embodiment of the present disclosure, the device further includes a configuration module, which is specifically used to:
[0150] Create a stress test task and configure stress test information;
[0151] The stress test information includes: preset upgrade times, preset upgrade vehicles, preset upgrade baselines, and preset upgrade methods; the preset upgrade methods include: immediate upgrade and scheduled upgrade;
[0152] A test start command is triggered, where the test start command is used to start a stress test task.
[0153] As an optional implementation of the embodiment of the present disclosure, the startup module is further used to:
[0154] When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
[0155] As an optional implementation of the embodiment of the present disclosure, the wake-up module is further used to:
[0156] When the task status of the target vehicle is any one of a downloading status, a prompting status, and an upgrading status, the task status of the target vehicle is queried again after a preset time interval.
[0157] As an optional implementation of the embodiment of the present disclosure, the judgment module is specifically used to:
[0158] When the task status of the target vehicle is a downloading status and the target vehicle is in an awake state, the task status of the target vehicle is queried at preset intervals to determine whether the target baseline corresponding to the target baseline download task has been downloaded.
[0159] As an optional implementation of the embodiment of the present disclosure, the prompt module is further used to:
[0160] When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
[0161] As an optional implementation of the embodiment of the present disclosure, the upgrade status includes: upgrading, upgrade success, and upgrade failure; the recording module includes:
[0162] A query unit, used for querying the mission status of the target vehicle after a first preset time interval;
[0163] A recording unit, configured to record the number of upgrades when the task status is an upgrade success or an upgrade failure in the upgrade status;
[0164] The processing unit is used to query the task status of the target vehicle again after a preset time interval when the upgrade status is upgrading.
[0165] As an optional implementation of the embodiment of the present disclosure, the query unit is further used to:
[0166] When the task state of the target vehicle is a prompt state and the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle.
[0167] The OTA stress test device provided by the present disclosure responds to the test start command and queries whether the target vehicle is in a dormant state; when the target vehicle is in a dormant state, a wake-up command is sent to the target vehicle, and the task status of the target vehicle is queried; when the task status of the target vehicle is a no-task state, multiple task upgrade packages are sent to the target vehicle, triggering the task status to switch to a downloading state, and querying whether the target vehicle is in a dormant state; according to whether the target vehicle is in a dormant state, it is determined whether multiple task upgrade packages have been downloaded, and when multiple task upgrade packages have been downloaded, the task status is triggered to switch to a prompting state, and query whether the target vehicle is in a dormant state. When the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle, and the target vehicle is upgraded according to the preset upgrade instruction, and the number of upgrades is recorded. According to the number of upgrades and the preset number of upgrades, it is determined whether the test task is completed. By executing different instructions under different task states, an OTA full-link stress test including dormant wake-up and breakpoint resumption is realized, that is, an OTA full-link stress test simulating user scenarios is realized.
[0168] For the specific definition of the OTA stress testing device, please refer to the definition of the OTA stress testing method above, which will not be repeated here. Each module in the above-mentioned OTA stress testing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor of the electronic device in hardware form, or can be stored in the processor of the electronic device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0169] The present disclosure also provides an electronic device, Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 3 As shown, the electronic device provided in this embodiment includes: a memory 31 and a processor 32, the memory 31 is used to store a computer program; the processor 32 is used to execute the steps performed in any embodiment of the OTA stress testing method provided in the above method embodiment when calling the computer program. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, an OTA stress testing method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0170] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0171] In one embodiment, the OTA stress test device provided by the present disclosure can be implemented in the form of a computer, and the computer program can be Figure 3 The memory of the electronic device may store various program modules constituting the OTA stress test device of the electronic device, for example, Figure 2The computer program composed of each program module enables the processor to execute the steps of the OTA stress test method of the electronic device of each embodiment of the present disclosure described in this specification.
[0172] An embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the OTA stress testing method provided by the above method embodiment is implemented.
[0173] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0174] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0175] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0176] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0177] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0178] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An OTA stress testing method, characterized in that: The method comprises: Respond to the test start command and query whether the target vehicle is in a dormant state; When the target vehicle is in a dormant state, a wake-up command is sent to the target vehicle, and the task status of the target vehicle is queried; the task status includes: downloading status, prompting status, upgrading status, and no task status; When the task state of the target vehicle is a no-task state, pushing a target baseline download task to the target vehicle; the target baseline download task is used to instruct the target vehicle to download the target baseline; If the task status of the target vehicle is a downloading status and the target vehicle is in a dormant state, sending a wake-up command to the target vehicle and querying the task status of the target vehicle; When the task state of the target vehicle is a prompt state, query whether the target vehicle is in a dormant state; When the target vehicle is in a dormant state, sending a preset upgrade instruction to the target vehicle; Upgrading the target vehicle according to the preset upgrade instruction and recording the upgrade times; Whether the test task is completed is determined based on the upgrade times and the preset upgrade times.
2. The method according to claim 1, characterized in that Before responding to the test start command and querying whether the target vehicle is in a dormant state, the method further includes: Create a stress test task and configure stress test information; The stress test information includes: preset upgrade times, preset upgrade vehicles, preset upgrade baselines, and preset upgrade methods; the preset upgrade methods include: immediate upgrade and scheduled upgrade; A test start command is triggered, where the test start command is used to start a stress test task.
3. The method according to claim 1, characterized in that The responding test start command and querying whether the target vehicle is in a dormant state also includes: When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
4. The method according to claim 1, characterized in that: The querying of the task status of the target vehicle also includes: When the task status of the target vehicle is any one of a downloading status, a prompting status, and an upgrading status, the task status of the target vehicle is queried again after a preset time interval.
5. The method according to claim 1, characterized in that The method further comprises: When the task status of the target vehicle is a downloading status and the target vehicle is in an awake state, the task status of the target vehicle is queried at preset intervals to determine whether the target baseline corresponding to the target baseline download task has been downloaded.
6. The method according to claim 1, characterized in that When the task state of the target vehicle is the prompt state, querying whether the target vehicle is in a dormant state further includes: When the target vehicle is in the awake state, it is queried again at a preset time interval whether the target vehicle is in the dormant state.
7. The method according to claim 1, characterized in that The upgrade status includes upgrading, successful upgrade, and failed upgrade; The step of upgrading the target vehicle according to the preset upgrade instruction and recording the number of upgrades includes: After a first preset time interval, querying the mission status of the target vehicle; When the task status is upgrade success or upgrade failure in the upgrade status, record the upgrade times; When the upgrade status is upgrading, the task status of the target vehicle is queried again after a preset time interval.
8. The method according to claim 7, characterized in that After the first preset time interval, querying the task status of the target vehicle includes: When the task state of the target vehicle is a prompt state and the target vehicle is in a dormant state, a preset upgrade instruction is sent to the target vehicle.
9. An OTA stress testing device, characterized in that: include: A start module, used to respond to a test start command and query whether the target vehicle is in a dormant state; A wake-up module, used for sending a wake-up instruction to the target vehicle when the target vehicle is in a dormant state, and querying the mission status of the target vehicle; The task status includes: downloading status, prompting status, upgrading status, and no task status; A download module, used for pushing a target baseline download task to the target vehicle when the task state of the target vehicle is a no-task state; the target baseline download task is used to instruct the target vehicle to download the target baseline; A judgment module, used for sending a wake-up instruction to the target vehicle and querying the task status of the target vehicle if the task status of the target vehicle is a downloading status and the target vehicle is in a dormant state; A prompt module, used for querying whether the target vehicle is in a dormant state when the task state of the target vehicle is a prompt state; An upgrade module, used for sending a preset upgrade instruction to the target vehicle when the target vehicle is in a dormant state; A recording module, used to upgrade the target vehicle according to the preset upgrade instruction and record the number of upgrades; The end module is used to determine whether the test task is ended according to the upgrade times and the preset upgrade times.
10. A vehicle, characterized in that: Comprising the OTA stress testing device as described in claim 8.
11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the OTA stress testing method described in any one of claims 1 to 7 is implemented.
12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the OTA stress testing method described in any one of claims 1 to 7 is implemented.