Test method and test device

By adjusting the temperature upper limit and operating frequency of the processor, and increasing the power supply load of the terminal equipment, the problem of inaccurate test results in the prior art is solved, and more accurate power supply testing and higher user experience are achieved.

CN118465599BActive Publication Date: 2025-03-21HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311209031.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-03-21
Estimated Expiration
2043-09-18

AI Technical Summary

Technical Problem

In the prior art, the power supply load of the terminal equipment is small, resulting in inaccurate test results and the ineffective testing of the power supply reliability when the current value is large.

Method used

During the run of the test program, the processor's upper temperature limit and operating frequency are adjusted to get it close to or reach the maximum bearing value, thereby increasing the processor's load and power supply load.

Benefits of technology

It improves the accuracy of the test results for power supply of terminal equipment, reduces the probability of automatic shutdown or restart due to power supply failure, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118465599B_ABST
    Figure CN118465599B_ABST
Patent Text Reader

Abstract

The present application provides a test method and a test device, which are conducive to improving the accuracy of the test results of the power supply of the terminal device and improving the user experience. The method includes: using a processor to run a test program to obtain the system operation status of the terminal device, the system operation status indicates whether the system of the terminal device crashes during the operation of the test program, the test program includes the assignment of initial variables and the execution of floating-point operation programs, and during the operation of the test program, the processor meets at least one of the following conditions: the upper temperature limit of the processor during operation is a first preset temperature, and the first preset temperature is the highest temperature that the processor can withstand; or the operating frequency of the processor is a first operating frequency, and the first operating frequency is the maximum operating frequency that the processor can run; based on the system operation status, a test result is obtained, and the test result is used to indicate whether the power supply to the processor is reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of terminal equipment, and in particular to a testing method and a testing device. Background Art

[0002] With the development of technology, people have higher and higher requirements on the quality of terminal equipment. In order to improve the factory quality of terminal equipment, terminal equipment needs to be tested before leaving the factory to screen out possible early failures of terminal equipment and improve the stability and reliability of terminal equipment. This is an important link in the terminal equipment production process.

[0003] At present, in order to ensure that the power supply of the terminal device to the central processing unit (CPU) is normal, the tester needs to perform reliability test on the power supply of the terminal device. In the related art, the tester can simulate the user's usage scenario by running multiple heavy-load applications in the terminal device at the same time, for example, playing audio, playing video, and reading memory at the same time through the terminal device, so that the power supply of the terminal device reaches a large load, thereby testing the reliability of the power supply of the terminal device.

[0004] However, due to some limitations, in the above solution, the power supply load of the terminal device's power supply is still small, resulting in the tester being unable to test whether the power supply of the terminal device is effective when the current value is large, which may lead to inaccurate test results. Summary of the invention

[0005] The present application provides a testing method and a testing device, which are beneficial to improving the accuracy of the test results of the power supply of a terminal device, thereby reducing the probability of the terminal device automatically shutting down or restarting due to power supply failure after entering the market, thereby improving the user experience.

[0006] In a first aspect, a testing method is provided, which is applied to a terminal device including a power supply and a processor, the method comprising: using the processor to run a test program to obtain a system operation status of the terminal device, the system operation status indicating whether the system of the terminal device crashes during the running of the test program, the test program including assignment of initial variables and execution of a floating-point operation program, during the running of the test program, the processor satisfies at least one of the following conditions: an upper temperature limit of the processor during operation is a first preset temperature, which is the maximum temperature that the processor can withstand; or, an operating frequency of the processor is a first operating frequency, which is the maximum operating frequency that the processor can run; based on the system operation status, a test result is obtained, the test result is used to indicate whether the power supply to the processor by the power supply is reliable.

[0007] The test method provided in the present application sets the conditions that the processor must meet during the execution of the test program to: adjust the temperature protection upper limit of the terminal device to the highest temperature that the processor of the terminal device can receive, and / or adjust the operating frequency of the processor to the maximum operating frequency that the processor can run.

[0008] By setting the operating temperature of the processor to the highest temperature that the processor can receive, the processor can still operate at a higher computing speed when it is at a higher temperature (higher than the temperature protection limit in the prior art and lower than the highest temperature that the processor can receive), thereby increasing the load on the processor during operation and thus increasing the power supply load of the power supply.

[0009] By setting the operating frequency of the processor to the highest frequency at which the processor can operate, the processor can always operate at the maximum operating frequency, which is beneficial to increasing the load of the processor when it is running, thereby increasing the power supply load of the power supply.

[0010] In this way, the power supply load of the power supply can be increased by increasing the load of the processor during operation, which is conducive to testing the reliability of the power supply of the terminal device when the current value is large, thereby improving the accuracy of the test results of the power supply of the terminal device, and further reducing the probability of automatic shutdown or restart of the terminal device due to power supply failure after the terminal device enters the market, thereby improving the user experience.

[0011] It should be understood that the above-mentioned processor may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a tensor processing unit (TPU) and other processors, and this application does not limit this.

[0012] Optionally, the initial variable is a variable in a floating-point operation. After the processor assigns a value to the initial variable, it compares the assigned variable with a preset value. After the assigned variable is greater than the initial variable, the initial variable is reassigned, and the assigned variable is compared with the preset value again. The floating-point operation program is executed after the assigned variable is less than the preset value. After executing the floating-point operation program, the system operation status of the terminal device is obtained.

[0013] It should be understood that floating-point operations may be a combination of one or more operations such as addition, subtraction, multiplication, division, exponentiation, logarithm, or factorial between floating-point numbers of relatively large magnitude, and this application does not limit this.

[0014] Before the terminal device uses the processor to run the test program, the tester can edit the test code to set the conditions that the processor meets when the processor runs. The conditions that the processor meets when the processor runs may include the following three possible situations.

[0015] In case 1, the upper temperature limit of the processor during operation is the maximum temperature that the processor can withstand (ie, the first preset temperature).

[0016] Optionally, a temperature sensor may be provided on the terminal device, and the temperature sensor may be used to detect the temperature of the processor when it is running. When the terminal device uses the processor to run the test program, the temperature sensor on the terminal device may obtain the temperature of the processor when it is running in real time, and the processor compares the temperature of the processor when it is running with the maximum temperature that the processor can withstand in real time. When the temperature of the processor when it is running is lower than the maximum temperature that the processor can withstand, the processor may continue to run the test program.

[0017] It should be understood that during the test, in order to ensure that the processor of the terminal device is not burned out, the temperature of the processor during operation will not exceed the maximum temperature that the processor can withstand.

[0018] It should also be understood that the maximum temperatures that different processors can withstand may be different, that is, the first preset temperatures corresponding to different processors may also be different, and this application does not limit this.

[0019] In case 2, the operating frequency of the processor is the highest frequency at which the processor can operate (ie, the first operating frequency).

[0020] It should be understood that different processors may be able to run at different operating frequencies, that is, the first operating frequencies corresponding to different processors may also be different, and this application does not limit this.

[0021] In case 3, the upper temperature limit of the processor during operation is the maximum temperature that the processor can withstand (ie, the first preset temperature), and the operating frequency of the processor is the maximum frequency at which the processor can operate (ie, the first operating frequency).

[0022] It should be understood that the settings of the first preset temperature and the first operating frequency can refer to the description of Case 1 and Case 2 above, which will not be repeated here.

[0023] Through the two conditions of temperature upper limit and operating frequency, the load of the processor during operation can be further increased, thereby increasing the power supply load of the power supply, which is conducive to testing whether the power supply of the terminal device is effective when the current value is large, thereby improving the accuracy of the test results of the power supply of the terminal device.

[0024] In combination with the first aspect, in certain implementations of the first aspect, a test result is obtained based on the system operation status, including: if the system operation status indicates that the system of the terminal device has not crashed, then the test result is determined as the power supply of the power supply to the processor is reliable; or, if the system operation status indicates that the system of the terminal device has crashed, then the test result is determined as the power supply of the power supply to the processor is unreliable.

[0025] Optionally, the unreliable power supply of the power supply to the processor may be an abnormality in the circuit of the power supply to the processor, or a power management unit (PMU) chip failure. The reliable power supply of the power supply to the processor may be a normal circuit of the power supply to the processor, or a normal PMU chip. It should be understood that the power management unit may also be called a power management module, which is not limited in the embodiments of the present application.

[0026] In combination with the first aspect, in certain implementations of the first aspect, a test program is run by a processor to obtain the system operation status of a terminal device, including: running the test program by the processor for the i-th time to obtain the i-th system operation status of the terminal device, where i is an integer greater than 0; if the i-th system operation status indicates that the system of the terminal device has crashed, the test is terminated, and the i-th system operation status is determined as the system operation status.

[0027] Optionally, a counter may be set in the terminal device. When the terminal device runs the test program, the counter starts counting from 0. After the terminal device runs the test program once, the counter increases by one.

[0028] In combination with the first aspect, in certain implementations of the first aspect, the above method also includes: if the i-th system operation status indicates that the system of the terminal device has not crashed, then ending the i-th operation of the test program and obtaining the number of tests; judging whether i is equal to the number of tests; if i is less than the number of tests, using the processor to run the test program for the i+1th time to obtain the i+1th system operation status of the terminal device; if the i+1th system operation status indicates that the system of the terminal device has not crashed, then ending the i+1th operation of the test program and obtaining the number of tests; if i+1 is equal to the number of tests, the i+1th system operation status is determined as the system operation status.

[0029] Optionally, the above test number may be a preset test number, which is a fixed test number written by the tester when writing the test program. The above test number may also be the total number of tests to be performed entered by the tester on the terminal device after the test program is written and before the terminal device runs the test program, and this application does not limit this.

[0030] Optionally, if the i+1th system operation status indicates that the system of the terminal device crashes, the i+1th operation of the test program is terminated, and the i+1th system operation status is determined as the system operation status.

[0031] Optionally, if i+1 is less than the number of tests, the next loop is entered, that is, the processor is used to run the test program for the i+2th time to obtain the i+2th system operation status. The loop is stopped until the number of executions of the terminal device is equal to the number of tests, and the last system operation status is determined as the system operation status.

[0032] Optionally, if i is equal to the number of tests, the test is terminated, and the i-th system operation status is determined as the system operation status.

[0033] In combination with the first aspect, in certain implementations of the first aspect, ending the i-th run of the test program includes: ending the i-th run of the test program after obtaining the system operation status of the terminal device for a first preset time period, or when the power supply current of the power supply to the processor is less than or equal to a preset current value.

[0034] Specifically, the end of the i-th test of the test program includes the following two implementation methods.

[0035] In one possible implementation, a timer may be set on the terminal device. After obtaining the system operation status of the terminal device, the terminal device uses the timer to count. After the timing duration is equal to a first preset duration, the i-th running of the test program is terminated.

[0036] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the first preset duration through multiple groups of experiments. For example, the tester can conduct multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after obtaining the system operation status of the current test, the terminal device waits for a preset time, ends the current run of the test program, runs the next test program, and detects the power supply current of the power supply to the processor when the test program is run next time. By setting different waiting preset time lengths in multiple groups of experiments, the power supply current of the power supply to the processor when the test program is run next time is detected. The tester can determine the preset time length in the experiment with the largest power supply current among the multiple power supply currents when the test program is run next time as the first preset time length.

[0037] Optionally, when there are multiple identical maximum power supply currents among the multiple power supply currents when the test program is run next time, the tester may determine the minimum preset time duration corresponding to the multiple identical maximum power supply currents as the first preset time duration.

[0038] By determining the minimum waiting time as the first preset time, it is helpful to save test time on the basis of the same test effect.

[0039] It should be understood that after the terminal device finishes the current test program and runs the next test program, the power supply current to the processor can reach the maximum. After that, as the processor load increases, the processor temperature rises, and the sensitivity of the processor components decreases, the power supply current to the processor will also decrease.

[0040] By setting the first preset time duration, it is beneficial to ensure that the power supply current of the power supply to the processor is under a relatively large current load within the first preset time duration, and it is beneficial that when the terminal device runs the test program again, the power supply current of the power supply to the processor can reach a larger value, thereby increasing the load of the power supply during the test, and thereby improving the accuracy of the test results of the power supply to the terminal device.

[0041] In another possible implementation, a current sensor may be provided on the terminal device, and the terminal device may detect the power supply current of the power supply to the processor in real time through the current sensor. When the power supply current of the power supply to the processor is less than or equal to the preset current value, the i-th run of the test program is terminated.

[0042] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the preset current value through multiple groups of experiments. For example, the tester can perform multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after obtaining the system operation status of the current test, the terminal device detects the power supply current of the power supply to the processor in real time. When the power supply current of the power supply to the processor is less than the preset current value, the current operation of the test program is terminated, the next test program is run, and the power supply current of the power supply to the processor is detected when the next test program is run. In multiple groups of experiments, by setting different preset current values, the power supply current of the power supply to the processor when multiple test programs are run next time can be detected. The tester can determine the preset current value in the experiment with the largest power supply current among the multiple power supply currents when the test program is run next time as the preset current value.

[0043] By setting the preset current value, the power supply current of the terminal device to the processor is beneficially placed under a relatively large current load for a period of time. After the terminal device runs the test program again, the power supply current of the power supply to the processor can reach a larger value, thereby increasing the load of the power supply during the test, and thereby improving the accuracy of the test results of the power supply of the terminal device.

[0044] In combination with the first aspect, in certain implementations of the first aspect, using the processor to run the test program for the i+1th time includes: after a second preset time period for the i-th run of the test program ends, or when the temperature of the processor is lower than a second preset temperature, using the processor to run the test program for the i+1th time.

[0045] Specifically, the terminal device uses the processor to run the test program for the (i+1)th time, including the following two implementation methods.

[0046] In one possible implementation, a timer may be set on the terminal device. After the i-th execution of the test program is completed, the terminal device uses the timer to count. After the timing duration reaches a second preset duration, the terminal device uses the processor to run the test program for the (i+1)th time.

[0047] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the second preset duration through multiple groups of experiments. For example, the tester can conduct multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after the terminal device ends the current run of the test program, it waits for a preset time, runs the next test program, and detects the power supply current of the power supply to the processor when the next test program is run. In multiple groups of experiments, by setting different preset time lengths, the power supply current of the power supply to the processor when the test program is run for multiple next times can be detected. The tester can determine the preset time length in the experiment with the largest power supply current among the multiple power supply currents when the test program is run for the next time as the second preset time length.

[0048] After the terminal device finishes the current test program, the temperature of the processor is still high. After the current test program is finished, the processor is not operated for the second preset time period, so as to cool the processor to a certain extent. This is beneficial for the power supply current of the power supply to the processor to reach a larger value after the terminal device runs the test program next time, thereby increasing the load of the power supply during the test, and thus improving the accuracy of the test results of the power supply of the terminal device.

[0049] In another possible implementation, a temperature sensor may be provided on the terminal device, and the terminal device may detect the temperature of the processor in real time through the temperature sensor. When the temperature of the processor is lower than the second preset temperature, the processor is used to run the test program for the (i+1)th time.

[0050] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the second preset temperature through multiple groups of experiments. For example, the tester can perform multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after the terminal device ends the current run of the test program, the terminal device can detect the temperature of the processor in real time through a temperature sensor, and when the temperature of the processor is lower than the preset temperature, run the next test program, and detect the power supply current of the power supply to the processor when running the next test program. In multiple groups of experiments, by setting multiple different preset temperatures, multiple power supply currents of the power supply to the processor when the test program is run next time can be obtained. The tester can determine the preset temperature in the experiment with the largest power supply current among the multiple power supply currents when the test program is run next time as the second preset temperature.

[0051] After the terminal device finishes the current test program, the temperature of the processor is still high. By setting the second preset temperature after the current test program is finished, the processor is in an idle state when the processor has not cooled down to the preset temperature, so as to cool the processor to a certain extent. This is beneficial for the power supply current of the power supply to the processor to reach a larger value after the terminal device runs the test program next time, thereby increasing the load of the power supply during the test, and thus improving the accuracy of the test results of the power supply of the terminal device.

[0052] In combination with the first aspect, in certain implementations of the first aspect, the processor includes a large core, a medium core, and a small core. The operating frequency of the large core when running is a first operating frequency, the operating frequency of the medium core when running is a second operating frequency, and the operating frequency of the small core when running is a third operating frequency. The third operating frequency is the minimum operating frequency that the processor can run, and the second operating frequency is less than the first operating frequency and greater than the third operating frequency.

[0053] It should be understood that the large core refers to the core with the highest operating frequency of the processor, the medium core refers to the core with the second highest operating frequency in the processor, and the small core refers to the core with the lowest operating frequency in the processor. The above-mentioned second operating frequency can be the maximum operating frequency that the medium core of the processor can run. It should also be understood that the first operating frequency is the maximum operating frequency that the processor can run, and it is also the maximum operating frequency that the large core can run. The maximum operating frequency that the processor can run and the maximum operating frequency that the large core can run are equivalent. The third operating frequency is the minimum operating frequency that the processor can run, and it is also the minimum operating frequency that the small core can run. The minimum operating frequency that the processor can run and the minimum operating frequency that the small core can run are equivalent.

[0054] Optionally, the large core and the medium core may be powered by the same current, and the small core may be powered by another current.

[0055] By setting different operating frequencies for the large core, medium core, and small core, the load on the large core and medium core can be increased, and the load on the small core can be reduced. This can reduce the impact of the processor temperature increase caused by the large load on the small core on the overall test effect, thereby improving the accuracy of the test results.

[0056] In combination with the first aspect, in certain implementations of the first aspect, the number of large cores is a first number, the number of medium cores is a second number, and the number of small cores is a third number; each of the large cores and each of the medium cores includes a first process, the first process is used to execute floating-point operation programs, and each of the small cores includes a second process, and the second process is an empty process.

[0057] It should be understood that including an empty process in a small core may mean that each small core runs at the lowest frequency but does not perform any operation.

[0058] Exemplarily, the number of large cores is 1, the number of medium cores is 4, and the number of small cores is 3. The 1 large core includes a first process, that is, the first process in the large core runs a floating-point operation program. Each of the 4 medium cores includes a first process, that is, the first process of each of the 4 medium cores runs a floating-point operation program. The empty process in each of the 3 small cores runs at the lowest frequency and does not perform floating-point operations.

[0059] It should be understood that, generally speaking, considering the load balancing of each core of the processor, when there are too many tasks in one core, the processor may assign the tasks in the core to an idle core. In this way, when the number of cores is greater than the number of processes, the process may be executed in multiple cores, causing some cores to be idle, and the processor cannot reach a large load. When the number of cores is less than the number of processes, some cores may poll the extra processes and queue up different processes for execution, which may cause the load of some cores to be unstable, and the processor cannot reach a large load.

[0060] The embodiment of the present application allocates a process to each core, that is, the number of cores is greater than the number of processes, so that each core can execute the process assigned to the core, which is conducive to avoiding the situation where there are idle cores in the processor or the process executed in the core is unstable when the number of cores and the number of processes of the processor are inconsistent. In this way, each core of the processor can stably execute the process assigned to the core, increase the load of the processor when running the test program, and then increase the power supply load of the power supply, thereby improving the accuracy of the test results of the power supply of the terminal device.

[0061] In a second aspect, a test device is provided, which is used to execute the method in the implementation of the first aspect. Specifically, the test device includes a module for executing the method in the implementation of the first aspect.

[0062] In one design, the testing device may include a module that executes the method / operation / step / action described in the first aspect above, and the module may be a hardware circuit, software, or a combination of hardware circuit and software.

[0063] In a third aspect, a testing device is provided, comprising: a processor and a memory, wherein the processor is used to read instructions stored in the memory to execute the method of the first aspect.

[0064] Optionally, there are one or more processors and one or more memories.

[0065] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0066] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0067] The testing device in the third aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in or located outside the processor and exist independently.

[0068] In a fourth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which enables a computer to execute the method of the first aspect when the computer program is executed.

[0069] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code or instruction) which, when executed on a computer, enables the computer to execute the method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application;

[0071] Figure 2 is a software structure block diagram of a terminal device in an embodiment of the present application;

[0072] Figure 3is a schematic flow chart of a testing method provided in an embodiment of the present application;

[0073] Figure 4 is a schematic flow chart of running multiple test programs provided in an embodiment of the present application;

[0074] Figure 5 is a schematic diagram of changes in the power supply current to the processor provided by the power supply according to an embodiment of the present application;

[0075] Figure 6 It is a schematic diagram of a test scenario in which a power supply according to an embodiment of the present application supplies power to a CPU;

[0076] Figure 7 This is a schematic diagram of interface changes of a mobile phone interface provided in an embodiment of the present application;

[0077] Figure 8 is a schematic flowchart of another testing method provided in an embodiment of the present application;

[0078] Fig. 9 is a schematic block diagram of a testing device provided in an embodiment of the present application;

[0079] Fig.10 It is a schematic block diagram of another testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0081] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0082] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0083] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0084] In the embodiments of the present application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that the device will make corresponding processing under certain objective circumstances. It does not limit the time, nor does it require the device to have a judgment action when implementing it, nor does it mean that there are other limitations.

[0085] In order to better understand the terminal device in the embodiment of the present application, Figure 1 The hardware structure of the terminal device in the embodiment of the present application is described in detail.

[0086] Figure 1 This is a schematic diagram of the structure of the terminal device 100 provided in the embodiment of the present application. Figure 1 As shown, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a voice module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, and a display screen 194, etc.

[0087] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0088] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0089] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0090] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0091] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, and / or a universal serial bus (USB) interface, etc.

[0092] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.

[0093] The I2S interface can be used for voice communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the voice module 170 via the I2S bus to achieve communication between the processor 110 and the voice module 170. In some embodiments, the voice module 170 can transmit voice signals to the wireless communication module 160 via the I2S interface to achieve the function of answering calls through a Bluetooth headset.

[0094] The PCM interface can also be used for voice communication, sampling, quantizing and encoding analog signals. In some embodiments, the voice module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the voice module 170 can also transmit voice signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for voice communication.

[0095] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the voice module 170 can transmit voice signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0096] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194. The MIPI interface includes a display serial interface (DSI). In some embodiments, the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0097] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the display screen 194, the wireless communication module 160, the voice module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0098] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play voice through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.

[0099] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0100] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.

[0101] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0102] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0103] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0104] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0105] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through a voice device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0106] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0107] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0108] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0109] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0110] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0111] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0112] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0113] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0114] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as voice data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0115] The terminal device 100 can implement voice functions such as music playing and recording through the voice module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0116] The voice module 170 is used to convert digital voice information into analog voice signal output, and is also used to convert analog voice input into digital voice signals. The voice module 170 can also be used to encode and decode voice signals. In some embodiments, the voice module 170 can be arranged in the processor 110, or some functional modules of the voice module 170 can be arranged in the processor 110.

[0117] The speaker 170A, also called a "speaker", is used to convert a voice electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0118] The receiver 170B, also called a "handset", is used to convert voice electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.

[0119] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0120] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0121] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.

[0122] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0123] The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the terminal device 200.

[0124] Figure 2 It is a software structure block diagram of the terminal device 200 according to an embodiment of the present application.

[0125] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0126] The application layer can include a series of application packages.

[0127] like Figure 2 As shown, the application package may include applications such as camera, calendar, map, phone, music, mailbox, settings, etc.

[0128] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, and the like.

[0129] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0130] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0131] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0132] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0133] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0134] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0135] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0136] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0137] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0138] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0139] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0140] A 2D graphics engine is a drawing engine for 2D drawings.

[0141] The kernel layer is a layer between hardware and software. The kernel layer is used to drive the hardware to make the hardware work. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver, floating point operation driver, etc., which are not limited in the embodiments of the present application.

[0142] With the development of technology, people have higher and higher requirements on the quality of terminal equipment. In order to improve the factory quality of terminal equipment, terminal equipment needs to be tested before leaving the factory to screen out possible early failures of terminal equipment and improve the stability and reliability of terminal equipment. This is an important link in the terminal equipment production process.

[0143] At present, in order to ensure that the power supply of the terminal device to the CPU is normal, the tester needs to perform reliability test on the power supply of the terminal device. In the related technology, the tester can simulate the user's usage scenario by running multiple heavy-load applications in the terminal device at the same time. For example, by playing audio, playing video, and reading memory at the same time in the terminal device, the power supply of the terminal device reaches a large load, thereby testing the reliability of the power supply of the terminal device.

[0144] However, in the related art, considering the user experience and reducing the impact of excessively high temperature on the user, the R&D personnel set a temperature protection limit on the terminal device, so that when the terminal device is running multiple heavy loads and the temperature of the terminal device reaches the upper limit of the protection temperature, the terminal device queues the tasks in the multiple heavy loads to run in sequence. In addition, when the terminal device is executing the above-mentioned heavy load tasks, the CPU operating frequency changes in real time, and the CPU may not be under a large load all the time. Therefore, the power supply load of the power supply of the terminal device is small, resulting in the tester may not be able to test whether the power supply of the terminal device is effective when the current value is large, which leads to inaccurate power supply test results for the power supply. In this way, some faulty terminal devices are not detected and flow into the market. When the user uses the faulty terminal device, the faulty terminal device may fail to supply power to the CPU when the CPU load is too large, resulting in automatic shutdown or restart problems.

[0145] It should be understood that the above-mentioned "power supply" refers to "power supply to the processor". For convenience, this application may be referred to as "power supply" in the following.

[0146] For example, in the related art, the upper temperature protection limit of the terminal device may be 50°. After the tester plays audio, plays video, and reads memory on the terminal device at the same time for a period of time, the temperature of the terminal device rises to 50°, triggering the temperature protection mechanism of the terminal device. The CPU of the terminal device begins to poll tasks such as playing audio, playing video, and reading memory, so that these tasks are queued up and run in sequence. In addition, the CPU operating frequency changes in real time, and the CPU operating frequency may not always be under a large load. In this way, the power supply load of the terminal device's power supply to the CPU is still small, resulting in the tester may not be able to test whether the power supply of the terminal device is effective when the current value is large, which may lead to inaccurate test results.

