Vehicle terminal abnormal sleep test method, device, equipment and medium

The ADB tool obtains the wake lock list of the vehicle terminal, filters and outputs the wake lock information regularly, solving the problem of complex testing and difficult to analyze abnormal sleep in the existing technology, and achieving stable operation and safety improvement of the vehicle terminal.

CN120469387APending Publication Date: 2025-08-12BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510596878.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art is complicated when testing the dormant state of a vehicle terminal, which may damage the equipment and is difficult to analyze and find out the cause of abnormal hibernation.

Method used

Connect the vehicle terminal through ADB tool to obtain the wake-up lock list, filter and output specific information of the wake-up lock, including the first type of wake-up lock and the wake-up lock information of a specific process, and output it regularly to monitor the process's holding time of the wake-up lock and judge the risk of abnormal sleep.

Benefits of technology

Accurately locate abnormal sleeping processes, reduce labor costs, improve monitoring efficiency, ensure stable operation of on-board network systems, avoid unnecessary battery consumption, and improve user experience and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469387A_ABST
    Figure CN120469387A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and equipment for testing abnormal dormancy of a vehicle terminal and a medium. The method comprises the following steps: connecting the vehicle terminal through an ADB tool mounted on the test equipment; acquiring a wake-up lock list of the vehicle-mounted terminal; filtering information in the wakeup lock list to obtain specific information of all first type wakeup locks in the wakeup lock list and specific information of the wakeup lock of the specific process; wherein the first type of wake-up lock is a partial wake-up lock; and outputting the specific information of the first type of wake-up lock and the specific information of the wake-up lock of the specific process regularly. By extracting the specific information of the first type of wake-up lock in the wake-up lock list, the holding time of any process for the first type of wake-up lock can be accurately obtained, so that whether any process of the vehicle-mounted terminal has abnormal dormancy or a risk of abnormal dormancy is judged, the abnormal dormancy problem of the vehicle-mounted terminal can be found, and meanwhile, the abnormal dormancy of the vehicle-mounted terminal is avoided. The abnormal dormancy process is accurately positioned, and fault reasons can be conveniently found out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and in particular to a method, device, equipment and medium for testing abnormal dormancy of a vehicle terminal. Background Art

[0002] With the continuous development of vehicle electrification, networking, and intelligence, vehicle functions are increasing, such as remote vehicle control and welcome mode. These functions need to be usable even after the vehicle is electrically locked and exited, and the dormant test mechanism is the key to achieving these functions.

[0003] Performing a sleep test ensures that the vehicle network system complies with relevant industry standards. Existing technology confirms the vehicle network status by monitoring the current in the vehicle circuit. The battery plug is disconnected, and a current tester is connected in series to the battery circuit to test the battery current. When the vehicle enters the OFF state, the generator stops operating, and the battery serves as the power source for all electrical devices. After the equipment is connected, the vehicle is controlled to enter the OFF state, and the battery current is continuously monitored. As each controller gradually enters the sleep state, the entire vehicle network enters the sleep state, and the battery current decreases significantly. When the current drops to near the designed value, the vehicle is confirmed to have entered the sleep state.

[0004] However, this method requires the device to be connected to the vehicle circuit during the testing process, which is complicated to operate. Considering the device's range and adaptability to impact current, the testing process may damage the device. The recording and analysis of data during the test requires monitoring by the tester, and analysis is difficult after the test is completed. If the device cannot sleep or sleeps abnormally, it is difficult to analyze and find the cause of the fault. Summary of the Invention

[0005] The embodiments of the present invention provide a method, device, equipment and medium for testing abnormal dormancy of a vehicle terminal, aiming to solve the problem in existing technical methods that it is difficult to analyze and find the cause of abnormal dormancy.

[0006] In the first aspect, an embodiment of the present invention provides a testing method for abnormal dormancy of a vehicle terminal, which is applied in a testing device, and the testing device establishes a communication connection with the vehicle terminal. The method includes: connecting to the vehicle terminal through an ADB tool installed on the testing device; obtaining a wake-up lock list of the vehicle terminal; filtering the information in the wake-up lock list to obtain specific information of all first-type wake-up locks in the wake-up lock list and specific information of the wake-up lock of a specific process; wherein the first-type wake-up lock is a partial wake-up lock; and periodically outputting the specific information of the first-type wake-up lock and the specific information of the wake-up lock of the specific process.

