Pressure measurement method, system and device for automobile OTA upgrading and storage medium

Through image recognition technology and ADB line connection, traditional automated testing has solved the problems of complex interface adaptation, strict authority management and insufficient expansion in automotive OTA upgrades, and efficient and flexible testing methods are realized, improving testing efficiency and accuracy.

CN120144444APending Publication Date: 2025-06-13CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510193692.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Traditional automated testing has problems such as complex interface adaptation, strict permission management and insufficient expansion in automotive OTA upgrades, resulting in inefficient testing and frequent script changes.

Method used

The image recognition method is used to connect the vehicle end host through the ADB line, obtain the image template of the on-board host interface, identify the target elements, perform stress test operations, and generate a stress test report.

Benefits of technology

It avoids the complexity of interface adaptation, reduces the impact of permission management, improves the flexibility and efficiency of testing, reduces the frequency of script changes, and meets the increasing demand for intelligent functional testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144444A_ABST
    Figure CN120144444A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of automatic testing, and particularly relates to a pressure testing method, system and device for automobile OTA upgrading and a storage medium. The method aims to solve the technical problems that in the prior art, expansibility of a traditional testing method cannot meet the testing requirement of increasing range, and scripts need to be continuously changed to achieve pressure testing. Comprising the following steps: configuring an OTA upgrade pressure test task, and obtaining an image template of a vehicle-mounted host interface; establishing connection with a vehicle-end host through an ADB line; setting a pressure test frequency of the OTA upgrade pressure test task, automatically performing a pressure test according to the pressure test frequency by using an automatic pressure test program, identifying a target element on a vehicle end host interface through an image identification method based on the image template, and executing a pressure test operation according to the identified target element; and after the set pressure test times are reached, generating a pressure test report through the automatic pressure test program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automated testing, and particularly relates to a stress testing method, system, device, and storage medium for automotive OTA upgrades. Background Art

[0002] Automated testing is a method of software testing 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 being increasingly applied in industries such as mobile phones, automobiles, and factory manufacturing, and the demand for testing efficiency in these industries is becoming more intense.

[0003] In the prior art, the use of image recognition technology in mobile phone function automated testing has matured. As the functions of automotive head units become more abundant, the number of test cases to be tested also increases. It is necessary to optimize test tools and methods based on traditional automated testing to improve testing efficiency and reduce labor costs.

[0004] The prior art has the following technical problems:

[0005] 1. Traditional automated testing needs to call the interfaces of the automotive host to complete automated testing. However, for OEM vehicle projects, the automotive host suppliers are different, the interface documents written by each supplier are different, and the platform construction is not yet perfect. As a result, traditional interfaces need to be re-adapted for each project and the amount of modification is large.

[0006] 2. Currently, the automotive host has relatively strict permission management for calling interfaces, and permissions affect the use of traditional automated testing scripts, resulting in a significant reduction in testing efficiency. The traditional automated testing method of calling interfaces cannot simulate operations such as touching by users in a real vehicle.

[0007] 3. Currently, there are many types of energy vehicles and their intelligence is becoming more abundant, and the functions to be tested are also increasing. The scalability of traditional testing methods cannot meet the growing testing requirements, and it is necessary to continuously change the scripts to implement stress testing. Summary of the Invention

[0008] The present invention provides a stress testing method, system, device, and storage medium for automotive OTA upgrades, aiming to solve the technical problems existing in the prior art, namely, that traditional interfaces need to be re-adapted for each project and the amount of modification is large; the traditional automated testing method of calling interfaces cannot simulate operations such as touching by users in a real vehicle; and the scalability of traditional testing methods cannot meet the growing testing requirements, and it is necessary to continuously change the scripts to implement stress testing.

[0009] The technical solution of the present invention to solve the above technical problems is as follows: A stress testing method for automotive OTA upgrade, which is used for the PC side. The method includes:

[0010] Configure the OTA upgrade stress testing task and obtain the image template of the in-vehicle host interface; wherein, the image template is used to identify specific elements on the in-vehicle host interface.

[0011] Establish a connection with the in-vehicle host through the ADB line.

