Stress testing method and system for vehicle OTA upgrade, device, storage medium and product

WO2026174791A1PCT designated stage Publication Date: 2026-08-27CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/123790
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-21
Filing Date
2025-09-24
Publication Date
2026-08-27

Smart Images

  • Figure CN2025123790_27082026_PF_FP_ABST
    Figure CN2025123790_27082026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a stress testing method and system for vehicle OTA upgrade, a device and a storage medium. The method comprises: configuring an OTA upgrade stress testing task, and acquiring an image template of an interface of a vehicle-side main unit; establishing a connection with the vehicle-side main unit by means of an ADB line; setting the number of stress tests of the OTA upgrade stress testing task, and using an automated stress testing program to automatically perform stress tests on the basis of the number of stress tests, wherein on the basis of the image template, a target element on the interface of the vehicle-side main unit is recognized by means of an image recognition method, and a stress testing operation is performed on the basis of the recognized target element; and when reaching the set number of stress tests, generating a stress testing report by means of the automated stress testing program.
Need to check novelty before this filing date? Find Prior Art

Description

Stress testing methods, systems, devices, storage media, and products for automotive OTA upgrades.

[0001] This application claims priority to Chinese Patent Application No. 202510193692.4, filed on February 21, 2025, entitled "Stress Testing Method, System, Device and Storage Medium for Automotive OTA Upgrades", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This disclosure belongs to the field of automated testing technology, and in particular relates to a stress testing method, system, device, storage medium and product for automotive OTA upgrades. Background Technology

[0003] Automated testing is a software testing method that uses specialized software tools to automatically execute test cases and compare the actual results with the expected results. This method can significantly improve the efficiency and accuracy of testing, reducing the time and cost required for manual testing. Automated testing is increasingly used in industries such as mobile phones, automobiles, and factory manufacturing, where the demand for testing efficiency is becoming increasingly strong. Summary of the Invention

[0004] This disclosure provides a stress testing method, system, device, storage medium, and product for automotive OTA upgrades.

[0005] The technical solution disclosed herein is as follows:

[0006] Firstly, a stress testing method for automotive OTA upgrades is provided, for use on a PC, the method comprising:

[0007] Configure an OTA upgrade stress test task and obtain an image template of the vehicle host interface; wherein, the image template is used to identify specific elements of the vehicle host interface;

[0008] Establish a connection with the vehicle-side host via the ADB cable;

[0009] The number of stress tests for the OTA upgrade stress test task is set, and the stress test is automatically performed using an automated stress test program based on the number of stress tests. Specifically, based on the image template, target elements on the vehicle host interface are identified using an image recognition method, and stress test operations are performed based on the identified target elements.

[0010] Once the set number of stress tests is reached, a stress test report is generated by the automated stress test program.

[0011] In some embodiments, establishing a connection with the vehicle-mounted host via an ADB cable specifically includes projecting the vehicle-mounted host interface onto a PC using an ARDC method.

[0012] In some embodiments, the operation of identifying target elements on the vehicle-mounted host interface using image recognition methods and performing stress tests based on the identified target elements specifically includes:

[0013] Use PyAutoGUI methods to capture a screenshot of the current vehicle-side host interface;

[0014] The screenshot was used to perform image recognition to obtain the position coordinates of the target element to be clicked.

[0015] The PyAutoGUI method is used to perform click operations based on the location coordinates, and the result of each click operation is recorded.

[0016] In some embodiments, the above-mentioned use of OpenCV methods to perform image recognition on the screenshot to obtain the position coordinates of the target element to be clicked specifically includes:

[0017] Use OpenCV methods to read the screenshot and the image template;

[0018] The image template's attribute data is obtained using the Shape attribute method. The attribute data includes: height, width, and number of channels.

[0019] Based on the attribute data, the matchTemplate method is used to perform similarity matching between the screenshot and the image template to obtain a matching result matrix;

[0020] The minimum and maximum values ​​in the matching result matrix are obtained using the minMaxLoc method. The matching position of the image template is obtained based on the maximum value. The coordinates of the top left corner of the image template are calculated based on the matching position and the minimum value.

