CN113051128B - Power consumption detection method and device, electronic equipment and storage medium - Google Patents

Power consumption detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113051128B
CN113051128B CN201911382911.4A CN201911382911A CN113051128B CN 113051128 B CN113051128 B CN 113051128B CN 201911382911 A CN201911382911 A CN 201911382911A CN 113051128 B CN113051128 B CN 113051128B
Authority
CN
China
Prior art keywords
power consumption
data
consumption data
terminal
dimension
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
CN201911382911.4A
Other languages
Chinese (zh)
Other versions
CN113051128A (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 Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201911382911.4A priority Critical patent/CN113051128B/en
Publication of CN113051128A publication Critical patent/CN113051128A/en
Application granted granted Critical
Publication of CN113051128B publication Critical patent/CN113051128B/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/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • G06F11/3062Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
    • 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)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The application discloses a power consumption detection method and device, electronic equipment and a storage medium, and belongs to the technical field of data detection. The method is performed by a server, the method comprising: the method comprises the steps of receiving power consumption data sent by each terminal, selecting each target power consumption data from the power consumption data according to a first screening rule, wherein each target power consumption data is data of an application program with the M-th bit of each terminal in the power consumption data being a first type application program, application programs with other positions being non-first type application programs, obtaining first normalized data according to each target power consumption data, detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data. The method and the device can reduce detection steps of power consumption data and improve detection efficiency of the power consumption data.

Description