[0012] Set the number of stress testing times for the OTA upgrade stress testing task, and use the automated stress testing program to automatically perform stress testing according to the number of stress testing times. Based on the image template, identify the target elements on the in-vehicle host interface through the image recognition method, and perform the stress testing operation according to the identified target elements.

[0013] After reaching the set number of stress testing times, generate a stress testing report through the automated stress testing program.

[0014] Further, the above-mentioned establishment of a connection with the in-vehicle host through the ADB line specifically includes: casting the in-vehicle host interface to the PC side through the ARDC method.

[0015] Further, the above is also used for the in-vehicle host, including:

[0016] Monitor whether the OTA upgrade stress testing task is received.

[0017] If the OTA upgrade stress testing task is not received, end the test and generate a test failure report.

[0018] If the OTA upgrade stress testing task is received, send a preparation completed instruction to the PC side. The preparation completed instruction is used for the automated stress testing program to enter the secondary APP menu of the in-vehicle host using the image recognition method and perform the OTA upgrade operation on the in-vehicle host according to the OTA upgrade stress testing task.

[0019] Further, the above-mentioned identification of the target elements on the in-vehicle host interface through the image recognition method and the performance of the stress testing operation according to the identified target elements specifically include:

[0020] Use the PyAutoGUI method to capture the screen shot of the current in-vehicle host interface.

[0021] Use the OpenCV method to perform image recognition on the screen shot to obtain the position coordinates of the target elements to be clicked.

[0022] Use the PyAutoGUI method to perform click operations according to the position coordinates and record the results of each click operation.

[0023] Further, the specific steps for obtaining the position coordinates of the target element to be clicked include:

[0024] Use the OpenCV method to read the screenshot and the image template;

[0025] Use the Shape attribute method to obtain the attribute data of the image template, where the attribute data includes: height, width, and number of channels;

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

[0027] Use the minMaxLoc method to obtain the minimum and maximum values in the matching result matrix, obtain the matching position of the image template according to the maximum value, and calculate the upper left corner coordinates of the image template according to the matching position and the minimum value;

[0028] Calculate the lower right corner coordinates of the image template based on the upper left corner coordinates and the attribute data, and calculate the position coordinates of the image template based on the upper left corner coordinates and the lower right corner coordinates; wherein, the position coordinates of the image template are the position coordinates of the target element to be clicked.

[0029] Further, the specific steps for establishing a connection with the vehicle-end host through the ADB line include:

[0030] Use the ADB client on the PC side to check whether there is a running first ADB server on the vehicle-end host;

[0031] If so, establish a connection with the first ADB server through the ADB client;

[0032] If not, self-start the second ADB server and establish a connection with the ADB daemon process of the vehicle-end host through the second ADB server.

[0033] In a second aspect, the present invention also provides a stress testing system for automotive OTA upgrades, which is used for the PC side. The system includes:

[0034] A configuration module, which is used to configure the OTA upgrade stress testing task and obtain an image template of the in-vehicle host interface; wherein, the image template is used to identify specific elements on the vehicle-end host interface;

[0035] A communication module, which is used to establish a connection with the vehicle-end host through the ADB line;

[0036] A pressure test module, which is used to set the number of pressure test times for the OTA upgrade pressure test task, automatically perform a pressure test according to the number of pressure test times by using an automated pressure test program, and based on the image template, identify target elements on the vehicle-end host interface through an image recognition method, and perform pressure test operations according to the identified target elements;

[0037] A report module, which is used to generate a pressure test report through the automated pressure test program after reaching the set number of pressure test times.

[0038] Furthermore, the above is also used for the vehicle-end host, including:

[0039] A monitoring module, which is used to monitor whether the OTA upgrade pressure test task is received:

[0040] If the OTA upgrade pressure test task is not received, the test is ended and a test failure report is generated;

[0041] If the OTA upgrade pressure test task is received, a preparation completion instruction is sent to the PC side. The preparation completion instruction is used for the automated pressure test program to enter the secondary APP menu of the vehicle-end host by using an image recognition method, and perform OTA upgrade operations on the vehicle-end host according to the OTA upgrade pressure test task.

