CN112148544B - Terminal device testing method, smart watch and system - Google Patents

Terminal device testing method, smart watch and system Download PDF

Info

Publication number
CN112148544B
CN112148544B CN202011123903.0A CN202011123903A CN112148544B CN 112148544 B CN112148544 B CN 112148544B CN 202011123903 A CN202011123903 A CN 202011123903A CN 112148544 B CN112148544 B CN 112148544B
Authority
CN
China
Prior art keywords
current
time
power consumption
current value
consumption test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011123903.0A
Other languages
Chinese (zh)
Other versions
CN112148544A (en
Inventor
钟敬坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN202011123903.0A priority Critical patent/CN112148544B/en
Publication of CN112148544A publication Critical patent/CN112148544A/en
Application granted granted Critical
Publication of CN112148544B publication Critical patent/CN112148544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Telephone Function (AREA)
  • Power Sources (AREA)

Abstract

The invention provides a terminal device testing method, a smart watch and a system, wherein the method comprises the following steps: acquiring a starting signal, acquiring and storing the current value and the current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current; acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type; executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution; and reading the stored current time data between the starting time and the ending time, and drawing a visual chart. The invention does not need complex disassembly and connection wires and depends on a current oscillogram testing instrument, can realize large-scale testing, saves testing cost and improves testing efficiency.

Description

Terminal device testing method, smart watch and system
Technical Field
The invention relates to the technical field of mobile communication, in particular to a terminal device testing method, an intelligent watch and a system.
Background
With the continuous development of intelligent mobile communication, terminal devices, such as smart phones, tablet computers, intelligent translation devices, smart watches, and the like, have become indispensable devices in the hands of people, and are convenient for people to use in work and life. Different functions of the terminal equipment need to be tested, such as functions of testing the motion state of a watch, testing a riding track of a positioning track, testing heart rate and power consumption and the like.
The current waveform is generally drawn through testing, and at present, the current waveform is tested by a current waveform testing instrument such as a direct current power supply analyzer, a power monitor and the like. The whole machine is required to be disconnected and connected with a current oscillogram testing instrument for each test, and the test operation is complicated, so that many scenes are inconvenient to test or even impossible to test, for example, the functions of testing the motion state of a watch, testing the riding track of a positioning track, testing the heart rate and the power consumption and the like are realized. Current power consumption test requirement that test efficiency is not high and rapid software iteration cannot be met due to incapability of large-scale test
Disclosure of Invention
The invention aims to provide a terminal device testing method, an intelligent watch and a system, which do not need complicated disassembly and connection wires and do not need to depend on a current oscillogram testing instrument, can realize large-scale testing, save testing cost and improve testing efficiency.
The technical scheme provided by the invention is as follows:
the invention provides a terminal equipment testing method, which comprises the following steps:
acquiring a starting signal, acquiring and storing a current value and current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type;
executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution;
and reading the stored current time data between the starting time and the ending time, and drawing a visual chart.
Further, the method comprises the following steps after reading the stored current time data between the starting time and the ending time and drawing a visual chart:
analyzing a power consumption current oscillogram through the visual chart;
when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained;
and positioning a fault point according to the time information in the fault information and the time information of the system log.
Further, the analysis of the power consumption current oscillogram by the visual chart comprises the following steps:
calculating an average current I through the visual chart,
Figure BDA0002732970560000021
wherein, I i Is the current total current value, I, collected for the ith time between the start time and the end time i0 For the current system service current collected the ith time between the start time and the end time, and n is the current collected between the start time and the end timeTotal number of times, i =0,2, \ 8230;, n, and i is an integer,
calculating the total power consumption I according to the average current I General assembly ,I General (1) I = I x t, wherein t is the time period between the start time and the end time.
Further, the method comprises the following steps after reading the stored current time data between the starting time and the ending time and drawing a visual chart:
and generating a html (hypertext markup language) format file through the visual chart, and opening the html format file through a browser.
Further, the method comprises the following steps after reading the stored current time data between the starting time and the ending time and drawing a visual chart:
and when the power consumption test case is executed, stopping acquiring the current value and the current time of the battery equipment of the terminal equipment.
The invention also provides a smart watch comprising:
the data acquisition module is used for acquiring a starting signal, acquiring and storing the current value and the current time of battery equipment of the terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
the test execution module is used for acquiring a power consumption test signal and analyzing the power consumption test signal to obtain the type of a power consumption test case; executing the power consumption test case according to the power consumption test case type, and recording the starting time and the ending time of the execution;
and the data reading module is in communication connection with the data acquisition module and the test execution module and is used for reading the stored current time data between the starting time and the ending time.
Further, the method also comprises the following steps:
the data acquisition module is in communication connection with the test execution module and used for stopping acquiring the current value and the current time of the battery equipment of the terminal equipment after the power consumption test case is executed.
The invention also provides a terminal equipment testing system which comprises an intelligent terminal and the intelligent watch, wherein the intelligent terminal is in communication connection with the intelligent watch;
and the intelligent terminal is used for acquiring the current time data of the power consumption test case between the starting time and the ending time, which is read by the intelligent watch, and drawing the current time data into a visual chart.
Further, the method also comprises the following steps:
the intelligent terminal is also used for generating a html file through the visual chart and opening the html file through a browser
Further, the method also comprises the following steps:
the intelligent terminal is also used for analyzing a power consumption current oscillogram through the visual chart; when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained; and positioning a fault point according to the time information in the fault information and the time information of the system log.
According to the terminal equipment testing method, the intelligent watch and the system, complex disassembly and connection are not needed, a current oscillogram testing instrument is not needed, large-scale testing can be achieved, testing cost is saved, and testing efficiency is improved.
Drawings
The above features, technical features, advantages and implementations of a terminal device testing method, a smart watch and a system will be further described in the following preferred embodiments in a clearly understandable manner with reference to the accompanying drawings.
FIG. 1 is a flow chart of one embodiment of a method for testing terminal equipment in accordance with the present invention;
FIG. 2 is a flow chart of another embodiment of a method for testing terminal equipment in accordance with the present invention;
FIG. 3 is a flow chart of another embodiment of a method for testing terminal equipment in accordance with the present invention;
FIG. 4 is a flow chart of another embodiment of a method for testing terminal devices in accordance with the present invention;
FIG. 5 is a schematic block diagram of one embodiment of a smart watch of the present invention;
fig. 6 is a schematic structural diagram of an embodiment of a terminal device testing system according to the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. Moreover, in the interest of brevity and understanding, only one of the components having the same structure or function is illustrated schematically or designated in some of the drawings. In this document, "one" means not only "only one" but also a case of "more than one".
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In addition, in the description of the present application, the terms "first," "second," and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, without inventive effort, other drawings and embodiments can be derived from them.
In an embodiment of the present invention, as shown in fig. 1, a terminal device testing method includes:
s100, acquiring a starting signal, acquiring and storing a current value and current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
s200, acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type;
s300, executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution;
s400, reading the stored current time data between the starting time and the ending time, and drawing a visual chart.
Specifically, the terminal device obtains input information of a user, the input mode may be a click touch input, a key input, or a voice input, and the start signal is obtained according to the input information. The terminal device includes but is not limited to a smart phone, a tablet computer, an intelligent translation device, an intelligent watch, and the like, and the embodiment is directed to a terminal device based on an Android operating system. After the terminal device acquires the start signal, the start program acquires the current value and the current time of the battery device of the terminal device at intervals of a preset period, where the preset period may select different time periods based on the test requirements, for example, data acquisition is performed every second or every 30 milliseconds, and data at the current moment is acquired in real time.
And storing the acquired current value and the current time of the battery equipment of the terminal equipment as historical current time data so as to read data of a corresponding time period when a power consumption test case is executed subsequently. Since the time displayed on the current waveform diagram and the time displayed on the terminal device in the prior art are not synchronized, which makes it difficult to analyze the log positioning problem, the current value is associated with the current time, so as to clarify the exact time when each current value occurs.
In addition, the current value comprises a current total current value and a current system service current, if no power consumption test case is executed, the current total current value is the same as the current system service current value, and if the power consumption test case is executed, the current total current value is the sum of the current system service current value and the current value consumed by the power consumption test case. Wherein the current system service current is the current value consumed by the system operation of the current terminal equipment.
Similarly, the terminal device obtains input information of a user, the input mode can be click touch input, key input or voice input, and the power consumption test signal is obtained according to the input information. And then analyzing the power consumption test signal to obtain the type of the power consumption test case and the starting time of the test execution of the power consumption test case, such as the functions of testing the motion state of the watch, testing the riding track of the positioning track, testing the heart rate power consumption and the like. The power consumption testing method comprises the steps that various power consumption testing cases can be selected, and the terminal equipment executes the power consumption testing cases in sequence according to the selected sequence.
And starting a corresponding function execution power consumption test case according to the type of the power consumption test case, recording the starting time of execution, and recording the ending time after the power consumption test case is executed. In addition, in order to distinguish the executed multiple power consumption test cases, the starting time and the ending time of the execution of each power consumption test case are marked by the name of the power consumption test case or the unique corresponding identification information. On the other hand, if the same power consumption test case is repeatedly executed for a plurality of times, the same power consumption test case is distinguished by marks such as numbers and symbols, for example, the start time and the end time of a certain test belonging to a certain power consumption test case are marked with the same symbol, and the marks of the start time and the end time of the same power consumption test case but not the same test are different.
The current value and the current time of the battery equipment of the terminal equipment are always acquired and stored according to the program started by the starting signal, so that the current time data of a time period between the starting time and the ending time of executing any one power consumption test case are read from the stored current time data, and the current time data are the parameters for executing the power consumption test case. And drawing a visual chart according to the current time data, such as the current time data, and drawing the visual chart.
The test device does not need to rely on a current oscillogram test instrument, the wiring of the machine does not need to be disassembled, the test function of the whole test device is very convenient no matter the motion state and the positioning track of a test watch or the heart rate power consumption test or the real environment of an outdoor simulation user, and meanwhile, the large-scale test can be realized, the dependence on the current oscillogram test instrument is saved, and the cost and the labor input are saved.
Preferably, in another embodiment of the present application, the step of reading the stored current time data between the start time and the end time and plotting the current time data as a visual chart in S400 comprises the steps of:
calculating an average current I through the visual chart,
Figure BDA0002732970560000071
wherein, I i Is the current total current value, I, collected for the ith time between the start time and the end time i0 Servicing current for a current system collected an ith time between the start time and the end time, n being a total number of times current is collected between the start time and the end time, i =0,2, \ 8230, n, and i is an integer;
calculating the total power consumption I according to the average current I General (1) ,I General assembly I = I x t, wherein t is the time period between the start time and the end time;
and carrying out power consumption analysis according to the average current and the total power consumption.
Preferably, in another embodiment of the present application, the step of reading the stored current time data between the start time and the end time and plotting the current time data as a visual chart in S400 comprises:
and when the power consumption test case is executed, stopping acquiring the current value and the current time of the battery equipment of the terminal equipment.
Specifically, in this embodiment, after all the power consumption test cases are executed, the shutdown program stops collecting the current value and the current time of the battery device of the terminal device. Or stopping collecting the current value and the current time of the battery equipment of the terminal equipment within the preset time after all the power consumption test cases are executed and no new power consumption test signal is received.
In an embodiment of the present invention, as shown in fig. 2, a terminal device testing method includes:
s100, acquiring a starting signal, acquiring and storing a current value and current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
s200, acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type;
s300, executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution;
s400, reading the stored current time data between the starting time and the ending time, and drawing a visual chart;
s500, analyzing a power consumption current oscillogram through the visual chart;
s600, when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained;
s700, positioning a fault point according to the time information in the fault information and the time information of the system log.
Specifically, the terminal device acquires a start signal, the start program acquires the current value and the current time of the battery device of the terminal device every preset period, and the acquired current value and the acquired current time of the battery device of the terminal device are stored as historical current time data so as to read data of a corresponding time period during subsequent execution of a power consumption test case. The current value comprises a current total current value and a current system service current, wherein the current system service current is a current value consumed by the system operation of the current terminal equipment.
Similarly, the terminal device obtains the power consumption test signal, analyzes the power consumption test signal to obtain the type of the power consumption test case and the starting time of the test execution of the power consumption test case, such as the functions of testing the motion state of the watch, testing the riding track of the positioning track, testing the heart rate power consumption, and the like. The power consumption testing method comprises the steps that various power consumption testing cases can be selected, and the terminal equipment executes the power consumption testing cases in sequence according to the selected sequence.
And starting a corresponding function execution power consumption test case according to the type of the power consumption test case, recording the execution starting time, and recording the ending time after the power consumption test case is executed. The current value and the current time of the battery equipment of the terminal equipment are always acquired and stored according to the program started by the starting signal, so that the current time data of a time period between the starting time and the ending time of executing any one power consumption test case is read from the stored current time data, and the current time data is the parameters for executing the power consumption test case. And drawing a visual chart according to the current time data, such as the current time data, and drawing the visual chart.
The time displayed on the waveform map and the time displayed on the telephone watch device are not synchronized at present, which causes the problem of analyzing log positioning to be difficult. Therefore, the power consumption current oscillogram is analyzed through the visual chart, whether the power consumption is normal under any power consumption test case is judged and identified, if the fault information is obtained through analysis, the time information corresponding to the fault information is determined by combining the visual chart, namely, the corresponding time point when the power consumption is abnormal is determined.
In addition, a system log of the terminal equipment is obtained, and a fault point is positioned according to time information of the system log and time information in fault information, so that the program process of the terminal equipment during fault is confirmed, and the fault reason is determined quickly.
The time point of the real-time current value and the time point of the system log are synchronous, and the analysis and positioning problems are very convenient.
In an embodiment of the present invention, as shown in fig. 3, a terminal device testing method includes:
s100, acquiring a starting signal, acquiring and storing a current value and current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
s200, acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type;
s300, executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution;
s400, reading the stored current time data between the starting time and the ending time, and drawing a visual chart;
s510 calculating an average current I through the visual graph,
Figure BDA0002732970560000101
wherein, I i Is the current total current value, I, collected for the ith time between the start time and the end time i0 The current system service current collected for the ith time between the starting time and the ending time is provided, n is the total times of collecting the current between the starting time and the ending time, i =0,2, \8230, n is provided, and i is an integer;
s520, calculating total power consumption I according to the average current I General (1) ,I General assembly I = I x t, wherein t is the time period between the start time and the end time;
s600, when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained;
s700, positioning a fault point according to the time information in the fault information and the time information of the system log.
Specifically, the terminal device acquires a start signal, the start program acquires the current value and the current time of the battery device of the terminal device at intervals of a preset period, and the acquired current value and the acquired current time of the battery device of the terminal device are stored as historical current time data so as to read data of a corresponding time period in the subsequent execution of a power consumption test case. The current value comprises a current total current value and a current system service current, wherein the current system service current is a current value consumed by the current terminal device in system operation.
Similarly, the terminal device obtains the power consumption test signal, and analyzes the power consumption test signal to obtain the type of the power consumption test case and the starting time of the test execution of the power consumption test case, such as the functions of testing the motion state of the watch, testing the riding track of the positioning track, testing the heart rate power consumption, and the like. Various power consumption test cases can be selected, and the terminal equipment executes the power consumption test cases in sequence according to the selected sequence.
And starting a corresponding function execution power consumption test case according to the type of the power consumption test case, recording the execution starting time, and recording the ending time after the power consumption test case is executed. The current value and the current time of the battery equipment of the terminal equipment are always acquired and stored according to the program started by the starting signal, so that the current time data of a time period between the starting time and the ending time of executing any one power consumption test case is read from the stored current time data, and the current time data is the parameters for executing the power consumption test case. And drawing a visual chart according to the current time data, such as the current time data, and drawing the visual chart.
And (4) performing power consumption current oscillogram analysis through a visual chart, namely calculating the average current (the sum of the obtained current values is divided by the total obtaining times) minus the average current for obtaining the real-time current system service) and the total power consumption (the average current is multiplied by the test time), namely performing the power consumption current oscillogram analysis.
In an embodiment of the present invention, as shown in fig. 4, a terminal device testing method includes:
s100, acquiring a starting signal, acquiring and storing a current value and current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
s200, acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type;
s300, executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution;
s400, reading the stored current time data between the starting time and the ending time, and drawing a visual chart;
s500, generating a file in an html format through the visual chart, and opening the file through a browser.
Specifically, the terminal device obtains a start signal, the start program collects the current value and the current time of the battery device of the terminal device every preset period, and the collected current value and the collected current time of the battery device of the terminal device are stored as historical current time data, so that data of a corresponding time period can be read when a power consumption test case is executed subsequently. The current value comprises a current total current value and a current system service current, wherein the current system service current is a current value consumed by the current terminal device in system operation.
Similarly, the terminal device obtains the power consumption test signal, and analyzes the power consumption test signal to obtain the type of the power consumption test case and the starting time of the test execution of the power consumption test case, such as the functions of testing the motion state of the watch, testing the riding track of the positioning track, testing the heart rate power consumption, and the like. The power consumption testing method comprises the steps that various power consumption testing cases can be selected, and the terminal equipment executes the power consumption testing cases in sequence according to the selected sequence.
And starting a corresponding function execution power consumption test case according to the type of the power consumption test case, recording the starting time of execution, and recording the ending time after the power consumption test case is executed. The current value and the current time of the battery equipment of the terminal equipment are always acquired and stored according to the program started by the starting signal, so that the current time data of a time period between the starting time and the ending time of executing any one power consumption test case is read from the stored current time data, and the current time data is the parameters for executing the power consumption test case. And drawing a visual chart according to the current time data, such as the current time data, and drawing the visual chart.
In the prior art, the saved file of the current diagram is very large along with long test time, and is opened on a computer very slowly or even not opened. And too large a test file is also inconvenient for transfer and storage calls.
In this embodiment, a html-format file is generated through a visualization chart and opened through a browser, for example, a visualization graph with time as an X-axis current value as a Y-axis is drawn on a PC in a Line & Area manner in an amcharts advanced chart library and stored as a html-format file and opened through a browser. The visualized waveform graph generated by the amcharts chart library is in an html format, so that the visualization is very convenient to preview.
One embodiment of the present invention, as shown in fig. 5, is a smart watch including:
the data acquisition module is used for acquiring a starting signal, acquiring and storing the current value and the current time of battery equipment of the terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
the test execution module is used for acquiring a power consumption test signal and analyzing the power consumption test signal to obtain a power consumption test case type; executing the power consumption test case according to the type of the power consumption test case, and recording the starting time and the ending time of the execution;
the data reading module is in communication connection with the data acquisition module and the test execution module and is used for reading the stored current time data between the starting time and the ending time;
the data acquisition module is in communication connection with the test execution module and used for stopping acquiring the current value and the current time of the battery equipment of the terminal equipment after the power consumption test case is executed.
Specifically, the smart watch obtains input information of a user, the input mode can be click touch input, key input or voice input, and the start signal is obtained according to the input information. Smart watches include, but are not limited to, smart phones, tablets, smart translation devices, smart watches, and the like, and the present embodiments are directed to smart watches based on an Android operating system. After the smart watch acquires the start signal, the start program acquires the current value and the current time of the battery device of the smart watch every other preset period, and the preset period can select different time periods based on the test requirements, for example, data acquisition is performed every second or every 30 milliseconds, and data at the current moment is acquired in real time.
And storing the acquired current value and the current time of the battery equipment of the intelligent watch as historical current time data so as to read data of a corresponding time period when a power consumption test case is executed subsequently. Because the time displayed on the current oscillogram and the time displayed on the smart watch in the prior art are not synchronous, the problem of positioning the analysis log is difficult, and therefore, the current value is associated with the current time so as to determine the exact time of each current value.
In addition, the current value comprises a current total current value and a current system service current, if no power consumption test case is executed, the current total current value is the same as the current system service current value, and if the power consumption test case is executed, the current total current value is the sum of the current system service current value and the current value consumed by the power consumption test case. Wherein the current system service current is the current value consumed by the current smart watch in system operation.
Similarly, the smart watch acquires input information of a user, the input mode can be click touch input, key input or voice input, and the power consumption test signal is acquired according to the input information. And then analyzing the power consumption test signal to obtain the type of the power consumption test case and the starting time of the test execution of the power consumption test case, such as the functions of testing the motion state of the watch, testing the riding track of the positioning track, testing the heart rate and the power consumption, and the like. The intelligent watch can select various power consumption test cases, and the intelligent watch executes the power consumption test cases in sequence according to the selected sequence.
And starting a corresponding function execution power consumption test case according to the type of the power consumption test case, recording the starting time of execution, and recording the ending time after the power consumption test case is executed. In addition, in order to distinguish the executed multiple power consumption test cases, the starting time and the ending time of the execution of each power consumption test case are marked by the name of the power consumption test case or the unique corresponding identification information. On the other hand, if the same power consumption test case is repeatedly executed for a plurality of times, the same power consumption test case is distinguished through marks such as numbers and symbols, for example, the start time and the end time of a certain test belonging to a certain power consumption test case are marked with the same symbol, and the marks of the start time and the end time of the same power consumption test case but not the same test are different.
The current value and the current time of the battery equipment of the smart watch are always acquired and stored according to the program started by the starting signal, so that the current time data of a time period between the starting time and the ending time of executing any one power consumption test case are read from the stored current time data, and the current time data are parameters for executing the power consumption test case.
On the other hand, data analysis is not convenient due to the fact that data processing capacity of the intelligent watch and the size of the display screen are prior, and therefore the intelligent watch can directly transmit the read current time data to other processing equipment for analysis and display.
And after all the power consumption test cases are executed, closing the program to stop acquiring the current value and the current time of the battery equipment of the terminal equipment. Or stopping acquiring the current value and the current time of the battery equipment of the terminal equipment within a preset time after all power consumption test cases are executed and no new power consumption test signal is received.
The test device does not need to rely on a current oscillogram test instrument, the wiring of the machine does not need to be disassembled, the test function of the whole test device is very convenient no matter the motion state and the positioning track of a test watch or the heart rate power consumption test or the real environment of an outdoor simulation user, and meanwhile, the large-scale test can be realized, the dependence on the current oscillogram test instrument is saved, and the cost and the labor input are saved.
In an embodiment of the present invention, as shown in fig. 6, a terminal device testing system includes: the intelligent terminal is in communication connection with the intelligent watch;
and the intelligent terminal is used for acquiring the current time data of the power consumption test case between the starting time and the ending time, which is read by the intelligent watch, and drawing the current time data into a visual chart.
And the intelligent terminal is also used for generating a html file through the visual chart and opening the html file through a browser.
The intelligent terminal is also used for analyzing a power consumption current oscillogram through the visual chart; when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained; and positioning a fault point according to the time information in the fault information and the time information of the system log.
Specifically, in this embodiment, the smart watch obtains input information of the user, where the input mode may be a click touch input, a key input, or a voice input, and obtains the start signal according to the input information. Smart watches include, but are not limited to, smart phones, tablets, smart translation devices, smart watches, and the like, and the present embodiments are directed to smart watches based on an Android operating system. After the smart watch acquires the start signal, the start program acquires the current value and the current time of the battery equipment of the smart watch every other preset period, the preset period can select different time periods based on test requirements, for example, data acquisition is performed every second or every 30 milliseconds, and data at the current moment is acquired in real time.
And storing the acquired current value and the current time of the battery equipment of the smart watch as historical current time data so as to read data of a corresponding time period when a power consumption test case is executed subsequently. Because the time displayed on the current oscillogram and the time displayed on the smart watch in the prior art are not synchronous, the problem of log positioning analysis is difficult, and therefore, the current value and the current time are correlated so as to determine the exact time of each current value.
In addition, the current value comprises a current total current value and a current system service current, if no power consumption test case is executed, the current total current value is the same as the current system service current value, and if the power consumption test case is executed, the current total current value is the sum of the current system service current value and the current value consumed by the power consumption test case. The current system service current is a current value consumed by the current system operation of the smart watch.
Similarly, the smart watch acquires input information of a user, the input mode can be click touch input, key input or voice input, and the power consumption test signal is acquired according to the input information. And then analyzing the power consumption test signal to obtain the type of the power consumption test case and the starting time of the test execution of the power consumption test case, such as the functions of testing the motion state of the watch, testing the riding track of the positioning track, testing the heart rate and the power consumption, and the like. The intelligent watch can select various power consumption test cases, and the intelligent watch executes the power consumption test cases in sequence according to the selected sequence.
And starting a corresponding function execution power consumption test case according to the type of the power consumption test case, recording the starting time of execution, and recording the ending time after the power consumption test case is executed. In addition, in order to distinguish the executed multiple power consumption test cases, the starting time and the ending time of the execution of each power consumption test case are marked by the name of the power consumption test case or the unique corresponding identification information. On the other hand, if the same power consumption test case is repeatedly executed for a plurality of times, the same power consumption test case is distinguished by marks such as numbers and symbols, for example, the start time and the end time of a certain test belonging to a certain power consumption test case are marked with the same symbol, and the marks of the start time and the end time of the same power consumption test case but not the same test are different.
The current value and the current time of the battery equipment of the smart watch are always acquired and stored according to the program started by the starting signal, so that the current time data of a time period between the starting time and the ending time of executing any one power consumption test case are read from the stored current time data, and the current time data are parameters for executing the power consumption test case.
The smart watch may transmit the read current time data to the smart terminal through wireless or wired data transmission, which is not limited herein. The intelligent terminal analyzes the power consumption current oscillogram after receiving the current time data, and the analysis process of the intelligent terminal is the same as that of the terminal equipment for analyzing the current time data in the method embodiment, so that the current time data are not explained one by one.
On the other hand, the intelligent terminal also generates a file in an html format through a visual chart and opens the file through a browser, for example, a visual graph with time as an X-axis current value as a Y-axis is drawn on a PC computer in a Line & Area mode in an amcharts advanced chart library and is stored as the file in the html format and opens the file through the browser. The visualized waveform graph generated by the amcharts chart library is in an html format, so that the visualization is very convenient to preview.
The test device does not need to rely on a current oscillogram test instrument, the wiring of the machine does not need to be disassembled, the test function of the whole test device is very convenient no matter the motion state and the positioning track of a test watch or the heart rate power consumption test or the real environment of an outdoor simulation user, and meanwhile, the large-scale test can be realized, the dependence on the current oscillogram test instrument is saved, and the cost and the labor input are saved.
Based on the same inventive concept, the embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements all or part of the method steps of the above method.
The present invention realizes all or part of the processes of the above methods, and can also be implemented by a computer program instructing related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the method.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (e.g., a sound playing function, an image playing function, etc.); the storage data area may store data (e.g., audio data, video data, etc.) created according to the use of the cellular phone. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), servers and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A terminal device testing method is characterized by comprising the following steps:
acquiring a starting signal, acquiring and storing a current value and current time of battery equipment of terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current value;
acquiring a power consumption test signal, and analyzing the power consumption test signal to obtain a power consumption test case type;
executing the power consumption test case according to the power consumption test case type, and recording the starting time and the ending time of the execution; the current total current value is the sum of the current system service current value and the current value consumed by executing the power consumption test case;
reading the stored current time data between the starting time and the ending time, and drawing a visual chart;
calculating an average current I through the visual chart,
Figure FDA0003993680970000011
wherein, I i Is the current total current value, I, collected for the ith time between the start time and the end time 0i Servicing current for a current system collected an ith time between the start time and the end time, n being a total number of times current is collected between the start time and the end time, i =0,2, \ 8230, n, and i is an integer;
calculating the total power consumption I according to the average current I General (1) ,I General (1) -I = I × t, wherein t is the time period between the start time and the end time;
when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained;
and positioning a fault point according to the time information in the fault information and the time information of the system log.
2. The method for testing terminal equipment according to claim 1, wherein the step of reading the stored current time data between the start time and the end time and drawing the data as a visual chart comprises the following steps:
and generating a html (hypertext markup language) format file through the visual chart, and opening the html format file through a browser.
3. The method for testing terminal equipment according to claim 1, wherein the step of reading the stored current time data between the start time and the end time and drawing the data as a visual chart comprises the following steps:
and when the power consumption test case is executed, stopping acquiring the current value and the current time of the battery equipment of the terminal equipment.
4. A smart watch, comprising:
the data acquisition module is used for acquiring a starting signal, acquiring and storing the current value and the current time of battery equipment of the terminal equipment at intervals of a preset period according to the starting signal, and associating the current value with the current time, wherein the current value comprises a current total current value and a current system service current;
the test execution module is used for acquiring a power consumption test signal and analyzing the power consumption test signal to obtain the type of a power consumption test case; executing the power consumption test case according to the power consumption test case type, and recording the starting time and the ending time of the execution;
the data reading module is in communication connection with the data acquisition module and the test execution module and is used for reading the stored current time data between the starting time and the ending time;
the data reading module is also used for calculating the average current I through the visual chart,
Figure FDA0003993680970000021
wherein, I i Is the current total current value, I, collected for the ith time between the start time and the end time 0i Servicing current for a current system collected an ith time between the start time and the end time, n being a total number of times current is collected between the start time and the end time, i =0,2, \ 8230, n, and i is an integer; calculating the total power consumption I according to the average current I General assembly ,I General assembly -I = I × t, wherein t is the time period between the start time and the end time; when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained; and positioning a fault point according to the time information in the fault information and the time information of the system log.
5. The smart watch of claim 4, wherein:
and the data acquisition module is in communication connection with the test execution module and is used for stopping acquiring the current value and the current time of the battery equipment of the terminal equipment after the power consumption test case is executed.
6. A terminal device testing system, comprising a smart terminal and the smart watch of claim 4 or 5, wherein the smart terminal is in communication connection with the smart watch;
and the intelligent terminal is used for acquiring the current time data of the power consumption test case between the start time and the end time, which is read by the intelligent watch, and drawing the current time data into a visual chart.
7. The terminal device test system of claim 6, wherein:
and the intelligent terminal is also used for generating a html file through the visual chart and opening the html file through a browser.
8. The terminal device test system of claim 6, wherein:
the intelligent terminal is also used for analyzing a power consumption current oscillogram through the visual chart; when the power consumption current oscillogram is analyzed to obtain fault information, a system log is obtained; and positioning a fault point according to the time information in the fault information and the time information of the system log.
CN202011123903.0A 2020-10-20 2020-10-20 Terminal device testing method, smart watch and system Active CN112148544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011123903.0A CN112148544B (en) 2020-10-20 2020-10-20 Terminal device testing method, smart watch and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011123903.0A CN112148544B (en) 2020-10-20 2020-10-20 Terminal device testing method, smart watch and system

