Interface response performance detection method and device, electronic equipment and storage medium

By turning on the detection process in the terminal and performing simulation operations, the response time of the smart cockpit interface is automatically detected, and the problems of low detection efficiency, high cost and unstable results in the prior art are solved, and an efficient, economical and consistent interface is achieved. Responsive performance detection.

CN119493725APending Publication Date: 2025-02-21CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411277530.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the prior art, the interface response performance detection efficiency is low, high cost and unstable detection results, which especially affects the user experience in the smart cockpit.

Method used

By opening the detection process in the terminal, obtaining operation events, and performing simulation operations in the first thread, determining the occurrence time of the lift event and response interface, and computing the interface response time to evaluate performance.

Benefits of technology

Automatic detection of interface response performance is realized, detection efficiency is improved, detection cost is reduced, and the consistency of detection results is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493725A_ABST
    Figure CN119493725A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminals, and provides an interface response performance detection method and device, electronic equipment and a storage medium. According to the method, a detection process is started in a terminal of a display interface, an operation event is obtained through the detection process, a first thread is started in the detection process, simulation operation corresponding to the operation event is executed through the first thread, and occurrence time of a lifting event of the simulation operation is determined as first time; the occurrence time of the response interface corresponding to the operation event is the second time, and calculating the difference value between the second time and the first time to obtain the interface response time of the interface responding to the operation event, so that the automatic detection of the interface response performance is realized, the detection efficiency is improved, the detection cost is reduced, and the consistency of the detection result is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method, device, electronic device and storage medium for detecting interface response performance. Background Art

[0002] With the development of smart cockpits, smart cockpits provide rich graphical interfaces and display technologies, providing users with a wide variety of entertainment and information services. Screen freezes, flickers, and black screens in smart cockpits are the most common problems in user experience, which will cause the application to respond slowly and the interface to be unsmooth, seriously affecting the user experience. Therefore, it is necessary to test the interface response performance of the smart cockpit screen.

[0003] The main problems with the smart cockpit performance detection methods in related technologies are as follows: low detection efficiency and prone to errors; high detection costs and the need for a large amount of human resources; poor versatility and subjective judgment factors in the performance identification of different scenarios by different detection personnel. Summary of the invention

[0004] In view of this, the embodiments of the present application provide an interface response performance detection method, device, electronic device and storage medium to solve the problems of high cost, low efficiency and unstable detection results of interface response performance detection in the prior art.

[0005] According to a first aspect of an embodiment of the present application, a method for detecting interface response performance is provided, comprising:

[0006] Starting a detection process in the terminal, the detection process including a first thread;

[0007] Acquire an operation event through a detection process, and execute a simulation operation corresponding to the operation event in a first thread;

[0008] Determine the time when the lifting event of the simulated operation occurs as the first time, and the time when the response interface corresponding to the operation event appears as the second time;

[0009] The difference between the second time and the first time is determined as the interface response time, and the performance of the interface in responding to the operation event is determined according to the interface response time.

[0010] A second aspect of the embodiment of the present application provides an interface response performance detection device, comprising:

[0011] An opening module is configured to open a detection process in the terminal, where the detection process includes a first thread;

[0012] An execution module is configured to obtain an operation event through a detection process, and execute a simulation operation corresponding to the operation event in a first thread;

[0013] A determination module is configured to determine that the time when the lifting event of the simulated operation occurs is the first time, and the time when the response interface corresponding to the operation event appears is the second time;

[0014] The detection module is configured to determine the difference between the second time and the first time as the interface response time, and determine the performance of the interface in responding to the operation event according to the interface response time.

[0015] According to a third aspect of an embodiment of the present application, 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 implements the steps of the above method when executing the computer program.

[0016] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0017] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: the embodiments of the present application start a detection process in the terminal displaying the interface, and obtain an operation event through the detection process, start a first thread in the detection process, and execute a simulation operation corresponding to the operation event through the first thread, and determine that the lift event occurrence time of the simulation operation is the first time, and the response interface appearance time corresponding to the operation event is the second time, and the difference between the second time and the first time is calculated to obtain the interface response time of the interface in response to the operation event, thereby realizing automatic detection of interface response performance, improving detection efficiency, reducing detection costs, and achieving good consistency in detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 It is a flow chart of an interface response performance detection method provided in an embodiment of the present application.

[0020] Figure 2 It is a flowchart of the method for determining the first time provided in an embodiment of the present application.