[0042] In a third aspect, the present invention also provides an electronic device to solve the above technical problems. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the pressure test method for vehicle OTA upgrade of the present application is implemented.

[0043] In a fourth aspect, the present invention also provides a computer-readable storage medium to solve the above technical problems. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the pressure test method for vehicle OTA upgrade of the present application is implemented.

[0044] Compared with the prior art, the present invention has the following advantages:

[0045] 1. By using an image recognition method to replace traditional API calls, the present invention can avoid complex interface adaptation for hosts of different suppliers. Even when switching between different vehicle host suppliers, there is no need to make a large number of changes to the test script, thereby improving development efficiency and flexibility.

[0046] 2. The present invention does not rely on directly calling the interfaces provided by the vehicle host, so it is not affected by the interface permission management policy. It can simulate user interaction behaviors for pressure testing, such as touch screen clicks, etc.

[0047] 3. The present invention establishes a connection using an ADB cable and combines ARDC screen mirroring technology to map the in-vehicle interface to the PC side for control, enabling efficient and accurate operation simulation.

[0048] 4. Through image recognition, the present invention can meet the increasing and complex intelligent function test requirements. There is no need to frequently change test scripts to adapt to new functions or new vehicle models. As long as the target elements on the interface remain the same, the same template can be continued to be used for testing.

[0049] Other features and advantages of the present invention will be described in the subsequent specification, and in part, will become apparent from the specification or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures pointed out in the specification, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0051] Figure 1 FIG. shows a schematic flow chart of a stress testing method for automotive OTA upgrade according to an embodiment of the present invention;

[0052] Figure 2 FIG. shows a schematic connection diagram between the PC side and the vehicle host according to an embodiment of the present invention;

[0053] Figure 3 FIG. shows a schematic flow chart of the vehicle host entering the OTA upgrade stage according to an embodiment of the present invention;

[0054] Figure 4 FIG. shows a schematic flow chart of image recognition according to an embodiment of the present invention;

[0055] Figure 5 FIG. shows a schematic structural diagram of a stress testing system for automotive OTA upgrade according to an embodiment of the present invention;

[0056] Figure 6 FIG. shows a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0058] Figure 1 The flowchart of a stress testing method for automotive OTA upgrade according to an embodiment of the present invention is shown. As Figure 1 shown, a stress testing method for automotive OTA upgrade according to an embodiment of the present invention is for the PC side, and the method includes:

[0059] Configure the OTA upgrade stress testing task and obtain the image template of the in-vehicle host interface; wherein, the image template is used to identify specific elements on the vehicle-side host interface;

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

[0061] Establish a connection with the vehicle-side host through the ADB line;

[0062] Set the number of stress testing times for the OTA upgrade stress testing task, and use the automated stress testing program to automatically perform stress testing according to the number of stress testing times, and based on the image template, identify the target elements on the vehicle-side host interface through the image recognition method, and perform the operations of stress testing according to the identified target elements;

[0063] After reaching the set number of stress testing times, generate a stress testing report through the automated stress testing program.

[0064] Optionally, establishing a connection with the vehicle-side host through the ADB line specifically includes: casting the vehicle-side host interface to the PC side through the ARDC method.

[0065] In this embodiment, as Figure 2 shown, it is a schematic diagram of the connection between the PC side and the vehicle-side host, Figure 2 which provides the connection methods between the PC side and the vehicle-side host at the physical layer, transport layer, and application layer. At the physical layer, it is connected through the industry-standard ADB line to establish communication between the ADB server on the PC side and the ARBD in the vehicle-side host. At the transport layer, it is connected through the TCP connection method. At the application layer, the vehicle-side screen is cast to the PC side through the ARDC program. After the above connection, subsequent image recognition is realized, and automatic click operations are performed based on the recognition results.

[0066] Optionally, it is also used for the vehicle-end host, including:

[0067] Monitoring whether the OTA upgrade stress test task is received;

[0068] If the OTA upgrade stress test task is not received, end the test and generate a test failure report;