Power consumption detection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of data detection, in particular to a power consumption detection method and device, electronic equipment and a storage medium.
Background
With the progress of science and technology, more and more applications are installed in a terminal, each application in the terminal generates a power consumption situation on the terminal, and the detection of the power consumption generated by each application in the terminal is one of important aspects for improving the endurance of the terminal.
At present, when power consumption conditions generated by each application program in a terminal are detected, power consumption data are often required to be manually captured, and the power consumption of each application program is analyzed in a mode of manually analyzing the data, so that the power consumption data in the terminal are detected. For example, a foreground time threshold, a resource occupation time threshold, and a use frequency threshold are obtained by manually analyzing data, and when foreground time in the power consumption data of the terminal is smaller than the foreground time threshold, and the resource occupation time is greater than the resource occupation time threshold or the use frequency is greater than the use frequency threshold, the power consumption data is determined to be abnormal power consumption data.
When each application program of the terminal calls other application programs during running, the other application programs detect how the power consumption of the terminal should be, and no perfect solution is provided at present.
Disclosure of Invention
The embodiment of the application provides a power consumption detection method and device, an electronic device and a storage medium, which can detect the power consumption of a terminal by other application programs when the other application programs are called when each application program of the terminal runs, so that the detection efficiency of power consumption data is improved. The technical scheme is as follows:
In one aspect, an embodiment of the present application provides a power consumption detection method, where the method is performed by a server, and the method includes:
receiving power consumption data sent by each terminal, wherein the power consumption data is data of application programs with the total power consumption ranked at the top N bits in each application program, which are acquired by each terminal in one period, and N is an integer greater than or equal to 2;
according to a first screening rule, selecting each target power consumption data from the power consumption data, wherein each target power consumption data is respectively data of an M-th application program of each terminal in the power consumption data, the M-th application program is a first type application program, the application programs at other positions are non-first type application programs, the M-th bit is any one position in the first N bits, and the first type application program is an application program called by other application programs in each terminal;
acquiring first normalized data according to each target power consumption data, wherein the first normalized data is normalized data of each target power consumption data, the first normalized data is obtained by normalizing a second data dimension of each target power consumption data according to a first data dimension of each target power consumption data, the first data dimension is any one data dimension contained in each target power consumption data, and the second data dimension is another data dimension contained in each target power consumption data;
And detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data.
In another aspect, an embodiment of the present application provides a power consumption detection apparatus, where the apparatus is used in a server, and the apparatus includes:
the data receiving module is used for receiving power consumption data sent by each terminal, wherein the power consumption data are acquired by each terminal in one period and are data of application programs with the total power consumption arranged at the top N bits in each application program, and N is an integer greater than or equal to 2;
a first data selection module, configured to select, according to a first filtering rule, each target power consumption data from the power consumption data, where each target power consumption data is data in which an M-th application of each terminal in the power consumption data is a first type application and applications in other positions are non-first type applications, where the M-th bit is any one of the first N bits, and the first type application is an application called by other applications in each terminal;
a first data obtaining module, configured to obtain first normalized data according to each target power consumption data, where the first normalized data is normalized data of each target power consumption data, the first normalized data is data obtained by normalizing a second data dimension of each target power consumption data according to a first data dimension of each target power consumption data, the first data dimension is any one data dimension included in each target power consumption data, and the second data dimension is another data dimension included in each target power consumption data;
And the first data determining module is used for detecting the normalized data through an artificial intelligence detection algorithm and determining abnormal power consumption data in each target power consumption data.
In another aspect, an embodiment of the present application provides an electronic device, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the power consumption detection method according to the above aspect.
In another aspect, an embodiment of the present application provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the power consumption detection method according to the above aspect.
The technical scheme provided by the embodiment of the application can at least comprise the following beneficial effects:
receiving power consumption data sent by each terminal, wherein the power consumption data are data of application programs of which the total power consumption is arranged at the top N bits in each application program in each terminal, the total power consumption is acquired by each terminal in one period, each target power consumption data are selected from the power consumption data according to a first screening rule, each target power consumption data is respectively an application program of which the M bit of each terminal in the power consumption data is a first type application program, application programs at other positions are data of non-first type application programs, and the first type application program is an application program called by other application programs in each terminal; acquiring first normalized data according to the target power consumption data, detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in the target power consumption data. According to the method and the device, the server selects each target power consumption data from the power consumption data of each terminal, normalization processing is carried out on each target power consumption data, abnormal power consumption data are determined by combining an artificial intelligence detection algorithm, detection steps of the power consumption data are reduced, and detection efficiency of the power consumption data is improved.
Drawings
FIG. 1 is a scenario diagram of an application scenario provided by an exemplary embodiment of the present application;
FIG. 2 is a flowchart of a method of a power consumption detection method according to an exemplary embodiment of the present application;
FIG. 3 is a flowchart of a method of a power consumption detection method according to an exemplary embodiment of the present application;
fig. 4 is a schematic diagram of a frequency distribution of power consumption data according to an exemplary embodiment of the present application;
FIG. 5 is a graph illustrating a frequency distribution of power consumption data after logarithmic change of FIG. 4 according to an exemplary embodiment of the present application;
FIG. 6 is an interface diagram of a presentation interface for an abnormal power consumption message according to an exemplary embodiment of the present application;
FIG. 7 is a flowchart of a method for power consumption detection provided by an exemplary embodiment of the present application;
fig. 8 is a block diagram illustrating a power consumption detection apparatus according to an exemplary embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The scheme provided by the application can be used in a real scene in which images in a terminal need to be processed when people use the terminal in daily life, and for convenience of understanding, some terms and application scenes related to the embodiment of the application are first briefly introduced below.
Top1 results: when there are a plurality of results, the best one of the plurality of results is obtained in one dimension. For example, the plurality of power consumption data have respective power consumption values, and the Top1 result may be selected from the plurality of power consumption data with the largest power consumption value according to the power consumption values.
TopN results: when a plurality of results exist, the first N-bit results of the plurality of results are obtained in one dimension. For example, the plurality of power consumption data have respective power consumption values, and the power consumption data with the power consumption value ranked in the top N bits may be selected from the plurality of power consumption data according to the power consumption values as the TopN result.
With the development of science and technology, more and more terminals appear in people's daily life, and people can work, amusement, study etc. through the terminal. In addition, the number of the application programs installed in the terminal is also increasing, and when each application program runs, corresponding power consumption data can be generated in the terminal.
Referring to fig. 1, a scene diagram of an application scenario provided in an exemplary embodiment of the present application is shown. As shown in fig. 1, a plurality of terminals 110 and a server 120 are included.
Alternatively, the terminal 110 is a terminal installed with an application program. For example, the terminal may be a mobile phone, a tablet computer, an e-book reader, smart glasses, a smart watch, an MP4(Moving Picture Experts Group Audio Layer IV) player, a notebook computer, a laptop portable computer, a desktop computer, and the like.
Optionally, the server 120 may be a server, or a plurality of servers, or a virtualization platform, or a cloud computing service center.
Alternatively, the terminal 110 and the server 120 may be connected through a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless or wired networks described above use standard communication techniques and/or protocols. The Network is typically the Internet, but can be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wired or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), Extensible Mark-up Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
Optionally, the terminal 110 may send power consumption data of each application program to the server 120 through a communication network, and the server 120 detects the power consumption data of each terminal 110.
When other application programs are called when each application program of the terminal runs, the other application programs detect the power consumption of the terminal, and the detection efficiency of the power consumption data is improved. The application provides a power consumption detection method, which can detect the power consumption data of the terminals under the condition of no need of manual analysis, and complete the determination of the abnormal power consumption data of each terminal, thereby improving the detection efficiency of the power consumption data.
Referring to fig. 2, a flowchart of a method for detecting power consumption according to an exemplary embodiment of the present application is shown. The method may be used in the application scenario shown in fig. 1, and executed by a server in the scenario, as shown in fig. 2, the power consumption detection method may include the following steps.
Step 201, receiving power consumption data sent by each terminal, where the power consumption data is data of an application program in which total power consumption collected by each terminal in one period is arranged at the top N bits in each application program.
Wherein N is an integer of 2 or more.
Optionally, each terminal mentioned in the application may have a client corresponding to the server, and the client may periodically collect power consumption data of each application program in the terminal and send the collected power consumption data to the server, and correspondingly, the server may receive the power consumption data sent by each terminal.
Optionally, when each terminal sends the power consumption data, the power consumption data of the top N applications may be selected and sent to the server according to the total power consumption of each application in the terminal. Alternatively, the period may be 3 hours, 6 hours, 12 hours, 24 hours, one week, one month, or the like.
Step 202, according to a first screening rule, selecting each target power consumption data from the power consumption data, wherein each target power consumption data is data of an application program with an M-th bit of each terminal in the power consumption data, the application programs with the other positions are non-first-type application programs, the M-th bit is any one of the first N bits, and the first-type application program is an application program called by other application programs in each terminal.
Optionally, for each terminal, during the foreground operation process of each application in the terminal, other applications in the terminal may be called, and the application does not show the called application in the foreground when calling the other applications. The terminal can also correspondingly collect the power consumption situation of the called application programs to the terminal. These invoked applications may be referred to as first type applications.
That is, in this step, for the power consumption data transmitted by a certain terminal, if any one of the first N bits is an application of the first type, the server may regard the power consumption data of the terminal as one target power consumption data. For example, in the power consumption data sent by a certain terminal, the first bit is data corresponding to a first type of application program, and the second bit to the nth bit are data corresponding to each non-first type of application program, so that the terminal can acquire the power consumption data sent by the terminal as a target power consumption data.
And 203, acquiring first normalization data according to each target power consumption data.
The first normalization data is obtained by normalizing second data dimensions of each target power consumption data according to first data dimensions of each target power consumption data, the first data dimensions are any data dimensions contained in each target power consumption data, and the second data dimensions are other data dimensions contained in each target power consumption data.
Optionally, each target power consumption data in the embodiment of the present application may have at least two dimensions, for example, for one of the target power consumption data, the target power consumption data may include N pieces of power consumption data, and each piece of power consumption data may include a total power consumption dimension, a screen power consumption dimension, a CPU (Central Processing Unit) power consumption dimension, a CPU time, and the like. The total power consumption may be a total power consumed by the application program to the terminal when the application program corresponding to the piece of power consumption data runs in the terminal within a period of time, the screen power consumption may be a power consumed by the display screen to the terminal when the application program runs in the terminal, the CPU power consumption may be a power consumed by the CPU to the terminal when the application program runs in the terminal, and the CPU time may be a working time of the CPU in the terminal when the application program runs in the terminal. Alternatively, the period of time may be preset by the server and the client in the terminal. That is, in the target power consumption data sent by each terminal, the power consumption data at any position can describe the power consumption situation of the terminal when the application program corresponding to the position runs in the terminal.
Optionally, the server may normalize another data dimension of the target power consumption data according to any one of the data dimensions. For example, the CPU time dimension is used as the first data dimension, and normalization processing is performed on the other three dimensions to obtain respective normalized data of each dimension. This is not limited by the examples of the present application.
And 204, detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data.
In summary, power consumption data sent by each terminal is received, the power consumption data is data of an application program, in which the total power consumption of each terminal is first N bits in the respective application program, acquired in one period by each terminal, and each target power consumption data is selected from the power consumption data according to a first screening rule, each target power consumption data is an application program, in which the mth bit of each terminal in the power consumption data is a first type of application program, and application programs in other positions are data of non-first type of application programs, and the first type of application program is an application program called by other application programs in each terminal; acquiring first normalized data according to each target power consumption data, detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data. According to the power consumption data detection method and device, the server selects each target power consumption data from the power consumption data of each terminal, normalization processing is carried out on each target power consumption data, abnormal power consumption data are determined by combining an artificial intelligence detection algorithm, detection steps of the power consumption data are reduced, and detection efficiency of the power consumption data is improved.
In a possible implementation manner, the data dimension of each target power consumption data includes a foreground time, where the foreground time is used to indicate a time for foreground running of each application program of each terminal in each terminal. The method embodiment is described by taking the example that the first data dimension adopted when the server acquires the first normalized data is foreground time.
Referring to fig. 3, a flowchart of a method of detecting power consumption according to an exemplary embodiment of the present application is shown. The method may be used in the application scenario shown in fig. 1 and executed by a server in the scenario, and as shown in fig. 3, the power consumption detection method may include the following steps.
Step 301, receiving power consumption data sent by each terminal.
The power consumption data is data of an application program with the first N bits of total power consumption of each terminal in one cycle, and N is an integer greater than or equal to 1.
Optionally, a client corresponding to the server may be installed in each terminal mentioned in the application, and the client may periodically collect power consumption data of each application program in the terminal and send the collected power consumption data to the server, so that the server receives the collected power consumption data. Or, the server may also periodically request the client to acquire the power consumption data, and after receiving the request of the server, the client sends the data acquired by the client to the server. For example, the server may send a data obtaining request to the client, where the data obtaining request is used to obtain power consumption data of each application program with the total power consumption of the first N bits in a certain time period in the terminal, and the client may send the power consumption data of the application program with the total power consumption of the first N bits to the server after receiving the request. The embodiment of the present application does not limit how the server receives the power consumption data.
Alternatively, the period may be 3 hours, 6 hours, 12 hours, 24 hours, one week, one month, or the like. For example, taking a period of 24 hours and N of 10 as an example, the server may obtain, every 24 hours, power consumption data of an application program of which the total power consumption of each terminal is 10 bits first in the period. For the first terminal, the first 10 applications with total power consumption may be ten applications such as the first application, the second application, the third application … …, the ninth application, and the tenth application in the cycle, and for the second terminal, the first 10 applications with total power consumption may be ten applications such as the first application a, the second application B, the C … …, the I application, and the J application. That is, the applications with the first 10 bits of total power consumption in the first terminal and the second terminal may be the same or different. Wherein, the server can receive the power consumption data of the application program with the total power consumption of Top10 for each terminal per se in 24 hours, which is sent by each terminal installed with the corresponding client.
Step 302, counting the occurrence frequency of each application program in each terminal in the current period.
Optionally, the server may count the obtained power consumption data according to the application name of each application program, so as to obtain the occurrence frequency of each application program in each terminal. That is, if the power consumption data sent by each terminal in one cycle received by the server is regarded as sample data, this step may be regarded as counting the sample data to obtain the number of times that each application program appears in each sample data.
Optionally, the power consumption data sent by the client of the terminal to the server may include application names of the first N application programs, and the server may obtain each application name in each power consumption data and perform statistics on the power consumption data according to each application name. For example, the power consumption data acquired by the server in a certain period includes application names such as a chat program one and a song listening program, and the server may count the occurrence frequency of the application names such as the chat program one and the song listening program in the power consumption data of each terminal.
In a possible implementation manner, 10 ten thousand terminals report to the server that there is power consumption data of the first chat program in the power consumption data of the first N-bit application programs in the period, and 8 ten thousand terminals report to the server that there is power consumption data of the first song listening program in the power consumption data of the first N-bit application programs in the period, so that the server can count the first chat program, and the occurrence times of the first song listening program in each terminal are 10 ten thousand times and 8 ten thousand times respectively.
Step 303, determining the application program with the occurrence frequency of K bits before as the first application program.
Wherein K is an integer of 1 or more.
Optionally, after the server completes statistics of the occurrence frequency of each application program according to the application name of each application program, the server may select an application program with the occurrence frequency ranked at the top K in each application program, and use the application program with the top K as the target application program. For example, the server may determine that all 100 applications appearing in the sample data within the period 100 times first are target applications. That is to say, in the embodiment of the present application, the server may actively perform exception detection on the power consumption data of each application program whose occurrence number is the first 100 bits.
And step 304, acquiring each first power consumption data according to the application name of the first application program.
And each first power consumption data is used for describing the power consumption condition of each terminal when the first application program runs in each terminal.
Optionally, after determining each first application program through the foregoing steps, the server may sequentially obtain the application name of each first application program according to the sequence from high to low, and obtain each first power consumption data through the application name of the first application program. Or, the server may also randomly select a first application program from the previous K-bit application programs, and obtain, according to an application name of the first application program, each piece of first power consumption data corresponding to the first application program appearing in each terminal. Or, the server may also obtain the application name of each first application program in sequence according to the order from low to high, and obtain each first power consumption data through the application name of the first application program. The embodiment of the present application does not limit the manner in which the server acquires each first application.
Optionally, a first power consumption data may describe power consumption of a plurality of portions of a terminal when the first application is running in the terminal.
For example, please refer to table 1, which shows a schematic table of first power consumption data related to an embodiment of the present application.
Terminal device Application program Front desk time Total power consumption Screen power consumption ……
Terminal I Application program one 5 hours 2 watt 0.5 watt ……
Terminal two Application program one 4 hours 1 watt 0.3 watts ……
TABLE 1
As shown in table 1, a piece of first power consumption data including a terminal name, an application name, a foreground time, a total power consumption, a screen power consumption, and the like is included. Each line of data may be one of the first power consumption data acquired by the server, that is, if the server acquires each of the first power consumption data according to the application name of the first application program, each of the first power consumption data acquired by the server may include the data shown in table 1. The foreground time represents the total time of the first application program running in the foreground of the first terminal in the period; the total power consumption represents the total power consumption of the terminal in the operation process of the first terminal in the period of the first application program; the screen power consumption represents the power consumption of the screen module of the first terminal to the first terminal in the running process of the first terminal in the period of the first application program.
Optionally, each of the first power consumption data may further include power consumption conditions in various aspects, such as CPU power consumption, CPU time, WiFi (Wireless-Fidelity, Wireless Fidelity) power consumption, WiFi background power consumption, WiFi traffic, data network power consumption, data network background power consumption, wakeup lock (wakeup) power consumption, GPS (Global Positioning System) power consumption, GPS use time, GPS background use time, Sensor (Sensor) power consumption, Sensor use time, Camera (Camera) power consumption, and Camera use time, when the corresponding first application program runs in the terminal of the terminal, which is not limited in the embodiment of the present application.
The CPU time can represent the working time of the terminal CPU when the first application program runs in the first terminal in the period; the WiFi power consumption can represent the power consumption of the WiFi module of the terminal to the terminal when the first application program runs in the foreground of the first terminal in the period; the WiFi background power consumption can represent the power consumption of the WiFi module of the terminal to the terminal when the application program operates in the background in the first terminal in the period; the WiFi traffic may represent WiFi traffic consumed by the application program when running in the terminal one in the period; the power consumption of the data network can represent the power consumption of the data network to the terminal when the application program runs in the foreground of the terminal I in the period; the background power consumption of the data network can represent the power consumption of the data network to the terminal when the application program runs in the background in the first terminal in the period; the wake-up lock power consumption may represent power consumption of the wake-up lock of the terminal to the terminal when the first terminal runs in the first period of the application program; the GPS power consumption can represent the power consumption of the terminal by the GPS module of the terminal when the first terminal runs in the period of the first application program; the GPS use time can represent the working time of the GPS module of the terminal when the application program runs in the foreground of the terminal I in the period; the GPS background use time can represent the working time of the GPS module of the terminal when the application program runs in the background in the period; the sensor power consumption can represent the power consumption of the terminal by the sensor module of the terminal when the application program runs in the first terminal in the period; the sensor use time can represent the working time of a sensor module of the terminal when the application program runs in the first terminal in the period; the power consumption of the camera can represent the power consumption of the camera module of the terminal to the terminal when the application program runs in the first terminal in the period; the camera usage time may represent an operating time of a camera module of the terminal when the application runs in the terminal one in the period.
The data of each dimension can reflect the power consumption situation of the application program to a certain terminal when the application program runs in the terminal, and correspondingly, the client in the terminal can acquire the power consumption data and send the power consumption data to the server. Optionally, the number of each dimension may be preset by a developer of the client or the server, which is not limited in this embodiment of the present application.
The server searches the power consumption data corresponding to the first application program from the received power consumption data according to the application name of the first application program, and accordingly obtains each first power consumption data.
And 305, acquiring second normalized data according to the first power consumption data.
The second normalized data is normalized data of each first power consumption data, the second normalized data is data obtained by normalizing a fourth data dimension of each first power consumption data according to a third data dimension of each first power consumption data, the third data dimension is any one data dimension contained in each first power consumption data, and the fourth data dimension is another data dimension contained in each first power consumption data.
Because the first power consumption data is also the power consumption data sent by the terminal, the first power consumption data is similar to each piece of power consumption data in the target power consumption data, and also has each data dimension, and each data dimension has a corresponding numerical value. Optionally, the data dimension of each first power consumption data is the same as the dimension of each power consumption data in the target power consumption data, and may also include a foreground time, where the third data dimension is a foreground time, and the foreground time may indicate a time for which the first application runs in a foreground in each terminal.
In a possible implementation manner, the server may further obtain a ratio between a value corresponding to the fourth data dimension of each first power consumption data and a value corresponding to the third data dimension of each first power consumption data.
In a possible implementation manner, as shown in table 1 above, each first power consumption data includes a foreground time, and in this step, the foreground time may be selected as a third data dimension, that is, the third data dimension is a foreground time, and the foreground time is used to indicate a time for which the first application runs in a foreground in each terminal. This step may also select screen power consumption as the fourth data dimension, i.e., the fourth data dimension is different from the third data dimension.
Optionally, when the first application is the first application, the server may calculate, according to table 1, that each terminal runs the first application in the foreground, and power consumption of the display screen of the terminal to the terminal in unit foreground time is obtained. For example, the server calculates the ratio of 10 based on the first row data of Table 1-2(the original fourth data dimension is reserved as the dimension of the ratio), and the ratio can describe the power consumption of the display screen to the terminal when the terminal runs the application program within unit foreground time. By analogy, the server may obtain a ratio of the screen power consumption of each terminal including the first application to the foreground time in the received power consumption data, which is not described herein again.
Optionally, after the server performs the above calculation on one fourth data dimension, the fourth data dimension may also be automatically changed, that is, the server may sequentially acquire each of the data dimensions except the third data dimension, sequentially use each of the other data dimensions as the fourth data dimension, and sequentially calculate a ratio between each of the fourth data dimensions and the third data dimension (foreground time), so as to obtain a power consumption of the hardware device corresponding to the third data dimension to the hardware device when the terminal runs the first application program in unit time.
It should be noted that, it is also exemplary that the foreground time is used as the third data dimension in this step, and other data dimensions mentioned above may also be used as the third data dimension, and one data dimension other than the third data dimension is selected as the fourth data dimension, and a ratio between the fourth data dimension and the third data dimension may also be obtained, so as to complete the normalization processing of the data.
Optionally, because the power consumption data sent by the terminal may include power consumption data of a first type application program, the first type application program is an application program that does not have a foreground display interface in each terminal, that is, in the power consumption data acquired by the terminal for the type of application program, foreground time is 0, if a direct ratio is obtained in the above manner, a condition that a denominator appears 0 may exist, and optionally, the server may replace the foreground time of the first type application program in each power consumption data with preset time. Optionally, the preset time may be the above cycle time, for example, the terminal sends a piece of power consumption data to the server every 24 hours, and the server may calculate the foreground time of the application program uniformly according to 24 hours, so as to obtain each ratio, and complete normalization processing of the data.
Optionally, taking the terminal as a mobile phone, the first type of application program may be an application program in which a User identity identifier (UID) in the mobile phone is 0 or 1000. That is, according to the scheme of the application, when the total power consumption of the application program with the UID of 0 or 1000 in the mobile phone is ranked in the first N bits, and the power consumption data in the first N bits is the power consumption data of other types of application programs, the server may test the power consumption of the application program with the UID of 0 or 1000 in the mobile phone in the current period.
Optionally, the server may obtain each obtained ratio as second normalized data. Optionally, in this embodiment of the application, the server may use each ratio obtained after the processing according to one third data dimension and one fourth data dimension as a group of second normalized data. That is, the server may obtain multiple sets of second normalized data according to different third data dimensions and different fourth data dimensions, which is not limited in the embodiment of the present application.
Please refer to table 2, which shows a schematic table of a second normalized data according to an exemplary embodiment of the present application.
Terminal device Second normalization data one Second normalized data two
Terminal I 0.01 0.1
Terminal two 0.0012 0.047
Terminal three 0.024 0.0046
…… …… ……
TABLE 2
As shown in table 2, the terminal name is included, and each group of the second normalized data. And each second normalized data represents a ratio relation between the fourth data dimension and the third data dimension. For example, the first normalization data in table 2 may represent a ratio between the screen power consumption and the foreground time, and the second normalization data may represent a ratio between the CPU power consumption and the foreground time. Optionally, the server may also generate a unique corresponding number for each second normalized data, so as to identify a ratio relationship between the fourth data dimension and the third data dimension. For example, the first normalization data in table 2 is numbered first, and the second normalization data is numbered second, etc.
In one possible implementation, the server may perform log-variant processing on the second normalized data. Optionally, the server may apply log change processing to the obtained second normalized data. Please refer to fig. 4, which shows a frequency distribution diagram of power consumption data according to an exemplary embodiment of the present application. As shown in fig. 4, the frequency count corresponding to each value section is included. The value interval can be preset by a developer.
Optionally, for any group of the obtained second normalized data, the server may determine which value interval each data in the second normalized data is located in, so as to count the terminal of the data in the value interval, and finally obtain the number of each corresponding terminal in each value interval, so as to obtain the above fig. 4. For example, taking the interval of the value range as 0.02, in the value range from 0.1 to 0.12, if there are 5000 pieces of second normalization data of the terminals located in the value range, the frequency between 0.1 and 0.12 is 5000.
In order to remove the smear phenomenon (i.e., the phenomenon that the data in the second normalized data is too large or too small) in the second normalized data, the server may perform a logarithmic transformation process on the second normalized data. Optionally, a base-10 log change process is used in the embodiments of the present application. Referring to fig. 5, a frequency distribution diagram of power consumption data after logarithmic change according to an exemplary embodiment of the present application is shown. As shown in fig. 5, each value interval is included therein. And counting the frequency corresponding to each value interval according to the second normalized data after log change. For example, the value of a certain second normalization data is 0.1, and is in the interval from 0.1 to 0.12 in fig. 4, and is in the interval from-1 to-0.9 in fig. 5, and the server may calculate the terminal corresponding to the second normalization data in the value interval from-1 to-0.9.
Step 306, obtaining an anomaly detection threshold according to the second normalized data and the standard deviation criterion.
Alternatively, the server may calculate the average value and the standard deviation of the second normalized data, and obtain the summation result between the average value and X times of the standard deviation. Wherein X is an integer of 1 or more.
That is, the server may calculate the average value and the standard deviation thereof for the second normalized data after the logarithmic change, and the server may sum the average value and the standard deviation of X times. Optionally, the server may obtain the value of X according to a third data dimension and a fourth data dimension used in the second normalized data. In a possible implementation manner, the value of X is related to a third data dimension and a fourth data dimension in the second normalized data, for example, for the above-mentioned third data dimension according to the foreground time, the screen power consumption is taken as the fourth data dimension, X in this step is 3, if the third data dimension according to the foreground time, the CPU power consumption is taken as the fourth data dimension, X in this step is 4, if the third data dimension according to the foreground time, the total power consumption is taken as the fourth data dimension, X in this step is 2, and so on.
In a possible implementation manner, the server may obtain the obtained normalized data of each dimension according to different standard deviation criteria, and obtain the anomaly detection threshold of each dimension. For example, the third data dimension is a CPU time dimension, the fourth data dimension is a screen power consumption dimension, at this time, the server may obtain a set of second normalized data, and the server may obtain the anomaly detection threshold according to a standard deviation criterion corresponding to the fourth data dimension.
Please refer to table 3, which shows a table of correspondence of a standard deviation criterion according to an embodiment of the present application.
A second data dimension Standard deviation criterion
Dimension one Criterion of standard deviation of one
Dimension two Standard deviation criterion two
Dimension three Criterion of standard deviation three
…… ……
TABLE 3
As shown in table 3, the corresponding relationship between each fourth data dimension and the standard deviation criterion is included. When the fourth data dimension in the obtained second normalized data is dimension two, the server may obtain that the standard deviation criterion that needs to be adopted at this time is standard deviation criterion two according to the above table 3, and may obtain the corresponding abnormality detection threshold according to the normalized data and the corresponding standard deviation criterion two.
In a possible implementation manner, after the server numbers each group of the second normalized data, the server may obtain the value of X in this step according to the number of each group of the second normalized data. For example, the server may store a correspondence table between the number of the second normalization data and X. After the server obtains the second normalized data of each group, the server inquires a corresponding relation table between the number and the X according to the number of each second normalized data of each group, so as to obtain a corresponding X value.
Please refer to table 4, which shows a table of correspondence between the numbers of the second normalization data and X according to an embodiment of the present application.
Number of X
0001 2
0002 4
0003 3
…… ……
TABLE 4
As shown in table 4, the server can look up table 4 to obtain X ═ 3 according to the number 0003. After the server performs the logarithmic change processing on the group of second normalized data of number 0003 and calculates the mean value and the standard deviation after the logarithmic change processing, the sum of the mean value and the 3-fold standard deviation of the group of second normalized data is obtained in this step.
Alternatively, the server may obtain the sum of the average value and X times the standard deviation as the abnormality detection threshold.
That is, the server uses the obtained summation result as the detection threshold of the corresponding fourth data dimension. The server may detect whether the data of the fourth data dimension in each terminal is abnormal data according to the summation result.
Step 307, determining the data greater than the anomaly detection threshold value in the second normalized data as the anomalous power consumption data in each target power consumption data.
Optionally, the server may compare each second normalized data in the set of second normalized data with an anomaly detection threshold of the set of second normalized data, and determine the second normalized data greater than the anomaly detection threshold as the anomalous power consumption data.
For example, the target application is a first application, the server obtains each first power consumption data shown in table 1, the server uses foreground time therein as a third data dimension, uses screen power consumption as a fourth data dimension, obtains a group of second normalized data, and performs logarithmic change processing on the second normalized data. And after the server acquires the X value according to the foreground time and the screen power consumption, an anomaly detection threshold value is obtained through the calculation. The server may compare each second normalized data in the set of second normalized data with the abnormality detection threshold, and determine data greater than the abnormality detection threshold as abnormal power consumption data corresponding to the target power consumption data of the terminal. For example, in the set of second normalized data, the second normalized data of the second terminal is greater than the abnormality detection threshold, and the server may determine the second normalized data of the second terminal as the abnormal power consumption data of the second terminal when the second terminal runs the application program.
And 308, selecting each second power consumption data from the power consumption data according to a second screening rule, wherein each second power consumption data is power consumption data without abnormity in the data of the application program of the front N bits of each terminal in the power consumption data.
For example, the first terminal sends a power consumption data to the server, and after the server executes the above steps, the server does not have abnormal power consumption data in the data of the first N-bit application programs in the power consumption data of the first terminal, and at this time, the server may acquire the power consumption data of the first terminal as a second power consumption data. For example, the first terminal sends data of the first 10-bit application programs, the server detects that the power consumption data of the 10 application programs are normal according to the above method, and the power consumption data of the first terminal is the second power consumption data.
That is, the second filtering rule may be that after the data of each dimension of each application program in the first terminal is detected by the detection threshold of each dimension obtained through the above calculation, it is found that the value of each dimension corresponding to the power consumption data of the first N-bit application program sent by the first terminal is not greater than the detection threshold of each dimension.
Step 309, according to the first filtering rule, selecting each target power consumption data from each second power consumption data.
The M-th bit of each terminal in the power consumption data is a first type application program, and the other positions of the application programs are data of non-first type application programs, wherein the M-th bit is any one of the first N bits, and the first type application program is an application program called by other application programs in each terminal.
That is, in each of the second power consumption data, the first N of the terminals is an application program of which one position corresponds to is a first-type application program, the application programs of which the other positions correspond to are non-first-type application programs, and the server may acquire the second power consumption data of the terminal as one target power consumption data.
That is, the first filtering rule may be that, in the power consumption data of the first N-bit application programs sent by the terminal, an application program at a certain position is a first-type application program, and application programs corresponding to the remaining dimensional positions are all non-first-type application programs.
And 310, acquiring second normalized data corresponding to each target power consumption data according to each target power consumption data, and acquiring the second normalized data corresponding to each target power consumption data as first normalized data.
Optionally, the server may obtain, according to the calculated each group of second normalized data, second normalized data of each target power consumption data obtained by the first screening rule, and obtain the obtained second normalized data as the first normalized data.
In a possible implementation manner, the server may also directly perform normalization processing on each target power consumption data according to the related description in step 305 to obtain first normalized data, which is not described herein again.
And 311, detecting the first normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data.
Optionally, the artificial intelligence detection algorithm may be preset in the server by a developer, and is used to detect the obtained first normalized data, and determine abnormal power consumption data therein.
For example, the artificial intelligence detection algorithm may be any one of an isolated forest algorithm, a local outlier factor algorithm, a density clustering algorithm, and the like.
Optionally, taking the isolated forest algorithm as an example, for example, the server may randomly select a fifth data dimension in the first normalized data, where the fifth data dimension is any one data dimension included in the first normalized data. The server randomly selects a Value threshold Value according to the fifth data dimension, classifies all the first normalized data according to the fifth data dimension, places the first normalized data in the first data set, wherein the Value corresponding to the fifth data dimension in the first normalized data is smaller than the Value threshold Value, and places the first normalized data in the first normalized data, wherein the Value corresponding to the fifth data dimension in the first normalized data is larger than or equal to the Value threshold Value, in the second data set.
The server may perform recursion on each data dimension included in the first normalized data, and construct a first data set and a second data set corresponding to each data dimension included in the first normalized data until a preset condition is satisfied, thereby forming a random binary tree. Wherein the preset condition may be: only one first normalized data or a plurality of identical first normalized data remains, or the height of the tree reaches a defined height.
The server may calculate a path length from each leaf node to a root node in the random binary tree, thereby determining whether data of a certain dimension of the first normalized data is abnormal power consumption data, and determining the abnormal power consumption data in the obtained target power consumption data.
Optionally, after determining the abnormal power consumption data in each target power consumption data, the server may further determine the first type application as a cause dimension, where the cause dimension is used to describe a cause of the abnormal power consumption data; generating an abnormal power consumption message according to the abnormal power consumption data and the reason dimension; and sending the abnormal power consumption message to a terminal corresponding to the abnormal power consumption data.
For example, in the power consumption data sent by the terminal to the server, the application program corresponding to the first bit of the first N bits is the first-type application program, the first-type application program is the application program with the UID number of 0, and the rest positions are all non-first-type application programs, after the server performs the above steps on the power consumption data of the terminal one, the server finds that the power consumption data of the terminal is abnormal in the step, and the server can determine the cause dimension that the power consumption of the terminal is abnormal when the application program with the UID number of 0 runs.
Referring to fig. 6, an interface diagram of a presentation interface of an abnormal power consumption message according to an exemplary embodiment of the present application is shown. As shown in fig. 6, the terminal interface 600 includes an acquisition cycle 601 and an abnormality cause 602. A user can check the reason that the power consumption of each application program in the terminal is abnormal in different acquisition periods through the interface shown in fig. 6.
In summary, power consumption data sent by each terminal is received, where the power consumption data is data of an application program in which total power consumption of each terminal is first N bits in each application program, the power consumption data is collected by each terminal in one period, each target power consumption data is selected from the power consumption data according to a first screening rule, each target power consumption data is an application program in which the mth bit of each terminal in the power consumption data is a first type application program, application programs in other positions are data of non-first type application programs, and the first type application program is an application program called by other application programs in each terminal; acquiring first normalized data according to the target power consumption data, detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in the target power consumption data. According to the method and the device, the server selects each target power consumption data from the power consumption data of each terminal, normalization processing is carried out on each target power consumption data, abnormal power consumption data are determined by combining an artificial intelligence detection algorithm, detection steps of the power consumption data are reduced, and detection efficiency of the power consumption data is improved.
In addition, the power consumption data are detected by obtaining the abnormal detection threshold value according to the big data principle, the reason dimensionality when the power consumption data are abnormal is also given, and the efficiency of positioning the reason of the abnormal power consumption data is also improved.
In a possible implementation manner, as for the execution result of the step 307, the server may also acquire the fourth data dimension as a cause dimension of the abnormal power consumption data, where the cause dimension is used to describe a cause of the abnormal power consumption data. Namely, the server determines one abnormal power consumption data, and can use a fourth data dimension adopted when the abnormal power consumption data is subjected to normalization processing as a reason dimension, so as to describe the reason of the abnormal power consumption data. For example, for a group of second normalized data obtained by taking the foreground time as the third data dimension and the screen power consumption as the fourth data dimension, the server obtains the abnormal power consumption data according to step 307, and then may take the screen power consumption as the reason of the abnormal power consumption data. That is, when the terminal runs the application program in the foreground, the abnormal condition of the abnormal power consumption data is caused by the abnormal screen power consumption.
In a possible implementation manner, the server may further generate the similar abnormal power consumption message according to the abnormal power consumption data and the reason dimension, and send the abnormal power consumption message to a terminal corresponding to the abnormal power consumption data. For example, the server may generate an abnormal power consumption message according to a preset format, and send the abnormal power consumption message to the client. Alternatively, the preset format may be set in the server in advance. Optionally, a client of the terminal is provided with an abnormal power consumption message reminding function, and after the reminding function is activated by a user, the client can display the abnormal power consumption message in the terminal.
In a possible implementation manner, for the detection process in step 307, the server may further correct the anomaly detection threshold according to the power consumption data of each history cycle; and detecting the received power consumption data sent by each terminal in the next period according to the corrected abnormality detection threshold, wherein the next period is the next period of the current period.
For example, in order to improve the accuracy of the anomaly detection threshold, the server may further use the power consumption data of the previous 5 periods and the power consumption data acquired in the current period as data samples to increase the data volume. And processing the data samples combined in the periods according to the method to obtain an abnormal detection threshold, replacing the abnormal detection threshold obtained according to the power consumption data in the current period according to the method, and then detecting according to the abnormal detection threshold.
Optionally, in order to reduce the calculation amount of the server, the server may use the obtained abnormality detection threshold as the abnormality detection threshold of the power consumption data of the next period. That is, for the next period, after receiving the power consumption data sent by each terminal, the server may compare the power consumption data of each terminal with the abnormality detection threshold to determine the abnormal power consumption data therein. For example, in the embodiment of the present application, in the current cycle, after the server performs step 305 to step 310 on the target power consumption data of the first application program, the anomaly detection threshold a when the screen power consumption is normalized with the foreground time is obtained, then, if there is power consumption data of the first application program in a certain terminal in the next cycle, the server may obtain data after performing normalization and logarithmic transformation processing on the screen power consumption in the power consumption data and the foreground time, directly compare the data with the anomaly detection threshold a, and if the data is greater than the anomaly detection threshold a, determine the data as the anomalous power consumption data.
It should be noted that, in the embodiment of the present application, each target power consumption data may also be classified according to different terminal models, so that the server may perform abnormal power consumption detection on the power consumption data of the terminals of the same model, thereby implementing abnormal power consumption detection on the terminals of the same model.
The following is an example of the power consumption detection method provided in the embodiment of the present application, with interaction between a server and a terminal. Referring to fig. 7, a flowchart of a method for power consumption detection according to an exemplary embodiment of the present application is shown. The method may be used in the application scenario shown in fig. 1, and executed by a server and a terminal in the scenario, as shown in fig. 7, the power consumption detection method may include the following steps.
Step 701, the terminal periodically collects power consumption data of the application program with total power consumption at Top10 in the current period.
That is, the terminal may periodically collect power consumption data of each application program with total power consumption of the first 10 bits in one period.
In step 702, the terminal periodically transmits the collected power consumption data to the server.
Correspondingly, the server receives the power consumption data sent by the terminal. Optionally, the implementation manner in this step may refer to the description in step 301, and is not described herein again.
In step 703, the server detects the non-first type application program and determines whether there is abnormal data.
Optionally, the server may process the power consumption data according to an application name of the application program, the server determines each application program whose occurrence frequency is Top100, the server obtains the corresponding power consumption data according to the application name of each application program and performs normalization processing, the server performs logarithmic change processing on the normalized data, the server determines an abnormal detection threshold according to the logarithmic changed normalized data and a triple standard deviation criterion, and the server obtains the abnormal power consumption data according to the abnormal detection threshold.
And 704, detecting the power consumption data of the terminal by the server through an artificial intelligence detection algorithm.
Step 705, the server generates an abnormal power consumption message.
Step 706, the server sends the abnormal power consumption message to the terminal.
Correspondingly, the terminal receives the power consumption abnormal message sent by the server.
In summary, the server receives power consumption data sent by the terminal, where the power consumption data is data of an application program with total power consumption, which is acquired by the terminal in one period and is arranged at the top N bits in each application program, and the server screens the power consumption data according to a first screening rule, and when the power consumption data passes the screening, the server may detect the power consumption data through an artificial intelligence detection algorithm to determine abnormal power consumption data in the power consumption data. According to the method and the device, the server is combined with the artificial intelligence detection algorithm to determine the abnormal power consumption data, so that the detection steps of the power consumption data are reduced, and the detection efficiency of the power consumption data is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 8, a block diagram of a power consumption detection apparatus according to an exemplary embodiment of the present application is shown. The power consumption detection device can be used in a server to execute all or part of the steps executed by the server in the method provided by the embodiment shown in fig. 2, fig. 3 or fig. 7.
The power consumption detection apparatus may include:
a data receiving module 801, configured to receive power consumption data sent by each terminal, where the power consumption data is data of an application program in which total power consumption collected by each terminal in one period is ranked at the top N bits in each application program, where N is an integer greater than or equal to 2;
a first data selection module 802, configured to select, according to a first filtering rule, each target power consumption data from the power consumption data, where each target power consumption data is data in which an M-th application of each terminal in the power consumption data is a first type application, and applications in other positions are non-first type applications, where the M-th bit is any one of the first N bits, and the first type application is an application called by another application in each terminal;
a first data obtaining module 803, configured to obtain first normalized data according to each target power consumption data, where the first normalized data is normalized data of each target power consumption data, the first normalized data is obtained by normalizing a second data dimension of each target power consumption data according to a first data dimension of each target power consumption data, the first data dimension is any one data dimension included in each target power consumption data, and the second data dimension is another data dimension included in each target power consumption data;
A first data determining module 804, configured to detect the first normalized data through an artificial intelligence detection algorithm, and determine abnormal power consumption data in each target power consumption data.
In summary, power consumption data sent by each terminal is received, the power consumption data is data of an application program, in which the total power consumption of each terminal is first N bits in the respective application program, acquired in one period by each terminal, and each target power consumption data is selected from the power consumption data according to a first screening rule, each target power consumption data is an application program, in which the mth bit of each terminal in the power consumption data is a first type of application program, and application programs in other positions are data of non-first type of application programs, and the first type of application program is an application program called by other application programs in each terminal; acquiring first normalized data according to each target power consumption data, detecting the normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data. According to the power consumption data detection method and device, the server selects each target power consumption data from the power consumption data of each terminal, normalization processing is carried out on each target power consumption data, abnormal power consumption data are determined by combining an artificial intelligence detection algorithm, detection steps of the power consumption data are reduced, and detection efficiency of the power consumption data is improved.
Optionally, each target power consumption data includes a foreground time, the first data dimension is the foreground time, and the foreground time is used to indicate a time for foreground operation of each application program of each terminal in each terminal.
Optionally, the first type application is an application that does not have a foreground display interface in each terminal, and the method further includes:
and the replacing module is used for replacing the foreground time of the first type application program in each target power consumption data with preset time.
Optionally, the apparatus further comprises:
a second data obtaining module, configured to obtain, according to an application name of a first application program, each first power consumption data before the first data selecting module 802 selects each target power consumption data from the power consumption data according to a first filtering rule, where each first power consumption data is used to describe a power consumption situation of each terminal when the first application program runs in each terminal;
a third data obtaining module, configured to obtain second normalized data according to each piece of the first power consumption data, where the second normalized data is normalized data of each piece of the first power consumption data, the second normalized data is obtained by normalizing a fourth data dimension of each piece of the first power consumption data according to a third data dimension of each piece of the first power consumption data, the third data dimension is any one data dimension included in each piece of the first power consumption data, and the fourth data dimension is another data dimension included in each piece of the first power consumption data;
A threshold value obtaining module, configured to obtain an anomaly detection threshold value according to the second normalized data and a standard deviation criterion;
and the second data determining module is used for determining the data which is greater than the abnormal detection threshold value in the normalized data as the abnormal power consumption data in each first power consumption data.
Optionally, the apparatus further comprises:
the second data selection module is used for selecting each second power consumption data from the power consumption data according to a second screening rule, wherein each second power consumption data is the power consumption data which has no abnormity in the data of the application program of the front N bits of each terminal in the power consumption data;
the first data selecting module 802 is configured to select each target power consumption data from each second power consumption data according to the first filtering rule.
Optionally, each of the first power consumption data includes a foreground time, the third data dimension is the foreground time, the foreground time is used to indicate a time for foreground operation of the first application in each terminal, and the first data obtaining module 803 is configured to obtain, according to each of the target power consumption data, second normalized data corresponding to each of the target power consumption data, and obtain the second normalized data corresponding to each of the target power consumption data as the first normalized data.
Optionally, the apparatus further comprises:
the dimension determining module is used for determining the first type application program as a reason dimension after abnormal power consumption data in each target power consumption data is determined, and the reason dimension is used for describing reasons of the abnormal power consumption data;
the message generation module is used for generating an abnormal power consumption message according to the abnormal power consumption data and the reason dimension;
and the message sending module is used for sending the abnormal power consumption message to a terminal corresponding to the abnormal power consumption data.
Optionally, the first type application is an application in which the user identity UID of each terminal is 0 or 1000.
Fig. 9 is a schematic structural diagram of a server according to an exemplary embodiment of the present application. As shown in fig. 9, the server 900 includes a Central Processing Unit (CPU) 901, a system Memory 904 including a Random Access Memory (RAM) 902 and a Read Only Memory (ROM) 903, and a system bus 905 connecting the system Memory 904 and the CPU 901. The computer device 900 also includes a basic Input/Output System (I/O System) 906 for facilitating information transfer between devices within the computer, and a mass storage device 907 for storing an operating System 912, application programs 913, and other program modules 914.
The basic input/output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse, keyboard, etc. for a user to input information. Wherein the display 908 and the input device 909 are connected to the central processing unit 901 through an input-output controller 910 connected to the system bus 905. The basic input/output system 906 may also include an input/output controller 910 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, an input-output controller 910 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM (Compact disk Read-Only Memory) drive.
The computer readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other solid state Memory technology, CD-ROM, DVD (Digital Video Disc) or other optical, magnetic, tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
The computer device 900 may connect to the internet or other network devices through a network interface unit 911 connected to the system bus 905.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 901 implements all or part of the steps executed by the server in the methods provided by the above embodiments of the present application by executing the one or more programs.
The present embodiments also provide a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the power consumption detection method according to the above embodiments.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the power consumption detection method according to the above embodiments.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (11)