[0021] The lower right corner coordinates of the image template are calculated based on the upper left corner coordinates and the attribute data. The position coordinates of the image template are then calculated based on the lower right corner coordinates of the upper left corner coordinates. The position coordinates of the image template are the position coordinates of the target element to be clicked.

[0022] In some embodiments, establishing a connection with the vehicle-side host via the ADB line specifically includes:

[0023] Use the ADB client on the PC to check if the vehicle-side host has a running first ADB server;

[0024] If the vehicle-side host has a running first ADB server, a connection is established with the first ADB server through the ADB client.

[0025] If the vehicle-side host does not have a running first ADB server, a second ADB server will be automatically started, and a connection will be established with the ADB daemon of the vehicle-side host through the second ADB server.

[0026] Secondly, a stress testing method for automotive OTA upgrades is provided, for the vehicle-side host, including:

[0027] Listen for whether an OTA upgrade stress test task has been received;

[0028] If no OTA upgrade stress test task is received, the test will end and a test failure report will be generated.

[0029] If an OTA upgrade stress test task is received, a preparation completion command is sent to the PC. The preparation completion command is used to enable the automated stress test program on the PC to use image recognition to enter the secondary APP menu of the vehicle host, and to execute the stress test method for automotive OTA upgrade as described above on the vehicle host according to the OTA upgrade stress test task.

[0030] Thirdly, a stress testing system for automotive OTA upgrades is provided, for use on a PC, the system comprising:

[0031] The configuration module is used to configure the OTA upgrade stress test task and obtain the image template of the vehicle host interface; wherein, the image template is used to identify specific elements of the vehicle host interface;

[0032] The communication module is used to establish a connection with the vehicle-side host via the ADB cable;

[0033] The stress testing module is used to set the number of stress tests for the OTA upgrade stress test task, and to automatically perform stress tests according to the number of stress tests using an automated stress testing program. Specifically, based on the image template, target elements on the vehicle host interface are identified using an image recognition method, and stress test operations are performed based on the identified target elements.

[0034] The reporting module is used to generate a stress test report through the automated stress test program when the set number of stress tests is reached.

[0035] Fourthly, a stress testing system for automotive OTA upgrades is provided, for the vehicle-side host, including:

[0036] The monitoring module is used to monitor whether the OTA upgrade stress test task has been received.

[0037] If no OTA upgrade stress test task is received, the test will end and a test failure report will be generated.

[0038] If an OTA upgrade stress test task is received, a preparation completion command is sent to the PC. The preparation completion command is used to enable the automated stress test program on the PC to use image recognition to enter the secondary APP menu of the vehicle host, and to execute the stress test method for automotive OTA upgrade as described above on the vehicle host according to the OTA upgrade stress test task.

[0039] Fifthly, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned stress testing method for automotive OTA upgrades.

[0040] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the aforementioned stress testing method for automotive OTA upgrades.

[0041] In a seventh aspect, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the aforementioned stress testing method for automotive OTA upgrades.

[0042] Other features and advantages of this disclosure will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0044] Figure 1 shows a schematic flowchart of a stress testing method for automotive OTA upgrades according to an embodiment of the present disclosure;

[0045] Figure 2 shows a schematic diagram of the connection between the PC terminal and the vehicle-mounted host according to an embodiment of the present disclosure;

[0046] Figure 3 shows a schematic flowchart of a stress testing method for automotive OTA upgrades according to an embodiment of the present disclosure;

[0047] Figure 4 illustrates a flowchart of the process of the vehicle-mounted host entering the OTA upgrade stage according to an embodiment of the present disclosure;

[0048] Figure 5 illustrates a schematic diagram of an image recognition process according to an embodiment of the present disclosure;

[0049] Figure 6 shows a structural schematic diagram of a stress testing system for automotive OTA upgrades according to an embodiment of the present disclosure;

[0050] Figure 7 shows a schematic diagram of another stress testing system for automotive OTA upgrades according to an embodiment of the present disclosure;

[0051] Figure 8 shows a schematic diagram of an electronic device structure according to an embodiment of the present disclosure. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort fall within the scope of protection of this disclosure.

