Test method, device, equipment and medium for vehicle terminal abnormal hibernation

By using ADB tools to obtain the list of vehicle terminal wake-up locks, filtering and periodically outputting information, the problems of complex vehicle sleep testing and difficulty in abnormal sleep analysis in existing technologies are solved. This achieves automation and precise positioning of vehicle sleep testing, ensuring the stability and security of the vehicle network system.

CN120469387BActive Publication Date: 2026-11-03BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510596878.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2026-11-03
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

Existing vehicle sleep test methods are complex to operate, may damage equipment, and are difficult to analyze and identify the causes of abnormal sleep.

Method used

By connecting to the vehicle terminal using the ADB tool, a list of wake-up locks can be obtained, filtered, and the wake-up lock information of the first type of wake-up lock and specific processes can be output periodically to accurately locate abnormal sleep processes.

Benefits of technology

Accurately locate abnormal sleep processes, reduce manual costs, improve monitoring efficiency, ensure stable operation of the vehicle network system, avoid unnecessary battery consumption, and enhance user experience and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469387B_ABST
    Figure CN120469387B_ABST
Patent Text Reader

Abstract

The application discloses a kind of vehicle terminal abnormal hibernation test method, device, equipment and medium, method includes: by installing ADB tool on test equipment connects car terminal;Obtain the wake lock list of car terminal;Filter information in wake lock list, to obtain the specific information of all first type wake lock in wake lock list and the specific information of the wake lock of specific process;Wherein, first type wake lock is part wake lock;Timing output the specific information of first type wake lock and the specific information of the wake lock of specific process.Through extracting the specific information of first type wake lock of wake lock list, the holding time of any process to first type wake lock can be accurately obtained, to determine whether there is abnormal hibernation or abnormal hibernation risk in any process of car terminal, so that abnormal hibernation process can be accurately positioned while discovering abnormal hibernation problem of car terminal, to facilitate finding out fault reason.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle technology, and in particular to a test method, apparatus, equipment and medium for abnormal sleep of vehicle terminals. Background Technology

[0002] With the continuous development of vehicle electrification, connectivity, and intelligence, vehicle functions are becoming increasingly diverse, such as remote vehicle control and welcome modes. These functions need to remain usable even after the vehicle is powered off and locked, and a sleep test mechanism is key to achieving this.

[0003] Conducting a sleep test ensures that the vehicle network system complies with relevant industry standards. Current technology confirms the vehicle network status by monitoring the current in the vehicle's circuits. The battery terminals are disconnected, and a current testing device is connected in series to the battery circuit to test the battery current. This is because when the vehicle enters the OFF state, the alternator stops working, and the battery becomes the power source for all vehicle electrical components. After the device is connected, the vehicle is controlled to enter the OFF state, and the battery current is continuously monitored. As each controller gradually enters sleep mode, the entire vehicle network enters sleep mode, and the battery current decreases significantly. When the current drops to near the design value, it can be confirmed that the vehicle has entered sleep mode.

[0004] However, this testing method requires connecting the equipment to the vehicle's circuit, which is complex. Considering the equipment's range and adaptability to inrush current, the testing process may damage the equipment. Data recording and analysis during the test require monitoring by the test personnel, and analysis is difficult after the test is completed. If the device cannot go into sleep mode or goes into sleep mode abnormally, it is difficult to analyze and find the cause of the fault. Summary of the Invention

[0005] This invention provides a testing method, apparatus, device, and medium for abnormal sleep mode of vehicle terminals, aiming to solve the problem that it is difficult to analyze and find the cause of abnormal sleep mode in existing technical methods.

[0006] In a first aspect, embodiments of the present invention provide a testing method for abnormal sleep mode of a vehicle terminal, applied in a testing device, wherein the testing device establishes a communication connection with the vehicle terminal, and the method includes: connecting to the vehicle terminal via an ADB tool installed on the testing device; obtaining a wake-up lock list of the vehicle terminal; filtering information in the wake-up lock list to obtain specific information of all wake-up locks of a first type and specific information of wake-up locks of a specific process in the wake-up lock list; wherein the first type of wake-up lock is a partial wake-up lock; and 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.