[0021] Figure 3 It is a flowchart of a method for determining a second time provided in an embodiment of the present application.

[0022] Figure 4It is a flow chart of another interface response performance detection method provided in an embodiment of the present application.

[0023] Figure 5 It is a flow chart of another interface response performance detection method provided in an embodiment of the present application.

[0024] Figure 6 It is a system structure diagram for implementing the interface response performance detection method provided in the embodiment of the present application.

[0025] Figure 7 It is a schematic diagram of the performance monitoring process provided in the embodiment of the present application.

[0026] Figure 8 It is a schematic diagram of the model reasoning recognition and data processing flow provided in the embodiment of the present application.

[0027] Fig. 9 It is a schematic diagram of an interface response performance detection device provided in an embodiment of the present application.

[0028] Fig.10 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0030] A method and device for detecting interface response performance according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0031] As mentioned above, screen freeze, screen flicker, and black screen in smart cockpits are the most common problems in user experience, which will cause the application to respond slowly and the interface to be unsmooth, seriously affecting the user experience. Therefore, it is necessary to test the interface response performance of the smart cockpit screen.

[0032] In the related technology, the interface response time in the performance of the smart cockpit is mainly detected by manually recording videos. Start recording the video when the detection is turned on, then operate the smart cockpit screen and click to reach the corresponding interface to end the video recording. Pause during video playback to obtain the start time of lifting after clicking, and obtain the end time after the interface appears completely, and get the interface response time based on the start time and end time. At the same time, before starting to record the video, turn on the monitoring of the central processing unit (CPU), memory display program (MEM), FPS (Frames Per Second, FPS), etc., and you can get the performance monitoring data when the video recording ends.

[0033] The main problems of the smart cockpit performance testing methods in the related art are as follows: low testing efficiency and prone to errors; high testing costs and requiring a large amount of human resources; poor versatility, and subjective judgment factors in the performance identification of different scenarios by different testers. In other words, the testing methods provided by the related art are not only inefficient and prone to errors, but also have poor versatility. At the same time, if the performance of multiple scenarios needs to be tested in batches, a large amount of human resources will be required.

[0034] In view of this, an embodiment of the present application provides a method for detecting interface response performance, by starting a detection process in a terminal that displays an interface, and obtaining an operation event through the detection process, starting a first thread in the detection process, and executing a simulation operation corresponding to the operation event through the first thread, determining that the lift-up event of the simulated operation occurs at a first time, and the time when a response interface corresponding to the operation event appears at a second time, and calculating the difference between the second time and the first time to obtain the interface response time of the interface in response to the operation event, thereby realizing automatic detection of interface response performance, improving detection efficiency, reducing detection costs, and achieving good consistency in detection results.

[0035] Figure 1 FIG. 1 is a flow chart of a method for detecting interface response performance provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0036] In step S101, a detection process is started in the terminal.

[0037] The detection process includes a first thread.

[0038] In step S102, an operation event is acquired through a detection process, and a simulation operation corresponding to the operation event is executed in a first thread.

[0039] In step S103, it is determined that the time when the lifting event of the simulated operation occurs is the first time, and the time when the response interface corresponding to the operation event appears is the second time.

[0040] In step S104, the difference between the second time and the first time is determined as the interface response time, and the performance of the interface responding to the operation event is determined according to the interface response time.

[0041] In some embodiments of the present application, the interface response performance detection method can be executed by a terminal that displays the interface. In one example, the terminal can be a smart cockpit or other terminal with a display screen.

[0042] In some implementations, when performing interface response performance detection, the terminal may start a detection process and obtain operation events through the detection process. The operation event refers to an event of operating the display interface of the terminal, such as an event of operating the navigation map in the smart cockpit, an event of operating the vehicle control application in the smart cockpit, an event of performing interface migration operations in the smart cockpit, etc.

[0043] In certain embodiments of the present application, the operation event can be predefined by collecting the working scene of the terminal, and obtaining the operation event through the detection process can be to determine the operation event corresponding to the interface response to be detected in the detection process. In one example, if the interface response performance of the terminal connected to Bluetooth needs to be detected, and there is a corresponding terminal connection Bluetooth operation event in the predefined terminal working scene, the terminal connection Bluetooth operation event can be obtained in the opened detection process as the operation event for this interface response performance detection.

[0044] Furthermore, the detection process includes at least a first thread, which is a thread for performing event operations. The simulation operation corresponding to the operation event determined above can be performed in the first thread, and the start time of the simulation operation and the end time of the interface response can be determined.