[0007] In a second aspect, an embodiment of the present invention further provides a vehicle terminal abnormal sleep testing device, which is used to implement the steps of the vehicle terminal abnormal sleep testing method described in the first aspect. The testing device includes:

[0008] An environment building module, used to connect to the vehicle terminal through the ADB tool installed on the test device;

[0009] A wakeup lock information acquisition module is used to obtain the wakeup lock list of the vehicle terminal;

[0010] a filtering module, configured to filter the information in the wakeup lock list to obtain specific information of all first-type wakeup locks in the wakeup lock list and specific information of wakeup locks of a specific process; wherein the first-type wakeup lock is a partial wakeup lock;

[0011] A timing output module is used to regularly output specific information of the first type of wake-up lock and specific information of the wake-up lock of the specific process.

[0012] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0013] Memory for storing computer programs;

[0014] The processor is used to implement the steps of the vehicle terminal abnormal dormancy testing method described in the first aspect when executing the program stored in the memory.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the vehicle terminal abnormal dormancy testing method as described in the first aspect.

[0016] An embodiment of the present invention provides a method, apparatus, device, and medium for testing abnormal dormancy of a vehicle terminal. The method includes: connecting to the vehicle terminal through an ADB tool installed on the test device; obtaining a wake-up lock list of the vehicle terminal; filtering the information in the wake-up lock list to obtain specific information of all first-type wake-up locks in the wake-up lock list and specific information of the wake-up lock of a specific process; wherein the first-type wake-up lock is a partial wake-up lock; and regularly outputting the specific information of the first-type wake-up lock and the specific information of the wake-up lock of the specific process. In this way, by extracting the specific information of the first-type wake-up lock from the wake-up lock list, the holding time of the first-type wake-up lock by any process can be accurately obtained, thereby determining whether any process in the vehicle terminal has abnormal dormancy or the risk of abnormal dormancy, thereby accurately locating the abnormally dormant process while discovering the abnormal dormancy problem of the vehicle terminal, facilitating the identification of the cause of the fault. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flow chart of a method for testing abnormal dormancy of a vehicle terminal provided by an embodiment of the present invention;

[0019] Figure 2 Another flow chart of the method for testing abnormal dormancy of a vehicle terminal provided by an embodiment of the present invention;

[0020] Figure 3 A schematic block diagram of a device for testing abnormal dormancy of a vehicle terminal provided by an embodiment of the present invention;

[0021] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0024] It should also be understood that the terms used in the present specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0025] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0026] It should also be noted that, unless otherwise clearly specified and limited, terms such as "installed", "connected", "connected", "fixed", and "set" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integrated connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. When an element is referred to as being "on" or "under" another element, the element can be "directly" or "indirectly" located on the other element, or there may be one or more intervening elements. The terms "first", "second", "third", etc. are only for the convenience of describing the present technical solution, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of such features. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.

[0027] See also Figure 1 An embodiment of the present invention provides a method for testing abnormal dormancy of a vehicle terminal. The method is applied to a test device that establishes a communication connection with a vehicle terminal. Abnormal dormancy, in which a vehicle terminal enters a low-power dormant state under unexpected or abnormal conditions, may be caused by hardware failure, software errors, system conflicts, or external interference, resulting in increased device power consumption or decreased performance, and may even affect the normal operation and safety of the vehicle. This testing method monitors the vehicle terminal to determine whether abnormal dormancy is possible.

[0028] like Figure 1 As shown, the test method includes:

[0029] S10. Connecting the vehicle terminal via the ADB tool installed on the test equipment.

[0030] In this embodiment, the test device can be a computer device, and the method can be implemented by a script program installed on the test device, thereby enabling automatic and long-term monitoring of the vehicle terminal, reducing labor costs. The vehicle terminal is a terminal device equipped with the Android system, and the test device can establish a communication connection with the vehicle terminal via a wired connection, thereby enabling data transmission between the test device and the vehicle terminal. The ADB tool (Android Debug Bridge) is also pre-installed in the test device. Connecting to the vehicle terminal through the ADB tool further connects to the vehicle terminal through the ADB tool to complete the construction of the test environment.