[0053] In related technologies, the use of image recognition technology for automated testing of mobile phone functions is already mature. As automotive infotainment systems become increasingly feature-rich, the number of test cases required also increases. Therefore, it is necessary to optimize testing tools and methods based on traditional automated testing to improve testing efficiency and reduce labor costs.

[0054] The related technologies have the following technical problems:

[0055] 1. Automated testing requires calling the interface of the car host to complete the automated testing. However, the car host suppliers used by the original equipment manufacturers (OEMs) for their vehicle projects are different. The interface documents written by each supplier are different, and the platform construction is not yet perfect. As a result, the interface needs to be re-adapted for each project and the amount of modification is large.

[0056] 2. Currently, automotive head units have strict access control over API calls, which affects the use of automated test scripts and significantly reduces testing efficiency. In related technologies, automated testing methods for API calls cannot simulate user touch operations in a real vehicle.

[0057] 3. Currently, there are many different types of energy vehicles, and they are becoming increasingly intelligent, requiring the testing of more and more functions. The scalability of existing testing methods cannot meet the increasing testing demands of extended range vehicles, necessitating continuous script modifications to achieve stress testing.

[0058] This disclosure aims to solve the aforementioned technical problems existing in the related art.

[0059] Figure 1 illustrates a flowchart of a stress testing method for over-the-air (OTA) upgrades in automobiles according to an embodiment of the present disclosure. As shown in Figure 1, the stress testing method for OTA upgrades in automobiles according to an embodiment of the present disclosure is used on a personal computer (PC), and the method includes the following steps S101-S104. It should be noted that the steps here are not intended to strictly limit the execution order of each step, and those skilled in the art can adjust the execution order of some steps according to needs or application scenarios. The method in this embodiment is used on a PC, meaning that the execution subject of the solution in this embodiment can be a computer.

[0060] Step S101: Configure the OTA upgrade stress test task and obtain the image template of the vehicle host interface; wherein, the image template is used to identify specific elements of the vehicle host interface.

[0061] In this embodiment, specific elements include buttons and menu items. It is also necessary to set parameters such as image recognition thresholds and matching methods to ensure the accuracy and robustness of the recognition.

[0062] Step S102: Establish a connection with the vehicle host via the Android Debug Bridge (ADB) cable.

[0063] Step S103: Set the number of stress tests for the OTA upgrade stress test task, automatically perform stress tests using an automated stress test program based on the number of stress tests, and identify target elements on the vehicle-side host interface using an image recognition method based on the image template, and perform stress test operations based on the identified target elements. It should be noted that in this step, "identifying target elements on the vehicle-side host interface using an image recognition method based on the image template, and performing stress test operations based on the identified target elements" is actually an operation in each stress test process. Therefore, step S103 can also be expressed as: setting the number of stress tests for the OTA upgrade stress test task, automatically performing stress tests using an automated stress test program based on the number of stress tests, wherein, based on the image template, identifying target elements on the vehicle-side host interface using an image recognition method, and performing stress test operations based on the identified target elements.

[0064] Step S104: After reaching the set number of stress tests, a stress test report is generated by the automated stress test program. In other words, a stress test report is generated by the automated stress test program after reaching the set number of stress tests.

[0065] In some embodiments, establishing a connection with the vehicle-mounted host via an ADB cable specifically includes projecting the vehicle-mounted host interface onto a PC using the ARDC (Android Remote Display Controller) method.

[0066] Figure 2 illustrates the connection between the PC and the vehicle-mounted host in some embodiments. Figure 2 shows the connection methods between the PC and the vehicle-mounted host at the physical layer, transport layer, and application layer. At the physical layer, a standard ADB cable is used to establish communication between the ADB server on the PC and the Android Debug Bridge Daemon (ADBD) in the vehicle-mounted host. At the transport layer, the connection is established using the Transmission Control Protocol (TCP). At the application layer, the vehicle-mounted screen is projected onto the PC via an ARDC program. Through this connection, image recognition can be implemented, and automatic click operations can be performed based on the recognition results.

[0067] In some embodiments, it is also used for a vehicle-mounted host, including:

[0068] Monitor whether the OTA upgrade stress test task has been received;

[0069] If no OTA upgrade stress test task is received, the test will end and a test failure report will be generated.