[0147] To this end, the present application provides a test method, by adjusting the upper temperature protection limit of the terminal device to the highest temperature that the processor of the terminal device can receive when testing the power supply of the power supply to the processor, and / or adjusting the operating frequency of the processor to the maximum operating frequency that the processor can run. In this way, when the terminal device uses the processor to execute the test program, it can increase the load of the processor when it is running, thereby increasing the power supply load of the power supply, which is beneficial to test whether the power supply of the terminal device is effective when the current value is large, thereby improving the accuracy of the test results of the power supply of the terminal device, further reducing the probability of the terminal device automatically shutting down or restarting due to power failure after entering the market, and improving the user experience.

[0148] It should be understood that the above-mentioned terminal device can be a device with a power supply and a processor, such as a mobile phone, a tablet, and a computer, etc., and the embodiments of the present application are not limited to this.

[0149] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0150] Figure 3 300 is a schematic flow chart of a test method 300 provided in an embodiment of the present application. The method 300 may be executed by a terminal device, and the hardware structure of the terminal device involved in the method 300 may be as follows: Figure 1 As shown, the software architecture of the terminal device involved in the method 300 can be as follows Figure 2 The method 300 may include the following steps:

[0151] S301, using a processor to run a test program to obtain a system operation status of a terminal device.

[0152] Specifically, the system operation status indicates whether the system of the terminal device crashes during the execution of the test program. The test program includes the assignment of initial variables and the execution of floating-point operation programs. During the execution of the test program, the processor satisfies at least one of the following conditions: the upper temperature limit of the processor during operation is a first preset temperature, which is the maximum temperature that the processor can withstand; or, the operating frequency of the processor is a first operating frequency, which is the maximum operating frequency that the processor can run.

[0153] It should be understood that the above-mentioned processor may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a tensor processing unit (TPU) and other processors, and this application does not limit this.

[0154] Optionally, the system operation status of the terminal device may be represented by characters, for example, the system operation status may be "pass", indicating that the system of the terminal device has not crashed, or the system operation status may be "dump", indicating that the system of the terminal device has crashed.

[0155] It should be understood that the system operation status can also be expressed in other ways, and this application does not limit this.

[0156] Optionally, the initial variable is a variable in a floating-point operation. After the processor assigns a value to the initial variable, it compares the assigned variable with a preset value. After the assigned variable is greater than the initial variable, the initial variable is reassigned, and the assigned variable is compared with the preset value again. The floating-point operation program is executed after the assigned variable is less than the preset value. After executing the floating-point operation program, the system operation status of the terminal device is obtained.

[0157] It should be understood that floating-point operations may be a combination of one or more operations such as addition, subtraction, multiplication, division, exponentiation, logarithm, or factorial between floating-point numbers of relatively large magnitude, and this application does not limit this.

[0158] S302, based on the system operation status, obtain a test result, the test result is used to indicate whether the power supply to the processor is reliable.

[0159] Optionally, if the system operation status indicates that the terminal device system has not crashed, the test result is determined as the power supply to the processor is reliable; or, if the system operation status indicates that the terminal device system has crashed, the test result is determined as the power supply to the processor is unreliable.

[0160] Optionally, the unreliable power supply of the power supply to the processor may be an abnormality in the circuit of the power supply to the processor, or a power management unit (PMU) chip failure. The reliable power supply of the power supply to the processor may be a normal circuit of the power supply to the processor, or a normal PMU chip. It should be understood that the power management unit may also be called a power management module, which is not limited in the embodiments of the present application.

[0161] The test method provided in the present application sets the conditions that the processor must meet during the execution of the test program to: adjust the temperature protection upper limit of the terminal device to the highest temperature that the processor of the terminal device can receive, and / or adjust the operating frequency of the processor to the maximum operating frequency that the processor can run.

[0162] By setting the operating temperature of the processor to the highest temperature that the processor can receive, the processor can still operate at a higher computing speed when it is at a higher temperature (higher than the temperature protection limit in the prior art and lower than the highest temperature that the processor can receive), thereby increasing the load on the processor during operation and thus increasing the power supply load of the power supply.

[0163] By setting the operating frequency of the processor to the highest frequency at which the processor can operate, the processor can always operate at the maximum operating frequency, which is beneficial to increasing the load of the processor when it is running, thereby increasing the power supply load of the power supply.

[0164] In this way, the power supply load of the power supply can be increased by increasing the load of the processor during operation, which is conducive to testing the reliability of the power supply of the terminal device when the current value is large, thereby improving the accuracy of the test results of the power supply of the terminal device, and further reducing the probability of automatic shutdown or restart of the terminal device due to power supply failure after the terminal device enters the market, thereby improving the user experience.

[0165] In a possible implementation, the terminal device is configured with a test interface, and the tester can start the test program in the test interface. After the tester starts the test program, the terminal device responds to the tester's start-up operation and uses the floating-point operation driver of the kernel layer to drive the processor on the terminal device to perform floating-point operations, so that the processor reaches a higher load. When the processor load increases, the power supply current of the power supply to the processor will also increase. By testing the system operation of the terminal device when the current value is the largest, it is tested whether the power supply to the processor is reliable. Among them, the processor can be as follows Figure 1 The power supply can be shown as the power management module 141, and the floating point operation driver can be shown as Figure 2 The floating-point operation driver of the kernel layer is shown in FIG.

[0166] Optionally, in the above S301, before the terminal device uses the processor to run the test program, the tester can edit the test code to set the conditions that the processor meets when the processor runs. The conditions that the processor meets when the processor runs may include the following three possible situations.

[0167] In case 1, the upper temperature limit of the processor during operation is the maximum temperature that the processor can withstand (ie, the first preset temperature).

[0168] Optionally, a temperature sensor may be provided on the terminal device, and the temperature sensor may be used to detect the temperature of the processor when it is running. When the terminal device uses the processor to run the test program, the temperature sensor on the terminal device may obtain the temperature of the processor when it is running in real time, and the processor compares the temperature of the processor when it is running with the maximum temperature that the processor can withstand in real time. When the temperature of the processor when it is running is lower than the maximum temperature that the processor can withstand, the processor may continue to run the test program.

[0169] It should be understood that during the test, in order to ensure that the processor of the terminal device is not burned out, the temperature of the processor during operation will not exceed the maximum temperature that the processor can withstand.

[0170] It should also be understood that different processors can withstand different maximum temperatures, that is, different processors may have different first preset temperatures, which is not limited in this application. For example, the maximum temperature that a computer processor can withstand may be 125°, and the first preset temperature may be 125°, while the maximum temperature that a mobile phone processor can withstand may be 90°, and the first preset temperature may be 90°.

[0171] In case 2, the operating frequency of the processor is the highest frequency at which the processor can operate (ie, the first operating frequency).

[0172] It should be understood that different processors can operate at different operating frequencies, that is, different processors may correspond to different first operating frequencies, which is not limited in this application. For example, the maximum operating frequency that some processors can withstand may be 3.7 GHZ, and the first operating frequency may be 3.7 GHZ. The maximum operating frequency that some processors can withstand may be 3.3 GHZ, and the first operating frequency may be 3.3 GHZ.

[0173] In case 3, the upper temperature limit of the processor during operation is the maximum temperature that the processor can withstand (ie, the first preset temperature), and the operating frequency of the processor is the maximum frequency at which the processor can operate (ie, the first operating frequency).

[0174] It should be understood that the settings of the first preset temperature and the first operating frequency can refer to the description of Case 1 and Case 2 above, which will not be repeated here.

[0175] Through the two conditions of temperature upper limit and operating frequency, the load of the processor during operation can be further increased, thereby increasing the power supply load of the power supply, which is conducive to testing whether the power supply of the terminal device is effective when the current value is large, thereby improving the accuracy of the test results of the power supply of the terminal device.

[0176] As an optional embodiment, a test program is run using a processor to obtain the system operation status of a terminal device, including: running the test program for the i-th time using the processor to obtain the i-th system operation status of the terminal device, where i is an integer greater than 0; if the i-th system operation status indicates that the terminal device system has crashed, the test is terminated, and the i-th system operation status is determined as the system operation status.

[0177] Optionally, a counter may be set in the terminal device. When the terminal device runs the test program, the counter starts counting from 0. After the terminal device runs the test program once, the counter increases by one.

[0178] Exemplarily, i can be 1. After the terminal device runs the test program for the first time, the first system operation status of the terminal device is obtained as "dump", indicating that the system of the terminal device crashes, and the first test is ended. At this time, the first system operation status can be the system operation status.

[0179] As an optional embodiment, the above method also includes: if the i-th system operation status indicates that the system of the terminal device has not crashed, then ending the i-th operation of the test program and obtaining the number of tests; judging whether i is equal to the number of tests; if i is less than the number of tests, using the processor to run the test program for the i+1th time to obtain the i+1th system operation status of the terminal device; if the i+1th system operation status indicates that the system of the terminal device has not crashed, then ending the i+1th operation of the test program and obtaining the number of tests; if i+1 is equal to the number of tests, the i+1th system operation status is determined as the system operation status.