[0007] Secondly, embodiments of the present invention also provide a testing device for abnormal sleep mode of a vehicle terminal, used to implement the steps of the testing method for abnormal sleep mode of a vehicle terminal described in the first aspect, the testing device comprising:

[0008] An environment setup module is used to connect to the vehicle terminal via an ADB tool installed on the test device.

[0009] The wake-up lock information acquisition module is used to acquire the wake-up lock list of the vehicle terminal.

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

[0011] The timed output module is used to periodically output the specific information of the first type of wake-up lock and the specific information of the wake-up lock of the specific process.

[0012] Thirdly, embodiments of the present invention also provide a computer device, the device including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;

[0013] Memory, used to store computer programs;

[0014] When the processor executes a program stored in the memory, it implements the steps of the test method for abnormal sleep of the vehicle terminal as described in the first aspect.

[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the test method for abnormal sleep of a vehicle terminal as described in the first aspect.

[0016] This invention provides a testing method, apparatus, device, and medium for abnormal sleep mode in vehicle terminals. The method includes: connecting to the vehicle terminal via an ADB tool installed on the testing device; obtaining a wake-up lock list of the vehicle terminal; filtering information in the wake-up lock list to obtain specific information of all first-type wake-up locks and specific wake-up lock information of a specific process; wherein the first-type wake-up locks are partial wake-up locks; and periodically outputting the specific information of the first-type wake-up locks and the specific wake-up lock information of the specific process. Thus, by extracting the specific information of the first-type wake-up locks from the wake-up lock list, the holding time of any process for a first-type wake-up lock can be accurately obtained, thereby determining whether any process on the vehicle terminal is in abnormal sleep mode or at risk of abnormal sleep mode. This allows for the precise location of the abnormally sleeping process while detecting abnormal sleep mode issues on the vehicle terminal, facilitating the identification of the cause of the fault. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart of a test method for abnormal sleep mode of a vehicle terminal provided in an embodiment of the present invention;

[0019] Figure 2 Another flowchart of the test method for abnormal sleep mode of vehicle terminal provided in the embodiment of the present invention;

[0020] Figure 3 A schematic block diagram of a test device for abnormal sleep mode of a vehicle terminal provided in an embodiment of the present invention;

[0021] Figure 4 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0024] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this 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 also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0026] It should also be noted that, unless otherwise explicitly specified and limited, terms such as "installation," "connection," "linking," "fixing," and "setting" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. When an component is referred to as being "on" or "below" another component, the component can be located "directly" or "indirectly" on the other component, or there may be one or more intermediary components. The terms "first," "second," "third," etc., are only for the convenience of describing this technical solution and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.

[0027] Please see Figure 1 This invention provides a testing method for abnormal sleep mode in vehicle terminals, applied in a testing device that establishes a communication connection with the vehicle terminal. Abnormal sleep mode occurs when a vehicle terminal enters a low-power sleep state under unexpected or abnormal conditions, which may be caused by factors such as hardware failure, software error, system conflict, or external interference. This leads to increased power consumption or decreased performance, and may even affect the normal operation and safety performance of the vehicle. This testing method can monitor the vehicle terminal to determine if abnormal sleep mode is possible.

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

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

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

[0031] S20. Obtain the wake-up lock list of the vehicle terminal.

[0032] In this embodiment, the list of currently active wakelocks on the vehicle terminal can be obtained by executing the command "adb shell dumpsys power" in the ADB tool. At this time, the vehicle terminal is in a wake-up state.