[0070] If an OTA upgrade stress test task is received, a ready-to-complete instruction is sent to the PC. The ready-to-complete instruction is used by the automated stress test program to enter the secondary APP (Application) menu of the vehicle host using image recognition method, and to perform the OTA upgrade operation on the vehicle host according to the OTA upgrade stress test task.

[0071] This embodiment provides a stress testing method for automotive OTA upgrades, specifically for the vehicle-side host. Referring to Figure 3, the method includes:

[0072] Step S301: Listen for whether an OTA upgrade stress test task has been received;

[0073] Step S302: If no OTA upgrade stress test task is received, end the test and generate a test failure report;

[0074] Step S303: If an OTA upgrade stress test task is received, a preparation completion instruction is sent to the PC. The preparation completion instruction is used to enable the automated stress test program on the PC to use image recognition to enter the secondary APP menu of the vehicle host, and to execute the stress test method for automotive OTA upgrade as described above on the vehicle host according to the OTA upgrade stress test task.

[0075] The method in this embodiment is used for the vehicle-side host, meaning that the method in this embodiment can be executed by the vehicle-side host. In other words, the vehicle-side host executes the above-described multiple steps, enabling the PC to perform the stress testing steps on the PC side. The PC and the vehicle-side host cooperate to perform stress testing on the vehicle's OTA upgrade. The PC-side stress testing method is as described in other embodiments; details can be found in other embodiments and will not be repeated here.

[0076] In some embodiments, after the test is completed, the connection between the vehicle or the OTA cloud, or both, can be improved based on the stress test report to optimize the subsequent OTA upgrade process.

[0077] In some embodiments, the vehicle-side interface listens for OTA upgrade stress test tasks. If no OTA upgrade stress test task is received within 10 minutes, the task status is checked. If a timeout occurs, the OTA upgrade stress test task is considered complete and a report is generated. If an OTA upgrade stress test task is received, the system uses an automated image recognition method to access the secondary APP menu and initiates the OTA upgrade by clicking the vehicle upgrade button in the automated stress test program. In other words, the vehicle-side host sends a ready-to-complete command to the PC, causing the PC to access the vehicle-side host's secondary APP menu via an automated image recognition method and initiate the OTA upgrade by clicking the vehicle upgrade button in the automated stress test program.

[0078] Figure 4 shows a flowchart of the vehicle-side host entering the OTA upgrade stage. In this embodiment, the vehicle-side host enters the upgrade stage according to the click of the automated stress test program (that is, it enters the upgrade stage in response to the click operation of the automated stress test program) and waits for the automated stress test program to configure the OTA upgrade. After the upgrade is completed, the power is turned off and the upgrade result is recorded. Then the automated stress test program determines whether the preset number of stress tests has been reached. If not, the stress test is performed on the vehicle-side host again.

[0079] In some embodiments, the operation of identifying target elements on the vehicle-mounted host interface using an image recognition method and performing stress testing based on the identified target elements specifically includes:

[0080] Use PyAutoGUI methods to capture a screenshot of the current vehicle-side host interface;

[0081] The screenshot was used to perform image recognition to obtain the position coordinates of the target element to be clicked.

[0082] The PyAutoGUI method is used to perform click operations based on the location coordinates, and the result of each click operation is recorded.

[0083] In some embodiments, using OpenCV methods to perform image recognition on the screenshot to obtain the position coordinates of the target element to be clicked specifically includes:

[0084] Use OpenCV methods to read the screenshot and the image template;

[0085] The image template's attribute data is obtained using the Shape attribute method. The attribute data includes: height, width, and number of channels.

[0086] Based on the attribute data, the matchTemplate method is used to perform similarity matching between the screenshot and the image template to obtain a matching result matrix;

[0087] The minimum and maximum values ​​in the matching result matrix are obtained using the minMaxLoc method. The matching position of the image template is obtained based on the maximum value. The coordinates of the top left corner of the image template are calculated based on the matching position and the minimum value.

[0088] The lower right corner coordinates of the image template are calculated based on the upper left corner coordinates and the attribute data. The position coordinates of the image template are then calculated based on the lower right corner coordinates of the upper left corner coordinates. The position coordinates of the image template are the position coordinates of the target element to be clicked.