[0031] S20: Obtain a wakeup lock list of the vehicle terminal.

[0032] In this embodiment, the "adb shell dumpsys power" command can be executed in the ADB tool to obtain the wakeup lock (WakeLock) list currently active on the vehicle terminal. At this time, the vehicle terminal is in the awake state.

[0033] S30: Filter the information in the wakeup lock list to obtain specific information of all first-type wakeup locks in the wakeup lock list and specific information of the wakeup lock of a specific process.

[0034] In this embodiment, the first type of wake-up lock is a partial wake-up lock (PARTIAL_WAKE_LOCK). The function of the first type of wake-up lock, i.e., a partial wake-up lock, is to allow the CPU to continue running when the screen of the terminal in the vehicle computer is turned off. The wake-up lock (WakeLock) list obtained in S20 includes all wake-up locks currently active on the vehicle computer terminal. In this step S30, the wake-up lock list can be filtered by executing the command "adb shell dumpsys power|grep PARTIAL_WAKE_LOCK" in the ADB tool, and the specific information of the first type of wake-up lock of all processes can be extracted from the wake-up lock list. The specific information of the first type of wake-up lock includes the holder process and the holding time. For example, the specific information of one of the first type of wake-up locks is "PARTIAL_WAKE_LOCK'AudioMix'ACQ=-1s7ms(uid=1013,pid=1234)", where the pid (Process ID) corresponds to the holder process one-to-one. A single process can be specifically located through a pid, and the time after ACQ is the holding time of the process for the first type of wake-up lock. Uid (UserID, user identifier) corresponds one-to-one to the user of the holder process. In this way, by extracting the specific information of the first type of wake-up lock in the wake-up lock list, the holding time of the first type of wake-up lock of any process can be accurately obtained, so as to judge whether any process in the vehicle terminal has abnormal sleep or whether there is a risk of abnormal sleep. In this way, while discovering the abnormal sleep problem of the vehicle terminal, the abnormal sleep process can be accurately located to accelerate the exposure of the problem and gain more time to solve the problem. Then, the vulnerability that may cause the vehicle terminal to sleep abnormally can be repaired in time, ensuring that the vehicle network system can maintain stable operation under various circumstances and avoid unnecessary battery consumption. The recording and analysis of data in the existing test method requires monitoring by testers, and analysis is difficult after the test is completed. If there is abnormal sleep, it is difficult to analyze and find the cause of the fault.

[0035] In this embodiment, the command "adb shell dumpsys power|grep -E'wakelock|package name'" is executed in the ADB tool to obtain specific information about the wake-up lock of a specific process, where the package name is the name of the corresponding specific process. In addition to filtering the specific information of the first type of wake-up lock from the list of all wake-up locks to determine whether the first type of wake-up lock is held abnormally, and thus determining whether the process holding the first type of wake-up lock is at risk of abnormal dormancy, the holding status of the wake-up lock by a specific process can also be obtained in a targeted manner as needed, thereby performing targeted monitoring on the specific process. The specific process can be one process or multiple processes, and the wake-up lock held by the specific process can be a first type of wake-up lock or another type of wake-up lock. That is, in this embodiment, on the one hand, the holding status of the first type of wake-up lock by all processes is obtained to determine whether any process is at risk of abnormal sleep, that is, all processes are monitored from the perspective of global monitoring to avoid any process being missed and not detected; on the other hand, on the basis of global monitoring, specific processes are monitored from the perspective of local monitoring to play a role of targeted monitoring, so as to accelerate the exposure of problems and reduce the script running pressure to a certain extent. The specific process can be a process with a higher risk of abnormal sleep. Specifically, the package name of the process with a higher probability of abnormal sleep can be obtained from previous detection reports or user feedback reports as the specific process.

[0036] S40: regularly outputting specific information of the first type of wake-up lock and specific information of the wake-up lock of the specific process.