[0045] In one example, the terminal can obtain various events (events) generated when the first thread executes the operation event, such as click events, lift events, etc., and determine the occurrence time of the lift event as the first time, that is, the start time of the simulated operation. For example, after obtaining the terminal connection Bluetooth operation event through detection, the detection process can record various operations on the terminal as events. When it is determined that the record includes a lift event, the timestamp of the lift event record can be used as the start time of the simulated operation. Among them, the lift event refers to an operation event in which the touching subject of the operating terminal interface, such as a finger, a robotic arm, etc., leaves the screen where the interface is located.

[0046] In another example, the terminal interface after the simulated operation can also be monitored, and the time when the response interface corresponding to the operation event appears is determined as the second time, that is, the end time of the interface response. For example, if the operation event is a terminal connection Bluetooth operation event, the interface of the terminal successfully connecting to Bluetooth can be determined as the response interface corresponding to the operation event, and the timestamp corresponding to the interface is used as the end time of the interface response.

[0047] In certain embodiments of the present application, the difference between the second time and the first time can be determined as the interface response time, and the performance of the terminal's interface response to the operation event can be determined based on the interface response time. For example, if the interface response time is less than or equal to the preset response time threshold, it can be determined that the interface response detection has passed, the first thread is terminated, a detection report is generated, and the detection process is terminated. On the contrary, if the interface response time is greater than the preset response time threshold, it can be determined that the interface response detection has not passed. At this time, the relevant logs and data recording the detection process can be obtained and provided to the user for reference.

[0048] According to the technical solution provided in the embodiment of the present application, a detection process is started in the terminal of the display interface, and an operation event is obtained through the detection process. A first thread is started in the detection process, and a simulation operation corresponding to the operation event is performed through the first thread. The occurrence time of the lift event of the simulation operation is determined to be the first time, and the appearance time of the response interface corresponding to the operation event is determined to be the second time. The difference between the second time and the first time is calculated to obtain the interface response time of the interface in response to the operation event, thereby realizing automatic detection of the interface response performance, improving detection efficiency, reducing detection costs, and achieving good consistency in detection results.

[0049] In certain embodiments of the present application, executing the simulation operation corresponding to the operation event in the first thread may be to call a test tool to generate and execute the simulation operation corresponding to the operation event; or to call an interface to control a physical device to execute the simulation operation corresponding to the operation event.

[0050] Taking the configuration of the Android operating system in the terminal as an example, the simulation operation corresponding to the operation event in the first thread may be to call the automated testing framework uiautomator2, click the designated position through the click method of each element event, or input the coordinates through the command adb input tap to realize clicking the designated position on the terminal interface. In other implementations, the terminal interface may be simulated clicked through a physical device such as a robotic arm, and then communicate with the robotic arm through a serial port or other means to control the robotic arm to click the designated position of the terminal interface.

[0051] Figure 2 FIG. 1 is a flow chart of a method for determining the first time provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0052] In step S201, an event record of a simulation operation is obtained in a first thread.

[0053] In step S202, in response to determining that the execution event record includes a click-and-lift event, a timestamp of the click-and-lift event is determined to be a first time.

[0054] In some embodiments of the present application, the event record of the simulated operation can be obtained in the first thread. Taking the terminal configuration of the Android operating system as an example, the command get_event can be used to obtain each event record in the simulated operation, and it can be determined whether the obtained event includes a lift event after clicking, that is, whether there is event="UP". If so, it means that the lift event is obtained, and the timestamp in the record corresponding to the lift event can be used as the first time.

[0055] Figure 3 FIG. 1 is a flow chart of a method for determining a second time provided in an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0056] In step S301, after a click-and-lift event is detected, a target detection algorithm is called to periodically detect the similarity between the current interface and a response interface corresponding to the operation event.

[0057] In step S302, in response to determining that the similarity between the first target current interface and the response interface corresponding to the operation event is greater than or equal to a first preset threshold, the timestamp of the first target current interface is determined to be a second time.

[0058] In some embodiments of the present application, when a lift event is detected after a click, a target detection algorithm may be periodically called to detect the similarity between the current interface of the terminal and the response interface corresponding to the operation event. In one example, the target detection algorithm may be a trained target detection algorithm, such as a target detection algorithm trained based on interface response data corresponding to different operation events of the terminal, and the target detection algorithm may be, for example, a YOLOv5 algorithm.