[0033] S30. Filter the information in the wake-up lock list to obtain the specific information of all first-type wake-up locks in the wake-up lock list and the specific information of the wake-up 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., the partial wake-up lock, is to allow the CPU to continue running when the screen of the terminal in the vehicle is off. The wake-up lock list obtained in S20 includes all wake-up locks currently active in the vehicle 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 for all processes can be extracted from the wake-up lock list. The specific information of the first type of wake-up lock includes the holding process and the holding time. For example, one of the specific information of the first type of wake-up lock is "PARTIAL_WAKE_LOCK 'AudioMix' ACQ=-1s7ms(uid=1013,pid=1234)", where pid (Process ID) corresponds one-to-one with the holding process, and a single process can be specifically located through a pid. The time after ACQ is the holding time of the first type of wake-up lock by that process. The Uid (UserID, user identifier) ​​corresponds one-to-one with the user of the process holding the lock. Thus, by extracting the specific information of the first type of wake-up lock from the wake-up lock list, the holding time of any process holding the first type of wake-up lock can be accurately obtained. This allows for the determination of whether any process in the vehicle terminal is in abnormal sleep mode or whether there is a risk of abnormal sleep mode. This enables the precise location of abnormally sleeping processes while discovering abnormal sleep mode issues in the vehicle terminal, accelerating problem exposure, and gaining more time to resolve the problem. Consequently, vulnerabilities that may lead to abnormal sleep mode can be patched promptly, ensuring the stable operation of the in-vehicle network system under various conditions, avoiding unnecessary battery consumption, and addressing the problems of existing testing methods where data recording and analysis require monitoring by testers, and post-test analysis is difficult. Furthermore, it is difficult to analyze and identify the cause of faults in cases of abnormal sleep mode.

[0035] In this embodiment, the command "adb shell dumpsys power|grep -E 'wakelock|package_name'" is also executed in the ADB tool to obtain specific information about the wake locks of a specific process, where the package name is the name of the corresponding specific process. Besides filtering the specific information of the first type of wake lock from the entire wake lock list to determine whether the first type of wake lock is held abnormally, and thus to determine whether the process holding the first type of wake lock is at risk of abnormal hibernation, the holding status of wake locks for specific processes can also be selectively obtained as needed, thereby enabling targeted monitoring of specific processes. This specific process can be one or more processes, and the wake lock held by the specific process can be a first type of wake lock or other types of wake locks. In this embodiment, firstly, the holding status of all processes with the first type of wake-up lock is obtained to determine whether any process is at risk of abnormal sleep. That is, all processes are monitored from a global monitoring perspective to avoid any processes being missed and not detected. Secondly, based on global monitoring, specific processes are monitored from a local monitoring perspective to play a targeted monitoring role, 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 high risk of abnormal sleep. Specifically, the package name of the process with a high probability of abnormal sleep can be obtained from previous detection reports or user feedback reports as the specific process.

[0036] S40. Periodically output the specific information of the first type of wake-up lock and the specific information of the wake-up lock of the specific process.

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

[0038] By monitoring the vehicle's WakeLock system, developers can quickly pinpoint the cause of issues, improving software stability and robustness during development, reducing the risks posed by abnormal sleep mode, and minimizing the possibility of related safety incidents. Testing ensures the in-vehicle network system responds quickly and correctly during abnormal sleep mode, thus protecting driving safety. It also reduces the likelihood of the vehicle failing to enter sleep mode promptly due to abnormal sleep mode, preventing unnecessary battery drain. Finally, testing optimizes the system, enhancing the user's driving experience.

[0039] Please see 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 holder information and 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, determining whether the corresponding process has a hibernation abnormality based on the holding time.

[0040] In this embodiment, holder information and holding time information are extracted from the specific information of the first type of wake-up lock output periodically. The holder information is the PID or PID and UID from the specific information of the first type of wake-up lock, and the holding time information is the time information after ACQ from the specific information of the first type of wake-up lock. Based on the holding time, it is determined whether the corresponding holder, i.e., the corresponding process, has a hibernation anomaly. For example, for a sensor process related to vehicle safety, to ensure vehicle driving safety, it should hold the first type of wake-up lock for a long time. If the holding time of the relevant process is short, it is determined that the relevant process has an abnormal hibernation, thereby reminding relevant personnel to maintain or further test the relevant process in a timely manner.

[0041] In some embodiments, S70, determining whether the corresponding process has a hibernation anomaly based on the holding time, includes the following sub-steps:

[0042] Determine 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 instantaneous process;

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

[0044] If the first judgment result is negative, then the result indicating that the process has a hibernation abnormality is output.

[0045] In this embodiment, persistent processes can be understood as processes related to the vehicle's continuous core functions or vehicle safety, such as processes related to the vehicle's real-time location and navigation, vehicle sensors, and voice assistants. Immediate processes can be understood as short-term tasks or non-core processes, such as Bluetooth connection processes and video playback processes. If a process is determined to belong to the first type of process, then it is determined whether the process's holding time for the first type of wake-up lock is greater than or equal to a first time threshold. If the holding time is greater than or equal to the first time threshold, i.e., the first determination result is yes, then the result that the process does not have a sleep abnormality is output; if the first determination 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 holding 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 its corresponding first time threshold.

[0047] Therefore, 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, then determine whether the corresponding holding time is less than the second time threshold to obtain the second determination result;

[0049] If the second judgment result is negative, then the result indicating that the process has a hibernation abnormality will be output.

[0050] If the process is determined to be a second type of process, then the holding time of the first type of wake-up lock is determined to be less than the second time threshold. If the holding time is greater than or equal to the first time threshold, i.e. the second determination result is no, then the result that the process has a sleep abnormality is output. If the second determination 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 holding 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 its corresponding second time threshold.

[0052] In a specific embodiment, determining whether the process belongs to a first type of process or a second type of process includes the following sub-steps: traversing a pre-stored mapping 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 table is pre-stored in the test device. The process name in the mapping table can be the specific name of the process, i.e., the package name of the process, or the uid corresponding to the process. The process types include first type processes and second type processes.

[0054] Please see Figure 2 In some embodiments, after S40, 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 output at regular intervals, the testing method further includes:

[0055] S80. Monitor the wake-up lock of the specific process to determine whether the specific process has a hibernation abnormality.

[0056] In this embodiment, the holding status of a specific process on the wake-up lock is monitored in a targeted manner, thereby enabling targeted monitoring of the specific process to determine whether the specific process has any hibernation abnormalities.

[0057] In a further embodiment, S80, monitoring the wake-up lock of the specific process to determine whether the specific process has a sleep anomaly, includes:

[0058] The specific information of the wake-up lock of the specific process is obtained, including the holding time of the wake-up lock, the acquisition timestamp, and the release timestamp; the service status of the vehicle system is obtained; by judging whether the holding time of the wake-up lock, the acquisition timestamp, and the release timestamp of the specific process match the service status of the vehicle system, the result of whether the specific process has abnormal sleep is obtained.