[0037] In this embodiment, since the method is implemented via a script, specific information about the first type of wakeup lock and the specific process's wakeup lock can be output periodically, thereby reducing labor costs and improving monitoring efficiency. The time interval for the timed output is preset in the script. Specifically, when executing the script, this can be achieved by executing "adb shell dumpsys alarm adb shell cat / sys / kernel / debug / wakeup_sources sleep60" in the ADB tool. The time interval can be 60s as in the above command, or 30s, 45s, etc.

[0038] By monitoring the vehicle computer's WakeLock, R&D can quickly identify the cause, helping to improve software stability and robustness during the R&D phase, reducing the risks posed by abnormal sleep to the vehicle and the potential for safety incidents. Testing ensures that the vehicle network system responds quickly and correctly when abnormal sleep occurs, thereby ensuring driving safety. This reduces the likelihood of the vehicle being unable to enter sleep mode in a timely manner due to abnormal sleep, thus avoiding unnecessary battery drain. By optimizing the system through testing, the user's driving experience is enhanced.

[0039] See also Figure 2 In some embodiments, after S40, periodically outputting the specific information of the first type of wake-up lock and the specific information of the wake-up lock of the specific process, the testing method includes: S50, extracting the holder information and the holding time information from the specific information of the first type of wake-up lock; S60, determining the holding time of each process for the first type of wake-up lock based on the holder information and the holding time information; S70, judging whether the corresponding process has a sleep abnormality according to the holding time.

[0040] In this embodiment, the holder information and holding time information are extracted from the timed output of the first type of wakeup lock specific information. The extracted holder information is the PID or PID and UID in the first type of wakeup lock specific information, and the holding time information is the time information after the ACQ in the first type of wakeup lock specific information. Based on the holding time, it is determined whether the corresponding holder, i.e., the corresponding process, has abnormal sleep. For example, a sensor process related to vehicle safety should hold the first type of wakeup lock for a long time to ensure vehicle driving safety. If the holding time of the relevant process is short, it is determined that the relevant process has abnormal sleep, thereby prompting relevant personnel to promptly perform maintenance or further testing on the relevant process.

[0041] In some embodiments, S70, judging whether the corresponding process has a sleep abnormality according to the holding time, includes sub-steps:

[0042] Determining whether the process belongs to a first type of process or a second type of process; wherein the first type of process is a persistent process and the second type of process is an immediate process;

[0043] If the process belongs to the first type of process, determining whether the corresponding holding time is greater than or equal to a first time threshold, and obtaining a first determination result;

[0044] If the first judgment result is no, a result indicating that the process has a sleep abnormality is output.

[0045] In this embodiment, a persistent process can be understood as a process related to the core functions of the vehicle or vehicle safety, such as processes related to the real-time location and navigation of the vehicle, processes related to vehicle sensors, and processes related to voice assistants. An immediate process can be understood as a short-term task or a non-core related process, such as processes related to Bluetooth connection and processes related to video playback. If it is determined that the process belongs to the first type of process, it is determined whether the holding time of the first type of wake-up lock by the process is greater than or equal to the first time threshold. If the holding time is greater than or equal to the first time threshold, that is, the first judgment result is yes, then the result that the process does not have a sleep abnormality is output; if the first judgment result is no, then the result that the process has a sleep abnormality is output.

[0046] It should be understood that since the data output by S40 usually includes more than one process's holding information of the wake-up lock, and the first type of process includes more than one process, the first time threshold also includes more than one time value. It should be that each process in the first type of process has a corresponding first time threshold.

[0047] Thus, in this embodiment, after determining whether the process belongs to the first type of process or the second type of process, the method further includes:

[0048] If the process belongs to the second type of process, determining whether the corresponding holding time is less than a second time threshold, and obtaining a second determination result;

[0049] If the second judgment result is no, a result indicating that the process has a sleep abnormality is output.

[0050] If it is determined that the process belongs to the second type of process, it is determined whether the holding time of the first type wake-up lock by the process is less than the second time threshold. If the holding time is greater than or equal to the first time threshold, that is, the second judgment result is no, then the result that the process has a sleep abnormality is output; if the second judgment result is yes, then the result that the process does not have a sleep abnormality is output.

[0051] Similarly, it should be understood that since the data output by S40 usually includes more than one process's holding information of the wake-up lock, and the second type of process includes more than one process, the second time threshold also includes more than one time value. It should be that each process in the second type of process has a corresponding second time threshold.

[0052] In a specific embodiment, the determination of whether the process belongs to the first type of process or the second type of process includes the sub-steps of: traversing a pre-stored mapping relationship table of process names, process types, and time thresholds, and outputting the process type and time threshold corresponding to the process; determining the time threshold corresponding to the first type of process as the first time threshold, and determining the time threshold corresponding to the second type of process as the second time threshold.

[0053] In this embodiment, the mapping relationship table is pre-stored in the test device. The process name in the mapping relationship table can be the specific name of the process, that is, the package name of the process, or the uid corresponding to the process; the process type includes the first type process and the second type process.

[0054] See also Figure 2 In some embodiments, after S40, the timed output of the specific information of the first type of wakeup lock and the specific information of the wakeup lock of the specific process, the testing method further includes:

[0055] S80: Monitor the wakeup lock of the specific process to determine whether the specific process has a sleep abnormality.

[0056] In this embodiment, the holding of the wake-up lock by a specific process is monitored in a targeted manner, thereby performing targeted monitoring on the specific process to determine whether the specific process has a sleep anomaly.

[0057] In a further embodiment, S80, monitoring the wakeup lock of the specific process to determine whether the specific process has a sleep abnormality, includes:

[0058] From the specific information of the wake-up lock of the specific process, obtain the holding time of the wake-up lock by the specific process and the acquisition timestamp and release timestamp; obtain the business status of the vehicle computer; by judging whether the holding time of the wake-up lock by the specific process and the acquisition timestamp and release timestamp match the business status of the vehicle computer, obtain the result of whether the specific process has abnormal sleep.

[0059] In this implementation, in addition to obtaining the specific information of the wake-up lock of a specific process and the holding time of the wake-up lock of the specific process, the acquisition timestamp and release timestamp of the wake-up lock of the specific process are also obtained, wherein the acquisition timestamp indicates the time point when the process acquires the wake-up lock, and the release timestamp indicates the time point when the process releases the wake-up lock, and the release timestamp - acquisition timestamp = holding time.

[0060] To obtain the business status of the vehicle computer, you can obtain the system log of the vehicle computer to obtain the business status of the vehicle computer. The business status indicates when the vehicle computer terminal performs and ends a process.

[0061] By determining whether the specific process holds the wake-up lock for a certain period of time and whether the acquisition and release timestamps match the business status of the vehicle computer, a result is obtained as to whether the specific process is in abnormal dormancy. That is, in this embodiment, not only is the relationship between the specific process's holding time of the wake-up lock and its corresponding time threshold monitored (for specific monitoring steps, refer to steps S50 to S70), but also by determining whether the specific process's acquisition and release time points for the wake-up lock match the business status of the vehicle computer, it is determined whether it is in abnormal dormancy. Taking the holding of the first type of wake-up lock by the relevant process of the music player as an example, it belongs to the second type of process described in sub-step S70. If its holding time is less than the second time threshold, it is also compared to see whether its release time point is after the vehicle computer stops playing music. If it releases the first type of wake-up lock while the vehicle computer is playing music, it is determined that the specific process is in abnormal dormancy.

[0062] In a further embodiment, the release timestamp and the acquisition timestamp can be used to determine whether the lock holding frequency is abnormal to determine whether a specific process is in abnormal dormancy. Specifically, after determining that the holding time of a process for the first type of wakeup lock meets the relationship between it and the time threshold, it is also determined whether the number of its release timestamps and acquisition timestamps is within a preset range. For example, although the holding time of a process for the first type of wakeup lock meets the relationship between it and the time threshold, it has multiple release timestamps and acquisition times. This indicates that the process has released and acquired the lock multiple times within a certain period of time, and it is still determined that there is a risk of abnormal dormancy.

[0063] See also Figure 3 The embodiment of the present invention further provides a vehicle terminal abnormal sleep testing device, which is used to implement the steps of the vehicle terminal abnormal sleep testing method provided in the above embodiment. The testing device includes:

[0064] The environment building module 1 is used to connect to the vehicle terminal through the ADB tool installed on the test device.

[0065] The wakeup lock information acquisition module 2 is used to obtain the wakeup lock list of the vehicle terminal.

[0066] Filtering module 3 is used to filter the information in the wake-up lock list to obtain specific information of all first-type wake-up locks in the wake-up lock list and specific information of the wake-up lock of a specific process; wherein the first-type wake-up lock is a partial wake-up lock.

[0067] The timing output module 4 is configured to periodically output specific information about the first type of wake-up lock and specific information about the wake-up lock of the specific process.

[0068] See also Figure 3 In a further embodiment, the testing device further comprises:

[0069] The information extraction module 5 is configured to extract the holder information and the holding time information from the specific information of the first type of wake-up lock.

[0070] The holding time confirmation module 6 is configured to determine a holding time of the first type wake-up lock by each process based on the holder information and the holding time information.

[0071] The first judgment module 7 is configured to judge whether the corresponding process has a sleep abnormality according to the holding time.

[0072] The second judgment module 8 is configured to monitor the wake-up lock of the specific process to determine whether the specific process has a sleep abnormality.

[0073] The above-mentioned vehicle terminal abnormal dormancy test device can be implemented in the form of a computer program, which can be used in Figure 4 Runs on the computer equipment shown.

[0074] See also Figure 4 , Figure 4 1 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device can be used to perform a test method for abnormal dormancy of a vehicle terminal.

[0075] See Figure 4 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a communication bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0076] The storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute a method for testing abnormal dormancy of a vehicle terminal. The storage medium 503 can be a volatile storage medium or a non-volatile storage medium.

[0077] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.

[0078] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a test method for abnormal dormancy of a vehicle terminal.

[0079] The network interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art will understand that Figure 4The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0080] The processor 502 is configured to execute a computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned vehicle terminal abnormal dormancy test method.

[0081] Those skilled in the art will understand that Figure 4 The embodiment of the computer device shown in the figure does not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are the same as those in the figure. Figure 4 The embodiments shown are consistent and will not be described again here.

[0082] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be 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. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0083] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be volatile or non-volatile. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps included in the aforementioned method for testing abnormal dormancy of a vehicle terminal.

[0084] In summary, the embodiments of the present invention provide a method, apparatus, device, and medium for testing abnormal dormancy of a vehicle terminal, which have at least the following beneficial effects:

[0085] By extracting the specific information of the first type of wake-up lock from the wake-up lock list, the time that any process holds the first type of wake-up lock can be accurately obtained, so as to determine whether any process in the vehicle terminal is in abnormal sleep or whether there is a risk of abnormal sleep. In this way, while discovering the abnormal sleep problem of the vehicle terminal, the abnormally dormant process can be accurately located to accelerate the exposure of the problem and gain more time to solve the problem. Vulnerabilities that may cause abnormal sleep of the vehicle terminal can be repaired in a timely manner, ensuring that the on-board network system can maintain stable operation under various circumstances and avoid unnecessary battery consumption. The data recording and analysis in the existing test method requires monitoring by testers, and analysis is difficult after the test is completed. If there is abnormal sleep, it is difficult to analyze and find the cause of the fault.

[0086] The effect of abnormal dormancy testing on vehicle terminals is reflected in the following three aspects:

[0087] Ensure system stability: Through testing, vulnerabilities or defects that may cause abnormal vehicle sleep can be discovered and repaired in a timely manner, ensuring that the in-vehicle network system can maintain stable operation under various circumstances.

[0088] Improve user experience: Abnormal sleep may prevent the vehicle from entering the correct sleep state in time, resulting in unnecessary battery power consumption. By testing and optimizing the system, we can reduce the occurrence of this and improve the user's driving experience.

[0089] Enhanced safety: In some cases, abnormal sleep may disrupt normal vehicle operation or even cause a safety incident. Testing ensures that the in-vehicle network system responds quickly and correctly when abnormal sleep occurs, thereby ensuring driving safety.

[0090] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0091] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, or units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.

[0092] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.

[0093] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0094] If the integrated 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 technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a computer-readable storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A vehicle terminal abnormal dormancy testing method, applied in a testing device, characterized in that: The test device establishes a communication connection with the vehicle terminal, and the method includes: Connecting the vehicle terminal via the ADB tool installed on the test equipment; Obtaining a wakeup lock list of the vehicle terminal; Filtering the information in the wakeup lock list to obtain specific information of all first-type wakeup locks in the wakeup lock list and specific information of the wakeup lock of a specific process; Wherein, the first type of wake-up lock is a partial wake-up lock; The specific information of the first type of wake-up lock and the specific information of the wake-up lock of the specific process are outputted periodically.

2. The vehicle terminal abnormal dormancy testing method according to claim 1, characterized in that: After the timed output of the specific information of the first type of wakeup lock and the specific information of the wakeup lock of the specific process, the method includes: Extracting holder information and holding time information from the specific information of the first type of wake-up lock; Determining, based on the holder information and the holding time information, a holding time of the first type wakeup lock by each process; It is determined whether the corresponding process has a sleep abnormality according to the holding time.

3. The vehicle terminal abnormal dormancy testing method according to claim 2, characterized in that: Judging whether the corresponding process has a sleep abnormality according to the holding time includes: Determining whether the process belongs to a first type of process or a second type of process; wherein the first type of process is a persistent process and the second type of process is an immediate process; If the process belongs to the first type of process, determining whether the corresponding holding time is greater than or equal to a first time threshold, and obtaining a first determination result; If the first judgment result is no, a result indicating that the process has a sleep abnormality is output.

4. The method for testing abnormal dormancy of a vehicle terminal according to claim 3, characterized in that: After determining whether the process belongs to the first type of process or the second type of process, the method further includes: If the process belongs to the second type of process, determining whether the corresponding holding time is less than a second time threshold, and obtaining a second determination result; If the second judgment result is no, a result indicating that the process has a sleep abnormality is output.

5. The vehicle terminal abnormal dormancy testing method according to claim 3, characterized in that: The determining whether the process belongs to the first type of process or the second type of process includes: Traverse the pre-stored mapping relationship table of process name, process type and time threshold, and output the process type and time threshold corresponding to the process; The time threshold corresponding to the first type of process is determined as the first time threshold, and the time threshold corresponding to the second type of process is determined as the second time threshold.

6. The method for testing abnormal dormancy of a vehicle terminal according to claim 1, characterized in that: After the timed output of the specific information of the first type of wakeup lock and the specific information of the wakeup lock of the specific process, the method further includes: Monitor the wakeup lock of the specific process to determine whether the specific process has a sleep exception.

7. The method for testing abnormal dormancy of a vehicle terminal according to claim 6, characterized in that: The monitoring of the wakeup lock of the specific process to determine whether the specific process has a sleep abnormality includes: Obtaining, from the specific information of the wake-up lock of the specific process, a holding time of the wake-up lock by the specific process, an acquisition timestamp, and a release timestamp; Get the business status of the vehicle computer; By judging the holding time of the wake-up lock of the specific process and whether the acquisition timestamp and release timestamp match the business status of the vehicle computer, the result of whether the specific process is in abnormal dormancy is obtained.

8. A vehicle terminal abnormal sleep testing device, used to implement the steps of the vehicle terminal abnormal sleep testing method according to any one of claims 1 to 7, characterized in that: The test setup includes: An environment building module, used to connect to the vehicle terminal through the ADB tool installed on the test device; A wakeup lock information acquisition module is used to obtain the wakeup lock list of the vehicle terminal; a filtering module, configured to filter the information in the wakeup lock list to obtain specific information of all first-type wakeup locks in the wakeup lock list and specific information of wakeup locks of a specific process; wherein the first-type wakeup lock is a partial wakeup lock; A timing output module is used to regularly output specific information of the first type of wake-up lock and specific information of the wake-up lock of the specific process.

9. A computer device, characterized in that: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; The processor is used to implement the steps of the vehicle terminal abnormal dormancy testing method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for testing abnormal dormancy of a vehicle terminal according to any one of claims 1 to 7 are implemented.