[0059] After starting the first thread, the terminal interface can be recorded by video. The video recording can be performed by the terminal internal program itself, or the terminal can send a video recording request to an external device, and the external device can record the terminal interface by video.

[0060] Furthermore, the target detection algorithm may be set in the terminal, which obtains the interface video recorded by the terminal itself, or obtains the interface video recorded by the external device, and periodically judges the interface in the interface video.

[0061] Alternatively, if the interface of the terminal is recorded by an external device, the target detection algorithm can also be set in the external device, and the interface in the recorded interface video is periodically judged in the external device, and the judgment result is sent to the terminal.

[0062] In some embodiments, the target detection algorithm can periodically detect the similarity between the current interface and the response interface corresponding to the operation event. If it is determined that the similarity between the current interface of the first target and the response interface corresponding to the operation event is greater than or equal to a first preset threshold, the timestamp of the current interface of the first target is determined to be the second time.

[0063] For example, the trained target detection algorithm can save the response interface corresponding to each operation event. The target detection algorithm obtains the current interface in the video every preset time period, such as 30 milliseconds, and determines the confidence that the current interface is the same as the response interface corresponding to the operation event. When the confidence is greater than a first preset threshold, such as 0.99, it is determined that the timestamp corresponding to the current interface is the second time.

[0064] In this way, the target detection algorithm can be used to automatically determine the end time of the interface response, which improves the accuracy and stability of the response time judgment and improves the detection accuracy.

[0065] Figure 4 It is a flow chart of another interface response performance detection method provided in an embodiment of the present application.

[0066] in, Figure 4 Steps S401 to S404 in the embodiment shown are Figure 1 Steps S101 to S104 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 4 As shown, the method also includes the following steps:

[0067] In step S405, a target detection algorithm is called to periodically detect the similarity between the current interface and a preset abnormal interface.

[0068] In step S406, in response to determining that the similarity between the second target current interface and the preset abnormal interface is greater than or equal to the second preset threshold, an interface response exception is thrown in the first thread.

[0069] As mentioned above, the interfaces of terminals such as smart cockpits may experience abnormal conditions such as black screens and flickering, which also need to be detected.

[0070] In some implementations, a target detection algorithm may be called to periodically detect the similarity between the current interface and a preset abnormal interface, wherein the preset abnormal interface may be a black screen interface, a flickering interface, such as an interface with a brightness value greater than a first preset brightness value or less than a second preset brightness value, and other abnormal interfaces. When it is determined that the similarity between the current interface of the second target and the preset abnormal interface is greater than or equal to the second preset threshold, it may be determined that an abnormality has occurred in the terminal interface response, and an interface response abnormality may be directly thrown in the first thread. Furthermore, relevant logs and data recording the detection process may be obtained and provided to the user for reference.

[0071] In some embodiments of the present application, the detection process may further include a second thread, which is a performance monitoring thread. In some implementations, the first thread and the second thread are asynchronous threads.

[0072] In some embodiments of the present application, executing the simulation operation corresponding to the operation event in the first thread may be, in response to determining that the second thread is successfully started, executing the simulation operation corresponding to the operation event in the first thread, and performing the interface response dynamic performance monitoring of the operation event in the second thread. Alternatively, in some other embodiments of the present application, executing the simulation operation corresponding to the operation event in the first thread may also be, in response to determining that the second thread fails to start, executing the simulation operation corresponding to the operation event in the first thread, and throwing an interface response dynamic performance monitoring exception in the second thread.

[0073] After receiving the startup success message sent by the second thread, the first thread can perform the simulation operation corresponding to the operation event, and the second thread also starts to perform the interface response dynamic performance monitoring of the operation event. On the other hand, if the first thread does not receive the message that the second thread has been successfully started, it can wait in a loop for a period of time. For example, after waiting for 5 seconds with a cycle of 1 second, if the message that the second thread has been successfully started is still not received, it can be determined that the startup of the second thread has failed. At this time, the first thread still continues to perform the simulation operation corresponding to the operation event, and the second thread throws an interface response dynamic performance monitoring exception.

[0074] Figure 5 It is a flow chart of another interface response performance detection method provided in an embodiment of the present application.

[0075] in, Figure 5 Steps S501 to S504 in the embodiment shown are Figure 1 Steps S101 to S104 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 5 As shown, the method also includes the following steps:

[0076] In step S505, in the second thread, a performance data acquisition command or a performance monitoring tool is used to acquire the dynamic performance of the interface response.

[0077] In step S506, the performance of the interface response is determined according to the dynamic performance of the interface response.