[0180] Optionally, the above test number may be a preset test number, which is a fixed test number written by the tester when writing the test program. The above test number may also be the total number of tests to be performed entered by the tester on the terminal device after the test program is written and before the terminal device runs the test program, and this application does not limit this.

[0181] Optionally, if the i+1th system operation status indicates that the system of the terminal device crashes, the i+1th operation of the test program is terminated, and the i+1th system operation status is determined as the system operation status.

[0182] Optionally, if i+1 is less than the number of tests, the next loop is entered, that is, the processor is used to run the test program for the i+2th time to obtain the i+2th system operation status. The loop is stopped until the number of executions of the terminal device is equal to the number of tests, and the last system operation status is determined as the system operation status.

[0183] Optionally, if i is equal to the number of tests, the test is terminated, and the i-th system operation status is determined as the system operation status.

[0184] For example, Figure 4It is a flow chart of the terminal device determining the system operation status. i can be 1, and the number of tests can be 3. After the terminal device runs the test program for the first time, it obtains the first system operation status of the terminal device. If the first system operation status is "dump", it means that the system of the terminal device crashes, and the terminal device ends the first test and determines the first system operation status as the system operation status. If the first system operation status is "pass", it means that the system of the terminal device does not crash, the terminal device ends the first test, and the terminal device determines that the current number 1 is less than the test number 3, then the counter is increased by 1, and at this time, i=1+1=2. The terminal device uses the processor to run the test program for the second time to obtain the second system operation status of the terminal device. If the second system operation status is "dump", it means that the system of the terminal device crashes, then the second test is ended, and the second system operation status is determined as the system operation status. If the second system operation status is "pass", it means that the system of the terminal device does not crash. The terminal device ends the second test, and the terminal device determines that the current number 2 is less than the test number 3, then the counter is increased by 1, and at this time, i=2+1=3. The terminal device uses the processor to run the test program for the third time to obtain the third system operation status of the terminal device. If the third system operation status is "dump", it means that the system of the terminal device crashes, and the third test is ended, and the third system operation status is determined as the system operation status. If the third system operation status is "pass", it means that the system of the terminal device has not crashed. The terminal device ends the third test, and the terminal device determines that the current number 3 is equal to the test number 3, and determines the third system operation status as the system operation status.

[0185] As an optional embodiment, ending the i-th execution of the test program includes: the terminal device ends the i-th execution of the test program after obtaining the system operation status of the terminal device for a first preset time period, or when the power supply current of the power supply to the processor is less than or equal to a preset current value.

[0186] Specifically, the end of the i-th test of the test program includes the following two implementation methods.

[0187] In a possible implementation, a timer may be set on the terminal device. After obtaining the system operation status of the terminal device, the terminal device uses the timer to count. After the timing duration is equal to a first preset duration, the i-th running of the test program is terminated.

[0188] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the first preset duration through multiple groups of experiments. For example, the tester can conduct multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after obtaining the system operation status of the current test, the terminal device waits for a preset time, ends the current run of the test program, runs the next test program, and detects the power supply current of the power supply to the processor when the test program is run next time. By setting different waiting preset time lengths in multiple groups of experiments, the power supply current of the power supply to the processor when the test program is run next time is detected. The tester can determine the preset time length in the experiment with the largest power supply current among the multiple power supply currents when the test program is run next time as the first preset time length.

[0189] Optionally, when there are multiple identical maximum power supply currents among the multiple power supply currents when the test program is run next time, the tester may determine the minimum preset time duration corresponding to the multiple identical maximum power supply currents as the first preset time duration.

[0190] By determining the minimum waiting time as the first preset time, it is helpful to save test time on the basis of the same test effect.

[0191] It should be understood that after the terminal device finishes the current test program and runs the next test program, the power supply current to the processor can reach the maximum. After that, as the processor load increases, the processor temperature rises, and the sensitivity of the processor components decreases, the power supply current to the processor will also decrease.

[0192] Exemplarily, the tester can conduct 3 groups of experiments, and the number of tests in each group of experiments includes at least two. In the first group of experiments, the terminal device runs the test program to obtain the system operation status of the current test, waits for 1s (i.e., the preset duration is 1s), the terminal device ends the current run of the test program, runs the next test program, and detects that the power supply current of the power supply to the processor is 5A when the test program is run next time. In the second group of experiments, the terminal device runs the test program to obtain the system operation status of the current test, waits for 3s (i.e., the preset duration is 3s), the terminal device ends the current run of the test program, runs the next test program, and detects that the power supply current of the power supply to the processor when the test program is run next time is 8A. In the third group of experiments, the terminal device runs the test program to obtain the system operation status of the current test, waits for 5s (i.e., the preset duration is 5s), the terminal device ends the current run of the test program, runs the next test program, and detects that the power supply current of the power supply to the processor when the test program is run next time is 10A. It can be seen that in the third group of experiments, the power supply current of the power supply to the processor when the terminal device runs the test program next time is the largest. Therefore, the tester can determine the preset time corresponding to the third group of experiments as the first preset time, that is, the first preset time is 5s.

[0193] Optionally, based on the above examples, the tester can also conduct a fourth group of experiments. In the fourth group of experiments, the terminal device runs the test program, obtains the system operation status of the current test, waits for 6 seconds (that is, the preset duration is 6 seconds), ends the current run of the test program, and runs the next test program. It is detected that the power supply current of the power supply to the processor when the test program is run next time is 10A. It can be seen that the fourth group of experiments and the third group of experiments obtain the same power supply current of the power supply to the processor when running the next test program. At this time, the tester can determine the minimum duration in the preset duration as the first preset duration, that is, the first preset duration is 5s.

[0194] By setting the first preset time duration, it is beneficial to ensure that the power supply current of the power supply to the processor is under a relatively large current load within the first preset time duration, and it is beneficial that when the terminal device runs the test program again, the power supply current of the power supply to the processor can reach a larger value, thereby increasing the load of the power supply during the test, and thereby improving the accuracy of the test results of the power supply to the terminal device.

[0195] In another possible implementation, a current sensor may be provided on the terminal device, and the terminal device may detect the power supply current of the power supply to the processor in real time through the current sensor. When the power supply current of the power supply to the processor is less than or equal to the preset current value, the i-th run of the test program is terminated.

[0196] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the preset current value through multiple groups of experiments. For example, the tester can perform multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after obtaining the system operation status of the current test, the terminal device detects the power supply current of the power supply to the processor in real time. When the power supply current of the power supply to the processor is less than the preset current value, the current operation of the test program is terminated, the next test program is run, and the power supply current of the power supply to the processor is detected when the next test program is run. In multiple groups of experiments, by setting different preset current values, the power supply current of the power supply to the processor when multiple test programs are run next time can be detected. The tester can determine the preset current value in the experiment with the largest power supply current among the multiple power supply currents when the test program is run next time as the preset current value.

[0197] Exemplarily, the tester can conduct 3 groups of experiments, and the number of tests in each group of experiments includes at least two. In the first group of experiments, the terminal device runs the test program, obtains the system operation status of the current test, and detects the power supply current of the power supply to the processor in real time. When the power supply current of the power supply to the processor is less than 8A (that is, the preset current value is 8A), the terminal device ends the current operation of the test program, runs the next test program, and detects that the power supply current of the power supply to the processor is 5A when the test program is run next time. In the second group of experiments, the terminal device runs the test program, obtains the system operation status of the current test, and detects the power supply current of the power supply to the processor in real time. When the power supply current of the power supply to the processor is less than 7A (that is, the preset current value is 7A), the terminal device ends the current operation of the test program, runs the next test program, and detects that the power supply current of the power supply to the processor is 8A when the test program is run next time. In the third group of experiments, the terminal device runs the test program to obtain the system operation status of the current test, and detects the power supply current of the power supply to the processor in real time. When the power supply current of the power supply to the processor is less than 15A (that is, the preset current value is 5A), the terminal device ends the current operation of the test program and runs the next test program. It is detected that the power supply current of the power supply to the processor when the test program is run next time is 10A. It can be seen that in the third group of experiments, the power supply current (10A) of the power supply to the processor measured by the terminal device when the test program is run next time is the largest. Therefore, the tester can determine the preset current value corresponding to the third group of experiments as the preset current value, that is, the preset current value is 5A.

[0198] By setting the preset current value, the power supply current of the terminal device to the processor is beneficially placed under a relatively large current load for a period of time. After the terminal device runs the test program again, the power supply current of the power supply to the processor can reach a larger value, thereby increasing the load of the power supply during the test, and thereby improving the accuracy of the test results of the power supply of the terminal device.

[0199] As an optional embodiment, using the processor to run the test program for the i+1th time includes: after the second preset time of the i-th running of the test program ends, or when the temperature of the processor is lower than the second preset temperature, using the processor to run the test program for the i+1th time.

[0200] Specifically, the terminal device uses the processor to run the test program for the (i+1)th time, including the following two implementation methods.