Publications (2)

Publication Number Publication Date
CN112148544A CN112148544A (en) 2020-12-29
CN112148544B true CN112148544B (en) 2023-02-24

Family

ID=73954058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011123903.0A Active CN112148544B (en) 2020-10-20 2020-10-20 Terminal device testing method, smart watch and system

Country Status (1)

Country Link
CN (1) CN112148544B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113933581B (en) * 2021-12-17 2022-05-13 荣耀终端有限公司 Power consumption testing method of mobile equipment and mobile equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5514964A (en) * 1994-08-17 1996-05-07 Square D Company System for monitoring a dual voltage ungrounded system for leakage currents
CN107315673A (en) * 2017-06-29 2017-11-03 努比亚技术有限公司 Power consumption monitoring method, mobile terminal and computer-readable recording medium
CN109697168A (en) * 2019-01-11 2019-04-30 网易(杭州)网络有限公司 Power consumption weight testing method and device, electronic equipment, storage medium
CN111209160A (en) * 2019-12-31 2020-05-29 深圳云天励飞技术有限公司 Power consumption abnormity analysis method and device, terminal equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5514964A (en) * 1994-08-17 1996-05-07 Square D Company System for monitoring a dual voltage ungrounded system for leakage currents
CN107315673A (en) * 2017-06-29 2017-11-03 努比亚技术有限公司 Power consumption monitoring method, mobile terminal and computer-readable recording medium
CN109697168A (en) * 2019-01-11 2019-04-30 网易(杭州)网络有限公司 Power consumption weight testing method and device, electronic equipment, storage medium
CN111209160A (en) * 2019-12-31 2020-05-29 深圳云天励飞技术有限公司 Power consumption abnormity analysis method and device, terminal equipment and readable storage medium