[0078] In some embodiments of the present application, after the response interface corresponding to the operation event appears, or after the first thread throws an interface response exception, it can be considered that the interface response detection is completed. At this time, the dynamic performance of the interface response can be obtained in the second thread through performance data acquisition commands or performance monitoring tools.

[0079] The interface response dynamic performance may include CPU-related data, MEM-related data, and FPS-related data. In one example, if the terminal is configured with an Android operating system, CPU-related data can be obtained using the adbshell top command in the Android operating system, and MEM-related data can be obtained using the adb shell dumpsysmeminfo command in the Android operating system. <pkg>Command to obtain FPS related data can be used in the Android operating system adb shell sympsysgfxinfo <pkg>In another example, third-party performance monitoring tools such as perfdog and solox can be used to obtain CPU-related data, MEM-related data, and FPS-related data.

[0080] Figure 6 1 is a system structure diagram for implementing the interface response performance detection method provided in the embodiment of the present application. Figure 6 As shown, the system includes a performance detection module and a target detection model training and reasoning module. In the performance detection module, you can first collect scenarios, write scripts corresponding to different scenarios, and run the scripts to implement simulated clicks and performance monitoring respectively. On the one hand, you can perform interface change detection on simulated clicks to achieve response time judgment. On the other hand, you can dynamically obtain relevant data in the performance monitoring program to judge the performance anomaly of the terminal. Finally, generate a complete report result based on the response time judgment results and the performance anomaly judgment results.

[0081] In the target detection model training and reasoning module, the image resources can be collected first, and the target detection model can be trained using the collected image resources. During training, a pre-trained model can be first constructed, and then the trained model can be obtained by training using the collected image resources. The trained model is used to perform image reasoning and data processing on the interface video stream of the terminal when executing an operation event, and the response interface of the interface response can be identified. The time information corresponding to the response interface is transmitted to the performance detection module, which can be used as the end time information for response time judgment.

[0082] In other words, the performance monitoring process mainly uses the program to record simulated operation data. First, performance monitoring is turned on, and then the click-and-lift event is used as the start time of the interface response time, until the expected interface is changed and recognized as the end time by the target detection algorithm, and the response time is calculated based on the start time and the end time. Then, the calculated response time is compared with the expected response time to determine whether the interface response is qualified, so as to achieve the purpose of detecting the response time after the entire interface changes. That is, performance monitoring uses the performance data of the calibration scenario as the benchmark data, and the actual performance monitoring results can be obtained by comparing the real-time monitoring data with the benchmark data, which can be quickly implemented in the actual smart cockpit detection performance test process.

[0083] In one example, you can click Settings and lift your finger to start timing, and the interface jumps to the complete settings interface to end timing. The performance response time is the time from clicking Settings to the complete appearance of the settings interface. Performance monitoring starts before clicking Settings to start related monitoring, ends monitoring after the settings interface is fully displayed, and generates related monitoring reports. Some response time scenarios in the smart cockpit can include, for example, navigation maps, vehicle control and vehicle settings, 360 panorama, driving recorder (Digital Video Recorder, DVR), interface migration and other scenarios.

[0084] Figure 7 Schematic diagram of the performance monitoring process provided by the embodiment of the present application. Figure 7 As shown, a first process (process_record) can be started in the terminal using a program, and the first process is mainly used to obtain the operation events of the smart cockpit system. For example, if the smart cockpit system as the terminal is an Android system, the event can be obtained through / dev / input / event0.

[0085] Furthermore, two asynchronous threads, event operation thread (event_thread) and performance monitoring thread (perf_monitor_thread), can be started. Among them, event_thread is mainly responsible for event processing, and perf_monitor_thread is mainly responsible for recording performance data, such as CPU / MEM / FPS and other data.

[0086] Next, you can get the operation event (get_event). In one example, you can record the operation events of the smart cockpit in the opened process. If there are simulated operations, such as clicks, slides, etc., the operation events will be recorded.

[0087] Before event_thread starts the operation of the event, it can first determine whether perf_monitor_thread is started successfully. If perf_monitor_thread is started successfully, event_thread starts the operation of the event. Otherwise, if it is not started successfully, it will wait in a loop (for example, waiting for 1 second each time) until it is detected that perf_monitor_thread is started normally, and then event_thread continues to perform the operation of the event. Furthermore, if perf_monitor_thread is still not started after a period of time, for example, 5 seconds, event_thread skips performance monitoring and continues to perform the operation of the event, and perf_monitor_thread throws a program exception of performance monitoring.