1. A method for power consumption detection, the method being performed by a server, the method comprising:
receiving power consumption data sent by each terminal, wherein the power consumption data is data of application programs with the total power consumption ranked at the top N bits in each application program, which are acquired by each terminal in one period, and N is an integer greater than or equal to 2;
according to a first screening rule, selecting each target power consumption data from the power consumption data, wherein each target power consumption data is data of an application program with an M-th bit of each terminal in the power consumption data, the application program with the M-th bit is a first type application program, and the application programs with other positions are non-first type application programs, the M-th bit is any one position in the first N bits, and the first type application program is an application program called by other application programs in each terminal;
acquiring first normalized data according to each target power consumption data, wherein the first normalized data is normalized data of each target power consumption data, the first normalized data is obtained by normalizing a second data dimension of each target power consumption data according to a first data dimension of each target power consumption data, the first data dimension is any one data dimension contained in each target power consumption data, and the second data dimension is another data dimension contained in each target power consumption data;
And detecting the first normalized data through an artificial intelligence detection algorithm, and determining abnormal power consumption data in each target power consumption data.
2. The method according to claim 1, wherein each target power consumption data includes a foreground time, and the first data dimension is the foreground time, and the foreground time is used to indicate a time for foreground running of the respective application program of each terminal in each terminal.
3. The method of claim 2, wherein the first type of application is an application in the respective terminal that does not have a foreground display interface, the method further comprising:
and replacing the foreground time of the first type of application program in each target power consumption data with preset time.
4. The method of claim 1, further comprising, prior to the selecting respective target power consumption data from the power consumption data according to the first filtering rule:
acquiring each first power consumption data according to an application name of a first application program, wherein each first power consumption data is used for describing the power consumption condition of each terminal when the first application program runs in each terminal;
Acquiring second normalized data according to each piece of first power consumption data, wherein the second normalized data is normalized data of each piece of first power consumption data, the second normalized data is obtained by normalizing a fourth data dimension of each piece of first power consumption data according to a third data dimension of each piece of first power consumption data, the third data dimension is any one data dimension contained in each piece of first power consumption data, and the fourth data dimension is another data dimension contained in each piece of first power consumption data;
acquiring an anomaly detection threshold according to the second normalized data and a standard deviation criterion;
and determining the data which is larger than the abnormal detection threshold value in the second normalized data as the abnormal power consumption data in each first power consumption data.
5. The method of claim 4, further comprising:
according to a second screening rule, selecting each second power consumption data from the power consumption data, wherein each second power consumption data is power consumption data without abnormality in the data of the application program of the previous N bits of each terminal in the power consumption data;
Selecting each target power consumption data from the power consumption data according to a first screening rule, wherein the selecting comprises the following steps:
and selecting each target power consumption data from each second power consumption data according to the first screening rule.
6. The method according to claim 4, wherein each of the first power consumption data includes a foreground time, the third data dimension is the foreground time, the foreground time is used to indicate a time for foreground operation of the first application in each of the terminals, and the obtaining of the first normalized data according to each of the target power consumption data includes:
and acquiring second normalized data corresponding to each target power consumption data according to each target power consumption data, and acquiring the second normalized data corresponding to each target power consumption data as the first normalized data.
7. The method of claim 1, further comprising:
determining the first type application program as a reason dimension after determining abnormal power consumption data in each target power consumption data, wherein the reason dimension is used for describing reasons of the abnormal power consumption data;
Generating an abnormal power consumption message according to the abnormal power consumption data and the reason dimension;
and sending the abnormal power consumption message to a terminal corresponding to the abnormal power consumption data.
8. Method according to any of claims 1 to 7, characterized in that said first type of application is an application of a user identity UID of 0 or 1000 in said respective terminal.
9. A power consumption detection apparatus, wherein the apparatus is used in a server, the apparatus comprising:
the data receiving module is used for receiving power consumption data sent by each terminal, wherein the power consumption data are acquired by each terminal in one period and are data of application programs with the total power consumption in the first N bits in each application program, and N is an integer greater than or equal to 2;
a first data selection module, configured to select, according to a first filtering rule, each target power consumption data from the power consumption data, where each target power consumption data is data in which an mth-bit application of each terminal in the power consumption data is a first-type application, and applications in other positions are non-first-type applications, where the mth bit is any one of the first N bits, and the first-type application is an application invoked by another application in each terminal;
A first data obtaining module, configured to obtain first normalized data according to each target power consumption data, where the first normalized data is normalized data of each target power consumption data, the first normalized data is obtained by normalizing, according to a first data dimension of each target power consumption data, a second data dimension of each target power consumption data, the first data dimension is any one data dimension included in each target power consumption data, and the second data dimension is another data dimension included in each target power consumption data;
and the first data determining module is used for detecting the first normalized data through an artificial intelligence detection algorithm and determining abnormal power consumption data in each target power consumption data.
10. An electronic device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the power consumption detection method according to any one of claims 1 to 8.
11. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the power consumption detection method according to any one of claims 1 to 8.
CN201911382911.4A 2019-12-27 2019-12-27 Power consumption detection method and device, electronic equipment and storage medium Active CN113051128B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911382911.4A CN113051128B (en) 2019-12-27 2019-12-27 Power consumption detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911382911.4A CN113051128B (en) 2019-12-27 2019-12-27 Power consumption detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113051128A CN113051128A (en) 2021-06-29
CN113051128B true CN113051128B (en) 2022-06-28