[0089] In this embodiment, as shown in Figure 5, which is a schematic diagram of the image recognition process, the automatic click function is provided with a tuple of coordinates of the region to be matched. This disclosure provides an image recognition and automatic click method developed using the Python language. The image recognition mainly uses two libraries: OpenCV and PyAutoGUI. OpenCV is a widely used library in computer vision and image processing. In this disclosure, the PyAutoGUI library is called to perform screen capture and automatic click operations, and the screenshot to be matched is passed to the image recognition program.

[0090] This code uses functions from the OpenCV library to read screenshots and target templates, and obtains the height, width, and number of channels of the target template using the Shape attribute. It then uses the matchTempalte template matching function, employing the standard squared difference method for matching. The result is a matrix of the same size as the target template, where each value represents the degree of matching at the corresponding position.

[0091] The `minMaxLoc` function finds the minimum and maximum values ​​and their positions in the matrix. Since squared difference matching is used, the coordinates of the minimum value are the coordinates of the top-left corner of the optimal matching position. After obtaining the top-left target, the coordinates of the bottom-right corner of the matching area can be calculated. After obtaining the coordinates of the top-left and bottom-right corners of the required matching area, the coordinates of the center point can be calculated. Once the coordinate tuple is obtained, the automatic clicking operation can begin.

[0092] In some embodiments, establishing a connection with the vehicle-mounted host via the ADB line specifically includes:

[0093] Use the ADB client on the PC to check if the vehicle-side host has a running first ADB server;

[0094] If so, a connection is established between the ADB client and the first ADB server;

[0095] If not, a second ADB server will be started automatically, and a connection will be established with the ADB daemon of the vehicle-side host through the second ADB server.

[0096] In other words, the PC-based ADB client checks whether the vehicle-side host has a running first ADB server; if the vehicle-side host has a running first ADB server, a connection is established with the first ADB server through the ADB client; if the vehicle-side host does not have a running first ADB server, a second ADB server is automatically started, and a connection is established with the vehicle-side host's ADB daemon through the second ADB server.

[0097] In some embodiments, a command line or terminal is opened on the PC, and a check command is run to check the status of the currently connected devices and ADB server: if the device list is displayed in the command output, it means that there is already a running ADB server (first ADB server) on the vehicle host. Then, an auto-start command is run to start a new ADB server (second ADB server); then, a connection is established between the second ADB server and the ADB daemon of the vehicle host. After the connection is established, the ADB server can send service requests to the second ADB server.

[0098] This disclosure achieves the following technical effects:

[0099] 1. This disclosure uses image recognition methods to replace API calls, avoiding complex interface adaptations for different host vendors. Even when switching between different vehicle host vendors, there is no need to make extensive modifications to the test scripts, thereby improving development efficiency and flexibility.

[0100] 2. This disclosure does not rely on directly calling the interfaces provided by the vehicle's host computer, and therefore is not subject to interface permission management policies. It can simulate user interaction behaviors for load testing, such as touchscreen clicks.

[0101] 3. This invention utilizes an ADB cable to establish a connection and combines it with ARDC projection technology to map the vehicle interface onto a PC for control, thereby achieving efficient and accurate operation simulation.

[0102] 4. This disclosure utilizes image recognition to address the increasing and more complex testing needs of intelligent functions. It eliminates the need for frequent changes to test scripts to adapt to new functions or vehicle models; as long as the target elements on the interface remain consistent, the same template can continue to be used for testing.

[0103] Based on the same principle as the method shown in Figure 1, this disclosure also provides a stress testing system for automotive OTA upgrades, as shown in Figure 6, for use on a PC. The system includes:

[0104] Configuration module 601 is used to configure OTA upgrade stress test tasks and obtain image templates of the vehicle host interface; wherein, the image templates are used to identify specific elements of the vehicle host interface;

[0105] Communication module 602 is used to establish a connection with the vehicle-side host via an ADB cable;

[0106] The stress testing module 603 is used to set the number of stress tests for the OTA upgrade stress test task, automatically perform stress tests using an automated stress testing program based on the number of stress tests, and identify target elements on the vehicle-side host interface based on the image template using an image recognition method, and perform stress test operations based on the identified target elements; that is, the stress testing module is used to set the number of stress tests for the OTA upgrade stress test task, automatically perform stress tests using an automated stress testing program based on the number of stress tests, and identify target elements on the vehicle-side host interface based on the image template using an image recognition method, and perform stress test operations based on the identified target elements;