[0088] When event_thread executes the operation of the event, it can simulate clicks (click_method) according to the response event scenario. Among them, the simulated click can be realized by calling uiautomator2 in the Android system, using the click method of each element event to click the specified position or the operation method of adb input tap coordinates to realize the click of the specified position. Alternatively, the simulated motor can also be realized by physical devices such as robotic arms, for example, communicating with the robotic arm through serial ports, and realizing the click of the specified position by calling the robotic arm through the program.

[0089] After executing the event operation, event_thread can check the recorded events to determine whether a lift event has occurred. If so, the timestamp of the lift event record is used as the start time of the interface response. In other words, it can be determined in the record of the operation event get_event whether a lift event after a simulated click (equivalent to a simulated operation event where the finger leaves the screen after clicking, also called an "UP" event) exists in the operation event. If the "UP" event exists, it means that the finger has been lifted after the simulated click, and the timestamp at this time is obtained as the start time. If it does not exist, the lift event was not captured, and the simulated click needs to be performed again.

[0090] At the same time, the target detection algorithm can be called to perform periodic detection on the interface to determine whether the target interface appears. The target interface is the response interface corresponding to this operation event. If it is determined that the target interface is detected after the simulated click and the confidence condition is met, the current timestamp obtained is used as the end time of the interface response. For details, see the model reasoning recognition and data processing flow. .

[0091] Then, the difference between the obtained interface response end time and start time is used as the interface response time of this event operation.

[0092] On the other hand, dynamic performance data can also be obtained from perf_monitor_thread. In the Android system, you can use ADB commands to obtain relevant performance data, such as CPU data can be obtained using the adb shell top command, and MEM data can be obtained using adb shell dumpsys meminfo <pkg>Get, FPS can be obtained through adb shell sympsysgfxinfo <pkg>Alternatively, you can use other more mature third-party performance monitoring software, such as perfdog, solox, etc. to obtain dynamic performance data.

[0093] The acquired monitoring data and corresponding data can be recorded in a local table in a waveform chart to facilitate data observation. The data exceeding the standard can be marked with different colors or highlighted to facilitate statistical analysis. Furthermore, the baseline data of CPU / MEM / FPS and other performance data corresponding to different applications of each terminal in various scenarios can be pre-drawn. The baseline data can be comprehensively derived based on the architecture of the application, data overhead, etc. This data is the upper limit data for the normal operation of the application and terminal system. Once the system is abnormal or the code logic is abnormal, the real-time performance data will exceed the baseline data. When the real-time data exceeds the expected indicators, the program throws an exception.

[0094] In one example, if the calculated interface response time (response_time) is less than or equal to the expected response time index, for example, the response time index from clicking the setting button to the complete appearance of the setting interface is 3s, then it is necessary to judge that it is less than or equal to 3s to meet the requirements. If the response time index requirements are met, the test passes; if the requirements are not met, the smart cockpit system log and the video of the operation process are obtained and provided to relevant developers for analysis and optimization.

[0095] When both the response time and performance monitoring data are less than the expected index, the test is considered to have passed. On the contrary, if at least one of the response time and performance monitoring data is less than the expected index, the test is considered to have failed. After the test fails, the full log in the vehicle needs to be downloaded from the ECU to the local computer, and the video data of the operation process needs to be obtained, and the data will be provided to the developers for analysis and optimization.

[0096] After the test is judged to have passed, or after the test is judged to have failed and the logs are obtained and the test process data is recorded, both event_thread and perf_monitor_thread can be closed (killed) to avoid them still running after the test activity ends and occupying system overhead, causing unnecessary exceptions.

[0097] Furthermore, the obtained response time data can be used to generate a test report for related personnel to make plans. Finally, the process process_stop is terminated.

[0098] Figure 8 Schematic diagram of model reasoning recognition and data processing flow provided by the embodiment of the present application. Figure 8 As shown, first you can load a trained target detection model, such as the YOLOv5 model. Then use OpenCV and other tools to open the recorded interface video stream. Read a frame every preset time period, such as 30 milliseconds. The value of the preset time period can be determined according to the terminal screen display fps refresh rate.