[0069] If the OTA upgrade stress test task is received, send a preparation completion instruction to the PC side. The preparation completion instruction is used for the automated stress test program to enter the secondary APP menu of the vehicle-end host using an image recognition method, and perform an OTA upgrade operation on the vehicle-end host according to the OTA upgrade stress test task.

[0070] In this embodiment, the vehicle-end interface monitors whether the OTA upgrade stress test task is received. If the OTA upgrade stress test task is not obtained within 10 minutes, the task status is detected. If it times out, the OTA upgrade stress test task ends and a report is generated. If the OTA upgrade stress test task is received, enter the secondary APP menu through the image recognition automation method and enter the OTA upgrade according to the vehicle upgrade button clicked by the automated stress test program.

[0071] Such as Figure 3 shown, it is a schematic flowchart of the vehicle-end host entering the OTA upgrade stage. In this embodiment, the vehicle-end host enters the upgrade stage according to the click 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 result of this upgrade is recorded. Then, the automated stress test program determines whether the preset number of stress test times is reached. If not, the vehicle-end host is stress-tested again.

[0072] Optionally, identifying the target element on the vehicle-end host interface by an image recognition method, and performing the stress test operation according to the identified target element specifically includes:

[0073] Using the PyAutoGUI method to capture the screen shot of the current vehicle-end host interface;

[0074] Using the OpenCV method to perform image recognition on the screen shot to obtain the position coordinates of the target element to be clicked;

[0075] Using the PyAutoGUI method to perform a click operation according to the position coordinates and record the result of each click operation.

[0076] Optionally, obtaining the position coordinates of the target element to be clicked specifically includes:

[0077] Using the OpenCV method to read the screen shot and the image template;

[0078] Use the Shape attribute method to obtain the attribute data of the image template, where the attribute data includes: height, width, and number of channels;

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

[0080] Use the minMaxLoc method to obtain the minimum and maximum values in the matching result matrix, obtain the matching position of the image template according to the maximum value, and calculate the upper left corner coordinates of the image template according to the matching position and the minimum value;

[0081] Calculate the lower right corner coordinates of the image template based on the upper left corner coordinates and the attribute data, and calculate the position coordinates of the image template based on the upper left corner coordinates and the lower right corner coordinates; where the position coordinates of the image template are the position coordinates of the target element to be clicked.

[0082] In this embodiment, as Figure 4 shown, it is a schematic diagram of the image recognition process. In terms of image recognition, it provides a coordinate tuple of the area to be matched for the automatic click function. The present invention provides a method for image recognition and automatic click developed using the python language. In image recognition, mainly two libraries, opencv and pyautogui, are used. Opencv is a widely used library in computer vision and image processing. In the present invention, the pyautogui library is called to perform screen capture and automatic click operations, and the screenshot to be matched is passed into the image recognition program.

[0083] Use the functions in the opencv library to read the screenshot and the target template and obtain the height, width, and number of channels of the target template through the Shape attribute. Use the matchTempalte template matching function to perform matching by using the standard square difference method. Return a matrix of the same size as the target template, and each value represents the matching degree of the corresponding position.

[0084] The minMaxLoc function is used to find the minimum and maximum values in the matrix and their positions. Since the square difference matching is used, the coordinates of the minimum value are the upper left corner coordinates of the best matching position. By calculating the target at the upper left corner, the lower right corner coordinates of the matching area can be obtained. By calculating the upper left corner and lower right corner coordinates of the required matching area, the coordinate tuple of the center point can be obtained. After obtaining the coordinate tuple, the automatic click operation can be started.

[0085] Optionally, establishing a connection with the vehicle-end host through the ADB line specifically includes:

[0086] Use the ADB client on the PC side to check whether there is a running first ADB server on the vehicle host;

[0087] If there is, establish a connection with the first ADB server through the ADB client;

[0088] If not, start the second ADB server automatically and establish a connection with the ADB daemon process of the vehicle host through the second ADB server.

[0089] In this embodiment, open the command line or terminal on the PC side and run the check command to check the status of the currently connected device and the ADB server: if the device list is displayed in the command output, it means that there is already a running ADB server (the first ADB server) on the vehicle host, then run the self-start command to start a new ADB server (the second ADB server); then establish a connection with the ADB daemon process of the vehicle host through the second ADB server. After the connection is established, the ADB server can send service requests to the second ADB server.