[0107] The reporting module 604 is used to generate a stress test report through the automated stress test program after the set number of stress tests has been reached. That is, the stress test report is generated through the automated stress test program when the set number of stress tests has been reached.

[0108] Referring to Figure 7, this disclosure also provides a stress testing system for automotive OTA upgrades, used in a vehicle-side host, comprising:

[0109] The monitoring module 701 is used to monitor whether the OTA upgrade stress test task has been received.

[0110] If no OTA upgrade stress test task is received, the test will end and a test failure report will be generated.

[0111] If an OTA upgrade stress test task is received, a preparation completion command is sent to the PC. The preparation completion command is used by the automated stress test program to enter the secondary APP menu of the vehicle host using an image recognition method, and to perform the OTA upgrade operation on the vehicle host according to the OTA upgrade stress test task (that is, the preparation completion command is used to enable the automated stress test program on the PC to enter the secondary APP menu of the vehicle host using an image recognition method, and to perform the stress test method for automotive OTA upgrade as described above on the vehicle host according to the OTA upgrade stress test task).

[0112] The stress testing system for automotive OTA upgrades in this disclosure can execute the stress testing method for automotive OTA upgrades provided in this disclosure, and their implementation principles are similar. The actions performed by each module and unit in the stress testing system for automotive OTA upgrades in each embodiment of this disclosure correspond to the steps in the stress testing method for automotive OTA upgrades in each embodiment of this disclosure. For detailed functional descriptions of each module in the stress testing system for automotive OTA upgrades, please refer to the descriptions in the corresponding stress testing methods for automotive OTA upgrades shown above, which will not be repeated here.

[0113] The stress testing system for automotive OTA upgrades described above can be a computer program (including program code) running on a computer device. For example, the stress testing system for automotive OTA upgrades can be an application software. The application software can be used to execute the corresponding steps in the methods provided in the embodiments of this disclosure.

[0114] In some embodiments, the stress testing system for automotive OTA upgrades provided in this disclosure can be implemented using a combination of hardware and software. As an example, the stress testing system for automotive OTA upgrades provided in this disclosure can be a processor in the form of a hardware decoding processor, which is programmed to execute the stress testing method for automotive OTA upgrades provided in this disclosure. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), digital signal processing units (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0115] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.

[0116] Based on the same principles as the methods shown in the embodiments of this disclosure, the embodiments of this disclosure also provide an electronic device, which may include, but is not limited to: a processor and a memory; the memory for storing computer programs; and the processor for executing the methods shown in any embodiment of this disclosure by invoking the computer programs.

[0117] In one optional embodiment, an electronic device is provided, as shown in FIG8. The electronic device shown in FIG8 includes a processor 801 and a memory 802. The processor 801 and the memory 802 are connected, such as via a bus. Optionally, the electronic device may further include a transceiver 803, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver is not limited to one, and the structure of this electronic device does not constitute a limitation on the embodiments of this disclosure.

[0118] The processor can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0119] A bus can include a pathway for transmitting information between the aforementioned components. The bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, Figure 6 uses only one thick line to represent a bus, but this does not imply that there is only one bus or one type of bus.

[0120] The memory may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic 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 not limited to these.

[0121] The memory stores application code (computer program) that executes the present disclosure, and its execution is controlled by a processor. The processor executes the application code stored in the memory to implement the content shown in the foregoing method embodiments.

[0122] The electronic device may also be a terminal device. The electronic device shown in Figure 8 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this disclosure.

[0123] This disclosure provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.

[0124] According to another aspect of this disclosure, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various embodiments described above.

[0125] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0126] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0127] The computer-readable storage medium provided in this disclosure can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0129] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A stress testing method for automotive OTA upgrades, used on a PC, the method comprising: Configure an OTA upgrade stress test task and obtain an image template of the vehicle host interface; wherein, the image template is used to identify specific elements of the vehicle host interface; Establish a connection with the vehicle-side host via the ADB cable; The number of stress tests for the OTA upgrade stress test task is set, and the stress test is automatically performed using an automated stress test program based on the number of stress tests. Specifically, based on the image template, target elements on the vehicle host interface are identified using an image recognition method, and stress test operations are performed based on the identified target elements. Once the set number of stress tests is reached, a stress test report is generated by the automated stress test program.