[0099] Next, after the interface changes, the target is identified according to each frame read. For example, if the target label is the setting interface, then each frame of the picture is detected to see if it is the setting interface. Specifically, the confidence of checkUI(labels="target label") can be judged to determine whether the current frame of the picture is the setting interface. When confidence is greater than or equal to the first preset threshold, for example, confidence>=0.99, the current timestamp can be returned, and the current timestamp ui_status_time can be recorded as the end time of the interface response; if the condition is not met, then the next frame is read and the next frame of data is processed.

[0100] By adopting the technical solution provided in the embodiment of the present application, the program is used to record operation events, capture the "lift" event, and use the target detection algorithm to identify and capture the situation when the complete interface appears. For different response time scenarios, automatic detection can be performed quickly to improve detection accuracy and detection stability, and greatly reduce errors caused by human subjective judgment.

[0101] Furthermore, the technical solution provided in the embodiment of the present application forms a set of methods for automatically detecting automobile cabin performance indicators in combination with target detection algorithms. The operation is simple and only requires running an automated program to automatically obtain the response time of a specified scenario, greatly reducing human resource costs.

[0102] Furthermore, the technical solution provided in the embodiment of the present application can adapt to various smart cockpit systems through operation event processing, such as updating the event storage path, has good general effects, can be quickly implemented in the relevant detection links of the smart cockpit, and improves production efficiency.

[0103] At the same time, the technical solution provided in the application embodiment can automatically judge the response time with the expected response time after detecting the response time. If it does not meet the expected results, it can automatically obtain logs and generate reports for relevant developers to analyze, timely optimize the interface response time, and improve user experience.

[0104] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0105] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0106] Fig. 9 Schematic diagram of an interface response performance detection device provided in an embodiment of the present application. Fig. 9 As shown, the device comprises:

[0107] The start module 901 is configured to start a detection process in the terminal, where the detection process includes a first thread.

[0108] The execution module 902 is configured to obtain an operation event through a detection process, and execute a simulation operation corresponding to the operation event in a first thread.

[0109] The determination module 903 is configured to determine that the time when the lifting event of the simulated operation occurs is the first time, and the time when the response interface corresponding to the operation event appears is the second time.

[0110] The detection module 904 is configured to determine the difference between the second time and the first time as the interface response time, and determine the performance of the interface response operation event according to the interface response time.

[0111] According to the technical solution provided in the embodiment of the present application, a detection process is started in the terminal of the display interface, and an operation event is obtained through the detection process. A first thread is started in the detection process, and a simulation operation corresponding to the operation event is performed through the first thread. The occurrence time of the lift event of the simulation operation is determined to be the first time, and the appearance time of the response interface corresponding to the operation event is determined to be the second time. The difference between the second time and the first time is calculated to obtain the interface response time of the interface in response to the operation event, thereby realizing automatic detection of the interface response performance, improving detection efficiency, reducing detection costs, and achieving good consistency in detection results.

[0112] In some embodiments, executing a simulation operation corresponding to an operation event in a first thread includes: calling a test tool to generate and execute a simulation operation corresponding to the operation event; or calling an interface to control a physical device to execute a simulation operation corresponding to the operation event.

[0113] In some embodiments, the first time is determined by: obtaining an event record of the simulated operation in the first thread; in response to determining that the execution event record includes a click-and-lift event, determining the timestamp of the click-and-lift event to be the first time.

[0114] In some embodiments, the second time is determined in the following manner: after detecting a click-and-lift event, the target detection algorithm is called to periodically detect the similarity between the current interface and the response interface corresponding to the operation event; in response to determining that the similarity between the current interface of the first target and the response interface corresponding to the operation event is greater than or equal to a first preset threshold, the timestamp of the current interface of the first target is determined to be the second time.

[0115] In some embodiments, when executing a simulation operation corresponding to an operation event in the first thread, it also includes: calling a target detection algorithm to periodically detect the similarity between the current interface and a preset exception interface; in response to determining that the similarity between the current interface of the second target and the preset exception interface is greater than or equal to a second preset threshold, throwing an interface response exception in the first thread.

[0116] In some embodiments, the detection process also includes a second thread, which is an asynchronous thread with the first thread; executing a simulation operation corresponding to the operation event in the first thread, including: in response to determining that the second thread has started successfully, executing the simulation operation corresponding to the operation event in the first thread, and performing interface response dynamic performance monitoring of the operation event in the second thread; or in response to determining that the second thread has failed to start, executing the simulation operation corresponding to the operation event in the first thread, and throwing an interface response dynamic performance monitoring exception in the second thread.