[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 by the specific process, the acquisition timestamp and release timestamp of the wake-up lock by the specific process are also obtained. The acquisition timestamp indicates the time when the process acquires the wake-up lock, and the release timestamp indicates the time when the process releases the wake-up lock. Release timestamp - acquisition timestamp = holding time.

[0060] The service status of the vehicle's infotainment system can be obtained by accessing the system logs. The service status indicates when the vehicle's infotainment system is performing and terminating which processes.

[0061] By determining whether the holding time of the wake-up lock by a specific process, as well as the acquisition and release timestamps, matches the service status of the vehicle's infotainment system, the result of whether the specific process is in abnormal sleep mode can be obtained. In this embodiment, not only is the relationship between the holding time of the wake-up lock by a specific process and its corresponding time threshold monitored (for specific monitoring steps, refer to steps S50-S70), but also the matching of the acquisition and release times of the wake-up lock by the specific process with the service status of the vehicle's infotainment system is used to determine whether it is in abnormal sleep mode. Taking the holding of the first type of wake-up lock by a music player process as an example, it belongs to the second type of process mentioned in the sub-step of S70. After determining that its holding time is less than the second time threshold, it is further compared whether its release time occurs after the vehicle's infotainment system stops playing music. If it releases the first type of wake-up lock while the vehicle's infotainment system is playing music, then it is determined that the specific process is in abnormal sleep mode.

[0062] In a further embodiment, the abnormal dormancy of a specific process can be determined by checking whether the lock holding frequency is abnormal through the release timestamp and the acquisition timestamp. Specifically, after determining that the holding time of a process on the first type of wake-up lock meets its relationship with 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 on the first type of wake-up lock meets its relationship with the time threshold, if it has multiple release timestamps and acquisition timestamps, it indicates that it has released and acquired multiple times within a certain period of time, and it is still determined that there is a risk of abnormal dormancy.

[0063] Please see Figure 3 This invention also provides a testing device for abnormal sleep mode of a vehicle terminal, used to implement the steps in the testing method for abnormal sleep mode of a vehicle terminal provided in the above embodiments. The testing device includes:

[0064] Environment setup module 1 is used to connect to the vehicle terminal via an ADB tool installed on the test device.

[0065] The wake-up lock information acquisition module 2 is used to acquire the wake-up lock list of the vehicle terminal.

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

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

[0068] Please see Figure 3 In a further embodiment, the testing apparatus further includes:

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

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

[0071] The first judgment module 7 is used to determine whether the corresponding process has a hibernation abnormality based on the holding time.

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

[0073] The aforementioned test device for abnormal sleep mode of vehicle terminals can be implemented in the form of a computer program, which can, for example... Figure 4 It runs on the computer device shown.

[0074] Please see Figure 4 , Figure 4 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. This computer device can be used to perform a test method for abnormal sleep mode in 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. The memory may include a storage medium 503 and internal memory 504.

[0076] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a test method for abnormal sleep mode of the vehicle terminal. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.

[0077] The processor 502 provides 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 sleep of the vehicle terminal.

[0079] This network interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 500 to which 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 different component arrangements.

[0080] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding function in the above-mentioned test method for abnormal sleep of vehicle terminal.

[0081] Those skilled in the art will understand that Figure 4 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 4 The embodiments shown are consistent and will not be repeated here.

[0082] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), 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.

[0083] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be volatile or non-volatile. The computer-readable storage medium stores a computer program, wherein when executed by a processor, the computer program implements the steps included in the above-described test method for abnormal sleep mode of a vehicle terminal.

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

[0085] By extracting specific information about the first type of wake-up lock from the wake-up lock list, the holding time of any process on the first type of wake-up lock can be accurately obtained. This allows for the determination of whether any process on the vehicle terminal is in abnormal sleep mode or whether there is a risk of abnormal sleep mode. Consequently, while discovering abnormal sleep mode issues on the vehicle terminal, the abnormal sleep process can be precisely located, accelerating the exposure of the problem and gaining more time to resolve it. This enables timely patching of vulnerabilities that may lead to abnormal sleep mode on the vehicle, ensuring that the in-vehicle network system can maintain stable operation under various conditions, avoiding unnecessary battery consumption, and solving the problems in existing testing methods where data recording and analysis require monitoring by testers, and analysis is difficult after testing. Furthermore, if abnormal sleep mode is present, it is difficult to analyze and find the cause of the fault.

[0086] The effectiveness of abnormal sleep 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 hibernation can be identified and fixed in a timely manner, ensuring that the vehicle network system can maintain stable operation under various conditions.

[0088] Improving User Experience: Abnormal sleep mode may prevent the vehicle from entering the correct sleep state in a timely manner, resulting in unnecessary battery drain. By testing and optimizing the system, this can be reduced, improving the user's driving experience.

[0089] Enhanced security: In certain situations, abnormal sleep mode can interfere with the normal operation of the vehicle and even cause safety accidents. Testing ensures that the in-vehicle network system can respond quickly and correctly during abnormal sleep modes, thereby protecting driving safety.

[0090] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. 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 foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0091] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped 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 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 it may be an electrical, mechanical, or other form of connection.

[0092] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0093] Furthermore, the functional units in the various embodiments of the present invention 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 integrated unit can be implemented in hardware or as a software functional unit.

[0094] If the integrated unit is implemented as 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, in essence, 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. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.