2. The method according to claim 1, wherein, Establishing a connection with the vehicle-mounted host via an ADB cable specifically includes projecting the vehicle-mounted host interface onto a PC using the ARDC method.

3. The method according to claim 1, wherein, The operation of identifying target elements on the vehicle-mounted host interface using image recognition methods and performing stress tests based on the identified target elements specifically includes: Use PyAutoGUI methods to capture a screenshot of the current vehicle-side host interface; The screenshot was used to perform image recognition to obtain the position coordinates of the target element to be clicked. The PyAutoGUI method is used to perform click operations based on the location coordinates, and the result of each click operation is recorded.

4. The method according to claim 3, wherein, Using OpenCV methods to perform image recognition on the screenshot to obtain the location coordinates of the target element to be clicked specifically includes: Use OpenCV methods to read the screenshot and the image template; The image template's attribute data is obtained using the Shape attribute method. The attribute data includes: height, width, and number of channels. Based on the attribute data, the matchTemplate method is used to perform similarity matching between the screenshot and the image template to obtain a matching result matrix; The minimum and maximum values ​​in the matching result matrix are obtained using the minMaxLoc method. The matching position of the image template is obtained based on the maximum value. The coordinates of the top left corner of the image template are calculated based on the matching position and the minimum value. The lower right corner coordinates of the image template are calculated based on the upper left corner coordinates and the attribute data. The position coordinates of the image template are then calculated based on the lower right corner coordinates of the upper left corner coordinates. The position coordinates of the image template are the position coordinates of the target element to be clicked.

5. The method according to claim 1, wherein, Establishing a connection with the vehicle-side host via the ADB cable specifically includes: Use the ADB client on the PC to check if the vehicle-side host has a running first ADB server; If the vehicle-side host has a running first ADB server, a connection is established with the first ADB server through the ADB client. If the vehicle-side host does not have a running first ADB server, a second ADB server will be automatically started, and a connection will be established with the ADB daemon of the vehicle-side host through the second ADB server.

6. A stress testing method for automotive OTA upgrades, used in a vehicle-side host, comprising: Listen for whether an OTA upgrade stress test task has been received; If no OTA upgrade stress test task is received, the test will end and a test failure report will be generated. If an OTA upgrade stress test task is received, a preparation completion command is sent to the PC. The preparation completion command is used to enable the automated stress test program on the PC to use image recognition to enter the secondary APP menu of the vehicle host, and execute the stress test method for automotive OTA upgrade as described in any one of claims 1-5 on the vehicle host according to the OTA upgrade stress test task.

7. A stress testing system for automotive OTA upgrades, used on a PC, the system comprising: The configuration module is used to configure the OTA upgrade stress test task and obtain the image template of the vehicle host interface; wherein, the image template is used to identify specific elements of the vehicle host interface; The communication module is used to establish a connection with the vehicle-side host via the ADB cable; The stress testing module is used to set the number of stress tests for the OTA upgrade stress test task, and to automatically perform stress tests according to the number of stress tests using an automated stress testing program. Specifically, based on the image template, target elements on the vehicle host interface are identified using an image recognition method, and stress test operations are performed based on the identified target elements. The reporting module is used to generate a stress test report through the automated stress test program when the set number of stress tests is reached.

8. A stress testing system for automotive OTA upgrades, used in a vehicle-side host, comprising: The monitoring module is used to monitor whether the OTA upgrade stress test task has been received. If no OTA upgrade stress test task is received, the test will end and a test failure report will be generated. If an OTA upgrade stress test task is received, a preparation completion command is sent to the PC. The preparation completion command is used to enable the automated stress test program on the PC to use image recognition to enter the secondary APP menu of the vehicle host, and execute the stress test method for automotive OTA upgrade as described in any one of claims 1-5 on the vehicle host according to the OTA upgrade stress test task.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-6.

10. A computer storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-6.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-6.