Power consumption test method and system, terminal and electronic equipment
Through the power consumption testing method that realizes power coupling and time alignment between the terminal and the electronic device, the problems of low power consumption testing efficiency and high labor cost in the prior art are solved, and automated testing is realized, which improves efficiency and accuracy.
Patent Information
- Application Number
- CN202411759098.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, power consumption testing relies on manual operation, is inefficient and prone to errors, resulting in high labor costs and low testing efficiency.
By implementing power coupling between the terminal and the electronic device, using time alignment, the terminal and the electronic device independently conduct power consumption tests, and the terminal can accurately obtain test information during the first power consumption test.
Automated power consumption testing is realized, reducing manual participation, improving testing efficiency and accuracy, and reducing labor costs.
Smart Images

Figure CN119667325A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a method and system, terminal, and electronic device for power consumption testing. Background Art
[0002] For electronic devices, multiple power consumption tests are required when the version is updated. Currently, manual testing is mostly used, with testers setting different test scenarios to test the electronic devices. This method takes up a lot of human resources, is inefficient and prone to errors.
[0003] Therefore, it is very important to reduce the labor cost of power consumption testing and improve testing efficiency. Summary of the invention
[0004] The present application provides a method and system for power consumption testing, a terminal, and an electronic device to reduce the occupation of human resources and improve testing efficiency.
[0005] Specifically, the technical solution of this application is as follows:
[0006] In a first aspect, a method for power consumption testing is provided. The method is applied to a terminal, where the terminal is coupled to an electronic device via a power supply, and the power supply is used to power the electronic device. The method includes:
[0007] receiving a first instruction input by a user;
[0008] According to the first instruction, a first power consumption test is started; the start time of the first power consumption test is synchronized with the start time of the second power consumption test; the second power consumption test is started by the electronic device and is used to test the power consumption of the electronic device in at least one test scenario;
[0009] According to the test setting of the first power consumption test, the first test information is obtained through the power supply; the test setting of the first power consumption test is the same as the test setting of the second power consumption test.
[0010] In the above power consumption test method, the terminal and the electronic device each independently perform power consumption tests, and the start time of the terminal starting the first power consumption test is synchronized with the start time of the electronic device starting the second power consumption test. In this way, the test time of the first power consumption test and the second power consumption test can be aligned. Furthermore, the test setting of the first power consumption test is the same as the test setting of the second power consumption test. On the basis of time alignment, the independent power consumption test processes of the terminal and the electronic device can be aligned, so that the terminal can accurately obtain test information during the first power consumption test. In this way, the terminal can automatically obtain the power consumption of the test equipment in various test scenarios, reducing manual participation in the entire power consumption test process, thereby improving test efficiency and reducing labor costs.
[0011] In one implementation, the at least one test scenario includes multiple test scenarios, and the test setting includes a test order of the multiple test scenarios. According to the test setting of the first power consumption test, obtaining the first test information includes:
[0012] According to the test sequence, first test information is obtained; the first test information includes test information under multiple test scenarios.
[0013] In this way, the test order of the first power consumption test is the same as the test order of the second power consumption test. Under the premise of time alignment, it is possible to ensure that the acquisition of test information is synchronized with the test process of the second power consumption test, thereby improving accuracy.
[0014] In one implementation, the at least one test scenario includes a first test scenario, and the test setting includes a test time of the first test scenario. According to the test setting of the first power consumption test, obtaining the first test information includes:
[0015] When the first power consumption test has been started for a first time, first test information is started to be obtained; the test time includes the first time and a second time taken to obtain the first test information.
[0016] In this way, the first test information can be stabilized within the first time (waiting time), so that the test information obtained by the terminal at the second time is more accurate.
[0017] In one implementation, the at least one test scenario further includes a second test scenario, and the test time further includes a third time. The third time includes an interval time between the first test scenario and the second test scenario.
[0018] In this way, by setting the interval time, the impact of switching test scenarios on current data can be reduced to prevent the current data from becoming unstable, which is beneficial to improving the accuracy of subsequent test information acquisition.
[0019] In one implementation, the multiple test scenarios include a second test scenario, and the above power consumption test method further includes:
[0020] When the second test scenario is the last test scenario in the test sequence, a test report is generated according to the first test information and the test report is stored.
[0021] In this way, after all power consumption tests are completed, a test report can be automatically generated and stored based on the test information corresponding to each test scenario, which is convenient for subsequent query and reference.
[0022] In a second aspect, a method for power consumption testing is provided. The method is applied to an electronic device, the electronic device is coupled to a terminal via a power supply, the power supply is used to power the electronic device and output first test information to the terminal after the electronic device starts a second power consumption test. The method includes:
[0023] receiving a second instruction input by a user;
[0024] According to the second instruction, start the second power consumption test; the second power consumption test is used to test the power consumption of the electronic device in at least one test scenario; the start time of the second power consumption test is synchronized with the start time of the first power consumption test; the first power consumption test is started by the terminal.
[0025] In one implementation, the at least one test scenario includes multiple test scenarios, and the test setting includes a test sequence and a test time of the multiple test scenarios.
[0026] According to a third aspect, a terminal is provided, comprising a processor for calling instructions stored in a memory, wherein when the instructions are called by the processor, the processor executes the steps of the method according to the first aspect or any one of the implementations of the first aspect.
[0027] In a fourth aspect, an electronic device is provided, comprising a processor for calling instructions stored in a memory, wherein when the instructions are called by the processor, the processor executes the steps of the second aspect or any one of the methods for implementing the second aspect.
[0028] In a fifth aspect, a system for power consumption testing is provided, including:
[0029] A power supply, coupled to the electronic device of the fourth aspect above, for supplying power to the electronic device;
[0030] The terminal of the third aspect is coupled to a power supply, and is used to obtain first test information through the power supply after starting the first power consumption test.
[0031] In a sixth aspect, a terminal is provided, comprising a processor for calling instructions stored in a memory, wherein when the instructions are called by the processor, the processor executes the steps of the method of the first aspect or any one of the implementations of the first aspect.
[0032] In a seventh aspect, an electronic device is provided, comprising a processor for calling instructions stored in a memory, wherein when the instructions are called by the processor, the processor executes the steps of the method of the second aspect or any one of the implementations of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The following is a brief introduction to the drawings used in describing the embodiments of the present application:
[0034] Figure 1 A schematic diagram of the structure of a power consumption test system provided in an embodiment of the present application is shown;
[0035] Figure 2 A flow chart of a method for power consumption testing provided in an embodiment of the present application is shown;
[0036] Figure 3 A schematic diagram of an electronic device operating system provided in an embodiment is shown;
[0037] Figure 4 A schematic diagram of a power consumption test process provided in an embodiment of the present application is shown;
[0038] Figure 5 A flow chart of another method for power consumption testing provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the specific implementation methods of the present application will be described below with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work. Adjustments and improvements made without departing from the concept of the present application are all within the scope of protection of the present application.
[0040] In order to simplify the drawings, each figure only schematically shows the parts related to the corresponding embodiments, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only parts with the same structure or function are schematically shown, and there may be more or fewer parts with the same structure or function in reality.
[0041] In this application, unless otherwise clearly specified and limited, ordinal numbers, such as "first", "second", etc., are only used to distinguish and describe associated objects, and cannot be understood as indicating or implying the relative importance or order between associated objects; in addition, they do not represent the number of associated objects. "Multiple" includes two or more, and other quantifiers are similar. "And / or" is used to describe the relationship between associated objects, which includes any combination relationship between associated objects, for example, "a and / or b" includes: "alone a", "alone b", or "a and b". "At least one" or "one or more" in multiple objects refers to any object or any combination of multiple objects, for example, "at least one of a1, a2, a3" includes: "alone a1", "alone a2", "alone a3", "a1 and a2", "a1 and a3", "a2 and a3", or "a1, a2 and a3". " / " is used to describe the relationship between associated objects, which represents the "or" relationship between associated objects.
[0042] During the design and development of electronic equipment, it is necessary to measure the power consumption of electronic equipment in different test scenarios in a timely manner in order to find problems and make improvements. Figure 1 , which is a schematic diagram of the structure of a power consumption test system provided in an embodiment of the present application. Figure 1As shown, the power consumption test system 100 includes a terminal 110, a power supply 120 and an electronic device 130. The power supply 120 is coupled to the electronic device 130. The power supply 120 can supply power to the electronic device 130. The terminal 110 is coupled to the power supply 120. When the electronic device 120 starts the power consumption test, the power consumption change of the electronic device 120 can be reflected by the real-time current of the power supply 120. The terminal 110 obtains the test information of the electronic device 120 by reading the current data of the power supply 120.
[0043] At present, power consumption testing of electronic devices is mainly done manually. For example, different test scenarios are set manually, and then the power consumption test is started. After the power consumption test of the current scenario is completed, the test results need to be recorded manually, and the next scenario needs to be manually set to continue the test. Since the test time for each scenario is only a few minutes to more than ten minutes, the tester basically has to wait next to the device to be tested, which takes up too much human resources. In addition, the test process is cumbersome and the test efficiency is low.
[0044] Based on this, the embodiment of the present application proposes a method for power consumption testing and other solutions. The solution of the present application automatically tests the power consumption of electronic devices in various test scenarios by means of time alignment, thereby improving test efficiency and accuracy and reducing labor costs. The following is an explanation with reference to the accompanying drawings.
[0045] Please refer to Figure 2 , which is a flow chart of a method for power consumption testing provided in an embodiment of the present application. The method for power consumption testing can be executed by a terminal (e.g., terminal 110). The present application does not limit the implementation form of the terminal or electronic device. For example, the terminal may include a desktop terminal (e.g., a computer) or a mobile terminal. Electronic devices may include electronic products such as mobile phones, tablet computers, and mobile payment terminals that have power consumption testing requirements. By way of example, the terminal may be connected to a power supply via a general-purpose interface bus (GPIB). Furthermore, the power supply voltage of the power supply may also be set via the GPIB interface. By way of example, the power supply may be a programmable DC regulated power supply.
[0046] like Figure 2 As shown, the method for power consumption testing at least includes the steps of:
[0047] S210: receiving a first instruction input by a user;
[0048] S220: According to the first instruction, start a first power consumption test; the first power consumption test and the second power consumption test are started synchronously; the second power consumption test is started by the electronic device and is used to test the power consumption of the electronic device in at least one test scenario;
[0049] S230: acquiring first test information through a power supply according to a test setting of a first power consumption test; the test setting of the first power consumption test is the same as the test setting of the second power consumption test.
[0050] The above test scenarios (or test items) can be used to test different functions of electronic devices. The power consumption of electronic devices in different test scenarios is different. By setting different test scenarios, different test requirements of electronic devices can be met. The test scenarios may include one or more of the following: flight mode, first standby mode (4G standby mode), second standby mode (standby after turning off GPS), third standby mode (standby after printing), first WIFI mode (WIFI is on but not connected to a router), second WIFI mode (WIFI is on and connected to a router), screen light mode, sleep mode, print mode, etc.
[0051] A user (e.g., a tester) can configure the test settings of the power consumption test on the electronic device. The test settings include the test scenarios in the power consumption test and the test time corresponding to the test scenarios. In one implementation, when there are multiple test scenarios, the test settings also include the test order between the multiple test scenarios. Please refer to Figure 3 , which is a schematic diagram of an electronic device operation interface provided in an embodiment of the present application. Figure 3 As shown, the user can configure the test settings of the electronic device power consumption test through the operation interface 300. For example, through the operation interface 300, one or more test scenarios can be checked and the order of the test scenarios can be adjusted. Figure 3 The test time is only an example, and the test time of different test scenarios can be set to the same or different durations. The test time in the embodiment of the present application refers to the test time of a single test scenario. When there are multiple test scenarios, the total duration of the power consumption test is the superposition of the test times corresponding to the multiple test scenarios.
[0052] When a user inputs an instruction to an electronic device, the electronic device starts a power consumption test based on the configured test setting. Similarly, the test setting can also be configured in the operation interface of the terminal, such as calling a configuration file and automatically setting it according to the configuration file. When a user inputs an instruction to the terminal, the terminal starts a power consumption test based on the configured test setting. For the sake of distinction, the instruction input by the user to the terminal can be referred to as a first instruction, and the instruction input by the user to the electronic device can be referred to as a second instruction. The power consumption test started by the terminal can be referred to as a first power consumption test, and the power consumption test started by the electronic device can be referred to as a second power consumption test. After the second power consumption test is started, the electronic device runs in different test scenarios according to the test setting. The first power consumption test is started synchronously with the second power consumption test, that is, the start time of the first power consumption test is the same as the start time of the second power consumption test or the time difference between the two is within a preset time (for example, 5 seconds). Further, the test setting of the terminal is the same as the test setting of the electronic device, so that after the first power consumption test is started, the terminal can synchronously obtain test information through the power supply according to the test setting. The test information includes the current data of the power supply after the second power consumption test is started. The current data may include one or more of the following: real-time current value, maximum current value within the total duration of the power consumption test, minimum current within the total duration of the power consumption test, or average current value within the total duration of the power consumption test, etc.
[0053] For example, Figure 3 As shown, after the user configures the test settings, he can click the "Start Test" button to input a second instruction to the electronic device. The electronic device starts the second power consumption test according to the second instruction, and starts the test according to the test scenario and test time configured in the test settings. Synchronously, the user inputs the first instruction to the terminal. The terminal starts the first power consumption test according to the first instruction and synchronously obtains the test information.
[0054] In the above power consumption test method, the terminal and the electronic device each independently perform power consumption tests, and the start time of the terminal starting the first power consumption test is synchronized with the start time of the electronic device starting the second power consumption test. In this way, the test time of the first power consumption test and the second power consumption test can be aligned. Furthermore, the test setting of the first power consumption test is the same as the test setting of the second power consumption test. On the basis of time alignment, the independent power consumption test processes of the terminal and the electronic device can be aligned, so that the terminal can accurately obtain test information during the first power consumption test. In this way, the terminal can automatically obtain the power consumption of the test equipment in various test scenarios, reducing manual participation in the entire power consumption test process, thereby improving test efficiency and reducing labor costs.
[0055] Furthermore, at least one of the above test scenarios includes multiple test scenarios. The test setting includes a test sequence of multiple test scenarios. According to the test setting of the first power consumption test, obtaining test information includes: obtaining test information according to the test sequence; the first test information includes test information under multiple test scenarios. The test sequence of the first power consumption test is the same as the test sequence of the second power consumption test. Under the premise of time alignment, it can ensure that the acquisition of test information is synchronized with the test process of the second power consumption test, thereby improving accuracy.
[0056] In one implementation, the test time of the first power consumption test can be further set. Assuming that at least one test scenario includes a first test scenario, the test setting includes the test time of the first test scenario. The test time of the first test scenario is the total test duration of the scenario. Taking the first test scenario as the flight mode as an example, in the test setting of the second power consumption test, the test time of the flight mode can be set to 10 minutes, indicating that the total test duration of the flight mode is 10 minutes, and other test scenarios can be tested or the test can be ended after 10 minutes.
[0057] In this case, according to the test setting of the first power consumption test, obtaining the test information includes:
[0058] When the first power consumption test has been started for the first time, the test information begins to be obtained; the test time includes the first time and the second time taken to obtain the test information. The first time includes the waiting time of the terminal in the first test scenario, and the second time includes the time taken for the terminal to obtain the test information. For example, the first time is 3 minutes, the second time is 6 minutes, and the test time of the first test scenario can be 9 minutes (i.e., the sum of the first time and the second time). In this way, the current data of the power supply can be stabilized within the first time (waiting time), so that the test information obtained by the terminal at the second time is more accurate.
[0059] Further, for the case of multiple test scenarios, it is assumed that at least one test scenario includes a first test scenario and a second test scenario. In this case, the test time of the first test scenario may also include a third time. The third time includes the interval time between the first test scenario and the second test scenario. For example, the first time is 2 minutes, the second time is 5 minutes, and the third time is 1 minute, and the test time of the first test scenario may be 8 minutes (i.e., the sum of the first time, the second time, and the third time). In this way, by setting the interval time, the impact of switching test scenarios on current data can be reduced to prevent the current data from being unstable, which is conducive to improving the accuracy of subsequent test information acquisition.
[0060] It should be noted that, for different test scenarios, one or more of the first time, the second time or the third time may be the same or different.
[0061] In one implementation, after all power consumption tests are completed, a test report can be automatically generated and stored based on the test information corresponding to each test scenario, which is convenient for subsequent query and reference. The multiple test scenarios include a second test scenario, and the above processing method also includes: when the second test scenario is the last test scenario in the test sequence, a test report is generated based on the test information and the test report is stored. Please refer to Figure 4 , which is a schematic diagram of the process of a power consumption test provided in an embodiment of the present application. Figure 4 The left side shows the power consumption test process of the terminal. Figure 4 The right side shows the power consumption test process of electronic equipment. Figure 4 As shown, n is an integer greater than or equal to 1. When the current test scenario is the last test scenario in the test sequence, a test report is generated according to the first test information. The first test information includes current data. The current data can be used to indicate a change in power consumption of the electronic device. Based on the current data, a test report can be generated. For example, the test report can include a current waveform diagram of the current data.
[0062] In addition, an embodiment of the present application further provides a terminal, including a processor, configured to call an instruction stored in a memory, wherein when the instruction is called by the processor, the processor executes any of the above Figures 1 to 4 The steps of the method for power consumption testing in the related embodiments. The present application also provides a computer program product, including instructions, which, when called by a processor, perform any of the above Figures 1 to 4 In a related embodiment, a method for power consumption testing is performed.
[0063] Based on the same technical concept, the embodiment of the present application also provides a method for power consumption testing, which is applied to an electronic device. The electronic device is coupled to a terminal via a power supply, and the power supply is used to power the electronic device and output first test information to the terminal after the electronic device starts a second power consumption test. Please refer to Figure 5 , which is a flow chart of another method for power consumption testing provided by an embodiment of the present application. Figure 5 As shown, the method at least comprises the steps of:
[0064] S510: receiving a second instruction input by a user;
[0065] S520: According to the second instruction, start a second power consumption test; the second power consumption test is used to test the power consumption of the electronic device in at least one test scenario; the start time of the second power consumption test is synchronized with the start time of the first power consumption test; the first power consumption test is started by the terminal.
[0066] In one implementation, at least one test scenario includes multiple test scenarios. The test setting includes the test sequence and test time of the multiple test scenarios. For the description of the second power consumption test, test scenarios, etc., please refer to the aforementioned Figure 1-Figure 4 The contents of the related embodiments are not described in detail here.
[0067] In addition, the present application also provides an electronic device, including a processor, for calling an instruction stored in a memory, wherein when the instruction is called by the processor, the processor executes the above Figure 5 The steps of the method for power consumption testing in the related embodiments. The present application also provides a computer program product, including instructions, which, when called by a processor, perform any of the above Figure 5 In a related embodiment, a method for power consumption testing is performed.
[0068] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. In addition, the above embodiments can be freely combined as needed.
Claims
1. A method for power consumption testing, characterized in that: Applied to a terminal, the terminal is coupled to an electronic device via a power supply, the power supply is used to power the electronic device, the method includes: receiving a first instruction input by a user; According to the first instruction, a first power consumption test is started; the start time of the first power consumption test is synchronized with the start time of the second power consumption test; the second power consumption test is started by the electronic device and is used to test the power consumption of the electronic device in at least one test scenario; According to a test setting of a first power consumption test, first test information is obtained through the power supply; the test setting of the first power consumption test is the same as the test setting of the second power consumption test.
2. The method according to claim 1, characterized in that The at least one test scenario includes a plurality of test scenarios, the test setting includes a test order of the plurality of test scenarios, and the acquiring test information according to the test setting of the first power consumption test includes: The test information is acquired according to the test sequence; the test information includes test information under the multiple test scenarios.
3. The method according to claim 1, characterized in that: The at least one test scenario includes a first test scenario, the test setting includes a test time of the first test scenario, and the acquiring first test information according to the test setting of the first power consumption test includes: When the first power consumption test has been started for a first time, the first test information begins to be obtained; the test time includes the first time and a second time taken to obtain the first test information.
4. The method according to claim 3, characterized in that The at least one test scenario further includes a second test scenario, the test time further includes a third time, and the third time includes an interval time between the first test scenario and the second test scenario.
5. The method according to claim 2, characterized in that: The plurality of test scenarios include a second test scenario, the method further comprising: When the second test scenario is the last test scenario in the test sequence, a test report is generated according to the first test information and the test report is stored.
6. A method for power consumption testing, characterized in that: Applied to an electronic device, the electronic device is coupled to a terminal via a power supply, the power supply is used to power the electronic device and output first test information to the terminal after the electronic device starts a second power consumption test, the method includes: receiving a second instruction input by a user; According to the second instruction, start a second power consumption test; the second power consumption test is used to test the power consumption of the electronic device in at least one test scenario; the start time of the second power consumption test is synchronized with the start time of the first power consumption test; the first power consumption test is started by the terminal.
7. The method according to claim 6, characterized in that The at least one test scenario includes a plurality of test scenarios, and the test setting includes a test sequence and a test time of the plurality of test scenarios.
8. A terminal, characterized in that: The method comprises a processor for calling instructions stored in a memory, wherein when the instructions are called by the processor, the processor executes the steps of the method according to any one of claims 1 to 5.
9. An electronic device, characterized in that: It comprises a processor, which is used to call instructions stored in a memory, and when the instructions are called by the processor, the processor executes the steps of the method as claimed in any one of claims 6 to 7.
10. A system for power consumption testing, characterized in that: include: a power supply, coupled to the electronic device as claimed in claim 9, for supplying power to the electronic device; The terminal as claimed in claim 8 is coupled to the power supply and is used to obtain first test information through the power supply after starting the first power consumption test.
Citation Information
Cited By
Processor power consumption test method and device, electronic equipment, chip and medium
CN122195758A