[0201] In one possible implementation, a timer may be set on the terminal device. After the i-th run of the test program is completed, the terminal device uses the timer to count. After the timing duration reaches a second preset duration, the terminal device uses the processor to run the test program for the (i+1)th time.

[0202] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the second preset duration through multiple groups of experiments. For example, the tester can conduct multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after the terminal device ends the current run of the test program, it waits for a preset time, runs the next test program, and detects the power supply current of the power supply to the processor when the next test program is run. In multiple groups of experiments, by setting different preset time lengths, the power supply current of the power supply to the processor when the test program is run for multiple next times can be detected. The tester can determine the preset time length in the experiment with the largest power supply current among the multiple power supply currents when the test program is run for the next time as the second preset time length.

[0203] Exemplarily, the tester can conduct 3 groups of experiments, and the number of tests in each group of experiments includes at least two times. In the first group of experiments, after the terminal device finishes the current run of the test program, it waits for 1s (i.e., the preset duration is 1s), and then runs the next test program. It is detected that the power supply current of the power supply to the processor when the test program is run next time is 5A. In the second group of experiments, after the terminal device finishes the current run of the test program, it waits for 3s (i.e., the preset duration is 3s), and then runs the next test program. It is detected that the power supply current of the power supply to the processor when the test program is run next time is 8A. In the third group of experiments, after the terminal device finishes the current run of the test program, it waits for 5s (i.e., the preset duration is 5s), and then runs the next test program. It is detected that the power supply current of the power supply to the processor when the test program is run next time is 10A. It can be seen that in the third group of experiments, the power supply current of the power supply to the processor measured by the terminal device when the test program is run next time is the largest. Therefore, the tester may determine the preset time length corresponding to the third group of experiments as the second preset time length, that is, the second preset time length is 5s.

[0204] After the terminal device finishes the current test program, the temperature of the processor is still high. After the current test program is finished, the processor is not operated for the second preset time period, so as to cool the processor to a certain extent. This is beneficial for the power supply current of the power supply to the processor to reach a larger value after the terminal device runs the test program next time, thereby increasing the load of the power supply during the test, and thus improving the accuracy of the test results of the power supply of the terminal device.

[0205] In another possible implementation, a temperature sensor may be provided on the terminal device, and the terminal device may detect the temperature of the processor in real time through the temperature sensor. When the temperature of the processor is lower than the second preset temperature, the test program is run for the (i+1)th time using the processor.

[0206] Optionally, before the terminal device uses the processor to run the test program, the tester can determine the second preset temperature through multiple groups of experiments. For example, the tester can perform multiple groups of experiments on the terminal device, and the number of tests in each group of experiments includes at least two times. In each group of experiments, after the terminal device ends the current run of the test program, the terminal device can detect the temperature of the processor in real time through a temperature sensor, and when the temperature of the processor is lower than the preset temperature, run the next test program, and detect the power supply current of the power supply to the processor when running the next test program. In multiple groups of experiments, by setting multiple different preset temperatures, multiple power supply currents of the power supply to the processor when the test program is run next time can be obtained. The tester can determine the preset temperature in the experiment with the largest power supply current among the multiple power supply currents when the test program is run next time as the second preset temperature.

[0207] Exemplarily, the tester can conduct 3 groups of experiments, and the number of tests in each group of experiments includes at least two. In the first group of experiments, after the terminal device ends the current run of the test program, it can detect the temperature of the processor in real time through the temperature sensor, and when the temperature of the processor is lower than 50° (i.e., the preset temperature is 50°), run the next test program, and detect that the power supply current of the power supply to the processor when running the next test program is 5A. In the second group of experiments, after the terminal device ends the current run of the test program, it can detect the temperature of the processor in real time through the temperature sensor, and when the temperature of the processor is lower than 40° (i.e., the preset temperature is 40°), run the next test program, and detect that the power supply current of the power supply to the processor when running the next test program is 8A. In the third group of experiments, after the terminal device ends the current run of the test program, it can detect the temperature of the processor in real time through the temperature sensor, and when the temperature of the processor is lower than 30° (i.e., the preset temperature is 30°), run the next test program, and detect that the power supply current of the power supply to the processor when running the next test program is 10A. It can be seen that in the third group of experiments, the power supply current of the power supply to the processor when the terminal device runs the test program next time is the largest. Therefore, the tester can determine the preset temperature corresponding to the third group of experiments as the second preset temperature, that is, the second preset temperature is 30°.

[0208] After the terminal device finishes the current test program, the temperature of the processor is still high. By setting the second preset temperature after the current test program is finished, the processor is in an idle state when the processor has not cooled down to the preset temperature, so as to cool down the processor to a certain extent, which is conducive to the power supply current of the power supply to the processor reaching a larger value as possible during the next test program run by the terminal device, so as to increase the load of the power supply during the test, thereby improving the accuracy of the test results of the power supply of the terminal device.

[0209] The above two embodiments describe a method in which a tester determines at least one of the first preset time length, the preset current value, the second preset time length, or the second preset temperature through multiple groups of experiments.

[0210] After determining the first preset duration, the preset current value, the second preset duration, or the second preset temperature, the method of the embodiment of the present application can be executed by the terminal device to obtain the test data of the embodiment of the present application. Optionally, the test data can be obtained by any of the following methods:

[0211] Method 1, after obtaining the first preset time length of the current system operation status, the operation of the current test program is terminated, and after the second preset time length of the current test program is terminated, the next test program is run to obtain test data.

[0212] Method 2, after obtaining the first preset time of the current system operation status, end the operation of the current test program, after the current test program is ended, when the processor temperature is lower than the second preset temperature, run the next test program to obtain test data.

[0213] Method 3, after the current of the power supply to the processor is less than the preset current value, the current test program is terminated. After the current test program is terminated and the processor temperature is lower than the second preset temperature, the next test program is run to obtain test data.

[0214] Method 4, after the current of the power supply to the processor is less than the preset current value, the running of the current test program is terminated, and after the second preset time period of the current test program is terminated, the next test program is run to obtain test data.

[0215] Exemplarily, taking mode 1 as an example, the change of the power supply current of the power supply to the processor during the process of executing the test program on the terminal device is explained.

[0216] Figure 5 The figure shows the change of the power supply current of the processor. Figure 5 In the example, the first preset time length can be 5 seconds, the second preset time length can also be 5 seconds, and the terminal device executes the test program 3 times. Figure 5In the figure, the X-axis represents time in seconds (s), and the Y-axis represents the current in amperes (A). The terminal device executes the test program at the 0th second, and the power supply reaches a maximum current of 10A at the 1st second. After that, as the processor load increases, the temperature of the processor rises, the sensitivity of the processor components decreases, and the power supply current to the processor gradually decreases, as shown in the current change curve from the 1st second to the 5th second. At the 5th second, the terminal device ends the first test program, waits for 5 seconds, and then runs the test program for the second time at the 10th second. After the terminal device runs for 1 second, the power supply reaches a maximum current of 10A at the 11th second. After that, as the processor load increases, the temperature of the processor rises, the sensitivity of the processor components decreases, and the power supply current to the processor decreases again, as shown in the current change curve from the 11th second to the 15th second. At the 15th second, the terminal device ends the running of the second test program, waits for 5 seconds, and then runs the test program for the third time at the 20th second. After the terminal device runs for 1 second, the power supply of the current reaches a maximum value of 10A at the 21st second. After that, as the processor load increases, the temperature of the processor rises, the sensitivity of the components of the processor decreases, and the power supply current to the processor decreases again, as shown in the current change curve from the 21st to the 25th second. At the 25th second, the terminal device ends the running of the third test program. Among them, 0s to 5s, 10s to 15s, and 20s to 25s can be the above-mentioned first preset time length, and the 5s waiting after each end of the running of the test program can be the second preset time length, that is, 5s to 10s and 15 to 20s can be the second preset time length.

[0217] As an optional embodiment, the above-mentioned processor includes a large core, a medium core and a small core. The operating frequency of the large core when running is a first operating frequency, the operating frequency of the medium core when running is a second operating frequency, and the operating frequency of the small core when running is a third operating frequency. The third operating frequency is the minimum operating frequency that the processor can run. The second operating frequency is less than the first operating frequency and greater than the third operating frequency.

[0218] It should be understood that the large core refers to the core with the highest operating frequency of the processor, the medium core refers to the core with the second highest operating frequency in the processor, and the small core refers to the core with the lowest operating frequency in the processor. The above-mentioned second operating frequency can be the maximum operating frequency that the medium core of the processor can run. It should also be understood that the first operating frequency is the maximum operating frequency that the processor can run, and it is also the maximum operating frequency that the large core can run. The maximum operating frequency that the processor can run and the maximum operating frequency that the large core can run are equivalent. The third operating frequency is the minimum operating frequency that the processor can run, and it is also the minimum operating frequency that the small core can run. The minimum operating frequency that the processor can run and the minimum operating frequency that the small core can run are equivalent.