[0090] Based on the same principle as the method shown in Figure 1 , the embodiment of the present invention also provides a stress testing system for automotive OTA upgrade, as shown in Figure 5 , for the PC side, the system includes:

[0091] A configuration module, configured to configure an OTA upgrade stress test task and obtain an image template of the in-vehicle host interface; wherein, the image template is used to identify specific elements on the vehicle host interface;

[0092] A communication module, configured to establish a connection with the vehicle host through an ADB cable;

[0093] A stress testing module, configured to set the number of stress test times for the OTA upgrade stress test task, automatically perform stress testing according to the number of stress test times by using an automated stress testing program, and based on the image template, identify target elements on the vehicle host interface through an image recognition method, and perform stress testing operations according to the identified target elements;

[0094] A report module, configured to generate a stress test report through the automated stress testing program after the set number of stress test times is reached.

[0095] Optionally, it is also used for the vehicle host, including:

[0096] A monitoring module, configured to monitor whether the OTA upgrade stress test task is received:

[0097] If the OTA upgrade stress test task is not received, end the test and generate a test failure report;

[0098] If an OTA upgrade stress test task is received, a preparation completion instruction is sent to the PC side. The preparation completion instruction is used for the automated stress test program to enter the secondary APP menu of the vehicle host using an image recognition method and perform an OTA upgrade operation on the vehicle host according to the OTA upgrade stress test task.

[0099] The stress test system for vehicle OTA upgrade according to the embodiments of the present invention can execute the stress test method for vehicle OTA upgrade provided by the embodiments of the present invention, and their implementation principles are similar. The actions performed by each module and unit in the stress test system for vehicle OTA upgrade in the embodiments of the present invention correspond to the steps in the stress test method for vehicle OTA upgrade in the embodiments of the present invention. For the detailed function descriptions of each module of the stress test system for vehicle OTA upgrade, reference can specifically be made to the descriptions in the corresponding stress test method for vehicle OTA upgrade shown above, and details are not repeated here.

[0100] Among them, the above-mentioned stress test system for vehicle OTA upgrade can be a computer program (including program code) running on a computer device. For example, the stress test system for vehicle OTA upgrade is an application software; this application software can be used to execute the corresponding steps in the method provided by the embodiments of the present invention.

[0101] In some embodiments, the stress test system for vehicle OTA upgrade provided by the embodiments of the present invention can be implemented in a combination of software and hardware. As an example, the stress test system for vehicle OTA upgrade provided by the embodiments of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the stress test method for vehicle OTA upgrade provided by the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor can employ one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0102] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the module itself in some cases.

[0103] Based on the same principle as the method shown in the embodiments of the present invention, embodiments of the present invention also provide an electronic device, which may include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any embodiment of the present invention by calling the computer program.

[0104] In an alternative embodiment, an electronic device is provided, such as Figure 6 shown, Figure 6 the electronic device shown includes: a processor and a memory. Among them, the processor and the memory are connected, such as connected by a bus. Optionally, the electronic device may further include a transceiver, and the transceiver may be used for data interaction between the electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in practical applications, the transceiver is not limited to one, and the structure of the electronic device does not constitute a limitation to the embodiments of the present invention.

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

[0106] The bus may include a path for transmitting information between the above components. The bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 6 only a thick line is shown in, but it does not mean that there is only one bus or one type of bus.

[0107] The memory can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0108] The memory is used to store the application program code (computer program) for executing the solution of the present invention and is controlled by the processor for execution. The processor is used to execute the application program code stored in the memory to implement the content shown in the foregoing method embodiments.

[0109] Among them, the electronic device can also be a terminal device. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.

[0110] The embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments.

[0111] According to another aspect of the present invention, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various implementation manners of the embodiments.

[0112] Computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0113] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0114] The computer-readable storage medium provided by the embodiments of the present invention may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the 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, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium may 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.

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

[0116] The above description is only a preferred embodiment of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present invention.