[0117] In some embodiments, after the response interface corresponding to the operation event appears, or after the first thread throws an interface response exception, it also includes: in the second thread, using a performance data acquisition command to obtain the dynamic performance of the interface response; or in the second thread, using a performance monitoring tool to obtain the dynamic performance of the interface response; determining the performance of the interface response based on the dynamic performance of the interface response.

[0118] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0119] Fig.10 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 10 of this embodiment includes: a processor 1001, a memory 1002, and a computer program 1003 stored in the memory 1002 and executable on the processor 1001. When the processor 1001 executes the computer program 1003, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1001 executes the computer program 1003, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0120] The electronic device 10 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 10 may include, but is not limited to, a processor 1001 and a memory 1002. Those skilled in the art will appreciate that Fig.10 The electronic device 10 is merely an example and does not limit the electronic device 10 . The electronic device 10 may include more or fewer components than shown in the figure, or different components.

[0121] Processor 1001 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0122] The memory 1002 may be an internal storage unit of the electronic device 10, for example, a hard disk or memory of the electronic device 10. The memory 1002 may also be an external storage device of the electronic device 10, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 10. The memory 1002 may also include both an internal storage unit of the electronic device 10 and an external storage device. The memory 1002 is used to store computer programs and other programs and data required by the electronic device.

[0123] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0124] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0125] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.< / pkg> < / pkg> < / pkg> < / pkg>

Claims

1. A method for detecting interface response performance, characterized in that: The method is executed by a terminal that displays the interface, and the method includes: Starting a detection process in the terminal, the detection process including a first thread; Acquire an operation event through the detection process, and execute a simulation operation corresponding to the operation event in the first thread; Determine the time when the lifting event of the simulated operation occurs as a first time, and the time when the response interface corresponding to the operation event appears as a second time; The difference between the second time and the first time is determined as an interface response time, and the performance of the interface in responding to the operation event is determined according to the interface response time.

2. The method according to claim 1, characterized in that The performing of the simulation operation corresponding to the operation event in the first thread includes: Calling a test tool to generate and execute a simulation operation corresponding to the operation event; or The interface is called to control the physical device to execute the simulation operation corresponding to the operation event.

3. The method according to claim 1, characterized in that The first time is determined in the following manner: Acquire an event record of the simulation operation in the first thread; In response to determining that the event record includes a click-and-lift event, determining a timestamp of the click-and-lift event as the first time.

4. The method according to claim 3, characterized in that The second time is determined in the following manner: After detecting the click-and-lift event, calling the target detection algorithm to periodically detect the similarity between the current interface and the response interface corresponding to the operation event; In response to determining that the similarity between the first target current interface and the response interface corresponding to the operation event is greater than or equal to a first preset threshold, determining the timestamp of the first target current interface as the second time.

5. The method according to claim 1, characterized in that When executing the simulation operation corresponding to the operation event in the first thread, the method further includes: Call the target detection algorithm to periodically detect the similarity between the current interface and the preset abnormal interface; In response to determining that the similarity between the second target current interface and the preset abnormal interface is greater than or equal to a second preset threshold, an interface response exception is thrown in the first thread.

6. The method according to claim 1, characterized in that The detection process further includes a second thread, wherein the second thread and the first thread are asynchronous threads; The performing of the simulation operation corresponding to the operation event in the first thread includes: In response to determining that the second thread is successfully started, executing a simulation operation corresponding to the operation event in the first thread, and performing dynamic performance monitoring of an interface response to the operation event in the second thread; or In response to determining that the second thread fails to start, a simulation operation corresponding to the operation event is executed in the first thread, and an interface response dynamic performance monitoring exception is thrown in the second thread.

7. The method according to claim 5, after the response interface corresponding to the operation event appears, or after the first thread throws an interface response exception, the method further comprises: In the second thread, a performance data acquisition command is used to acquire the interface response dynamic performance; or In the second thread, a performance monitoring tool is used to obtain the dynamic performance of the interface response; The performance of the interface response is determined based on the dynamic performance of the interface response.

8. An interface response performance detection device, characterized in that: include: An opening module is configured to open a detection process in the terminal, wherein the detection process includes a first thread; an execution module, configured to obtain an operation event through the detection process, and execute a simulation operation corresponding to the operation event in the first thread; A determination module is configured to determine that the time when the lifting event of the simulated operation occurs is a first time, and the time when the response interface corresponding to the operation event appears is a second time; The detection module is configured to determine the difference between the second time and the first time as the interface response time, and determine the performance of the interface in responding to the operation event according to the interface response time.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.