[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 these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A test method for abnormal sleep mode of a vehicle terminal, applied in a test device, characterized in that, The testing equipment establishes a communication connection with the vehicle terminal, and the method includes: The vehicle terminal is connected via an ADB tool installed on the test equipment; Obtain the wake-up lock list of the vehicle terminal; Filter the information in the wake lock list to obtain specific information about all wake locks of the first type in the wake lock list and specific information about the wake locks of a specific process; 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 output periodically. After the timed output of 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 following is included: Extract the holder information and holding time information from the specific information of the first type of wake-up lock; The holding time of each process for the first type of wake-up lock is determined based on the holder information and the holding time information; Determine whether the corresponding process has a hibernation anomaly based on the holding time; After 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, it also includes: Monitor the wake-up lock of the specific process to determine if the specific process has any hibernation abnormalities; The monitoring of the wake-up lock of the specific process to determine whether the specific process has a sleep anomaly includes: Obtain the holding time of the wake-up lock by the specific process, as well as the acquisition timestamp and release timestamp, from the specific information of the wake-up lock of the specific process; Obtain the service status of the vehicle's infotainment system; By determining whether the holding time of the wake-up lock by the specific process and whether the acquisition timestamp and release timestamp match the business status of the vehicle system, the result of whether the specific process is in abnormal sleep can be obtained.

2. The test method for abnormal sleep mode of a vehicle terminal according to claim 1, characterized in that, Determining whether the corresponding process has a dormant anomaly based on the holding time includes: Determine 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 instantaneous process; If the process belongs to the first type of process, then determine whether the corresponding holding time is greater than or equal to the first time threshold, and obtain the first determination result; If the first judgment result is negative, then the result indicating that the process has a hibernation abnormality is output.

3. The test method for abnormal sleep mode of a vehicle terminal according to claim 2, characterized in that, After determining whether the process belongs to the first type of process or the second type of process, the process further includes: If the process belongs to the second type of process, then determine whether the corresponding holding time is less than the second time threshold to obtain the second determination result; If the second judgment result is negative, then the result indicating that the process has a hibernation abnormality will be output.

4. The test method for abnormal sleep mode of a vehicle terminal according to claim 2, characterized in that, The determination of whether the process belongs to the first type of process or the second type of process includes: Iterate through the pre-stored mapping table of process names, process types, and time thresholds, and output the process type and time threshold corresponding to each 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.

5. A testing apparatus for abnormal sleep mode of a vehicle terminal, used to implement the steps of the testing method for abnormal sleep mode of a vehicle terminal according to any one of claims 1-4, characterized in that, The testing apparatus includes: An environment setup module is used to connect to the vehicle terminal via an ADB tool installed on the test device. The wake-up lock information acquisition module is used to acquire the wake-up lock list of the vehicle terminal. A filtering module is used to filter information in the wake-up lock list to obtain specific information of all wake-up locks of the first type and specific information of wake-up locks of a specific process; wherein, the first type of wake-up lock is a partial wake-up lock; The timed output module is used to periodically output 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 information extraction module is used to extract holder information and holding time information from the specific information of the first type of wake-up lock; The holding time confirmation module is used to determine the holding time of each process on the first type of wake-up lock based on the holder information and the holding time information; The first judgment module is used to determine whether the corresponding process has a hibernation abnormality based on the holding time. The second judgment module is used to monitor the wake-up lock of the specific process to determine whether the specific process has a hibernation abnormality. The monitoring of the wake-up lock of the specific process to determine whether the specific process has a hibernation abnormality includes: obtaining the holding time of the wake-up lock of the specific process and the acquisition timestamp and release timestamp from the specific information of the wake-up lock of the specific process; obtaining the service status of the vehicle system; and obtaining the result of whether the specific process has an abnormal hibernation by judging whether the holding time of the wake-up lock and the acquisition timestamp and release timestamp of the specific process match the service status of the vehicle system.

6. 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 through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the test method for abnormal sleep of a vehicle terminal as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the test method for abnormal sleep of the vehicle terminal as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Automobile network dormancy test method, device and equipment and storage medium

    CN112241164A

  • Vehicle wake-up automatic test method, device, equipment and medium

    CN119575924A