Claims

1. A stress testing method for automobile OTA upgrade, characterized in that: For PC, the method includes: 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; Establish a connection with the vehicle host via the ADB line; Setting the number of stress tests for the OTA upgrade stress test task, automatically performing stress tests according to the number of stress tests using an automated stress test program, and identifying target elements on the vehicle-side host interface using an image recognition method based on the image template, and performing stress test operations according to the identified target elements; After reaching the set number of stress tests, a stress test report is generated through the automated stress test program.

2. A stress testing method for automobile OTA upgrade according to claim 1, characterized in that: Establishing a connection with the vehicle-side host through the ADB line specifically includes: projecting the vehicle-side host interface to the PC through the ARDC method.

3. A stress testing method for automobile OTA upgrade according to claim 1, used for a vehicle-side host, characterized in that: include: Monitor whether the OTA upgrade stress test task is received; If no OTA upgrade stress test task is received, the test is terminated and a test failure report is generated; If an OTA upgrade stress test task is received, a preparation completion instruction is sent to the PC. The preparation completion instruction is used by the automated stress test program to enter the secondary APP menu of the vehicle-side host using an image recognition method, and perform the OTA upgrade operation on the vehicle-side host according to the OTA upgrade stress test task.

4. The stress testing method for automobile OTA upgrade according to claim 1, characterized in that: The operation of identifying the target element on the vehicle-side host interface by an image recognition method and performing the stress test according to the identified target element specifically includes: Use the PyAutoGUI method to capture a screenshot of the current vehicle-side host interface; Use OpenCV method to perform image recognition on the screenshot to obtain the position coordinates of the target element to be clicked; The PyAutoGUI method is used to perform a click operation according to the position coordinates, and the result of each click operation is recorded.

5. A stress testing method for automobile OTA upgrade according to claim 4, characterized in that: Getting the position coordinates of the target element to be clicked specifically includes: Using OpenCV methods to read the screenshot and the image template; Use the Shape attribute method to obtain the attribute data of the image template, the attribute data including: height, width and number of channels; Based on the attribute data, using the matchTemplate method to perform similarity matching between the screenshot and the image template to obtain a matching result matrix; Using the minMaxLoc method to obtain the minimum and maximum values ​​in the matching result matrix, obtaining the matching position of the image template according to the maximum value, and calculating the coordinates of the upper left corner of the image template according to 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, and the position coordinates of the image template are calculated based on the lower right corner coordinates of the upper left corner coordinates; wherein the position coordinates of the image template are the position coordinates of the target element to be clicked.

6. A stress testing method for automobile OTA upgrade according to claim 1, characterized in that: Establishing a connection with the vehicle host through the ADB line specifically includes: Using the ADB client on the PC to check whether the vehicle-side host has a running first ADB server; If yes, establishing a connection with the first ADB server through the ADB client; If not, the second ADB server is automatically started, and a connection is established with the ADB daemon of the vehicle-side host through the second ADB server.

7. A stress testing system for automobile OTA upgrade, characterized in that: For PC, the system includes: A configuration module is used to configure the 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-side host interface; Communication module, used to establish connection with the vehicle-side host through the ADB line; A stress test module, used to set the stress test times of the OTA upgrade stress test task, automatically perform stress test according to the stress test times using an automated stress test program, and identify target elements on the vehicle-side host interface through an image recognition method based on the image template, and perform stress test operations according to the identified target elements; The reporting module is used to generate a stress test report through the automated stress test program after reaching a set number of stress tests.

8. A stress testing system for automobile OTA upgrade according to claim 7, characterized in that: Used for a vehicle-side host, characterized by comprising: The monitoring module is used to monitor whether the OTA upgrade stress test task is received: If no OTA upgrade stress test task is received, the test is terminated and a test failure report is generated; If an OTA upgrade stress test task is received, a preparation completion instruction is sent to the PC. The preparation completion instruction is used by the automated stress test program to enter the secondary APP menu of the vehicle-side host using an image recognition method, and perform the OTA upgrade operation on the vehicle-side host according to the OTA upgrade stress test task.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

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

    WO2026174791A1