Equipment test management method and device and electronic equipment
By obtaining the ratio of deep sleep duration to normal sleep duration of the device, the problem of inaccurate judgment of stable standby state caused by frequent power-on in the aging standby test of electronic devices is solved, realizing the effectiveness of aging standby test data and optimized resource management.
Patent Information
- Application Number
- CN202511410626.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-13
AI Technical Summary
In the aging standby test of electronic devices, external factors cause the device to light up frequently and fail to enter a stable standby state, affecting the accuracy and validity of the test results.
The software program acquires the device's deep sleep duration and normal sleep duration, calculates their ratio, determines whether the device is in a stable standby state, and marks the aging standby test data as valid or invalid.
This improves the accuracy of determining the stable standby state of equipment, ensures the authenticity and validity of the generated aging standby test data, and avoids resource waste.
Smart Images

Figure CN121523985A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of device testing, and in particular to a device testing management method and device, and an electronic device. BACKGROUND
[0002] Electronic devices such as mobile phones and tablets need to be tested in an ideal stable standby state before being put on the market, so as to intercept problematic devices in advance. Only the aging standby test performed in the stable standby state is effective. However, due to external factors such as network disconnection and reconnection, the electronic device will be frequently turned on and the stable standby state will be interrupted. In the case where the stable standby state is not reached, the aging standby test and the data generated therefrom are invalid, which affects the test results.
[0003] Therefore, it is necessary to accurately determine whether the electronic device is in the ideal stable standby state during the aging standby test, and there is no solution to this problem at present. SUMMARY
[0004] Therefore, it is necessary to accurately determine whether the electronic device is in the ideal stable standby state during the aging standby test, and there is no solution to this problem at present.
[0005] The present application provides a device testing management method, which comprises the following steps:
[0006] The software program is used to obtain the deep sleep duration of the device under test in the deep sleep state and the ordinary sleep duration of the device under test in the ordinary sleep state. The ordinary sleep state is used to represent the low-power working state of the device under test when the screen is off and no task is actively running by reducing the resource consumption of hardware and software. The deep sleep state is used to represent the working state of the device under test which is lower than the power consumption in the ordinary sleep state after the device under test has been in the ordinary sleep state for a predetermined duration and has no activity.
[0007] The ratio of the deep sleep duration to the ordinary sleep duration is determined.
[0008] The aging standby test data generated when the ratio is greater than the preset ratio value is marked as valid data.
[0009] In one embodiment, the software program is used to obtain the deep sleep duration of the device under test in the deep sleep state, which comprises the following steps:
[0010] The software program is used to obtain the first duration from the start of the device under test to the current time.
[0011] acquire a second time length of the to-be-tested device in a deep sleep state from powering on, wherein the non-deep sleep state at least includes the normal sleep state;
[0012] determine a time difference between the first time length and the second time length as a deep sleep time length of the to-be-tested device in the deep sleep state.
[0013] In an embodiment, the normal sleep time length of the to-be-tested device in the normal sleep state is acquired through a preset software program, including:
[0014] acquire, through a preset software program, a third time length of the to-be-tested device from powering on to a current time, excluding the deep sleep state;
[0015] acquire, within the third time length, a fourth time length of the to-be-tested device in a non-normal sleep state;
[0016] determine a time difference between the third time length and the fourth time length as the normal sleep time length of the to-be-tested device in the normal sleep state.
[0017] In an embodiment, the method further includes:
[0018] in a case where the proportion is not greater than a preset proportion value, generating and sending problem warning information to a preset user end, so that the user end performs problem positioning on the to-be-tested device based on the problem warning information.
[0019] In an embodiment, the method further includes:
[0020] in a case where the proportion is not greater than a preset proportion value, stopping performing the aging standby test, and / or, marking the currently generated aging standby test data as invalid data.
[0021] In an embodiment, the normal sleep state and the deep sleep state are two different low-power consumption modes, and the power consumption of the normal sleep state is higher than that of the deep sleep state.
[0022] Embodiments of the present application provide a device test management apparatus, the apparatus comprising:
[0023] The time length obtaining module is configured to obtain, through a preset software program, a deep sleep time length of the to-be-tested device in a deep sleep state and an ordinary sleep time length of the to-be-tested device in an ordinary sleep state; the ordinary sleep state is used to represent a working state of the to-be-tested device in low power consumption by reducing resource consumption of hardware and software when a screen is turned off and no task is actively run; the deep sleep state is used to represent a working state of the to-be-tested device in lower power consumption than the ordinary sleep state after the to-be-tested device in the ordinary sleep state lasts for a preset time length and has no activity;
[0024] The proportion determining module is configured to determine a proportion of the deep sleep time length and the ordinary sleep time length.
[0025] The data marking module is configured to mark, as valid data, the aging standby test data generated in a case where the proportion is greater than a preset proportion value.
[0026] In an embodiment, the time length obtaining module is further configured to:
[0027] obtain, through a preset software program, a first time length of the to-be-tested device from booting to a current time point;
[0028] obtain a second time length of the to-be-tested device in a non-deep sleep state after booting; the non-deep sleep state at least includes the ordinary sleep state;
[0029] determine, as the deep sleep time length of the to-be-tested device in the deep sleep state, a time difference between the first time length and the second time length.
[0030] In an embodiment, the time length obtaining module is further configured to:
[0031] obtain, through a preset software program, a third time length of the to-be-tested device from booting to a current time point, except for the deep sleep state;
[0032] obtain, within a range of the third time length, a fourth time length of the to-be-tested device in a non-ordinary sleep state;
[0033] determine, as the ordinary sleep time length of the to-be-tested device in the ordinary sleep state, a time difference between the third time length and the fourth time length.
[0034] In an embodiment, the device further includes a pre-warning module.
[0035] The pre-warning module is configured to, in a case where the proportion is not greater than a preset proportion value, generate and send problem pre-warning information to a preset user end, so that the user end performs problem positioning on the to-be-tested device based on the problem pre-warning information.
[0036] The embodiment of the present application provides a kind of electronic equipment, including memory and processor, the memory is stored with computer program, the processor executes the steps of the test management method of the device provided in any embodiment of the present application when the computer program is implemented.
[0037] The embodiment of the present application provides a kind of computer readable storage medium, which stores computer program, the steps of the test management method of the device provided in any embodiment of the present application are implemented when the computer program is executed by processor.
[0038] The test management method, device and electronic equipment provided by the embodiment of the present application include: obtaining the deep sleep duration of the device under test in a deep sleep state and the ordinary sleep duration in an ordinary sleep state through a preset software program; determining the ratio of the deep sleep duration to the ordinary sleep duration; and marking the aging standby test data generated when the ratio is greater than a preset ratio value as valid data.
[0039] In the present application, the deep sleep duration and the ordinary sleep duration are automatically collected by the software program during the execution of the aging standby test process, and the ratio of the deep sleep duration to the ordinary sleep duration is calculated. The higher the ratio of the deep sleep duration to the ordinary sleep duration, the lower the frequency of the device under test being turned on, and accordingly, the more likely it is to be in a stable standby state that meets the execution of the aging standby test; on the contrary, the lower the ratio of the deep sleep duration to the ordinary sleep duration, the higher the frequency of the device under test being turned on, and accordingly, the more likely it is unable to enter a stable standby state, and the more likely it is to interrupt the stable standby state required for the aging standby test. Therefore, the ratio can objectively and quantitatively determine whether the device under test is frequently turned on and whether it is in a stable standby state, and improve the accuracy of determining that the device under test is in a stable standby state. When the ratio is greater than a preset ratio value, it indicates that it is in a stable standby state, and the power consumption control mechanism of the device under test is normal, so the aging standby test performed is valid, and the aging standby test data generated is valid data, and the data obtained is real and reliable, avoiding resource waste caused by invalid test. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 It is a flowchart of the test management method of the device in one embodiment;
[0041] Figure 2 It is a structural schematic diagram of the test management device of the device in one embodiment;
[0042] Figure 3 It is a structural schematic diagram of the electronic equipment in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0044] Electronic devices such as mobile phones, tablets, etc. need to be subjected to aging standby tests before being put on the market to intercept problem devices in advance. The aging standby test can include: placing the device under test in a test environment with constant temperature and shielding external interference, and maintaining its stable connection with the base station and Wi-Fi network. The test system runs for a preset time (such as 72 hours), and the monitoring program records the overall average current, sleep state and other key power consumption data of the device under test at fixed intervals (such as every hour) during the test. After the test is completed, the system automatically generates a test report. If the final average current value in the test report is lower than the preset threshold, it is determined that the aging standby test of the device under test is passed, and the power consumption performance meets the design requirements.
[0045] During the aging standby test, it is very important to detect the sleep state of the electronic device. Currently, the common schemes for detecting whether the electronic device enters the sleep state mainly include the following two schemes. Scheme one, the upper layer of the mobile phone issues poweroff.sleep, waits for a period of time, and then tests the standby current on the hardware of the electronic device. If the standby current meets certain test range conditions, it is considered to pass the test. This scheme may encounter a situation where the electronic device cannot sleep due to the lock of some applications, resulting in excessive current power consumption, which affects the related work of the aging standby test. Excessive current power consumption is usually discovered after batch online trial run. Once this problem is discovered, it is necessary to maintain the urgency, and the personnel pressure is large. Therefore, there is no good method to control the sleep state of the electronic device.
[0046] Scheme two, in order to avoid the influence of the upper layer linux operating system on the test hardware power consumption, the standby current test is performed in the shutdown mode. The test environment is a pure hardware test environment, which eliminates the influence of the upper layer environment. However, the pure hardware test environment can only solve the hardware related problems one-sidedly, and cannot locate and troubleshoot software related problems.
[0047] The inventors have found that the reasons for the lock of some applications mainly include the following:
[0048] (1) Application of lock class software background keep-alive mechanism, including: (a) active lock screen protection: some security / privacy applications (such as "application lock" tool) will continuously occupy CPU resources to prevent being recycled by the system. (b) Background service resident: keep active through foreground service (foreground service), timing task or broadcast wake-up (such as AlarmManager). (c) Abuse of permissions: get wake-up lock (WakeLock), background pop-up interface and other permissions to prevent the system from entering deep sleep.
[0049] (2) Abnormal behavior of locked applications, including: (a) Background process conflict: locked applications (such as WeChat and Alipay) may repeatedly attempt to wake up due to permission restrictions in the locked state. (b) Synchronization / notification failure retry: after the application lock intercepts the notification, the application may continuously retry the synchronization request (such as email and cloud backup).
[0050] (3) System compatibility issues, including: (a) Manufacturer ROM restrictions: The power saving strategy of some domestic mobile phones (such as Xiaomi and Huawei) conflicts with the application lock, resulting in chaotic sleep logic. (b) Android version adaptation: The background restrictions of Android 10+ may cause abnormal application lock function and repeatedly wake up the system.
[0051] Due to the above reasons, some applications hold the lock, causing the electronic device to not go to sleep. When performing aging standby testing on the electronic device, it is expected that the electronic device can enter deep sleep and be in a stable standby state, and only in the stable standby state can effective aging standby testing be performed. However, in the actual testing process, based on the above reasons and external factors such as network disconnection and reconnection, the electronic device may need to be turned on for operation. Frequent turning on of the electronic device will cause the electronic device to be unable to enter the stable standby state required for aging standby testing.
[0052] Therefore, during the aging standby testing process, it is necessary to accurately know whether the electronic device is frequently turned on, that is, to know whether the electronic device is in an ideal stable standby state. If it is not frequently turned on, it means that the electronic device is in a stable standby state, and the standby testing data obtained at this time is effective and reliable. If it is frequently turned on, it means that the electronic device cannot enter a stable standby state, and the standby testing performed at this time and the test data obtained are invalid.
[0053] Based on the above, in the aging standby testing process, in order to accurately determine whether the electronic device is in an ideal stable standby state and identify effective aging standby testing data in the stable standby state, the present embodiment provides a device testing management method and device and an electronic device.
[0054] In one embodiment, as Figure 1As shown, a device test management method is provided, which can be applied to the aging standby test scenario of electronic devices such as mobile phones and tablets, and can be executed by a device test management apparatus of the device, which can be implemented in software and / or hardware and can be integrated on the electronic device. Among them, the electronic device can be a device to be tested for aging standby test, such as a smartphone, a personal computer, a notebook computer, a tablet computer, and a portable wearable device.
[0055] Referring to Figure 1 In this embodiment, the device test management method can include the following steps.
[0056] S102, through a preset software program, the deep sleep duration of the device under test in the deep sleep state and the ordinary sleep duration in the ordinary sleep state are obtained.
[0057] Among them, the ordinary sleep state is used to represent that the device under test is in a low-power working state by reducing the resource consumption of hardware and software when the screen is off and no task is actively running; the deep sleep state is used to represent that the device under test enters a working state with lower power consumption than the ordinary sleep state after being in the ordinary sleep state for a preset duration and having no activity.
[0058] In this embodiment, the ordinary sleep state and the deep sleep state are two different low-power modes, which are designed to prolong the standby time of the device under test. The power consumption of the ordinary sleep state is higher than that of the deep sleep state, and the core difference between the two, such as, includes: system resource closing degree, wake-up delay and background task limitation, etc.
[0059] The ordinary sleep state, which can also be referred to as standby sleep state, sleep mode or low-power state, refers to the working state of an electronic device (such as a mobile phone) when the screen is off and no task is actively running. In this state, the system of the electronic device reduces the resource consumption of hardware and software to save power. In the ordinary sleep state, the electronic device still maintains basic functions such as receiving notifications and network connections, but the core components of the electronic device enter a low-power running mode.
[0060] The deep sleep state, when the electronic device has no activity for a period of time in the ordinary sleep state, will try to enter a deeper deep sleep state to achieve maximum power saving. In the deep sleep state, most of the hardware of the electronic device is suspended, and the background is almost stopped (only the core functions such as the clock are retained), the power consumption is extremely low, and the power consumption is maximized. The power consumption is lower than that in the ordinary sleep state, and the power consumption is lower.
[0061] In this embodiment, through a preset software program, the deep sleep duration of the device under test in the deep sleep state can include:
[0062] The first time length from the start of the to-be-tested device to the current time is obtained through a preset software program; the second time length from the start of the to-be-tested device to the current time in the non-deep sleep state is obtained; and the time difference between the first time length and the second time length is determined as the deep sleep time length of the to-be-tested device in the deep sleep state.
[0063] As an example, the software program in the embodiment can be a service or a background daemon of a system deployed in the to-be-tested device, and has a high system permission to ensure that it can continuously run and listen to the state and time of the to-be-tested device.
[0064] The software program has a time collection function, and the time stamp of the start of the to-be-tested device and the current time can be read through the software program, so as to obtain the first time length (indicated as T) from the start of the to-be-tested device to the current time. The first time length T is the total time elapsed since the start of the to-be-tested device, which includes all possible states of the to-be-tested device, such as the normal sleep state, the deep sleep state and the normal working state.
[0065] In the deep sleep state of the to-be-tested device, most system functions (including software and hardware clocks responsible for timing) are suspended or turned off, resulting in the inability to perform normal and continuous time recording. In order to achieve the most extreme power saving effect, the to-be-tested device in the deep sleep state can usually turn off or greatly reduce the CPU power consumption, disconnect the network, turn off the screen, suspend most peripherals, and only retain a few ultra-low-power hardware units; the above-mentioned retained hardware units such as real-time clocks and a small number of storage registers associated therewith are used to save wake-up time and other key information.
[0066] In this case, the above-mentioned retained real-time clock can only record a linear, continuously accumulated timing number (Ticks) since the start or power-on, and cannot record complex time related to the running state; at the same time, other software programs capable of timing the running state stop running and cannot record the time length of the deep sleep state.
[0067] Therefore, the problem of being unable to directly record the time length of the deep sleep state occurs. In view of this problem, the embodiment considers that the retained real-time clock in the to-be-tested device maintains continuous timing whether in the deep sleep state or in any other state, so that the first time length from the start of the to-be-tested device to the current time can be obtained. In addition, in the normal sleep state and the normal working state other than the deep sleep state, the software program for timing the running state is normally working; this indicates that the time length of other running states other than the deep sleep state can be obtained.
[0068] Based on this, the embodiment adopts an indirect mode, first acquires a first duration T from the start of the to-be-tested device to the current time; then acquires a second duration (denoted as T1) from the start of the to-be-tested device, in a non-deep sleep state (such as a normal sleep state and a normal working state). Then, the software program also has data calculation capability, so that the time difference between the first duration T and the second duration T1 is calculated by the software program, and the deep sleep duration of the to-be-tested device accumulated in the deep sleep state is obtained, that is, T-T1.
[0069] The embodiment intelligently acquires, by a software program, key time parameters indirectly related to the to-be-tested device and the deep sleep state, that is, a first duration from the start to the current time, and a second duration from the start in a non-deep sleep state; the deep sleep duration accumulated by the to-be-tested device is indirectly and accurately calculated by the difference between the first duration and the second duration. The method provides accurate and reliable data support for judging whether the to-be-tested device successfully enters the low-power standby state in the automatic test, effectively avoids invalid test caused by test environment or device exception, and improves test efficiency and reliability.
[0070] In an embodiment, the program software normally works in the normal sleep state, and can directly record the normal sleep duration of the normal sleep state. Further, the embodiment can record, by a preset software program, a first time stamp of the to-be-tested device entering the normal sleep state and a second time stamp of the to-be-tested device exiting the normal sleep state each time the to-be-tested device enters and exits the normal sleep state; and determine the normal sleep duration of the to-be-tested device accumulated in the normal sleep state according to the first time stamp and the second time stamp.
[0071] In another embodiment, the normal sleep duration of the to-be-tested device in the normal sleep state is acquired by a preset software program, which can include:
[0072] The third duration of the to-be-tested device from the start to the current time, except for the deep sleep state, is acquired by a preset software program; the fourth duration of the to-be-tested device in the non-normal sleep state is acquired within the third duration; and the time difference between the third duration and the fourth duration is determined as the normal sleep duration of the to-be-tested device in the normal sleep state.
[0073] In the embodiment, the software program obtains a third time length (denoted as t) of the to-be-tested device from the time of starting up to the current time, excluding the deep sleep state. The third time length t only includes the time of the to-be-tested device in the non-deep sleep state; for example, only the time of the to-be-tested device in the normal sleep state, or if the to-be-tested device exists in the normal working state and the normal sleep state simultaneously, the time of the to-be-tested device in the normal working state and the normal sleep state. When the to-be-tested device enters the deep sleep state, the clock counting the third time length t is paused; when the to-be-tested device wakes up from the deep sleep state, the clock continues to run.
[0074] In the range of the third time length, the time interference of the deep sleep state to the normal sleep state has been excluded, but the time interference of the normal working state may exist. Therefore, the embodiment monitors a fourth time length (denoted as t1) of the to-be-tested device in the non-normal sleep state (i.e., the normal working state) in the range of the third time length through the software program.
[0075] The software program calculates the time difference between the third time length t and the fourth time length t1 to obtain the normal sleep time length of the to-be-tested device in the normal sleep state, i.e., t-t1.
[0076] The above embodiment adopts the way of subtracting the third time length and the fourth time length to determine the normal sleep time length of the to-be-tested device in the normal sleep state, so that the way of determining the normal sleep time length is consistent with the way of determining the deep sleep time length, which can ensure the uniformity of the data source for timing and reduce the precision error of the normal sleep time length and the deep sleep time length. In addition, for the software program, only a few important time lengths need to be maintained, and an independent timer that needs to be frequently started and stopped does not need to be maintained for each running state, thereby reducing the system complexity.
[0077] The unmentioned part in the specific implementation of the embodiment for determining the normal sleep time length can be referred to the way of determining the deep sleep time length in the foregoing embodiment.
[0078] The embodiment obtains the key time parameters of the to-be-tested device related to the normal sleep state through the software program, i.e., the third time length remaining after excluding the deep sleep state from the time of starting up to the current time, and the fourth time length in the non-normal sleep state in the range of the third time length, and then calculates the difference to obtain the normal sleep time length, which ingeniously eliminates the interference of the deep sleep state and the normal working state and other running states except the normal sleep state, thereby accurately obtaining the total stay time length of the to-be-tested device in the normal sleep state. The method is efficient in calculation and clear in logic, and provides accurate and reliable data support for determining whether the to-be-tested device successfully enters the low-power standby state.
[0079] S104, determine the ratio of the deep sleep time length and the ordinary sleep time length.
[0080] In the embodiment, the ratio of the deep sleep time length and the ordinary sleep time length is calculated by the following formula:
[0081] Ratio=(T-T1) / (t-t1)
[0082] The above-mentioned ratio Ratio can represent the time distribution relationship of the to-be-tested device in the low-power sleep stage between the deep sleep state and the ordinary sleep state. If the ratio Ratio is high (for example, higher than 50%), it indicates that the to-be-tested device is mostly in the optimal energy-saving state during the sleep time; on the contrary, if the ratio Ratio is low (for example, lower than or equal to 50%), it indicates that the to-be-tested device cannot sleep deeply due to various reasons and frequently stays in the ordinary sleep state, which is abnormal in power consumption.
[0083] Specifically, the to-be-tested device can have the following three running states: normal working state, ordinary sleep state and deep sleep state. Usually, the running cycle of the to-be-tested device includes: after the to-be-tested device is turned on, it first enters the normal working state; when the user operates the to-be-tested device to turn off the screen and there is no operation within the preset time length (for example, 3 minutes), it enters the ordinary sleep state with lower power consumption; when the to-be-tested device stays in the ordinary sleep state for a preset time length (for example, 5 minutes) and there is no activity, it enters the deep sleep state with lower power consumption than the ordinary sleep state.
[0084] Then, the to-be-tested device stays in the deep sleep state until it is turned on by external intervention, enters the normal working state, and repeats the above running cycle. In this way, during the execution of the aging standby test of the to-be-tested device, it can experience at least one round of the above-mentioned running cycle.
[0085] Based on the above-mentioned running cycle, the ratio of the deep sleep time length and the ordinary sleep time length can be determined, which can reflect the frequency of turning on the to-be-tested device. The higher the ratio of the deep sleep time length and the ordinary sleep time length, the lower the frequency of turning on the to-be-tested device, and accordingly, it is more likely to be in a stable standby state that meets the execution of the aging standby test; on the contrary, the lower the ratio of the deep sleep time length and the ordinary sleep time length, the higher the frequency of turning on the to-be-tested device, and accordingly, it is more likely to be unable to enter the stable standby state and more likely to interrupt the stable standby state required by the aging standby test.
[0086] For the convenience of understanding, a specific example is provided here. It is assumed that, in a one-hour time period, the device under test first stays in the normal working state for 2 minutes; then the device under test goes to sleep and enters the ordinary sleep state after 3 minutes of inactivity; after staying in the ordinary sleep state for 5 minutes and without activity, the device under test enters the deep sleep state. That is, the running cycle from the start to the entry into the deep sleep state takes 10 minutes.
[0087] In this case, in a one-hour time period, it is assumed that the device under test is only turned on once, and then stays in the deep sleep state for the remaining 50 minutes. Obviously, the ratio of the deep sleep time period to the ordinary sleep time period is high.
[0088] In contrast, case a): the device under test can be turned on again before entering the deep sleep state, and repeatedly switches between the normal working state and the ordinary sleep state; or case b): the device under test can be turned on again after entering the deep sleep state, causing the device under test to repeatedly cycle through the above running cycle. In short, the device under test can be frequently turned on. In this case, it is assumed that the device under test is frequently turned on 4 times. In the case of the above case b), there are 10 x 4 = 40 minutes of time in the normal working state and the ordinary sleep state before entering the deep sleep state, and only the remaining 20 minutes in the deep sleep state. Obviously, the ratio of the deep sleep time period to the ordinary sleep time period is much lower.
[0089] Therefore, the lower the frequency of turning on the device under test, the higher the ratio of the deep sleep time period to the ordinary sleep time period; the higher the frequency of turning on the device under test, the lower the ratio of the deep sleep time period to the ordinary sleep time period. In other words, the ratio of the deep sleep time period to the ordinary sleep time period can reflect the frequency of turning on the device under test.
[0090] S106, marking the aging standby test data generated in the case where the ratio is greater than the preset ratio value as valid data.
[0091] As can be seen from the above embodiments, the ratio of the deep sleep time period to the ordinary sleep time period can reflect the frequency of turning on the device under test, and the frequency of turning on the device under test is related to the stable standby state required for performing the aging standby test. Therefore, the present embodiment can determine whether the device under test successfully enters the stable standby state required for the aging standby test according to the ratio of the deep sleep time period to the ordinary sleep time period.
[0092] The present embodiment can preset a ratio value (such as 50%) as a key parameter for determining whether the device under test successfully enters the stable standby state. Based on this, it is determined whether the ratio of the deep sleep time period to the ordinary sleep time period is greater than the preset ratio value.
[0093] If the ratio of the deep sleep time length to the normal sleep time length is greater than the preset ratio value, i.e. Ratio>50%, it indicates that the DUT does not have the frequency lightening condition, the deep sleep state time of the DUT is longer, and the software, hardware and test environment of the DUT are normal, and no abnormal active task or wake-up source prevents the DUT from entering the deep sleep state. In this case, it is determined that the DUT successfully enters the ideal stable standby state, it is confirmed that the current aging standby test is normal and effective, and the power consumption data generated in the process is true and effective.
[0094] Further, the aging standby test data generated in the case where the ratio is greater than the preset ratio value is marked as valid data.
[0095] In the embodiment, in the case where the ratio is not greater than the preset ratio value, the aging standby test is stopped, and / or the current aging standby test data is marked as invalid data.
[0096] If the ratio of the deep sleep time length to the normal sleep time length is not greater than the preset ratio value, i.e. Ratio≤50%, it indicates that the DUT has the frequency lightening condition, the deep sleep state time of the DUT is shorter, and there is an abnormal active task or wake-up source preventing the DUT from entering the deep sleep state. In this case, it is determined that the DUT does not enter the ideal stable standby state. The aging standby test performed in this case and the generated data are invalid.
[0097] Therefore, the embodiment can automatically terminate the aging standby test being performed, prevent the test time and power resources from being continuously consumed due to the abnormal power consumption of the DUT, secondly, mark a small amount of early data generated in the current aging standby test as invalid data, and store the invalid data in the database and add an invalid reason, for example, insufficient deep sleep ratio. In this way, the invalid aging standby test can be interrupted in time, garbage data is avoided from being mixed into the final analysis report, and the test resources are saved and the cleanliness of the data warehouse is ensured.
[0098] Alternatively, the embodiment can also not stop the aging standby test, continue to perform the aging standby test, and mark the aging standby test data generated in the case where the ratio is greater than the preset ratio value as invalid data. In this way, the aging standby test process is not affected, and the aging standby test is continuously and completely performed, and the invalid data marked is completely retained in the complete test data, which can be specially reviewed and analyzed by engineers, and used for in-depth research on the complete performance mode and the root cause of the abnormal power consumption.
[0099] In another embodiment, in the case where the ratio is not greater than the preset ratio value, problem warning information is generated and sent to the preset user end, so that the user end performs problem positioning on the DUT based on the problem warning information.
[0100] If the ratio is not greater than the ratio value Ratio≤50%, it indicates that the to-be-tested device has an abnormality, and the test state is invalid. In this case, a pre-warning process is triggered immediately, and structured problem pre-warning information is generated. The problem pre-warning information includes, for example, device information (such as a serial number and a system version of the to-be-tested device), key data (such as the ratio, the deep sleep time length, and the ordinary sleep time length), and a preliminary diagnosis conclusion (such as insufficient deep sleep ratio and suspected abnormal wake-up).
[0101] In addition, the problem pre-warning information is sent to a pre-set user terminal. After receiving the problem pre-warning information, a test engineer of the user terminal can quickly locate the problem according to the data in the problem pre-warning information, for example, by accurately finding the abnormal device through the device information, preliminarily judging the problem severity through the key data, and further investigating the root cause of preventing the to-be-tested device from entering the deep sleep state by logging in the to-be-tested device and using other advanced diagnostic tools.
[0102] In the aging standby test process, the ratio of the deep sleep time length to the ordinary sleep time length is used to actively determine whether the to-be-tested device is in an ideal stable standby state, and the aging standby test data is marked as valid data or invalid data according to different determination conditions. This can find abnormal problems before the to-be-tested device is tested online in batches, and expose the problems in the software development process in advance. The problems can be locked in the software, and the probability of problems in the hardware environment during related testing can be reduced to a certain extent. Therefore, the embodiment can determine whether the aging standby test data generated by the aging standby test process meets the requirements in advance. If the software has a problem, the intervention process is performed in advance, and the probability of problems in the hardware environment during related testing is reduced to a certain extent. The test time, manpower, and resource cost are greatly saved, and the product quality is effectively ensured.
[0103] In summary, the test management method for the device provided in the embodiment of the present disclosure includes: obtaining, by a pre-set software program, a deep sleep time length of a to-be-tested device in a deep sleep state and an ordinary sleep time length of the to-be-tested device in an ordinary sleep state; determining a ratio of the deep sleep time length to the ordinary sleep time length; and marking, as valid data, aging standby test data generated in a case where the ratio is greater than a pre-set ratio value.
[0104] In the aging standby test process, the deep sleep time length and the ordinary sleep time length are automatically collected by a software program, and the ratio of the deep sleep time length to the ordinary sleep time length is calculated. The ratio can objectively and quantitatively determine whether the device under test is frequently turned on and whether it is in a stable standby state, thereby improving the accuracy of determining that the device under test is in a stable standby state. When the ratio is greater than a preset ratio value, it indicates that the device under test is in a stable standby state, and the power consumption control mechanism is normal. Therefore, the aging standby test is effective, and the generated aging standby test data is valid. The obtained data is real and reliable, and the waste of resources caused by invalid test is avoided.
[0105] In one embodiment, as shown in FIG. 2, a test management device 200 for a device is provided, and the device includes: Figure 2
[0106] The time length acquisition module 210 is configured to acquire, by a preset software program, a deep sleep time length of the device under test in a deep sleep state and an ordinary sleep time length of the device under test in an ordinary sleep state. The ordinary sleep state is used to represent a low-power working state of the device under test when the screen is turned off and no task is actively run by reducing the resource consumption of hardware and software. The deep sleep state is used to represent a working state of the device under test that is lower in power consumption than the ordinary sleep state after the device under test has been in the ordinary sleep state for a preset time length and has no activity.
[0107] The ratio determination module 220 is configured to determine a ratio of the deep sleep time length to the ordinary sleep time length.
[0108] The data marking module 230 is configured to mark, as valid data, aging standby test data generated in a case where the ratio is greater than a preset ratio value.
[0109] In one embodiment, the time length acquisition module 210 is further configured to:
[0110] acquire, by a preset software program, a first time length of the device under test from startup to the current time;
[0111] acquire a second time length of the device under test in a non-deep sleep state after startup. The non-deep sleep state at least includes the ordinary sleep state.
[0112] determine, as the deep sleep time length of the device under test in the deep sleep state, a time difference between the first time length and the second time length.
[0113] In one embodiment, the time length acquisition module 210 is further configured to:
[0114] The third time length is obtained by a preset software program, and the third time length is the time length of the device under test from booting to the current time, excluding the deep sleep state;
[0115] In the range of the third time length, the fourth time length of the device under test in the non-ordinary sleep state is obtained;
[0116] The time difference between the third time length and the fourth time length is determined as the ordinary sleep time length of the device under test in the ordinary sleep state.
[0117] In an embodiment, the device further comprises a pre-warning module;
[0118] The pre-warning module is configured to generate and send problem pre-warning information to a preset user end when the ratio is not greater than a preset ratio value, so that the user end performs problem positioning on the device under test based on the problem pre-warning information.
[0119] In an embodiment, the data marking module 230 is further configured to stop performing the aging standby test and / or mark the currently generated aging standby test data as invalid data when the ratio is not greater than a preset ratio value.
[0120] In an embodiment, the device further comprises that the ordinary sleep state and the deep sleep state are two different low-power modes, and the power consumption of the ordinary sleep state is higher than that of the deep sleep state.
[0121] In the test management device of the above device, the deep sleep time length and the ordinary sleep time length are automatically collected by a software program during the aging standby test process, and the ratio of the deep sleep time length to the ordinary sleep time length is calculated. The higher the ratio of the deep sleep time length to the ordinary sleep time length, the lower the frequency of the device under test being turned on, and accordingly, it is more likely to be in a stable standby state that meets the aging standby test; on the contrary, the lower the ratio of the deep sleep time length to the ordinary sleep time length, the higher the frequency of the device under test being turned on, and accordingly, it is more likely to be unable to enter a stable standby state and more likely to interrupt the stable standby state required for the aging standby test. Therefore, the ratio can objectively and quantitatively determine whether the device under test is frequently turned on and whether it is in a stable standby state, thereby improving the accuracy of determining that the device under test is in a stable standby state. In the case where the ratio is greater than a preset ratio value, it indicates that it is in a stable standby state, and the power consumption control mechanism of the device under test is normal, so that the aging standby test is effective, the aging standby test data generated is valid data, the obtained data is real and reliable, and resource waste caused by invalid test is avoided.
[0122] The specific definition of the test management apparatus of the device can refer to the definition of the test management method of the device in the foregoing, which will not be repeated here. Each module in the test management apparatus of the device can be realized by software, hardware, and a combination thereof in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.
[0123] In one embodiment, an electronic device, which can be a terminal, has an internal structure as shown in Figure 3 The electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the electronic device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, a carrier network, near field communication (NFC), or other technologies. The computer program is executed by the processor to implement a test management method of a device. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad arranged on the shell of the electronic device, or an external keyboard, touchpad, or mouse, etc.
[0124] Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] In one embodiment, the test management apparatus of the device provided by the present application can be implemented in the form of a computer program, which can run on an electronic device as shown in Figure 3 The memory of the electronic device can store various program modules constituting the test management apparatus of the device, such as the time length obtaining module 210, the proportion determining module 220, and the data marking module 230 as shown in Figure 2 The computer program constituted by the various program modules enables the processor to perform the steps in the test management method of the device of each embodiment of the present application described in the specification.
[0126] For example, Figure 3The electronic device shown can be used as follows Figure 2 Figure 2 The duration acquisition module 210 in the illustrated device executes a preset software program to acquire the deep sleep duration of the device under test (DUT) in a deep sleep state and the normal sleep duration in a normal sleep state. The normal sleep state represents a low-power operating state where the DUT operates by reducing hardware and software resource consumption when the screen is off and no tasks are actively running. The deep sleep state represents a working state where the DUT enters a lower power consumption state than the normal sleep state after a preset duration of inactivity in the normal sleep state. The electronic device can determine the ratio between the deep sleep duration and the normal sleep duration using the ratio determination module 220. The electronic device can mark aging standby test data generated when the ratio is greater than a preset value as valid data using the data marking module 230.
[0127] In one embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring, through a preset software program, the deep sleep duration of the device under test (DUT) in a deep sleep state and the normal sleep duration in a normal sleep state; wherein, the normal sleep state is used to represent a low-power operating state of the DUT when the screen is off and no tasks are actively running, by reducing the resource consumption of hardware and software; the deep sleep state is used to represent a working state in which the DUT enters a lower power consumption state than the normal sleep state after the DUT has been in the normal sleep state for a preset duration without any activity;
[0128] Determine the ratio of the duration of deep sleep to the duration of normal sleep;
[0129] The aging standby test data generated when the ratio is greater than the preset ratio value is marked as valid data.
[0130] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0131] Optionally, the duration of deep sleep of the device under test in a deep sleep state can be obtained through a preset software program, including:
[0132] The system uses a pre-set software program to obtain the first duration of the device under test from power-on to the current moment.
[0133] The duration of the device under test in a non-deep sleep state after power-on is obtained; wherein the non-deep sleep state includes at least the normal sleep state;
[0134] A time difference between the first time length and the second time length is determined as a deep sleep time length of the to-be-tested device in the deep sleep state.
[0135] Optionally, a normal sleep time length of the to-be-tested device in a normal sleep state is obtained through a preset software program, including:
[0136] A third time length of the to-be-tested device from a power-on time to a current time, excluding the deep sleep state, is obtained through a preset software program.
[0137] A fourth time length of the to-be-tested device in a non-normal sleep state is obtained within the third time length.
[0138] A time difference between the third time length and the fourth time length is determined as a normal sleep time length of the to-be-tested device in the normal sleep state.
[0139] Optionally, the method further includes:
[0140] In a case where the proportion is not greater than a preset proportion value, problem warning information is generated and sent to a preset user end, so that the user end performs problem positioning on the to-be-tested device based on the problem warning information.
[0141] Optionally, the method further includes: in a case where the proportion is not greater than a preset proportion value, stopping performing the aging standby test, and / or, marking the currently generated aging standby test data as invalid data.
[0142] Optionally, the normal sleep state and the deep sleep state are two different low-power modes, and the power consumption of the normal sleep state is higher than that of the deep sleep state.
[0143] In the electronic device, during the execution of the aging standby test process, the deep sleep time length and the ordinary sleep time length are automatically collected by a software program, and a ratio of the deep sleep time length to the ordinary sleep time length is calculated. The higher the ratio of the deep sleep time length to the ordinary sleep time length, the lower the frequency of the to-be-tested device being turned on, and accordingly, the more likely the to-be-tested device is in a stable standby state that meets the execution of the aging standby test. Conversely, the lower the ratio of the deep sleep time length to the ordinary sleep time length, the higher the frequency of the to-be-tested device being turned on, and accordingly, the more likely the to-be-tested device cannot enter the stable standby state and the more likely the stable standby state required by the aging standby test is interrupted. Therefore, the ratio can objectively and quantitatively determine whether the to-be-tested device is frequently turned on and whether the to-be-tested device is in the stable standby state, and improve the accuracy of determining that the to-be-tested device is in the stable standby state. In the case that the ratio is greater than a preset ratio value, it is indicated that the to-be-tested device is in the stable standby state and the power consumption control mechanism of the to-be-tested device is normal, and then the aging standby test performed is effective, the aging standby test data generated is effective data, the data obtained is real and reliable, and resource waste caused by ineffective test is avoided.
[0144] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps: obtaining, by a preset software program, a deep sleep time length of a to-be-tested device in a deep sleep state and an ordinary sleep time length of the to-be-tested device in an ordinary sleep state; wherein the ordinary sleep state is used to represent that the to-be-tested device is in a low-power-consumption working state by reducing the resource consumption of hardware and software when the screen is turned off and no task is actively run; and the deep sleep state is used to represent that the to-be-tested device enters a working state with lower power consumption than the ordinary sleep state after being in the ordinary sleep state for a preset time length and having no activity;
[0145] determining a ratio of the deep sleep time length to the ordinary sleep time length;
[0146] marking, as effective data, aging standby test data generated in the case that the ratio is greater than a preset ratio value.
[0147] In one embodiment, the processor further implements the following steps when executing the computer program:
[0148] Optionally, the deep sleep time length of the to-be-tested device in the deep sleep state is obtained by the preset software program, including:
[0149] the first time length of the to-be-tested device from booting to the current time is obtained by the preset software program;
[0150] the second time length of the to-be-tested device in a non-deep sleep state after booting is obtained; wherein the non-deep sleep state at least includes the ordinary sleep state;
[0151] A time difference between the first time length and the second time length is determined as a deep sleep time length of the to-be-tested device in the deep sleep state.
[0152] Optionally, a normal sleep time length of the to-be-tested device in a normal sleep state is obtained through a preset software program, including:
[0153] A third time length of the to-be-tested device from a power-on time to a current time, excluding the deep sleep state, is obtained through a preset software program.
[0154] A fourth time length of the to-be-tested device in a non-normal sleep state is obtained within the third time length.
[0155] A time difference between the third time length and the fourth time length is determined as a normal sleep time length of the to-be-tested device in the normal sleep state.
[0156] Optionally, the method further includes:
[0157] In a case where the proportion is not greater than a preset proportion value, problem warning information is generated and sent to a preset user end, so that the user end performs problem positioning on the to-be-tested device based on the problem warning information.
[0158] Optionally, the method further includes: in a case where the proportion is not greater than a preset proportion value, stopping performing the aging standby test, and / or, marking the currently generated aging standby test data as invalid data.
[0159] Optionally, the normal sleep state and the deep sleep state are two different low-power modes, and power consumption of the normal sleep state is higher than that of the deep sleep state.
[0160] In the above storage medium, during the execution of the burn-in standby test process, the deep sleep duration and the normal sleep duration are automatically collected by a software program, and the ratio of the deep sleep duration to the normal sleep duration is calculated. The higher the ratio of the deep sleep duration to the normal sleep duration, the lower the frequency of the to-be-tested device being turned on, and accordingly, the more likely the to-be-tested device is in a stable standby state that satisfies the execution of the burn-in standby test. Conversely, the lower the ratio of the deep sleep duration to the normal sleep duration, the higher the frequency of the to-be-tested device being turned on, and accordingly, the more likely the to-be-tested device cannot enter the stable standby state and the more likely the stable standby state required by the burn-in standby test is interrupted. Therefore, the ratio can objectively and quantitatively determine whether the to-be-tested device is frequently turned on and whether the to-be-tested device is in the stable standby state, and improve the accuracy of determining that the to-be-tested device is in the stable standby state. In the case where the ratio is greater than a preset ratio value, it is indicated that the to-be-tested device is in the stable standby state and the power consumption control mechanism of the to-be-tested device is normal, and thus the burn-in standby test performed is effective, the burn-in standby test data generated is valid data, and the obtained data is real and reliable, thereby avoiding resource waste caused by invalid test.
[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. The volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM), etc.
[0162] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present disclosure.
[0163] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific and detailed manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these are all within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.
Claims
1. A method for testing and managing equipment, characterized in that, The method includes: The software program obtains the duration of deep sleep and normal sleep of the device under test (DUT) when it is in deep sleep and normal sleep respectively. The normal sleep state indicates that the DUT operates with low power consumption by reducing hardware and software resource consumption when the screen is off and no tasks are actively running. The deep sleep state indicates that the DUT enters a working state with lower power consumption than the normal sleep state after the DUT has been in the normal sleep state for a preset duration without any activity. Determine the ratio of the duration of deep sleep to the duration of normal sleep; The aging standby test data generated when the ratio is greater than the preset ratio value is marked as valid data.
2. The method according to claim 1, characterized in that, The deep sleep duration of the device under test is obtained through a preset software program, including: The system uses a pre-set software program to obtain the first duration of the device under test from power-on to the current moment. The duration of the device under test in a non-deep sleep state after power-on is obtained; wherein the non-deep sleep state includes at least the normal sleep state; The time difference between the first duration and the second duration is determined as the deep sleep duration of the device under test in the deep sleep state.
3. The method according to claim 1 or 2, characterized in that, The software program obtains the duration of normal sleep when the device under test is in normal sleep mode, including: The third duration of the device under test from power-on to the current time, excluding the deep sleep state, is obtained through a preset software program. Within the third duration, a fourth duration during which the device under test is in a non-normal sleep state is obtained; The time difference between the third duration and the fourth duration is determined as the normal sleep duration of the device under test in the normal sleep state.
4. The method according to claim 1, characterized in that, The method further includes: If the ratio is not greater than a preset ratio value, a problem warning message is generated and sent to a preset user terminal so that the user terminal can locate the problem of the device under test based on the problem warning message.
5. The method according to claim 1, characterized in that, The method further includes: If the ratio is not greater than a preset ratio value, stop performing the aging standby test, and / or mark the currently generated aging standby test data as invalid data.
6. The method according to claim 1, characterized in that, The normal sleep state and the deep sleep state are two different low-power modes, with the power consumption of the normal sleep state being higher than that of the deep sleep state.
7. A test management device for equipment, characterized in that, The device includes: The duration acquisition module is used to acquire the deep sleep duration of the device under test (DUT) in a deep sleep state and the normal sleep duration in a normal sleep state through a preset software program. The normal sleep state represents the low-power operation state of the DUT when the screen is off and no tasks are actively running, by reducing the consumption of hardware and software resources. The deep sleep state represents the operation state in which the DUT enters a lower power consumption state than the normal sleep state after the DUT has been in the normal sleep state for a preset duration without any activity. A ratio determination module is used to determine the ratio of the deep sleep duration to the normal sleep duration; The data marking module is used to mark aging standby test data generated when the ratio is greater than a preset ratio value as valid data.
8. The apparatus according to claim 7, characterized in that, The duration acquisition module is also used for: The system uses a pre-set software program to obtain the first duration of the device under test from power-on to the current moment. The duration of the device under test in a non-deep sleep state after power-on is obtained; wherein the non-deep sleep state includes at least the normal sleep state; The time difference between the first duration and the second duration is determined as the deep sleep duration of the device under test in the deep sleep state.
9. The apparatus according to claim 7 or 8, characterized in that, The duration acquisition module is also used for: The third duration of the device under test from power-on to the current time, excluding the deep sleep state, is obtained through a preset software program. Within the third duration, a fourth duration during which the device under test is in a non-normal sleep state is obtained; The time difference between the third duration and the fourth duration is determined as the normal sleep duration of the device under test in the normal sleep state.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.