CN108255673B - Method and device for detecting resource occupied by application program and storage medium - Google Patents

Method and device for detecting resource occupied by application program and storage medium Download PDF

Info

Publication number
CN108255673B
CN108255673B CN201711479824.1A CN201711479824A CN108255673B CN 108255673 B CN108255673 B CN 108255673B CN 201711479824 A CN201711479824 A CN 201711479824A CN 108255673 B CN108255673 B CN 108255673B
Authority
CN
China
Prior art keywords
resource
determining
application program
range
occupation
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
CN201711479824.1A
Other languages
Chinese (zh)
Other versions
CN108255673A (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201711479824.1A priority Critical patent/CN108255673B/en
Publication of CN108255673A publication Critical patent/CN108255673A/en
Application granted granted Critical
Publication of CN108255673B publication Critical patent/CN108255673B/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/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/503Resource availability

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a method, a device and a storage medium for detecting resource occupation of an application program, wherein the method comprises the following steps: determining an application program to be detected from target application programs operated by a terminal; acquiring a plurality of occupation values of the application program to be detected on target system resources according to a preset period in a preset time period; determining a plurality of first preset division ranges of the application program to be detected, and determining a division range in which each occupancy value is located from the plurality of first preset division ranges; and acquiring the number of the occupied values in each first preset division range, and determining the resource occupation state of the application program to be detected on the target system resource in the preset time period according to the number.

Description

Method and device for detecting resource occupied by application program and storage medium
Technical Field
The present disclosure relates to the field of machine learning, and in particular, to a method and an apparatus for detecting resource occupation by an application program, and a storage medium.
Background
The CPU resource, the memory resource, the disk io resource, the network io resource, and the like are important system resources of the terminal and are a basis for ensuring normal operation of the application program, and therefore, when at least one system resource is exhausted, an operation failure may occur in the operating application program.
At present, a system resource monitoring tool (such as a top, etc.) may monitor a system resource to obtain an occupation situation of the system resource, where a system resource occupation value of an application program at a certain time may be obtained, and determine whether the system resource occupation value of the application program is greater than or equal to a preset threshold, when determining that the system resource occupation value of the application program is greater than or equal to the preset threshold, determine that a resource occupation state of the application program is an abnormal state, and when determining that the system resource occupation value of the application program is less than the preset threshold, determine that the resource occupation state of the application program is a normal state, where the system resource occupation value of the abnormal state is greater than the system resource occupation value of the normal state, but since the system resource occupation values of some application programs are always greater, it is possible that the system resource occupation values of some application programs are always greater than or equal to the preset threshold, thereby causing inaccurate judgment of the resource occupation state.
Disclosure of Invention
In order to solve the above problem, the present disclosure provides a method and an apparatus for detecting resource occupation by an application program, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, a method for detecting resource occupation by an application program is provided, including:
determining an application program to be detected from target application programs operated by a terminal;
acquiring a plurality of occupation values of the application program to be detected on target system resources according to a preset period in a preset time period;
determining a plurality of first preset division ranges of the application program to be detected, and determining a division range in which each occupancy value is located from the plurality of first preset division ranges; the first preset division range is a division range corresponding to the target system resource occupation of the application program to be detected;
and acquiring the number of the occupied values in each first preset division range, and determining the resource occupation state of the application program to be detected on the target system resource in the preset time period according to the number.
Optionally, the resource occupation status includes a normal status and an abnormal status, and the determining, according to the number, the resource occupation status of the to-be-detected application program on the target system resource within the preset time period includes:
determining the first preset division range with the largest number as a first numerical range;
determining a second numerical range from the first preset division range, wherein the minimum value of the second numerical range is larger than the maximum value of the first numerical range;
when the occupation value exists in the second numerical value range, determining that the resource occupation state is an abnormal state;
and when the occupation value does not exist in the second value range, determining that the resource occupation state is a normal state.
Optionally, after determining that the resource occupation state is an abnormal state, the method further includes:
acquiring a resource occupation model;
obtaining a first system resource expected value corresponding to the first numerical range and a second system resource expected value corresponding to the second numerical range through the resource occupation model;
and calculating a resource occupation evaluation parameter according to the first system resource expected value and the second system resource expected value.
Optionally, the obtaining the resource occupancy model includes:
determining a target application program running in the terminal and occupied system resources occupied by the target application program in the preset time period; the occupied system resource comprises the target system resource;
establishing a resource occupation network according to the target application program and the occupied system resources;
and obtaining the resource occupation model through a Bayesian network algorithm according to the resource occupation network, the first preset division range and a second preset division range, wherein the second preset division range is a division range corresponding to the occupied system resource.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for detecting resource occupation by an application, including:
the first determining module is used for determining the application program to be detected from the target application program operated by the terminal;
the first acquisition module is used for acquiring a plurality of occupation values of the application program to be detected on the target system resource according to a preset period in a preset time period;
the second determining module is used for determining a plurality of first preset division ranges of the application program to be detected and determining the division range in which each occupancy value is located from the plurality of first preset division ranges; the first preset division range is a division range corresponding to the target system resource occupation of the application program to be detected;
the second acquisition module is used for acquiring the number of the occupied values in each first preset division range;
and the third determining module is used for determining the resource occupation state of the target system resource by the application program to be detected in the preset time period according to the quantity.
Optionally, the resource occupation state includes a normal state and an abnormal state, and the third determining module includes:
the first determining submodule is used for determining the first preset division range with the largest number as a first numerical value range;
the second determining submodule is used for determining a second numerical range from the first preset dividing range, and the minimum value of the second numerical range is larger than the maximum value of the first numerical range;
a third determining submodule, configured to determine that the resource occupation state is an abnormal state when it is determined that the occupation value exists in the second value range;
and the fourth determining submodule is used for determining that the resource occupation state is a normal state when the occupation value does not exist in the second numerical value range.
Optionally, the method further comprises:
the third acquisition module is used for acquiring a resource occupation model;
a fourth obtaining module, configured to obtain, through the resource occupancy model, a first system resource expected value corresponding to the first numerical range and a second system resource expected value corresponding to the second numerical range;
and the calculation module is used for calculating a resource occupation evaluation parameter according to the first system resource expected value and the second system resource expected value.
Optionally, the third obtaining module is configured to determine, within the preset time period, a target application running in the terminal and occupied system resources occupied by the target application; the occupied system resource comprises the target system resource;
establishing a resource occupation network according to the target application program and the occupied system resources;
and obtaining the resource occupation model through a Bayesian network algorithm according to the resource occupation network, the first preset division range and a second preset division range, wherein the second preset division range is a division range corresponding to the occupied system resource.
According to a third aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect described above.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for detecting resource occupation by an application, including: the computer-readable storage medium recited in the third aspect above; and one or more processors for executing the program in the computer-readable storage medium.
According to the technical scheme, the application program to be detected is determined from the target application programs operated by the terminal; acquiring a plurality of occupation values of the application program to be detected on target system resources according to a preset period in a preset time period; determining a plurality of first preset division ranges corresponding to the application program to be detected, and determining a division range in which each occupancy value is located from the plurality of first preset division ranges; the first preset division range is a division range corresponding to the target system resource occupation of the application program to be detected; and acquiring the number of the occupation values in each first preset division range, and determining the resource occupation state of the to-be-detected application program on the target system resource in the preset time period according to the number, so that the resource occupation state of the to-be-detected application program is determined by counting a plurality of occupation values of the to-be-detected application program on the target system resource in the preset time period and based on the number of the occupation values in the first preset division range, thereby improving the accuracy of determining the resource occupation state of the to-be-detected application program.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a flowchart illustrating a method for detecting resource occupation by an application according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating another method for detecting resource occupation by an application according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a resource-occupied network, shown in an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another resource-occupying network shown in an exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram of an apparatus for detecting resource occupation by a first application according to an exemplary embodiment of the disclosure;
FIG. 6 is a block diagram of an apparatus for detecting resource occupation by a second application according to an exemplary embodiment of the disclosure;
fig. 7 is a block diagram of an apparatus for detecting resource occupation by a third application according to an exemplary embodiment of the disclosure;
fig. 8 is a block diagram of an apparatus for detecting resource occupation by a fourth application according to an exemplary embodiment of the disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
The method and the device can acquire a plurality of occupation values of the application program to be detected to the target system resource according to a preset period in a preset time period, and determine the division range where each occupation value is located from a plurality of first preset division ranges, so that the resource occupation state of the application program to be detected to the target system resource in the preset time period can be determined according to the number of the occupation values in each first preset division range, and thus, the resource occupation state of the application program to be detected is determined by counting the plurality of occupation values of the application program to be detected to the target system resource in the preset time period and based on the number of the occupation values in the first preset division ranges, and the accuracy of determining the resource occupation state of the application program to be detected is improved.
The present disclosure is described in detail below with reference to specific examples.
Fig. 1 is a flowchart illustrating a method for detecting resource occupation by an application according to an exemplary embodiment of the present disclosure, as shown in fig. 1, the method includes:
s101, determining an application program to be detected from target application programs operated by the terminal.
The application to be detected may be, for example, a java application, a main application, a sshd application, a top application, a khugepaged application, or a metricbeat application, and the above examples are only illustrative and the disclosure is not limited thereto.
S102, acquiring a plurality of occupation values of the application program to be detected on the target system resource according to a preset period in a preset time period.
The target system resource may be a CPU resource, a memory resource, a disk io resource, or a network io resource, and the like, and the above examples are merely illustrative, and the disclosure does not limit this.
S103, determining a plurality of first preset division ranges of the application program to be detected, and determining the division range of each occupancy value from the plurality of first preset division ranges.
In this step, the first preset partition range is a preset partition range, that is, a partition range corresponding to the target system resource occupied by the application to be detected.
S104, acquiring the number of the occupied values in each first preset division range, and determining the resource occupation state of the application program to be detected on the target system resource in the preset time period according to the number.
The resource occupation state may include a normal state and an abnormal state, the abnormal state may be a state in which the application program to be detected is in a high load, and the normal state may be a state in which the application program to be detected is in a normal load.
By adopting the method, the resource occupation state of the application program to be detected is determined by counting a plurality of occupation values of the application program to be detected to the target system resource in the preset time period and based on the number of the occupation values in the first preset division range, so that the accuracy of determining the resource occupation state of the application program to be detected is improved.
Fig. 2 is a flowchart illustrating a method for detecting resource occupation by an application according to an exemplary embodiment of the present disclosure, as shown in fig. 2, the method includes:
s201, determining an application program to be detected from application programs operated by the terminal.
The application to be detected may be, for example, a java application, a main application, a sshd application, a top application, a khugepaged application, or a metricbeat application, and the above examples are only illustrative and the disclosure is not limited thereto.
S202, acquiring a plurality of occupation values of the application program to be detected on the target system resource according to a preset period in a preset time period.
The preset time period may be a preset time period, for example, the preset time period may be 100 hours obtained from the current time, and the target system resource may be a CPU resource, a memory resource, a disk io resource, a network io resource, or the like.
S203, determining a plurality of first preset division ranges corresponding to the application programmer to be detected, and determining the division range of each occupancy value from the plurality of first preset division ranges.
In this step, the first preset partition range is a preset partition range, that is, a partition range corresponding to the target system resource occupied by the application program to be detected, for example, the occupation range of the application program to be detected for the target system resource may be [0,1], where "0" represents that the occupation value of the application program to be detected for the target system resource is 0%, and "1" represents that the occupation value of the application program to be detected for the target system resource is 100%, at this time, the occupation range may be divided into a plurality of first preset partition ranges of the application program to be detected, for example, the occupation range [0,1] is divided into [0, 0.1 ], [0.1, 0.2 ], [0.2, 1], so as to determine the partition range where each occupation value is located from the three first preset partition ranges.
And S204, acquiring the number of the occupied values in each first preset division range.
S205, determining the first preset dividing range with the largest number as a first numerical range.
And S206, determining a second numerical value range from the first preset division range.
The minimum value of the second numerical range is greater than the maximum value of the first numerical range, and the example in step S203 is continued to be taken as an example, where if the first preset division ranges are [0, 0.1), [0.1, 0.2), [0.2, 1], when the number of occupied values in [0.1, 0.2) is determined to be the maximum, then [0.1, 0.2) is the first numerical range, at this time, the second numerical range may be determined to be [0.2, 1], and the above example is only an example, and the disclosure does not limit this.
And S207, determining whether the occupancy value exists in the second value range.
Upon determining that the occupancy value exists within the second range of values, performing step S208 and steps S210 to S212;
upon determining that the occupancy value does not exist within the second range of values, step S209 is performed.
And S208, determining that the resource occupation state of the target system resource by the application program to be detected in the preset time period is an abnormal state.
The abnormal state may be a state in which the application to be detected is under a high load.
S209, determining that the resource occupation state of the target system resource by the application program to be detected in the preset time period is a normal state.
In this step, the normal state may be a state in which the application to be detected is in a normal load.
And S210, acquiring a resource occupation model.
In this step, the resource occupancy model may be constructed by:
and S11, determining the target application program running in the terminal and occupied system resources occupied by the target application program in a preset time period.
In this disclosure, the target application is an application used by the user within the preset time period, and the occupied system resource includes the target system resource. The target application may be a java application, a main application, an sshd application, a top application, a khugepaged application, a metricbeat application, and the like, and the occupied system resources occupied by the target application may include CPU resources, memory resources, a system load, and the like.
And S12, establishing a resource occupation network according to the target application program and the occupied system resource.
In this step, if the occupied system resource includes a plurality of system resources, the resource occupied network may be a two-layer network including the plurality of system resources and the target application, as shown in fig. 3, if the target application includes java application, main application, sshd application, the plurality of system resources comprise CPU resources and memory resources, the java application program occupies the CPU resources and the memory resources, the main application program occupies the CPU resources, the sshd application program occupies the CPU resources and the memory resources, the java application, the main application, and the sshd application may be used as a first layer of the resource-occupying network, and the CPU resource and the memory resource may be used as a second layer of the resource-occupying network, and establishing a connection relation between the target application program and occupied system resources occupied by the target application program so as to establish and complete the resource occupation network.
If the occupied system resources include a total load and a plurality of system resources, the resource occupation network may be a three-tier network including the plurality of system resources, the target application program and the total load, as shown in fig. 4, if the target application program includes a java application program, a main application program, and a sshd application program, the plurality of system resources include CPU resources and memory resources, and the java application program occupies CPU resources and memory resources, the main application program occupies CPU resources, and the sshd application program occupies CPU resources and memory resources, the java application program, the main application program, and the sshd application program may be used as a first tier of the resource occupation network, the CPU resources and the memory resources are used as a second tier of the resource occupation network, and the total load is used as a third tier of the resource occupation network, and a connection relationship between the target application program and the plurality of system resources occupied by the target application program is established, and establishing a connection relationship between the plurality of system resources and the total load so as to construct and complete the resource occupation network, where the above examples are merely illustrative, and the disclosure is not limited thereto.
And S13, obtaining the resource occupation model through a Bayesian network algorithm according to the resource occupation network, the first preset division range and the second preset division range.
If the resource-occupied network is a two-layer network constructed in step S12, the first preset partition range is a partition range corresponding to the occupation of the target system resources by each target application, and the second preset partition range is a partition range corresponding to the occupation of the resources of the plurality of system resources, so that the plurality of occupation values can be input into the two-layer resource-occupied network and trained through the bayesian network algorithm to obtain the resource occupation model; if the resource occupation network is a three-layer network constructed in step S12, the first preset partition range is a partition range corresponding to the occupation of the target system resource by each target application, and the second preset partition range is a partition range corresponding to a plurality of system resources and a partition range of the total load, so that the plurality of occupation values are input into the resource occupation network and trained through the bayesian network algorithm to obtain the resource occupation model.
S211, obtaining a first system resource expected value corresponding to the first numerical range and a second system resource expected value corresponding to the second numerical range through the resource occupation model.
In this step, a first probability that the application program to be detected performs resource consumption in a first numerical range and a second probability that the application program to be detected performs resource consumption in a second numerical range may be obtained according to the constructed resource occupation model, and a first identification parameter corresponding to the first numerical range and a second identification parameter corresponding to the second numerical range are preset, so that a product of the first probability and the first identification parameter may be calculated to obtain a first system resource expected value, and a product of the second probability and the second identification parameter may be calculated to obtain a second system resource expected value, it should be noted that, if a plurality of second numerical ranges are determined to exist in S206, the second system resource expected values corresponding to the plurality of second numerical ranges need to be calculated in this step.
S212, calculating a resource occupation evaluation parameter according to the first system resource expected value and the second system resource expected value.
In this step, the calculation formula of the resource occupation evaluation parameter may be:
Figure BDA0001533554680000111
wherein E is1Indicating a first system resource expected value, EiAnd the expected value of the second system resource corresponding to the ith second value range is represented, n represents the total quantity of the second value ranges, and y is a resource occupation evaluation parameter.
After the resource occupation evaluation parameter is obtained, the abnormal level corresponding to the resource occupation evaluation parameter can be determined according to the abnormal level range divided in advance, so that the application program can be correspondingly processed according to the abnormal level.
By adopting the method, the resource occupation state of the application program to be detected is determined by counting a plurality of occupation values of the application program to be detected to the target system resource in the preset time period and based on the number of the occupation values in the first preset division range, so that the accuracy of determining the resource occupation state of the application program to be detected is improved.
Fig. 5 is a block diagram of an apparatus for detecting resource occupation by an application according to an exemplary embodiment of the present disclosure, as shown in fig. 5, including:
a first determining module 501, configured to determine an application to be detected from target applications run by a terminal;
a first obtaining module 502, configured to obtain, according to a preset period, multiple occupation values of the to-be-detected application program for a target system resource within a preset time period;
a second determining module 503, configured to determine a plurality of first preset partition ranges of the application to be detected, and determine a partition range in which each of the occupancy values is located from the plurality of first preset partition ranges; the first preset division range is a division range corresponding to the target system resource occupation of the application program to be detected;
a second obtaining module 504, configured to obtain the number of occupancy values in each first preset partition range;
a third determining module 505, configured to determine, according to the number, a resource occupation state of the target system resource by the application to be detected in the preset time period.
Fig. 6 is a block diagram of an apparatus for detecting resource occupation by an application according to an exemplary embodiment of the present disclosure, as shown in fig. 6, where the resource occupation state includes a normal state and an abnormal state, and the third determining module 505 includes:
a first determining submodule 5051, configured to determine that the first preset division range with the largest number is a first numerical range;
a second determining submodule 5052, configured to determine a second value range from the first preset dividing range, where a minimum value of the second value range is greater than a maximum value of the first value range;
a third determining submodule 5053, configured to determine that the resource occupation state is an abnormal state when it is determined that the occupation value exists in the second value range;
a fourth determining sub-module 5054, configured to determine that the resource occupation status is a normal status when it is determined that the occupation value does not exist in the second value range.
Fig. 7 is a block diagram of an apparatus for detecting resource occupation by an application according to an exemplary embodiment of the disclosure, as shown in fig. 7, further including:
a third obtaining module 506, configured to obtain a resource occupancy model;
a fourth obtaining module 507, configured to obtain, through the resource occupancy model, a first system resource expected value corresponding to the first numerical range and a second system resource expected value corresponding to the second numerical range;
a calculating module 508, configured to calculate a resource occupation evaluation parameter according to the first system resource expected value and the second system resource expected value.
Optionally, the third obtaining module 506 is configured to determine, in the preset time period, a target application running in the terminal and occupied system resources occupied by the target application; the occupied system resource comprises the target system resource;
establishing a resource occupation network according to the target application program and the occupied system resources;
and obtaining the resource occupation model through a Bayesian network algorithm according to the resource occupation network, the first preset division range and a second preset division range, wherein the second preset division range is a division range corresponding to the occupied system resource.
By adopting the device, the resource occupation state of the application program to be detected is determined by counting a plurality of occupation values of the application program to be detected to the target system resource in the preset time period and based on the number of the occupation values in the first preset division range, so that the accuracy of determining the resource occupation state of the application program to be detected is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a block diagram illustrating an apparatus 800 for detecting resource occupation by an application according to an exemplary embodiment of the disclosure. As shown in fig. 8, the apparatus 800 for detecting resource occupation by an application may include: a processor 801, a memory 802, a multimedia component 803, an input/output (I/O) interface 804, and a communications component 805.
The processor 801 is configured to control the overall operation of the apparatus 800 for detecting resource occupation by an application program, so as to complete all or part of the steps in the method for detecting resource occupation by an application program. The memory 802 is used to store various types of data to support the operation of the device 800 for detecting the occupation of resources by the application, and the data may include, for example, instructions for any application or method operating on the device 800 for detecting the occupation of resources by the application, and application-related data. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for performing wired or wireless communication between the apparatus for detecting resource occupation 800 of the application program and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the Device 800 for detecting resource usage of an Application program may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, and is used to perform the method for detecting resource usage of an Application program.
In another exemplary embodiment, a computer readable storage medium, such as a memory 802, comprising program instructions, which are executable by a processor 801 of an apparatus 800 for detecting occupation of resources by an application program to perform the method for detecting occupation of resources by an application program as described above is also provided.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (6)

1. A method for detecting resource occupation of an application program is characterized by comprising the following steps:
determining an application program to be detected from target application programs operated by a terminal;
acquiring a plurality of occupation values of the application program to be detected on target system resources according to a preset period in a preset time period;
determining a plurality of first preset division ranges of the application program to be detected, and determining a division range in which each occupancy value is located from the plurality of first preset division ranges; the first preset division range is a division range corresponding to the target system resource occupation of the application program to be detected;
acquiring the number of the occupied values in each first preset division range, and determining the resource occupation state of the application program to be detected on the target system resource in the preset time period according to the number;
the resource occupation states include a normal state and an abnormal state, and the determining the resource occupation state of the to-be-detected application program on the target system resource within the preset time period according to the quantity includes:
determining the first preset division range with the largest number as a first numerical range;
determining a second numerical range from the first preset division range, wherein the minimum value of the second numerical range is larger than the maximum value of the first numerical range;
if the resource occupation state is determined to be an abnormal state, the method further comprises the following steps:
acquiring a resource occupation model;
obtaining a first system resource expected value corresponding to the first numerical range and a second system resource expected value corresponding to the second numerical range through the resource occupation model;
calculating a resource occupation evaluation parameter according to the first system resource expected value and the second system resource expected value;
the acquiring of the resource occupation model comprises:
determining a target application program running in the terminal and occupied system resources occupied by the target application program in the preset time period; the occupied system resource comprises the target system resource;
establishing a resource occupation network according to the target application program and the occupied system resources;
and obtaining the resource occupation model through a Bayesian network algorithm according to the resource occupation network, the first preset division range and a second preset division range, wherein the second preset division range is a division range corresponding to the occupied system resource.
2. The method according to claim 1, wherein the determining, according to the number, a resource occupation state of the target system resource by the application to be detected in the preset time period further comprises:
when the occupation value exists in the second numerical value range, determining that the resource occupation state is an abnormal state;
and when the occupation value does not exist in the second value range, determining that the resource occupation state is a normal state.
3. An apparatus for detecting resource occupation by an application, comprising:
the first determining module is used for determining the application program to be detected from the target application program operated by the terminal;
the first acquisition module is used for acquiring a plurality of occupation values of the application program to be detected on the target system resource according to a preset period in a preset time period;
the second determining module is used for determining a plurality of first preset division ranges of the application program to be detected and determining the division range in which each occupancy value is located from the plurality of first preset division ranges; the first preset division range is a division range corresponding to the target system resource occupation of the application program to be detected;
the second acquisition module is used for acquiring the number of the occupied values in each first preset division range;
a third determining module, configured to determine, according to the number, a resource occupation state of the target system resource by the application to be detected within the preset time period;
the resource occupation state includes a normal state and an abnormal state, and the third determining module includes:
the first determining submodule is used for determining the first preset division range with the largest number as a first numerical value range;
the second determining submodule is used for determining a second numerical range from the first preset dividing range, and the minimum value of the second numerical range is larger than the maximum value of the first numerical range;
the device further comprises:
the third acquisition module is used for acquiring a resource occupation model;
a fourth obtaining module, configured to obtain, through the resource occupancy model, a first system resource expected value corresponding to the first numerical range and a second system resource expected value corresponding to the second numerical range;
the calculation module is used for calculating a resource occupation evaluation parameter according to the first system resource expected value and the second system resource expected value;
the third obtaining module is configured to determine, within the preset time period, a target application running in the terminal and system resources occupied by the target application; the occupied system resource comprises the target system resource;
establishing a resource occupation network according to the target application program and the occupied system resources;
and obtaining the resource occupation model through a Bayesian network algorithm according to the resource occupation network, the first preset division range and a second preset division range, wherein the second preset division range is a division range corresponding to the occupied system resource.
4. The apparatus of claim 3, wherein the third determining module further comprises:
a third determining submodule, configured to determine that the resource occupation state is an abnormal state when it is determined that the occupation value exists in the second value range;
and the fourth determining submodule is used for determining that the resource occupation state is a normal state when the occupation value does not exist in the second numerical value range.
5. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as claimed in claim 1 or 2.
6. An apparatus for detecting resource occupation by an application, comprising:
the computer-readable storage medium recited in claim 5; and
one or more processors to execute the program in the computer-readable storage medium.
CN201711479824.1A 2017-12-29 2017-12-29 Method and device for detecting resource occupied by application program and storage medium Active CN108255673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711479824.1A CN108255673B (en) 2017-12-29 2017-12-29 Method and device for detecting resource occupied by application program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711479824.1A CN108255673B (en) 2017-12-29 2017-12-29 Method and device for detecting resource occupied by application program and storage medium

Publications (2)

Publication Number Publication Date
CN108255673A CN108255673A (en) 2018-07-06
CN108255673B true CN108255673B (en) 2021-10-15

Family

ID=62724518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711479824.1A Active CN108255673B (en) 2017-12-29 2017-12-29 Method and device for detecting resource occupied by application program and storage medium

Country Status (1)

Country Link
CN (1) CN108255673B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240827B (en) * 2018-08-20 2021-01-15 东软集团股份有限公司 Method and device for determining resource occupation condition of application, storage medium and equipment
CN109408368B (en) * 2018-09-03 2023-06-09 深圳壹账通智能科技有限公司 Test auxiliary information output method, storage medium and server
CN109614282B (en) * 2018-09-28 2022-06-03 东软集团股份有限公司 Method and device for determining system resource use information of application
CN109753405B (en) * 2018-12-05 2022-05-31 东软集团股份有限公司 Application resource consumption detection method and device, storage medium and electronic equipment
CN110457179A (en) * 2019-07-29 2019-11-15 Oppo广东移动通信有限公司 System detecting method, internal memory monitoring method, device, medium and electronic equipment
CN111708633A (en) * 2020-05-28 2020-09-25 北京赛博云睿智能科技有限公司 Dynamic resource adjustment method and system
CN113064832A (en) * 2021-04-22 2021-07-02 中国工商银行股份有限公司 Application program energy consumption detection method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139007A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 Method and system for detecting application server performance
CN103902437A (en) * 2014-03-11 2014-07-02 深圳市同洲电子股份有限公司 Detecting method and server
CN105528052A (en) * 2015-12-09 2016-04-27 上海斐讯数据通信技术有限公司 Electronic equipment power consumption reduction method and device and electronic equipment with display screen
CN106201819A (en) * 2016-06-28 2016-12-07 乐视控股(北京)有限公司 The system resource occupancy monitoring method and apparatus of application container engine
CN106293976A (en) * 2016-08-15 2017-01-04 东软集团股份有限公司 Application performance Risk Forecast Method, device and system
CN106685752A (en) * 2016-06-28 2017-05-17 腾讯科技(深圳)有限公司 Information processing method and terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6548379B2 (en) * 2014-10-23 2019-07-24 キヤノン株式会社 INFORMATION PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND PROGRAM
US10310957B2 (en) * 2016-05-12 2019-06-04 Lenovo Enterprise Solutions (Singapore) Pte. Ltd Indicating an application status based on a device state

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139007A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 Method and system for detecting application server performance
CN103902437A (en) * 2014-03-11 2014-07-02 深圳市同洲电子股份有限公司 Detecting method and server
CN105528052A (en) * 2015-12-09 2016-04-27 上海斐讯数据通信技术有限公司 Electronic equipment power consumption reduction method and device and electronic equipment with display screen
CN106201819A (en) * 2016-06-28 2016-12-07 乐视控股(北京)有限公司 The system resource occupancy monitoring method and apparatus of application container engine
CN106685752A (en) * 2016-06-28 2017-05-17 腾讯科技(深圳)有限公司 Information processing method and terminal
CN106293976A (en) * 2016-08-15 2017-01-04 东软集团股份有限公司 Application performance Risk Forecast Method, device and system

Also Published As

Publication number Publication date
CN108255673A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108255673B (en) Method and device for detecting resource occupied by application program and storage medium
CN107861915B (en) Method and device for acquiring early warning threshold value and storage medium
CN105988836B (en) Application recommendation method and device
CN105279023B (en) A kind of virtual machine migration method and device
JP6380875B2 (en) Detection distance calibration method, apparatus, and device
CN109597798B (en) Network file deleting method and device, computer equipment and storage medium
CN109800858B (en) Application system abnormality detection method and device, readable storage medium and electronic equipment
CN112181919A (en) Compression method, compression system, electronic equipment and storage medium
CN113253878A (en) Touch screen report point determining method and device, electronic equipment and storage medium
CN105005526A (en) Information reminding method and mobile terminal
CN110798230A (en) Run length detection method and device and electronic equipment
CN108563774B (en) GPS data processing method and device
CN108362957B (en) Equipment fault diagnosis method and device, storage medium and electronic equipment
CN112099759A (en) Numerical value processing method, device, processing equipment and computer readable storage medium
CN109274562B (en) Voice instruction execution method and device, intelligent household appliance and medium
CN110908701B (en) Firmware version switching method and device, storage medium and electronic equipment
CN110992387A (en) Image processing method and device, electronic equipment and storage medium
CN105988835B (en) Software upgrading method and terminal
JP2013011987A (en) Abnormal state detection device and abnormal state detection method
CN112217585B (en) Signal path determination method and device, computer equipment and storage medium
CN114969073A (en) Wind control method and device based on block chain
CN113918757A (en) Application recommendation method and device, electronic equipment and storage medium
CN109240827B (en) Method and device for determining resource occupation condition of application, storage medium and equipment
US10872019B2 (en) Load and save recovery partition using mobile device
KR20180103885A (en) METHOD, DEVICE AND RECORDING MEDIUM FOR PROCESSING DIVIDER OPERATION

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