Family

ID=76507388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911382911.4A Active CN113051128B (en) 2019-12-27 2019-12-27 Power consumption detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113051128B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516806B (en) * 2014-12-26 2017-12-08 北京奇虎科技有限公司 The testing result methods of exhibiting and system of the power consumption information of mobile terminal
US10281973B2 (en) * 2016-06-02 2019-05-07 Apple Inc. Application power usage
CN109302735A (en) * 2017-07-24 2019-02-01 中兴通讯股份有限公司 A kind of method and mobile terminal controlling power consumption
CN107463437B (en) * 2017-07-31 2020-01-31 Oppo广东移动通信有限公司 Application control method and device, storage medium and electronic equipment
CN108958932A (en) * 2018-06-27 2018-12-07 努比亚技术有限公司 A kind of control method of background application, terminal and computer readable storage medium
CN109858548B (en) * 2019-01-29 2023-04-18 Oppo广东移动通信有限公司 Method and device for judging abnormal power consumption, storage medium and communication terminal
CN110209260B (en) * 2019-04-26 2024-02-23 平安科技(深圳)有限公司 Power consumption abnormality detection method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN113051128A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
US10565525B2 (en) Collaborative filtering method, apparatus, server and storage medium in combination with time factor
CN109460432B (en) Data processing method and system
US20210035126A1 (en) Data processing method, system and computer device based on electronic payment behaviors
CN111698303A (en) Data processing method and device, electronic equipment and storage medium
WO2019061664A1 (en) Electronic device, user's internet surfing data-based product recommendation method, and storage medium
CN111581258A (en) Safety data analysis method, device, system, equipment and storage medium
CN114265740A (en) Error information processing method, device, equipment and storage medium
CN110825466B (en) Program jamming processing method and jamming processing device
CN110602207A (en) Method, device, server and storage medium for predicting push information based on off-network
CN113051127B (en) Abnormal power consumption detection method and device, electronic equipment and storage medium
CN115952398B (en) Traditional calculation method, system and storage medium based on data of Internet of things
CN113051128B (en) Power consumption detection method and device, electronic equipment and storage medium
CN108961071B (en) Method for automatically predicting combined service income and terminal equipment
CN113780666B (en) Missing value prediction method and device and readable storage medium
CN108429632B (en) Service monitoring method and device
CN111565311B (en) Network traffic characteristic generation method and device
CN109947803B (en) Data processing method, system and storage medium
CN113836130A (en) Data quality evaluation method, device, equipment and storage medium
CN115358772A (en) Transaction risk prediction method and device, storage medium and computer equipment
CN113961565A (en) Data detection method, system, computer system and readable storage medium
CN110222779B (en) Distributed data processing method and system
CN109922359B (en) User processing method, device, equipment and storage medium
CN110909262B (en) Method and device for determining companion relationship of identity information
CN111918323B (en) Data calibration method, device, equipment and storage medium
CN118363811A (en) System running state monitoring method and device, computer equipment and storage medium

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