[0219] Exemplarily, the operating frequency when the large core is running may be 3.7 GHZ, the operating frequency when the medium core is running may be 2.9 GHZ, and the operating frequency when the small core is running may be 1.2 GHZ.

[0220] Optionally, the large core and the medium core may be powered by the same current, and the small core may be powered by another current.

[0221] By setting different operating frequencies for the large core, medium core, and small core, the load on the large core and medium core can be increased, and the load on the small core can be reduced. This can reduce the impact of the processor temperature increase caused by the large load on the small core on the overall test effect, thereby improving the accuracy of the test results.

[0222] As an optional embodiment, the number of large cores is a first number, the number of medium cores is a second number, and the number of small cores is a third number; each of the large cores and each of the medium cores includes a first process, the first process is used to execute floating-point operation programs, and each of the small cores includes a second process, and the second process is an empty process.

[0223] It should be understood that including an empty process in a small core may mean that each small core runs at the lowest frequency but does not perform any operation.

[0224] Exemplarily, the number of large cores is 1, the number of medium cores is 4, and the number of small cores is 3. The 1 large core includes a first process, that is, the first process in the large core runs a floating-point operation program. Each of the 4 medium cores includes a first process, that is, the first process of each of the 4 medium cores runs a floating-point operation program. The empty process in each of the 3 small cores runs at the lowest frequency and does not perform floating-point operations.

[0225] It should be understood that, generally speaking, considering the load balancing of each core of the processor, when there are too many tasks in one core, the processor may assign the tasks in the core to an idle core. In this way, when the number of cores is greater than the number of processes, the process may be executed in multiple cores, causing some cores to be idle, and the processor cannot reach a large load. When the number of cores is less than the number of processes, some cores may poll the extra processes and queue up different processes for execution, which may cause the load of some cores to be unstable, and the processor cannot reach a large load.

[0226] The embodiment of the present application allocates a process to each core, that is, the number of cores is greater than the number of processes, so that each core can execute the process assigned to the core, which is conducive to avoiding the situation where there are idle cores in the processor or the process executed in the core is unstable when the number of cores and the number of processes of the processor are inconsistent. In this way, each core of the processor can stably execute the process assigned to the core, increase the load of the processor when running the test program, and then increase the power supply load of the power supply, thereby improving the accuracy of the test results of the power supply of the terminal device.

[0227] In the following, the terminal device is a mobile phone, and the processor of the terminal device is an eight-core CPU. Figure 6 and Figure 7 The test method of this application is described.

[0228] Figure 6 The figure shows a test scenario schematic diagram of the power supply on the mobile phone to the CPU. Figure 6 The mobile phone includes: a power supply, a line V1, and a CPU, and the power supply supplies power to the CPU through the line V1. The CPU may include 8 cores, including 3 small cores, 4 medium cores, and 1 large core. The 3 small cores may be: small core 0 to small core 2, the 4 medium cores may be: medium core 3 to medium core 6, and the one large core may be: large core 7.

[0229] Before the terminal device uses the CPU to execute the test program, the tester can rewrite the test code to set the upper temperature limit of the CPU to 125°. By rewriting the test code, the tester sets the operating frequency of small cores 0 to 2 to 1.2GHZ (i.e., the third operating frequency mentioned above), the operating frequency of medium cores 3 to 6 to 2.9GHZ (i.e., the second operating frequency mentioned above), and the operating frequency of large core 7 to 3.7GHZ (i.e., the first operating frequency mentioned above). By rewriting the test code, the tester sets a process to be assigned to each of medium cores 3 to 6 and large core 7, and performs floating-point operations in each process, and sets an empty process to be assigned to each of small cores 0 to 2.

[0230] Optionally, after setting the above temperature, operating frequency, and process allocation, the tester can start the test program. Figure 7 A schematic diagram of the interface changes when starting a test on a mobile phone is shown. Figure 7 In the interface a shown in the figure, two test options "CPU power test" and "other tests" are displayed in the middle of the interface. The tester clicks the test option "CPU power test". The mobile phone responds to the tester's click operation and displays Figure 7 Interface b shown. Figure 7In the interface b shown, the title "Number of Tests" is displayed in the middle of the interface, and there is a rectangular input box below the title for entering the number of tests. There is a soft keyboard icon below the input box. After the tester enters the number of tests "8" on the soft keyboard, the mobile phone responds to the tester's click operation and displays Figure 7 The interface shown is c. Figure 7 The interface c shown is Figure 7 The displayed interface b is roughly the same, except that the test number "8" entered by the tester is displayed in the input box. The tester clicks the "√" icon in the soft keyboard, and the mobile phone responds to the tester's click operation and displays Figure 7 The interface d is shown. Figure 7 In the interface d shown, the title "Number of Tests" is displayed in the middle of the interface, and there is a rectangular input box below the title. The number of tests displayed in the input box is "8" times, and a "Start" button is displayed below the input box. After the tester clicks the "Start" button, the mobile phone responds to the tester's click operation and can execute the test program based on the above-mentioned temperature, operating frequency, and process allocation.

[0231] Optionally, after the mobile phone completes the test program, the mobile phone displays the system operation status of the mobile phone. The system operation status may include "dump" and "pass". When the system operation status displayed on the mobile phone is "dump", it is determined that the power supply to the CPU is unreliable. When the system operation status displayed on the mobile phone is "pass", it is determined that the power supply to the CPU is reliable.

[0232] Exemplarily, Table 1 shows the correspondence between the system operation status of the terminal device and the test results.

[0233] Table 1

[0234] System operation Test Results dump Unreliable power supply pass Reliable power supply

[0235] Next, we will take an eight-core processor including 1 large core, 4 medium cores, and 3 small cores as an example. Figure 8 The overall process of the testing method of this application is described.

[0236] Figure 8 A flowchart of another test method provided by an embodiment of the present application. The test method includes two stages, wherein the first stage is the setting stage, in which the tester sets the test conditions by rewriting the test code, and the test conditions include temperature, operating frequency, and process allocation, etc. The second stage is the test stage, which is executed by the terminal device, and the terminal device executes the test program based on the test conditions. Below, the entire test method is described.

[0237] Phase 1: Setup Phase

[0238] S801, the tester can rewrite the test code to set the upper temperature limit of the processor to 125° when it is running.

[0239] S802, the tester can rewrite the test code to set the operating frequency of the small core of the processor to the third operating frequency, the operating frequency of the medium core to the second operating frequency, and the operating frequency of the large core to the first operating frequency.

[0240] Exemplarily, the first operating frequency may be 3.7 GHZ, the second operating frequency may be 2.9 GHZ, and the third operating frequency may be 1.2 GHZ.

[0241] S803, the tester can set both the medium core and the large core to perform floating-point operations, and not to perform floating-point operations in the small core.

[0242] S804, the tester can set it to allocate one process to each of the four medium cores and the large core, perform floating-point operations in each process, and allocate one empty process to each of the three small cores.

[0243] S805, the tester inputs the number of tests.

[0244] For example, the interface for the tester to input the test times can be changed as described above. Figure 6 shown.

[0245] After the tester inputs the test number, the test program can be started so that the terminal device executes the test program.

[0246] Phase 2: Testing Phase

[0247] S806: The terminal device assigns values ​​to initial variables.

[0248] S807, the terminal device determines whether the initial variable is less than or equal to a preset value.

[0249] If the initial variable is less than or equal to the preset value, the terminal device executes S808. Otherwise, the terminal device reassigns the initial variable, that is, executes S806.

[0250] S808, the terminal device performs floating point operations to obtain system operation status.

[0251] S809: The terminal device determines whether the system crashes.

[0252] If the system has not crashed, the terminal device continues to execute S810 , otherwise, the terminal device directly executes S812 .

[0253] S810, the terminal device obtains the test number input by the tester, and determines whether the test number executed by the terminal device is equal to the test number input by the tester.

[0254] If the number of tests executed by the terminal device is equal to the number of tests input by the tester, the terminal device executes S811. Otherwise, the terminal device executes S806.

[0255] S811, the terminal device determines that the power supply to the processor is reliable.

[0256] S812: The terminal device determines that the power supply to the processor is unreliable.

[0257] It should be understood that the order of execution of each process in the above method 800 does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic. There are many possible implementation methods according to the combination of different orders, and this application does not limit this.

[0258] Combination of the above Figures 1 to 8 The test method of the embodiment of the present application is described in detail. Fig.10 , describe in detail the testing device of the embodiment of the present application.

[0259] Fig. 9 The present invention provides a test device 900, which includes: an operation module 901 and a determination module 902. The device 900 is used to implement the steps corresponding to the terminal device in the above method. The software architecture involved in the device 900 can be as follows: Figure 2 As shown, other forms of software architecture are also possible, and this application does not limit this.

[0260] The operation module 901 is used to run the test program to obtain the system operation status of the terminal device. The system operation status indicates whether the system of the terminal device crashes during the operation of the test program. The test program includes the assignment of initial variables and the execution of floating-point operation programs. During the operation of the test program, the processor meets at least one of the following conditions: the upper temperature limit of the processor during operation is a first preset temperature, which is the highest temperature that the processor can withstand; or the operating frequency of the processor is a first operating frequency, which is the maximum operating frequency that the processor can run. The determination module 902 is used to obtain a test result based on the system operation status, and the test result is used to indicate whether the power supply to the processor is reliable.

[0261] Optionally, the determination module 902 is also used to: if the system operation status indicates that the system of the terminal device has not crashed, then determine the test result as the power supply to the processor is reliable; or, if the system operation status indicates that the system of the terminal device has crashed, then determine the test result as the power supply to the processor is unreliable.

[0262] Optionally, the running module 901 is also used to: use the processor to run the test program for the i-th time to obtain the i-th system operation status of the terminal device, where i is an integer greater than 0; if the i-th system operation status indicates that the system of the terminal device has crashed, the test is terminated, and the i-th system operation status is determined as the system operation status.

[0263] Optionally, the operation module 901 is also used to: if the i-th system operation status indicates that the system of the terminal device has not crashed, then end the i-th operation of the test program and obtain the number of tests; determine whether i is equal to the number of tests; if i is less than the number of tests, use the processor to run the test program for the i+1th time to obtain the i+1th system operation status of the terminal device; if the i+1th system operation status indicates that the system of the terminal device has not crashed, then end the i+1th operation of the test program and obtain the number of tests; if i+1 is equal to the number of tests, the i+1th system operation status is determined as the system operation status.

[0264] Optionally, the operation module 901 is further used for: if i is equal to the number of tests, ending the test and determining the i-th system operation status as the system operation status.

[0265] Optionally, the running module 901 is also used to end the i-th running of the test program after obtaining the first preset time length of the system running status of the terminal device, or when the power supply current of the power supply to the processor is less than or equal to a preset current value.

[0266] Optionally, the running module 901 is further used to: after the second preset time duration of the i-th running of the test program ends, or when the temperature of the processor is lower than the second preset temperature, use the processor to run the test program for the (i+1)th time.

[0267] Optionally, the processor includes a large core, a medium core and a small core. The operating frequencies of the large core and the medium core when running are a first operating frequency, the operating frequency of the medium core when running is a second operating frequency, and the operating frequency of the small core when running is a third operating frequency. The third operating frequency is the minimum operating frequency that the processor can run, and the second operating frequency is less than the first operating frequency and greater than the third operating frequency.

[0268] Optionally, the number of large cores is a first number, the number of medium cores is a second number, and the number of small cores is a third number; each of the large cores and each of the medium cores includes a first process, the first process is used to execute floating-point operation programs, and each of the small cores includes a second process, and the second process is an empty process.

[0269] It should be understood that the device 900 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art can understand that the device 900 can be specifically a terminal device in the above-mentioned embodiment, and the device 900 can be used to execute the various processes and / or steps corresponding to the terminal device in the above-mentioned method embodiment. To avoid repetition, it will not be repeated here.

[0270] The above-mentioned device 900 has the function of implementing the corresponding steps executed by the terminal device in the above-mentioned method; the above-mentioned function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. For example, the above-mentioned operation module 901 can be used to implement the various steps and / or processes for executing the operation action corresponding to the above-mentioned operation module, and the above-mentioned determination module 902 can be used to implement the various steps and / or processes for executing the processing action corresponding to the above-mentioned determination module.

[0271] In the embodiments of the present application, Fig. 9 The device 900 in the embodiment may also be a chip or a chip system, such as a system on chip (SOC). Correspondingly, the operation module 901 may be an operation circuit of the chip, and the determination module 902 may be a determination circuit of the chip, which is not limited here.

[0272] Fig.10 Another test device 1000 provided by an embodiment of the present application is shown. The device 1000 includes a processor 1001, a communication interface 1002, a memory 1003 and a power supply 1004. The processor 1001, the communication interface 1002, the memory 1003 and the power supply 1004 communicate with each other through an internal connection path, the memory 1003 is used to store instructions, the processor 1001 is used to execute the instructions stored in the memory 1003, the communication interface 1002 can be used to receive signals from other modules (for example, the memory 1003), the communication interface 1002 can also be used to send signals to other modules, and the power supply 1004 can be used to supply power to the processor.

[0273] It should be understood that the device 1000 can be specifically a terminal device in the above-mentioned embodiment, and can be used to execute the various steps and / or processes corresponding to the terminal device in the above-mentioned method embodiment. Optionally, the memory 1003 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 1001 may be used to execute instructions stored in the memory, and when the processor 1001 executes the instructions stored in the memory, the processor 1001 is used to execute the various steps and / or processes of the above-mentioned method embodiment corresponding to the terminal device. Exemplarily, the communication interface 1002 can read the instructions stored in the memory 1003 and send the instructions to the processor 1001. When the instructions shown are executed by the processor 1001, the device can execute the various steps executed by the terminal device in the above-mentioned embodiment.

[0274] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0275] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0276] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method corresponding to the terminal device in the above embodiment.

[0277] The present application also provides a computer program product, which includes a computer program (also referred to as code or instruction). When the computer program runs on a computer, the computer can execute the method corresponding to the terminal device shown in the above embodiment.

[0278] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0279] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0280] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0281] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0282] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0283] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0284] The above is only a specific implementation of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present application, which should be included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.

Claims

1. A testing method, characterized in that: Applied to a terminal device including a power supply and a processor, the method comprises: The processor is used to run a test program to obtain a system operation status of the terminal device, wherein the system operation status indicates whether the system of the terminal device crashes during the running of the test program, wherein the test program includes assignment of initial variables and execution of a floating-point operation program, and during the running of the test program, the processor satisfies at least one of the following conditions: The upper limit of the temperature of the processor during operation is a first preset temperature, and the first preset temperature is the highest temperature that the processor can withstand; or The operating frequency of the processor is a first operating frequency, and the first operating frequency is the maximum operating frequency at which the processor can operate; Based on the system operation status, a test result is obtained, wherein the test result is used to indicate whether the power supply of the processor by the power supply is reliable; The using the processor to run the test program to obtain the system operation status of the terminal device includes: Using the processor to run the test program for the i-th time, obtaining the i-th system operation status of the terminal device, where i is an integer greater than 0; If the i-th system operation status indicates that the system of the terminal device has not crashed, then after the first preset time length of obtaining the system operation status of the terminal device, or when the power supply current of the power supply to the processor is less than or equal to a preset current value, the i-th operation of the test program is terminated, and the number of tests is obtained; Determine whether i is equal to the number of tests; If i is less than the test number, the processor is used to run the test program for the i+1th time to obtain the i+1th system operation status of the terminal device; If the i+1th system operation status indicates that the system of the terminal device has not crashed, then ending the i+1th operation of the test program and obtaining the test number; If i+1 is equal to the number of tests, the i+1th system operation status is determined as the system operation status.

2. The method according to claim 1, characterized in that The test result is obtained based on the system operation condition, including: If the system operation status indicates that the system of the terminal device has not crashed, the test result is determined as the power supply of the processor by the power supply being reliable; or, If the system operation status indicates that the system of the terminal device crashes, the test result is determined as the power supply of the processor by the power supply is unreliable.

3. The method according to claim 1, characterized in that The method further comprises: If the i-th system operation status indicates that the system of the terminal device crashes, the test is terminated, and the i-th system operation status is determined as the system operation status.

4. The method according to claim 1, characterized in that: The method further comprises: If i is equal to the number of tests, the test is terminated, and the i-th system operation status is determined as the system operation status.

5. The method according to claim 1, characterized in that: The step of using the processor to run the test program for the (i+1)th time includes: After the second preset time period for finishing the i-th running of the test program, or when the temperature of the processor is lower than the second preset temperature, the test program is run for the (i+1)th time using the processor.

6. The method according to any one of claims 1 to 5, characterized in that The processor includes a large core, a medium core and a small core. The operating frequency of the large core when running is the first operating frequency, the operating frequency of the medium core when running is the second operating frequency, and the operating frequency of the small core when running is the third operating frequency. The third operating frequency is the minimum operating frequency that the processor can run, and the second operating frequency is less than the first operating frequency and greater than the third operating frequency.

7. The method according to claim 6, characterized in that The number of the large cores is a first number, the number of the medium cores is a second number, and the number of the small cores is a third number; Each of the large cores and each of the medium cores includes a first process, which is used to execute the floating-point operation program, and each of the small cores includes a second process, which is an empty process.

8. A testing device, characterized in that: The method comprises a module for implementing the method according to any one of claims 1 to 7.

9. A testing device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program includes instructions for implementing the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Test case crash recovery

    CN103744775A

  • Chip failure type test system

    CN115421027A

  • Frequency adjustment method for inter-core migration

    WO2022179473A1