Also Published As

Publication number Publication date
CN112148544A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN108874268B (en) User behavior data acquisition method and device
CN108255729B (en) Mobile phone game automatic testing method and system based on Unity platform
CN108717393A (en) A kind of applied program testing method and mobile terminal
US20060100731A1 (en) Information processing device, operation state management device, information processing method, program, and computer-readable storage medium storing program
CN104216826A (en) Test method and device
CN112463634A (en) Software testing method and device under micro-service architecture
CN112148544B (en) Terminal device testing method, smart watch and system
CN107391360A (en) Application exception information processing method, device, server and user terminal
CN114167132B (en) Power consumption detection method and device of wireless terminal, electronic equipment and storage medium
CN110532559B (en) Rule processing method and device
CN115375582A (en) Moire digestion method and device based on low-order Taylor decomposition
CN111581067A (en) Data acquisition method and device
CN111310351A (en) Method and device for monitoring state of workshop equipment, terminal equipment and storage medium
CN105224465B (en) Webpage adjustment method and device
CN110457219B (en) Method and device for selecting time when test script is recorded
CN112905451A (en) Automatic testing method and device for application program
CN108108175A (en) A kind of method and apparatus for gray scale issue
CN111897737A (en) Omission detection method and device for program test of micro-service system
CN110543416A (en) Method, device, equipment and storage medium for automatically testing terminal program
CN110222391A (en) Electrical equipment drawing practice, system and terminal device
CN114071127A (en) Live video delay testing method and device, storage medium and electronic equipment
CN113806231A (en) Code coverage rate analysis method, device, equipment and medium
CN112596846A (en) Method and device for determining interface display content, terminal equipment and storage medium
CN114443461A (en) Method, device, system and medium for determining code coverage information
JPH07129677A (en) Production simulation device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant