WO2019128546A1 - Application program processing method, electronic device, and computer readable storage medium - Google Patents

Application program processing method, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2019128546A1
WO2019128546A1 PCT/CN2018/116532 CN2018116532W WO2019128546A1 WO 2019128546 A1 WO2019128546 A1 WO 2019128546A1 CN 2018116532 W CN2018116532 W CN 2018116532W WO 2019128546 A1 WO2019128546 A1 WO 2019128546A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
electronic device
user
resource restriction
obtaining
Prior art date
Application number
PCT/CN2018/116532
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019128546A1 publication Critical patent/WO2019128546A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Definitions

  • the present application relates to the field of computer technologies, and in particular, to an application processing method, an electronic device, and a computer readable storage medium.
  • Smart devices can implement different application operations through applications, such as purchasing products through a shopping application, viewing videos through a video application, and the like.
  • the smart device can perform resource restriction processing on the application, and the application that restricts the resource can only occupy a limited resource, and cannot use the resource of the device without restriction.
  • the application can be frozen, the frozen application can no longer continue to run, does not occupy the processor resources in the smart device, reduces the power consumption of the smart device, and improves the smoothness of the foreground application.
  • the application still exists in the smart device, it also occupies resources such as memory and hardware in the smart device.
  • an application processing method an electronic device, and a computer readable storage medium are provided.
  • An application processing method including:
  • An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations:
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to:
  • the application processing method, the electronic device, and the computer readable storage medium may acquire user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain the user dependent program according to the degree of user dependence. Resource restriction strategy.
  • the target application is then subjected to resource restriction processing according to the obtained resource restriction policy.
  • the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
  • FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment.
  • FIG. 2 is a schematic diagram showing the internal structure of an electronic device in an embodiment.
  • 3 is a flow chart of an application processing method in one embodiment.
  • FIG. 4 is a flow chart of an application processing method in another embodiment.
  • FIG. 5 is a schematic diagram of a resource restriction state of an application in an embodiment.
  • FIG. 6 is a partial structural diagram of an electronic device in an embodiment.
  • FIG. 7 is a schematic structural diagram of an application processing apparatus in an embodiment.
  • FIG. 8 is a schematic structural diagram of an application processing apparatus in another embodiment.
  • FIG. 9 is a block diagram showing a partial structure of a mobile phone related to an electronic device according to an embodiment of the present application.
  • first may be referred to as a second client
  • second client may be referred to as a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment.
  • the application environment includes a client 102 and a server 104.
  • the application program can be installed on the client 102, and then the historical running data of each application is obtained, and the user attribute information corresponding to the user who uses the electronic device is obtained according to the historical running data; the average running time of the electronic device is obtained, and the user is obtained according to the average running time.
  • the degree of dependence obtaining the target application according to the user attribute information, and obtaining the resource restriction policy according to the degree of user dependency; and performing resource restriction processing on the target application according to the resource restriction policy.
  • the server 104 can be used to push an application processing algorithm to the client 102, and the client 102 processes the application according to the application processing algorithm.
  • the client 102 is an electronic device that is mainly used for inputting user information and outputting processing results at the outermost periphery of the computer network, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like.
  • the server 104 is a device for providing a computing service in response to a service request, and may be, for example, one or more computers. It can be understood that, in other embodiments provided by the present application, the application environment of the application processing method may only include the client 102.
  • the electronic device includes a processor, memory, and display screen connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement an application processing method suitable for an electronic device provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the computer program can be executed by a processor for implementing an application processing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for operating systems and computer programs in non-volatile storage media.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as performing front and back Application switching instructions, etc.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
  • the specific electronic device may be It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • the electronic device further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external electronic device, for example, for communicating with a server.
  • FIG. 3 is a flow chart of an application processing method in one embodiment.
  • the application processing method in this embodiment is described by using the terminal or server running in FIG. 1 as an example.
  • the application processing method includes operations 302 through 308. among them:
  • the historical running data of each application in the electronic device is acquired, and the user attribute information corresponding to the user who uses the electronic device is obtained according to the historical running data.
  • An application refers to a software written for an application purpose in an electronic device, and the electronic device can implement a service demanded by the user through an application. For example, users can play games through a game-like application, watch videos through a video-like application, and play music through a music-like application.
  • Applications can be divided into foreground applications and background applications based on the state of the run.
  • the foreground application refers to an application running in the foreground of the electronic device, and the foreground application can be displayed and interacted with the user in the foreground.
  • a background application refers to an application that runs in the background of an electronic device. The background application generally cannot display and interact with the user in the foreground.
  • the process is a running activity of the program in the computer on a certain data set, and is a basic unit for the system to perform resource allocation and scheduling.
  • a process can correspond to one or more threads.
  • a thread is a single sequential control process in a program, and is a relatively independent, schedulable execution unit within a process.
  • the process may include a foreground process and a background process, and the foreground process is a process running in the foreground of the electronic device, and the background process is a process running in the background of the electronic device.
  • the electronic device can control the switching between the foreground process and the background process, and the foreground process can switch to the background operation, and the background process can also switch to the foreground operation.
  • the process can be managed by the process pool, and the process identifier corresponding to one or more processes can be stored in the process pool.
  • the process ID is used to uniquely identify a process.
  • the process pool may include a foreground process pool and a background process pool.
  • the foreground process pool includes a process identifier corresponding to the foreground process
  • the background process pool includes a process identifier corresponding to the background process.
  • the process ID of process A is “0123”.
  • the process ID “0123” of process A can be removed from the background process pool and added to the foreground process. In the pool.
  • Historical running data is the data generated by the application during the historical running process before the current time.
  • the historical running data may include the amount of power consumed by the application to run between the installation and the current time, or the time each time the application runs, the application launch time, and the application close time.
  • Historical running data can reflect the user's operating habits of the application, reflecting the characteristics of the user.
  • the characteristics of the user who uses the electronic device can be analyzed, and the user attribute information is obtained.
  • the user attribute information is used to represent related attributes of the user, and may be, but is not limited to, information including user age, user occupation, user gender, and the like.
  • the average running time of the electronic device is obtained, and the degree of user dependence is obtained according to the average running time.
  • the average running time indicates the duration of the average running time of the electronic device in the unit time length, and the degree of user dependence is used to indicate the degree of dependence of the user on the electronic device.
  • the state of the electronic device can be divided into a standby state and an operating state.
  • the electronic device In the standby state, the electronic device does not perform any substantial operation on the file or the program, and only the electronic device can work on the file or The program handles it.
  • the average running time indicates the length of time that the electronic device runs on the unit time.
  • the unit time can be set in advance.
  • the average running time can be the average length of time that a statistical electronic device runs within a day, or can be the length of time that a statistical electronic device runs within an average of one month.
  • the electronic device records the work start time and the work end time each time entering the work state during the running process, and then calculates the work time length of each work according to the recorded work start time and the work end time.
  • the running data of the electronic device during the statistical period can be obtained, and then the running time is calculated according to the running data.
  • the statistical period refers to the time period used to calculate the average running time.
  • the running data refers to the data generated by the electronic device during the running process, and may include the work start time and the work end time.
  • the running time in each unit time in the statistical period can be calculated, and the average running time is calculated according to the running time in each unit length obtained. For example, if the current time is 15:30:00 on December 25, 2017, the statistical time period can be the operational data in the previous month, that is, from 15:30:00 on November 25, 2017 to December 25, 2017. The operating data of the electronic equipment within 15:30:00. Then calculate the running time of the day in the month based on the running data, and then average the running time of each day to get the average running time.
  • the degree of user dependency is used to indicate the degree of user dependence on the electronic device, and may be, but is not limited to, including the first level of dependency, the second level of dependency, and the third level of dependency.
  • the correspondence between the average running time and the degree of user dependency is established in advance, and then the corresponding user dependent program is obtained according to the average running time.
  • the degree of dependence of the first level is higher than that of the second level
  • the degree of dependence of the second level is higher than that of the third level.
  • the first level of dependency indicates the user's heavy dependence on the electronic device
  • the second level of dependence indicates the user's general dependence on the electronic device
  • the third level of dependence indicates the user's slight dependence on the electronic device.
  • the average running time can be expressed as the average running time of the mobile phone every day.
  • the corresponding user dependency degree is the first level dependence; when the average user runs for 4 hours per day Between 8 hours, the corresponding user dependency degree is the second level dependency degree; when the average user running time is less than 4 hours per day, the corresponding user dependency degree is the third level dependency degree.
  • Operation 306 Obtain a target application according to user attribute information, and obtain a resource restriction policy according to the degree of user dependency.
  • the target application refers to an application that needs to perform resource limitation processing, pre-establishes a correspondence between the user attribute information and the target application, and then acquires a corresponding target application according to the user attribute information.
  • the user attribute information is different, and the corresponding target application is different.
  • the user attribute information may be the gender of the user.
  • the corresponding target application is a game application; when the user is a female, the corresponding target application is a shopping application.
  • a resource restriction policy is a policy for performing resource restriction processing on a target application, and a corresponding relationship between a user dependency degree and a resource restriction policy is established in advance, and then a corresponding resource restriction policy is obtained according to the degree of user dependency. For example, when the degree of user dependency is the first level of dependency, when the target application runs in the foreground for more than 2 hours, the target application running in the foreground is frozen.
  • Operation 308 performing resource restriction processing on the target application according to the resource restriction policy.
  • a resource is a software or hardware resource that an electronic device must use to process an application event, such as a CPU (Central Processing Unit), memory, hardware, network resources, and IO (Input-Output). , input and output) and so on.
  • Resource limit processing refers to the process of restricting the resources occupied by the application.
  • the resource limit processing can be, but is not limited to, controlling the application to enter a frozen state or a resource restricted state, and the application in the frozen state is not closed, but is not temporarily running. When the application is frozen, the application does not consume processor resources, but still occupies resources such as memory and hardware of the electronic device.
  • the resource limit state refers to the state in which the resources of the electronic device used by the application at runtime are restricted. For example, the CPU usage of the control application at runtime cannot exceed 5%.
  • the application processing method can obtain the user attribute information according to the historical running data of each application in the electronic device, obtain the user dependent program according to the average running time of the electronic device, and obtain the resource limiting policy according to the degree of user dependence.
  • the target application is then subjected to resource restriction processing according to the obtained resource restriction policy.
  • the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
  • FIG. 4 is a flow chart of an application processing method in another embodiment.
  • the application processing method in this embodiment is described by using the terminal or server running in FIG. 1 as an example.
  • the application processing method includes operations 402 through 418. among them:
  • Operation 402 Acquire historical running data of each application in the electronic device, and acquire user attribute information corresponding to the user who uses the electronic device according to the historical running data.
  • the historical running data may refer to the power consumption and/or operating frequency of each application.
  • Power consumption is the amount of power consumed by an application during its historical operation.
  • the operation 402 may specifically include: acquiring power consumption of each application in the electronic device, acquiring a power consumption application according to the power consumption, and acquiring user attribute information corresponding to the user using the electronic device according to the power consumption application. The higher the power consumption of the application, the more frequently the user uses the application, and the user's usage habits can be analyzed based on the power consumption of the application.
  • acquiring the power consumption application according to the power consumption may include at least one of the following methods: acquiring an application that consumes more power than the power threshold, as a power consumption application; sorting the application according to power consumption, and Get the specified number of applications in the sorted application as a power-consuming application.
  • the power threshold can be set in advance by the user or the system, the application that consumes more power than the power threshold, is considered to be the most frequently used application by the user, and then analyzes the user attribute information according to the application most frequently used by the user. It is also possible to sort each application according to the power consumption, and then obtain the specified number of applications in the sorted application as a power-consuming application, and the application that obtains the specified number of digits can be regarded as the most frequently used application.
  • each application is sorted in descending order of power consumption, and then the top three applications of the sorted application are obtained as power-consuming applications.
  • the electronic device can be considered as a female user.
  • the power consumption of each application is counted.
  • BatteryStatsSerive there is a Service (service) dedicated to statistical power in the framework layer: BatteryStatsSerive.
  • the BatteryStatsSerive service can be created in the ActivityManagerService.
  • the ActivityManagerService stores the data of each module in the electronic device into the system catalog batterystats.bin file, and then analyzes the power data through the data analyzer BatteryStatsImpl, thereby realizing the statistics of power consumption.
  • the running frequency can refer to the number of times the application runs within the unit time period, or the average length of time the application runs within the unit time.
  • the operation 402 may specifically include: acquiring an operating frequency of each application in the electronic device, acquiring a frequency application according to the operating frequency, and using user attribute information corresponding to the user of the electronic device according to the frequency application. The higher the application's running frequency, the higher the user's frequency of use of the application, and the user's usage habits can be analyzed according to the running frequency of the application.
  • acquiring the frequency application according to the operating frequency may include at least one of: acquiring an application whose operating frequency exceeds the frequency threshold as a frequency application; sorting the application according to the operating frequency, and sorting the application Get the specified number of applications in the application as a frequency application.
  • the frequency threshold can be set in advance by the user or the system, the application running at a frequency higher than the frequency threshold is considered to be the most frequently used application by the user, and then the user attribute information is analyzed according to the application most frequently used by the user. It is also possible to sort each application according to the running frequency, and then obtain the specified number of applications in the sorted application as a power-consuming application, and the application that obtains the specified number of bits can be regarded as the most frequently used application. . For example, sort the application in descending order of running frequency, and then get the top three applications in the sorted application as a frequency application.
  • Operation 404 obtaining an average running time of the electronic device, and determining a target duration interval in which the average running time falls.
  • Operation 406 obtaining a corresponding degree of user dependency according to the target duration interval.
  • the range of the average running time of the electronic device may be divided into two time intervals of two or more durations, and then the correspondence between each time interval and the degree of user dependence may be established, and then according to the corresponding relationship.
  • the unit time for calculating the average running time can be three days, then the average running time can be expressed as the average running time of the electronic device every three days, and the average running time ranges from 0 to 72 hours.
  • the range of the average running time is divided into three time intervals, which can be divided into three time intervals of [0, 12], [12, 36], [36, 72], and the corresponding user dependence is first. Level dependency, second level dependency, and third level dependency. Assuming that the average running time of the currently counted electronic device is 24 hours, then the corresponding user dependency degree of the user is the second level of dependency.
  • Operation 408 obtaining a target application according to user attribute information.
  • the target application can be stored through a list of target applications that contain one or more application identities that require the target application.
  • Each target application list corresponds to a target list identifier, a correspondence between the pre-user attribute information and the target list identifier.
  • the electronic device may obtain the target list identifier according to the user attribute information, and obtain the target application according to the target application list corresponding to the target list identifier.
  • the user attribute information may include minors and adults, and the corresponding target list identifiers are “list_01” and “list_02”, respectively.
  • the corresponding target list identifier may be obtained as “list_01”, and the target application may be acquired according to the application identifier included in the target application list corresponding to “list_01”.
  • the target application list may be set by the user, or may be automatically generated by the electronic device system, or may be delivered by the server, and is not specifically limited in the present application.
  • the user may initiate a modification instruction to the target application list by using the electronic device, and the electronic device modifies the target application list according to the modification instruction.
  • the modification instruction may include, but is not limited to, including an application identifier and corresponding modification information. Modifications can include actions such as adding, deleting, and replacing. For example, the user can select an application identifier through the electronic device interface, and then click the delete button to delete the application identifier from the target application list.
  • the terminal may also send historical running data of each application to the server. After receiving the historical running data sent by the terminal, the server learns and analyzes the running data, generates a target application list according to the analysis result, and then pushes the target application list to the server. terminal.
  • Operation 410 Acquire a first resource restriction policy and a second resource restriction policy when the degree of user dependency is a first level dependency.
  • the resource restriction policy is divided into a first resource restriction policy and a second resource restriction policy, where the first resource restriction policy refers to controlling the target application to enter the resource limitation state according to the foreground running time of the target application.
  • the policy refers to a policy of controlling the target application to enter a frozen state according to the duration of the target application switching to the background.
  • the degree of user dependency is the second level of dependency, indicating that the frequency of use of the electronic device is normal
  • the background operation of the target application may be limited, that is, the second resource restriction policy is acquired, and the second resource restriction is adopted.
  • Operation 414 performing resource restriction processing on the target application according to the first resource restriction policy, and/or performing resource restriction processing on the target application according to the second resource restriction policy.
  • performing resource limitation processing on the target application according to the first resource restriction policy includes: acquiring a foreground running time of the target application; and when the current running time exceeds the first duration threshold, controlling the target application to enter the resource limiting state .
  • the resource-restricted application is running, the resource usage of the electronic device is less than the occupancy threshold.
  • the target application's resource occupancy rate for the electronic device cannot exceed the occupancy threshold. It can control the running efficiency of the target application in the foreground and reduce the user's dependence on the electronic device.
  • the CPU usage of the control target application should not exceed 5% at runtime to reduce the excessive consumption of CPU by the target application and reduce the user's dependence on the mobile phone.
  • cgroups control groups
  • the target application can also be controlled to enter the resource restriction state according to the total resource occupancy rate of the electronic device, where the total resource occupancy rate refers to the ratio of the occupied resources and the total resources in the electronic device.
  • the total resource occupancy rate refers to the ratio of the occupied resources and the total resources in the electronic device.
  • the foreground running time of the target application exceeds the first duration threshold
  • the total resource occupancy rate of the electronic device is acquired, and the target application enters the resource limiting state according to the total resource occupancy rate.
  • the correspondence between the total resource occupancy rate and the resource restriction level may be established in advance, and the resource usage rate of the target application to the electronic device may not exceed the occupancy rate threshold when the resource is restricted.
  • the target application has different occupancy thresholds.
  • the total resource occupation rate of the electronic device is divided into three occupation levels of 50% to 60%, 60% to 80%, and 80% to 100%, and then corresponding to the light resource restriction level, the common resource restriction level, and the depth.
  • the resource limit level is three levels, and the corresponding resource limit level can be obtained according to the total resource usage rate.
  • the occupancy thresholds corresponding to different resource limit levels are different. It can be understood that the occupancy thresholds corresponding to different resources may be different. For example, the CPU usage threshold can be 5%, and the memory usage threshold can be 10%.
  • the occupancy of the resource may be controlled according to the application priority of the target application, the correspondence between the application priority and the resource restriction level is established in advance, and then the access resource is controlled according to the application priority of the target application.
  • Limit the resource limit level of the state may include: obtaining an application priority corresponding to the target application when the current running time exceeds the first duration threshold; acquiring a corresponding resource restriction level according to the application priority; and controlling the target application to enter a resource limitation state corresponding to the resource limitation level.
  • performing resource restriction processing on the target application according to the second resource restriction policy includes: starting when the target application is detected to switch from the foreground to the background; when the timing duration exceeds the second duration threshold , then control the target application to enter a frozen state.
  • the target application that enters the frozen state can no longer continue to run, which can reduce the resource consumption of the electronic device by the target application.
  • the frozen target application can also be woken up, and the user or system can set the conditions for wakeup.
  • the target application may not be subjected to resource restriction processing, and the target application may be subjected to resource limitation processing according to the third resource limitation processing policy.
  • the third resource restriction policy is acquired.
  • the resource restriction processing on the target application according to the third resource restriction policy includes: starting when the target application is detected to switch from the foreground to the background, and when the timing duration exceeds the third duration threshold, the control target application enters a frozen state.
  • the second duration threshold is less than the third duration threshold.
  • the Android system there are various ways to implement application freezing and wake-up.
  • the pm (package manager) command In the pm command, the application can be set to a frozen state by the freeze command pm disable[–user USER_ID]PACKAGE_OR_COMPONENT, and then passed.
  • the defrosting command pm enable[–user USER_ID]PACKAGE_OR_COMPONENT wakes up the application in the frozen state, and obtains the list of applications in the frozen state by freezing the list query command pm list packages–d to view the frozen application.
  • the application processing method is described by taking the Android operating system as an example in the present application, but the application processing method of the present application is not limited to being implemented in the Android system, and can also be applied to the IOS (IPhone Operating System), In operating systems such as Symbian, Windows, and MAC OS (Macintosh Operating System).
  • IOS IPhone Operating System
  • MAC OS Macintosh Operating System
  • Operation 416 obtaining a time limit from the time when the resource restriction processing is performed on the target application to the current time.
  • the electronic device After the resource limit processing is performed on the target application, the electronic device starts a timer and then starts counting through the timer.
  • the electronic device can establish a corresponding timer for each target application, and each target application can perform timing according to the corresponding timer when performing resource limitation processing.
  • Corresponding relationship between the target application identifier of the target application and the timing identifier of the timer is established in advance, and the timer is searched and started by the timing identifier corresponding to the target application identifier.
  • the system can predefine a timer.
  • the target application identifier searches for a corresponding timer, and the timer is cleared by timer.setBase(SystemClock.elapsedRealtime()). Then start the timer with the timer.start() function and start timing.
  • the target application When the limit duration exceeds the limit duration threshold, the target application is restored to normal operation.
  • the target application When the target application is in the resource limit state, the electronic device's resource limit to the target application is released. Wakes up the target application from a frozen state when the target application is frozen. After returning to normal operation, the target application's use of electronic device resources is no longer restricted.
  • FIG. 5 is a schematic diagram of a resource restriction state of an application in an embodiment.
  • the resources of the electronic device include a CPU, a memory, an IO, a network resource, and the like, and the state of the application may be classified into a normal running state, a resource limiting state, and a frozen state.
  • the resource restriction state may be further divided into a light resource restriction state, a normal resource restriction state, and a deep resource restriction state.
  • the corresponding available resource 502 and the unavailable resource 504 are different. From the light resource limit state, the normal resource limit state to the deep resource limit state, the available resource 502 is decremented. In normal operation, the application's available resource 502 is 100%.
  • the application processing method provided by the foregoing embodiment may obtain user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain a first resource restriction policy according to the degree of user dependency. And a second resource restriction policy. Then, the target application is subjected to resource restriction processing according to the obtained first resource restriction policy and the second resource restriction policy.
  • the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
  • FIGS. 3 and 4 are sequentially displayed as indicated by the arrows, these operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and the operations may be performed in other sequences. Moreover, at least some of the operations in FIGS. 3 and 4 may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, or The order of execution of the stages is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-operations or stages of other operations or other operations.
  • the architecture system of the electronic device includes a JAVA space layer 61, a local frame layer 62, and a Kernel space layer 63.
  • the JAVA spatial layer 61 can include a policy application 610 through which the electronic device can initiate a freeze and thaw strategy for each application, thereby implementing freezing and thawing operations for each application in the electronic device.
  • the policy application 610 determines the background power consumption application and initiates a freeze operation on the background power consumption application.
  • the local framework layer 62 includes a resource priority and restriction management module 620 and a platform freeze management module 622.
  • the electronic device can maintain the priority of the application and the corresponding resource group in real time through the resource priority and restriction management module 620, and adjust the priority and the resource group of the application according to the requirements of the upper layer, thereby achieving optimized performance and saving power consumption. effect.
  • the electronic device can allocate the tasks that can be frozen in the background to the frozen layer corresponding to the preset level by the platform freeze management module 622.
  • the frozen layer can include: the CPU limits the sleep mode, and the CPU Freeze sleep mode, process deep freeze mode.
  • the kernel space layer 63 includes a UID management module 630, a Cgroup module 632, a timeout freeze exit module 634, a Binder management module 636, and a process memory recovery module 638.
  • the UID management module 630 can manage resources of the third-party application or freeze based on the User Identifier (UID) of the application. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID.
  • the Cgroup module 632 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms.
  • the timeout freeze exit module 634 is configured to resolve an exception generated by the freeze timeout scenario.
  • the Binder management module 636 is used to implement the priority control of the background binder communication.
  • the process memory recovery module 638 is configured to implement a deep freeze mode of the process.
  • the file area of the process can be released, thereby saving the memory module and speeding up the application at the next startup. speed.
  • FIG. 7 is a schematic structural diagram of an application processing apparatus in an embodiment.
  • the application processing apparatus 700 includes a user information acquisition module 702, a dependency degree acquisition module 704, a policy acquisition module 706, and an application processing module 708. among them:
  • the user information obtaining module 702 is configured to acquire historical running data of each application in the electronic device, and obtain user attribute information corresponding to the user who uses the electronic device according to the historical running data.
  • the dependency degree obtaining module 704 is configured to acquire an average running time of the electronic device, and obtain a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, The degree of user dependency is used to indicate how much the user is dependent on the electronic device.
  • the policy obtaining module 706 is configured to obtain a target application according to the user attribute information, and obtain a resource restriction policy according to the user dependency degree.
  • the application processing module 708 is configured to perform resource limitation processing on the target application according to the resource restriction policy.
  • the application processing device of the above embodiment can obtain user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain a resource restriction policy according to the degree of user dependence.
  • the target application is then subjected to resource restriction processing according to the obtained resource restriction policy.
  • the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
  • FIG. 8 is a schematic structural diagram of an application processing apparatus in another embodiment.
  • the application processing apparatus 800 includes a user information acquisition module 802, a dependency degree acquisition module 804, a policy acquisition module 806, an application processing module 808, and an application recovery module 810. among them:
  • the user information obtaining module 802 is configured to acquire historical running data of each application in the electronic device, and obtain user attribute information corresponding to the user who uses the electronic device according to the historical running data.
  • the dependency degree obtaining module 804 is configured to acquire an average running time of the electronic device, and obtain a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, The degree of user dependency is used to indicate how much the user is dependent on the electronic device.
  • the policy obtaining module 806 is configured to obtain a target application according to the user attribute information, and obtain a resource restriction policy according to the user dependency degree.
  • the application processing module 808 is configured to perform resource limitation processing on the target application according to the resource restriction policy.
  • the application recovery module 810 is configured to acquire a time limit from a time when the resource limiting process is performed on the target application to a current time limit, and restore the target application to a normal running state when the limit duration exceeds a limit duration threshold. .
  • the application processing device of the above embodiment can obtain user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain a resource restriction policy according to the degree of user dependence.
  • the target application is then subjected to resource restriction processing according to the obtained resource restriction policy.
  • the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
  • the user information obtaining module 802 is further configured to acquire power consumption of each application in the electronic device, obtain a power consumption application according to the power consumption, and acquire and use the electronic device according to the power consumption application.
  • the user information obtaining module 802 is further configured to acquire the application that consumes the power consumption exceeding the power threshold as a power consumption application; and/or sort the application according to the power consumption. And get the specified number of applications in the sorted application as a power-consuming application.
  • the user information obtaining module 802 is further configured to acquire the application whose operating frequency exceeds the frequency threshold as a frequency application; and/or sort the applications according to the operating frequency, and after sorting The application gets the specified number of bits in the application as a frequency application.
  • the dependency degree acquisition module 804 is further configured to acquire an average running time of the electronic device, determine a target duration interval in which the average running time falls, and obtain a corresponding user dependency degree according to the target duration interval.
  • the policy obtaining module 806 is further configured to: when the degree of user dependency is a first level of dependency, acquire a first resource limiting policy and a second resource limiting policy; when the user dependency level is a second level When the degree of dependency is reached, the second resource restriction policy is obtained.
  • the application processing module 808 is further configured to perform resource limitation processing on the target application according to the first resource restriction policy; and/or perform the target application according to the second resource restriction policy. Resource limit processing.
  • the application processing module 808 is further configured to acquire a foreground running time of the target application; when the foreground running time exceeds a first duration threshold, the target application is controlled to enter a resource limiting state.
  • the application processing module 808 is further configured to start timing when detecting that the target application switches from the foreground to the background; and when the timing duration exceeds the second duration threshold, controlling the target application to enter a frozen state. .
  • the application processing device may be divided into different modules as needed to perform all or part of the functions of the application processing device.
  • each module in the application processing apparatus may be in the form of a computer program.
  • the computer program can run on a terminal or server.
  • the program modules of the computer program can be stored on the memory of the terminal or server.
  • the operation of the method described in the embodiments of the present application is implemented when the computer program is executed by the processor.
  • the embodiment of the present application also provides a computer readable storage medium.
  • One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to execute the applications provided by the above embodiments Approach.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the application processing method provided by the above embodiments.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 9 , for the convenience of description, only the parts related to the embodiments of the present application are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application.
  • the electronic device can be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an on-board computer, a wearable device, and the like, and the electronic device is used as a mobile phone. :
  • FIG. 9 is a block diagram showing a partial structure of a mobile phone related to an electronic device according to an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980.
  • RF radio frequency
  • the structure of the handset shown in FIG. 9 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the RF circuit 910 can be used for receiving and transmitting signals during the transmission and reception of information or during a call.
  • the downlink information of the base station can be received and processed by the processor 980.
  • the uplink data can also be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 910 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General
  • the memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920.
  • the memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 900.
  • the input unit 930 may include a touch panel 931 and other input devices 932.
  • the touch panel 931 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 931 or near the touch panel 931. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 931 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 980 is provided and can receive commands from the processor 980 and execute them.
  • the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 940 can include a display panel 941.
  • the display panel 941 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 is The type of touch event provides a corresponding visual output on display panel 941.
  • touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.
  • the handset 900 can also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 960, speaker 961, and microphone 962 can provide an audio interface between the user and the handset.
  • the audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961.
  • the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and after being processed by the audio data output processor 980, it can be sent to another mobile phone via the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access.
  • FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone 900 and can be omitted as needed.
  • the processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • processor 980 can include one or more processing units.
  • the processor 980 can integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, a user interface, an application, and the like; the modem processor primarily processes wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
  • the mobile phone 900 also includes a power source 990 (such as a battery) that supplies power to various components.
  • a power source 990 such as a battery
  • the power source can be logically coupled to the processor 980 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the handset 900 can also include a camera, a Bluetooth module, and the like.
  • the processor 980 included in the electronic device implements the operation of the application processing method provided by the foregoing embodiment when executing the computer program stored in the memory.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • synchronization Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).

Abstract

An application program processing method, comprising: acquiring historical running data of each application program in an electronic device, and acquiring, according to the historical running data, user attribute information corresponding to a user using the electronic device; acquiring an average operation duration of the electronic device, and acquiring a user dependency degree according to the average running duration; acquiring a target application program according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and performing resource restriction processing on the target application program according to the resource restriction policy.

Description

应用程序处理方法、电子设备、计算机可读存储介质Application processing method, electronic device, computer readable storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年12月29日提交中国专利局、申请号为201711489113.2、发明名称为“应用程序处理方法和装置、电子设备、计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200911489113.2, entitled "Application Processing Method and Apparatus, Electronic Apparatus, Computer Readable Storage Medium", filed on December 29, 2017, the entire disclosure of which is incorporated herein by reference. The content is incorporated herein by reference.
技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种应用程序处理方法、电子设备、计算机可读存储介质。The present application relates to the field of computer technologies, and in particular, to an application processing method, an electronic device, and a computer readable storage medium.
背景技术Background technique
智能设备可以通过应用程序实现不同的应用操作,比如可以通过购物类应用程序购买商品、通过视频类应用程序查看视频等。智能设备可以对应用程序进行资源限制处理,对资源进行限制后的应用程序仅能占用有限的资源,而不能对设备的资源进行无限制地使用。应用程序可以被冻结,冻结后的应用程序无法再继续运行,不会占用智能设备中处理器资源,降低了智能设备的功耗、提高前台应用程序的流畅度。但是由于应用程序还是存在与智能设备中的,因此还会占用智能设备中的内存、硬件等资源。Smart devices can implement different application operations through applications, such as purchasing products through a shopping application, viewing videos through a video application, and the like. The smart device can perform resource restriction processing on the application, and the application that restricts the resource can only occupy a limited resource, and cannot use the resource of the device without restriction. The application can be frozen, the frozen application can no longer continue to run, does not occupy the processor resources in the smart device, reduces the power consumption of the smart device, and improves the smoothness of the foreground application. However, since the application still exists in the smart device, it also occupies resources such as memory and hardware in the smart device.
发明内容Summary of the invention
根据本申请的各种实施例,提供一种应用程序处理方法、电子设备、计算机可读存储介质。According to various embodiments of the present application, an application processing method, an electronic device, and a computer readable storage medium are provided.
一种应用程序处理方法,包括:An application processing method, including:
获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息;Obtaining historical running data of each application in the electronic device, and acquiring user attribute information corresponding to the user who uses the electronic device according to the historical running data;
获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度;Acquiring an average running time of the electronic device, and acquiring a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, and the user dependency degree is used to indicate a user pair The degree of dependence of the electronic device;
根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略;及Obtaining a target application according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and
根据所述资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the resource restriction policy.
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations:
获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息;Obtaining historical running data of each application in the electronic device, and acquiring user attribute information corresponding to the user who uses the electronic device according to the historical running data;
获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度;Acquiring an average running time of the electronic device, and acquiring a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, and the user dependency degree is used to indicate a user pair The degree of dependence of the electronic device;
根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略;及Obtaining a target application according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and
根据所述资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the resource restriction policy.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下操作:A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to:
获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述 电子设备的用户所对应的用户属性信息;Obtaining historical running data of each application in the electronic device, and acquiring user attribute information corresponding to the user using the electronic device according to the historical running data;
获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度;Acquiring an average running time of the electronic device, and acquiring a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, and the user dependency degree is used to indicate a user pair The degree of dependence of the electronic device;
根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略;及Obtaining a target application according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and
根据所述资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the resource restriction policy.
上述应用程序处理方法、电子设备、计算机可读存储介质,可以根据电子设备中各个应用程序的历史运行数据获取用户属性信息,根据电子设备的平均运行时长获取用户依赖程序,并根据用户依赖程度获取资源限制策略。然后根据获取的资源限制策略对目标应用程序进行资源限制处理。这样可以根据用户对电子设备的使用习惯,实现对电子设备中应用程序的运行的控制,针对不同用户做不同的处理,使得电子设备能够更准确地对应用程序进行控制,提高了电子设备的用户黏度。The application processing method, the electronic device, and the computer readable storage medium may acquire user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain the user dependent program according to the degree of user dependence. Resource restriction strategy. The target application is then subjected to resource restriction processing according to the obtained resource restriction policy. In this way, according to the user's habit of using the electronic device, the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为一个实施例中应用程序处理方法的应用环境示意图。FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment.
图2为一个实施例中电子设备的内部结构示意图。2 is a schematic diagram showing the internal structure of an electronic device in an embodiment.
图3为一个实施例中应用程序处理方法的流程图。3 is a flow chart of an application processing method in one embodiment.
图4为另一个实施例中应用程序处理方法的流程图。4 is a flow chart of an application processing method in another embodiment.
图5为一个实施例中应用程序的资源限制状态的示意图。FIG. 5 is a schematic diagram of a resource restriction state of an application in an embodiment.
图6为一个实施例中电子设备的部分架构图。FIG. 6 is a partial structural diagram of an electronic device in an embodiment.
图7为一个实施例中应用程序处理装置的结构示意图。FIG. 7 is a schematic structural diagram of an application processing apparatus in an embodiment.
图8为另一个实施例中应用程序处理装置的结构示意图。FIG. 8 is a schematic structural diagram of an application processing apparatus in another embodiment.
图9为与本申请实施例提供的电子设备相关的手机的部分结构的框图。FIG. 9 is a block diagram showing a partial structure of a mobile phone related to an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It will be understood that the terms "first", "second" and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
图1为一个实施例中应用程序处理方法的应用环境示意图。如图1所示,该应用环境包括客户端102和服务器104。客户端102上可以安装应用程序,然后获取各个应用程序的历史运行数据,根据历史运行数据获取使用电子设备的用户所对应的用户属性信息;获取电子设备的平均运行时长,根据平均运行时长获取用户依赖程度;根据用户属性信息获取目标应用程序,并根据用户依赖程度获取资源限制策略;根据资源限制策略对目标应用程序进行资源限制处理。服务器104可以用于向客户端102推送应用程序处理算法,客户端102根据该应用程序处理算法对应用程序进行处理。其中,客户端102为处于计算机网 络最外围,主要用于输入用户信息以及输出处理结果的电子设备,例如可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。服务器104是用于响应服务请求,同时提供计算服务的设备,例如可以是一台或者多台计算机。可以理解的是,本申请提供的其他实施例中,应用程序处理方法的应用环境可以只包含客户端102。FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment. As shown in FIG. 1, the application environment includes a client 102 and a server 104. The application program can be installed on the client 102, and then the historical running data of each application is obtained, and the user attribute information corresponding to the user who uses the electronic device is obtained according to the historical running data; the average running time of the electronic device is obtained, and the user is obtained according to the average running time. The degree of dependence; obtaining the target application according to the user attribute information, and obtaining the resource restriction policy according to the degree of user dependency; and performing resource restriction processing on the target application according to the resource restriction policy. The server 104 can be used to push an application processing algorithm to the client 102, and the client 102 processes the application according to the application processing algorithm. The client 102 is an electronic device that is mainly used for inputting user information and outputting processing results at the outermost periphery of the computer network, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like. The server 104 is a device for providing a computing service in response to a service request, and may be, for example, one or more computers. It can be understood that, in other embodiments provided by the present application, the application environment of the application processing method may only include the client 102.
如图2所示,提供了一种电子设备的内部结构示意图。该电子设备包括通过系统总线连接的处理器、存储器和显示屏。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器用于存储数据、程序、和/或指令代码等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于电子设备的应用程序处理方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现本申请各个实施例所提供的一种应用程序处理方法。内存储器为非易失性存储介质中的操作系统和计算机程序提供高速缓存的运行环境。显示屏可以是触摸屏,比如为电容屏或电子屏,用于显示前台进程对应的应用的界面信息,还可以被用于检测作用于该显示屏的触摸操作,生成相应的指令,比如进行前后台应用的切换指令等。As shown in FIG. 2, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, memory, and display screen connected by a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement an application processing method suitable for an electronic device provided in the embodiments of the present application. . The memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing an application processing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for operating systems and computer programs in non-volatile storage media. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as performing front and back Application switching instructions, etc.
本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。如该电子设备还包括通过系统总线连接的网络接口,网络接口可以是以太网卡或无线网卡等,用于与外部的电子设备进行通信,比如可用于同服务器进行通信。A person skilled in the art can understand that the structure shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may be It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements. For example, the electronic device further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external electronic device, for example, for communicating with a server.
图3为一个实施例中应用程序处理方法的流程图。本实施例中的应用程序处理方法,以运行于图1中的终端或服务器上为例进行描述。如图3所示,该应用程序处理方法包括操作302至操作308。其中:3 is a flow chart of an application processing method in one embodiment. The application processing method in this embodiment is described by using the terminal or server running in FIG. 1 as an example. As shown in FIG. 3, the application processing method includes operations 302 through 308. among them:
操作302,获取电子设备中各个应用程序的历史运行数据,根据历史运行数据获取使用电子设备的用户所对应的用户属性信息。In operation 302, the historical running data of each application in the electronic device is acquired, and the user attribute information corresponding to the user who uses the electronic device is obtained according to the historical running data.
应用程序(Application,APP)是指电子设备中针对某种应用目的所撰写的软体,电子设备可以通过应用程序实现对用户的需求服务。例如,用户可以通过游戏类应用程序玩游戏,也可以通过视频类应用程序看视频,还可以通过音乐类应用程序播放音乐等。应用程序可以根据运行的状态分为前台应用程序和后台应用程序。前台应用程序是指在电子设备的前台运行的应用程序,前台应用程序可以在与在前台显示并与用户实现交互。后台应用程序是指在电子设备的后台运行的应用程序,后台应用程序一般不能在前台显示并与用户实现交互过程。An application (Application) refers to a software written for an application purpose in an electronic device, and the electronic device can implement a service demanded by the user through an application. For example, users can play games through a game-like application, watch videos through a video-like application, and play music through a music-like application. Applications can be divided into foreground applications and background applications based on the state of the run. The foreground application refers to an application running in the foreground of the electronic device, and the foreground application can be displayed and interacted with the user in the foreground. A background application refers to an application that runs in the background of an electronic device. The background application generally cannot display and interact with the user in the foreground.
一般地,应用程序的应用操作是由一个或多个进程(process)来共同完成,进程是是计算机中的程序关于某数据集合上的一次运行活动,是系统进行资源分配和调度的基本单位。同时,一个进程可以对应一个或多个线程,线程是程序中一个单一的顺序控制流程,是进程内一个相对独立的、可调度的执行单元。进程可包括前台进程和后台进程,前台进程即为在电子设备前台运行的进程,后台进程即为在电子设备后台运行的进程。电子设备可以控制前台进程和后台进程的切换,前台进程可切换到后台运行,后台进程也可以切换到前台运行。具体地,可以通过进程池来实现对进程的管理,进程池中可以存放一个或多个进程对应的进程标识。进程标识用于唯一标示一个进程。进程池可以包括前台进程池和后台进程池,前台进程池中包括前台进程对应的进程标识,后台进程池中包括后台进程对应的进程标识。当检测到前台进程和后台进程的运行状态发生改变时,进程池会相应地添加或删除产生变化的进程标识。例如,进程A的进程标识为“0123”,当检测到进程A由后台进程变成前台进程时,可将该进程A的进程标识“0123”从后台进程池中移除,并添加 到前台进程池中。Generally, the application operation of the application is completed by one or more processes. The process is a running activity of the program in the computer on a certain data set, and is a basic unit for the system to perform resource allocation and scheduling. At the same time, a process can correspond to one or more threads. A thread is a single sequential control process in a program, and is a relatively independent, schedulable execution unit within a process. The process may include a foreground process and a background process, and the foreground process is a process running in the foreground of the electronic device, and the background process is a process running in the background of the electronic device. The electronic device can control the switching between the foreground process and the background process, and the foreground process can switch to the background operation, and the background process can also switch to the foreground operation. Specifically, the process can be managed by the process pool, and the process identifier corresponding to one or more processes can be stored in the process pool. The process ID is used to uniquely identify a process. The process pool may include a foreground process pool and a background process pool. The foreground process pool includes a process identifier corresponding to the foreground process, and the background process pool includes a process identifier corresponding to the background process. When it is detected that the running status of the foreground process and the background process changes, the process pool will add or delete the process ID that changes accordingly. For example, the process ID of process A is “0123”. When it is detected that process A changes from the background process to the foreground process, the process ID “0123” of process A can be removed from the background process pool and added to the foreground process. In the pool.
应用程序在运行的过程中,电子设备可以将应用程序产生的数据进行记录。历史运行数据就是应用程序在当前时刻之前的历史运行过程中产生的数据。例如,历史运行数据可以包括应用程序在从安装到当前时刻之间运行所消耗的电子设备的电量,或者应用程序每次运行时时长、应用启动时刻和应用关闭时刻等。历史运行数据可以反映用户对应用程序的操作习惯,从而反映用户的特征。根据历史运行数据进行学习,可以分析出使用电子设备的用户的特征,得到用户属性信息。用户属性信息用于表示用户的相关属性,可以但不限于包括用户年龄、用户职业、用户性别等信息。During the running of the application, the electronic device can record the data generated by the application. Historical running data is the data generated by the application during the historical running process before the current time. For example, the historical running data may include the amount of power consumed by the application to run between the installation and the current time, or the time each time the application runs, the application launch time, and the application close time. Historical running data can reflect the user's operating habits of the application, reflecting the characteristics of the user. According to the historical operation data, the characteristics of the user who uses the electronic device can be analyzed, and the user attribute information is obtained. The user attribute information is used to represent related attributes of the user, and may be, but is not limited to, information including user age, user occupation, user gender, and the like.
操作304,获取电子设备的平均运行时长,根据平均运行时长获取用户依赖程度,该平均运行时长表示电子设备在单位时长内平均运行的时长,用户依赖程度用于表示用户对电子设备的依赖程度。In operation 304, the average running time of the electronic device is obtained, and the degree of user dependence is obtained according to the average running time. The average running time indicates the duration of the average running time of the electronic device in the unit time length, and the degree of user dependence is used to indicate the degree of dependence of the user on the electronic device.
在一个实施例中,电子设备的状态可以分为待机状态和工作状态,在待机状态下电子设备不会对文件或程序进行任何实质性的操作,只有在工作状态下电子设备才会对文件或程序进行处理。平均运行时长表示电子设备在单位时长内平均运行的时长,单位时长可以预先进行设置。例如,平均运行时长可以是统计的电子设备平均每天内运行的时长,或者可以是统计的电子设备平均一个月内运行的时长。具体地,电子设备在运行过程中会记录每次进入工作状态的工作开始时刻和工作结束时刻,然后根据记录的工作开始时刻和工作结束时刻可以计算每次工作的工作时长。In one embodiment, the state of the electronic device can be divided into a standby state and an operating state. In the standby state, the electronic device does not perform any substantial operation on the file or the program, and only the electronic device can work on the file or The program handles it. The average running time indicates the length of time that the electronic device runs on the unit time. The unit time can be set in advance. For example, the average running time can be the average length of time that a statistical electronic device runs within a day, or can be the length of time that a statistical electronic device runs within an average of one month. Specifically, the electronic device records the work start time and the work end time each time entering the work state during the running process, and then calculates the work time length of each work according to the recorded work start time and the work end time.
在计算平均运行时长时,可以获取电子设备在统计时段内的运行数据,然后根据运行数据计算运行时长。统计时段是指用于统计平均运行时长的时间段,运行数据是指电子设备在运行过程中产生的数据,可以包括工作开始时刻和工作结束时刻。根据统计时段内的运行数据可以计算统计时段内每个单位时长内的运行时长,并根据获取的每个单位时长内的运行时长计算平均运行时长。例如,当前时刻为2017年12月25日15:30:00,则统计时段可以是前一个月内的运行数据,即获取从2017年11月25日15:30:00到2017年12月25日15:30:00内电子设备的运行数据。然后根据运行数据计算这一个月内每天的运行时长,再将每天的运行时长进行平均得到平均运行时长。When calculating the average running time, the running data of the electronic device during the statistical period can be obtained, and then the running time is calculated according to the running data. The statistical period refers to the time period used to calculate the average running time. The running data refers to the data generated by the electronic device during the running process, and may include the work start time and the work end time. According to the running data in the statistical period, the running time in each unit time in the statistical period can be calculated, and the average running time is calculated according to the running time in each unit length obtained. For example, if the current time is 15:30:00 on December 25, 2017, the statistical time period can be the operational data in the previous month, that is, from 15:30:00 on November 25, 2017 to December 25, 2017. The operating data of the electronic equipment within 15:30:00. Then calculate the running time of the day in the month based on the running data, and then average the running time of each day to get the average running time.
用户依赖程度用于表示用户对电子设备的依赖程度,可以但不限于包括第一级依赖程度、第二级依赖程度和第三级依赖程度。预先建立平均运行时长和用户依赖程度的对应关系,然后根据平均运行时长获取对应的用户依赖程序。其中,第一级依赖程度高于第二级依赖程度,第二级依赖程度高于第三级依赖程度。一般地,第一级依赖程度表示用户对电子设备的重度依赖,第二级依赖程度表示用户对电子设备的普通依赖,第三级依赖程度表示用户对电子设备的轻度依赖。例如,平均运行时长可以表示为手机平均每天运行的时长,当用户平均每天运行的时长在8小时以上时,对应的用户依赖程度为第一级依赖程度;当用户平均每天运行的时长在4到8小时之间时,对应的用户依赖程度为第二级依赖程度;当用户平均每天运行的时长在4小时以下时,对应的用户依赖程度为第三级依赖程度。The degree of user dependency is used to indicate the degree of user dependence on the electronic device, and may be, but is not limited to, including the first level of dependency, the second level of dependency, and the third level of dependency. The correspondence between the average running time and the degree of user dependency is established in advance, and then the corresponding user dependent program is obtained according to the average running time. Among them, the degree of dependence of the first level is higher than that of the second level, and the degree of dependence of the second level is higher than that of the third level. Generally, the first level of dependency indicates the user's heavy dependence on the electronic device, the second level of dependence indicates the user's general dependence on the electronic device, and the third level of dependence indicates the user's slight dependence on the electronic device. For example, the average running time can be expressed as the average running time of the mobile phone every day. When the average running time of the user is more than 8 hours per day, the corresponding user dependency degree is the first level dependence; when the average user runs for 4 hours per day Between 8 hours, the corresponding user dependency degree is the second level dependency degree; when the average user running time is less than 4 hours per day, the corresponding user dependency degree is the third level dependency degree.
操作306,根据用户属性信息获取目标应用程序,并根据用户依赖程度获取资源限制策略。Operation 306: Obtain a target application according to user attribute information, and obtain a resource restriction policy according to the degree of user dependency.
目标应用程序是指需要进行资源限制处理的应用程序,预先建立用户属性信息与目标应用程序的对应关系,然后根据用户属性信息获取对应的目标应用程序。用户属性信息不同,对应的目标应用程序不同。例如用户属性信息可以是用户的性别,当用户为男性时,对应的目标应用程序为游戏类应用程序;当用户为女性时,对应的目标应用程序为购物类应用程序。The target application refers to an application that needs to perform resource limitation processing, pre-establishes a correspondence between the user attribute information and the target application, and then acquires a corresponding target application according to the user attribute information. The user attribute information is different, and the corresponding target application is different. For example, the user attribute information may be the gender of the user. When the user is a male, the corresponding target application is a game application; when the user is a female, the corresponding target application is a shopping application.
资源限制策略是指用于对目标应用程序进行资源限制处理的策略,预先建立用户依赖程度和资源限制策略的对应关系,然后根据用户依赖程度获取对应的资源限制策略。例如,用户依赖程度为第一级依赖程度时,当目标应用程序在前台运行的时长超过2个小时, 就将前台运行的目标应用程序进行冻结。A resource restriction policy is a policy for performing resource restriction processing on a target application, and a corresponding relationship between a user dependency degree and a resource restriction policy is established in advance, and then a corresponding resource restriction policy is obtained according to the degree of user dependency. For example, when the degree of user dependency is the first level of dependency, when the target application runs in the foreground for more than 2 hours, the target application running in the foreground is frozen.
操作308,根据资源限制策略对目标应用程序进行资源限制处理。 Operation 308, performing resource restriction processing on the target application according to the resource restriction policy.
资源是指电子设备在处理应用事件时所必须用到的软件或硬件资源,比如电子设备的CPU(Central Processing Unit,中央处理器)、内存(Memory)、硬件、网络资源、IO(Input-Output,输入输出)等。资源限制处理是指对应用程序占用的资源进行限制的处理。资源限制处理可以但不限于是控制应用程序进入冻结状态或资源限制状态,处于冻结状态的应用程序没有被关闭,只是暂时不运行。当应用程序处于冻结状态时,应用程序不占用处理器资源,但是仍然占用电子设备的内存和硬件等资源。资源限制状态是指对应用程序在运行时使用的电子设备的资源进行限制的状态,例如控制应用程序在运行时使用的CPU占用率不能超过5%。A resource is a software or hardware resource that an electronic device must use to process an application event, such as a CPU (Central Processing Unit), memory, hardware, network resources, and IO (Input-Output). , input and output) and so on. Resource limit processing refers to the process of restricting the resources occupied by the application. The resource limit processing can be, but is not limited to, controlling the application to enter a frozen state or a resource restricted state, and the application in the frozen state is not closed, but is not temporarily running. When the application is frozen, the application does not consume processor resources, but still occupies resources such as memory and hardware of the electronic device. The resource limit state refers to the state in which the resources of the electronic device used by the application at runtime are restricted. For example, the CPU usage of the control application at runtime cannot exceed 5%.
上述实施例应用程序处理方法,可以根据电子设备中各个应用程序的历史运行数据获取用户属性信息,根据电子设备的平均运行时长获取用户依赖程序,并根据用户依赖程度获取资源限制策略。然后根据获取的资源限制策略对目标应用程序进行资源限制处理。这样可以根据用户对电子设备的使用习惯,实现对电子设备中应用程序的运行的控制,针对不同用户做不同的处理,使得电子设备能够更准确地对应用程序进行控制,提高了电子设备的用户黏度。In the above embodiment, the application processing method can obtain the user attribute information according to the historical running data of each application in the electronic device, obtain the user dependent program according to the average running time of the electronic device, and obtain the resource limiting policy according to the degree of user dependence. The target application is then subjected to resource restriction processing according to the obtained resource restriction policy. In this way, according to the user's habit of using the electronic device, the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
图4为另一个实施例中应用程序处理方法的流程图。本实施例中的应用程序处理方法,以运行于图1中的终端或服务器上为例进行描述。如图4所示,该应用程序处理方法包括操作402至操作418。其中:4 is a flow chart of an application processing method in another embodiment. The application processing method in this embodiment is described by using the terminal or server running in FIG. 1 as an example. As shown in FIG. 4, the application processing method includes operations 402 through 418. among them:
操作402,获取电子设备中各个应用程序的历史运行数据,根据历史运行数据获取使用电子设备的用户所对应的用户属性信息。Operation 402: Acquire historical running data of each application in the electronic device, and acquire user attribute information corresponding to the user who uses the electronic device according to the historical running data.
在本申请提供的实施例中,历史运行数据可以是指各个应用程序的耗电量和/或运行频率。耗电量是指应用程序在历史运行过程中消耗的电子设备的电量。则操作402具体可以包括:获取电子设备中各个应用程序的耗电量,根据耗电量获取耗电应用程序,并根据耗电应用程序获取使用电子设备的用户所对应的用户属性信息。应用程序的耗电量越高,说明用户对该应用程序的使用频率越高,根据应用程序的耗电量可以分析用户对应用程序的使用习惯。In the embodiments provided by the present application, the historical running data may refer to the power consumption and/or operating frequency of each application. Power consumption is the amount of power consumed by an application during its historical operation. The operation 402 may specifically include: acquiring power consumption of each application in the electronic device, acquiring a power consumption application according to the power consumption, and acquiring user attribute information corresponding to the user using the electronic device according to the power consumption application. The higher the power consumption of the application, the more frequently the user uses the application, and the user's usage habits can be analyzed based on the power consumption of the application.
具体地,根据耗电量获取耗电应用程序可以包括以下方式中至少一种:获取耗电量超过电量阈值的应用程序,作为耗电应用程序;根据耗电量将应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序。电量阈值可以由用户或系统预先进行设置,耗电量高于电量阈值的应用程序,认为是用户最经常使用的应用程序,然后根据用户最经常使用的应用程序来分析用户属性信息。还可以将各个应用程序根据耗电量进行排序,然后在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序,获取的指定位数的应用程序可以看做最经常使用的应用程序。例如,将各个应用程序按照耗电量进行降序排序,然后获取排序后的应用程序的前三位应用程序,作为耗电应用程序。当前三位应用程序为“his购物”、“sou购物”、“lirg购物”时,可以认为该电子设备为女性用户。Specifically, acquiring the power consumption application according to the power consumption may include at least one of the following methods: acquiring an application that consumes more power than the power threshold, as a power consumption application; sorting the application according to power consumption, and Get the specified number of applications in the sorted application as a power-consuming application. The power threshold can be set in advance by the user or the system, the application that consumes more power than the power threshold, is considered to be the most frequently used application by the user, and then analyzes the user attribute information according to the application most frequently used by the user. It is also possible to sort each application according to the power consumption, and then obtain the specified number of applications in the sorted application as a power-consuming application, and the application that obtains the specified number of digits can be regarded as the most frequently used application. program. For example, each application is sorted in descending order of power consumption, and then the top three applications of the sorted application are obtained as power-consuming applications. When the current three applications are "his shopping", "sou shopping", "lirg shopping", the electronic device can be considered as a female user.
电子设备在运行过程中会对各个应用程序的耗电量进行统计,一般应用程序的运行时间越长,资源占用率越高,耗电量越高。例如,在Android系统中,framework(框架)层中有一个专门用于统计电量的Service(服务):BatteryStatsSerive。该BatteryStatsSerive服务可以在ActivityManagerService中创建,ActivityManagerService会对电子设备中的各个模块数据存放到系统目录batterystats.bin文件中,然后通过数据分析器BatteryStatsImpl来分析电量数据,从而实现对耗电量的统计。During the operation of the electronic device, the power consumption of each application is counted. The longer the running time of the general application, the higher the resource occupancy rate and the higher the power consumption. For example, in the Android system, there is a Service (service) dedicated to statistical power in the framework layer: BatteryStatsSerive. The BatteryStatsSerive service can be created in the ActivityManagerService. The ActivityManagerService stores the data of each module in the electronic device into the system catalog batterystats.bin file, and then analyzes the power data through the data analyzer BatteryStatsImpl, thereby realizing the statistics of power consumption.
运行频率可以是指应用程序在单位时长内运行的次数,也可以是指应用程序在单位时长内运行的平均时长。则操作402具体可以包括:获取电子设备中各个应用程序的运行频率,根据运行频率获取频率应用程序,并根据频率应用程序使用电子设备的用户所对应的用户属性信息。应用程序的运行频率越高,说明用户对该应用程序的使用频率越高,根据应用程序的运行频率可以分析用户对应用程序的使用习惯。The running frequency can refer to the number of times the application runs within the unit time period, or the average length of time the application runs within the unit time. The operation 402 may specifically include: acquiring an operating frequency of each application in the electronic device, acquiring a frequency application according to the operating frequency, and using user attribute information corresponding to the user of the electronic device according to the frequency application. The higher the application's running frequency, the higher the user's frequency of use of the application, and the user's usage habits can be analyzed according to the running frequency of the application.
具体地,根据运行频率获取频率应用程序可以包括以下方式中至少一种:获取运行频率超过频率阈值的应用程序,作为频率应用程序;根据运行频率将应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为频率应用程序。频率阈值可以由用户或系统预先进行设置,运行频率高于频率阈值的应用程序,认为是用户最经常使用的应用程序,然后根据用户最经常使用的应用程序来分析用户属性信息。还可以将各个应用程序根据运行频率进行排序,然后在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序,获取的指定位数的应用程序可以看作最经常使用的应用程序。例如,将应用程序按照运行频率进行降序排列,然后在排序后的应用程序中获取前三位应用程序,作为频率应用程序。Specifically, acquiring the frequency application according to the operating frequency may include at least one of: acquiring an application whose operating frequency exceeds the frequency threshold as a frequency application; sorting the application according to the operating frequency, and sorting the application Get the specified number of applications in the application as a frequency application. The frequency threshold can be set in advance by the user or the system, the application running at a frequency higher than the frequency threshold is considered to be the most frequently used application by the user, and then the user attribute information is analyzed according to the application most frequently used by the user. It is also possible to sort each application according to the running frequency, and then obtain the specified number of applications in the sorted application as a power-consuming application, and the application that obtains the specified number of bits can be regarded as the most frequently used application. . For example, sort the application in descending order of running frequency, and then get the top three applications in the sorted application as a frequency application.
操作404,获取电子设备的平均运行时长,确定平均运行时长落入的目标时长区间。 Operation 404, obtaining an average running time of the electronic device, and determining a target duration interval in which the average running time falls.
操作406,根据目标时长区间获取对应的用户依赖程度。 Operation 406, obtaining a corresponding degree of user dependency according to the target duration interval.
在一个实施例中,可以预先将电子设备的平均运行时长的取值范围划分为两个以两个以上的时长区间,然后建立每个时长区间与用户依赖程度的对应关系,然后根据该对应关系来获取电子设备的用户依赖程度。例如,计算平均运行时长的单位时长可以为三天,那么平均运行时长可以表示为电子设备每三天内平均运行的时长,则平均运行时长的取值范围就为0到72小时。将平均运行时长的取值范围划分为三个时长区间,则可以分为[0,12]、[12,36]、[36,72]等三个时长区间,对应的用户依赖程度为第一级依赖程度、第二级依赖程度和第三级依赖程度。假设当前统计的电子设备的平均运行时长为24小时,那么该用户就对应的用户依赖程度就为第二级依赖程度。In an embodiment, the range of the average running time of the electronic device may be divided into two time intervals of two or more durations, and then the correspondence between each time interval and the degree of user dependence may be established, and then according to the corresponding relationship. To get the user dependence of the electronic device. For example, the unit time for calculating the average running time can be three days, then the average running time can be expressed as the average running time of the electronic device every three days, and the average running time ranges from 0 to 72 hours. The range of the average running time is divided into three time intervals, which can be divided into three time intervals of [0, 12], [12, 36], [36, 72], and the corresponding user dependence is first. Level dependency, second level dependency, and third level dependency. Assuming that the average running time of the currently counted electronic device is 24 hours, then the corresponding user dependency degree of the user is the second level of dependency.
操作408,根据用户属性信息获取目标应用程序。 Operation 408, obtaining a target application according to user attribute information.
在一个实时例中,可以通过目标应用列表来存储目标应用程序,该目标应用列表中包含一个或多个需要目标应用程序的应用标识。每个目标应用列表都对应一个目标列表标识,预先用户属性信息与目标列表标识的对应关系。电子设备在根据历史运行数据获取到用户属性信息之后,可以根据用户属性信息获取目标列表标识,并根据目标列表标识对应的目标应用列表获取目标应用程序。例如,用户属性信息可以包括未成年和成年,对应的目标列表标识分别为“list_01”、“list_02”。当电子设备根据历史运行数据识别用户为未成年时,则可以获取对应的目标列表标识为“list_01”,再根据“list_01”对应的目标应用列表中包含的应用标识就可以获取目标应用程序。In a real-time example, the target application can be stored through a list of target applications that contain one or more application identities that require the target application. Each target application list corresponds to a target list identifier, a correspondence between the pre-user attribute information and the target list identifier. After acquiring the user attribute information according to the historical running data, the electronic device may obtain the target list identifier according to the user attribute information, and obtain the target application according to the target application list corresponding to the target list identifier. For example, the user attribute information may include minors and adults, and the corresponding target list identifiers are “list_01” and “list_02”, respectively. When the electronic device identifies the user as a minor according to the historical running data, the corresponding target list identifier may be obtained as “list_01”, and the target application may be acquired according to the application identifier included in the target application list corresponding to “list_01”.
该目标应用列表可以是由用户设置的,也可以是由电子设备系统自动生成的,还可以是由服务器下发的,在本申请中不做具体限定。具体地,用户可以通过电子设备发起对目标应用列表的修改指令,电子设备根据该修改指令对该目标应用列表进行修改。其中,修改指令中可以但不限于包括应用标识和对应的修改信息。修改可以包括添加、删除和替换等操作。例如,用户可以通过电子设备界面选定一个应用标识,然后点击删除按钮,则将该应用标识从该目标应用列表中进行删除。终端还可以将各个应用程序的历史运行数据发送给服务器,服务器接收到终端发送的历史运行数据之后,对运行数据进行学习和分析,并根据分析结果生成目标应用列表,然后将目标应用列表推动给终端。The target application list may be set by the user, or may be automatically generated by the electronic device system, or may be delivered by the server, and is not specifically limited in the present application. Specifically, the user may initiate a modification instruction to the target application list by using the electronic device, and the electronic device modifies the target application list according to the modification instruction. The modification instruction may include, but is not limited to, including an application identifier and corresponding modification information. Modifications can include actions such as adding, deleting, and replacing. For example, the user can select an application identifier through the electronic device interface, and then click the delete button to delete the application identifier from the target application list. The terminal may also send historical running data of each application to the server. After receiving the historical running data sent by the terminal, the server learns and analyzes the running data, generates a target application list according to the analysis result, and then pushes the target application list to the server. terminal.
操作410,当用户依赖程度为第一级依赖程度时,获取第一资源限制策略和第二资源限制策略。Operation 410: Acquire a first resource restriction policy and a second resource restriction policy when the degree of user dependency is a first level dependency.
根据用户依赖程度获取对应的资源限制策略,根据资源限制策略对目标应用程序进行资源限制处理。本申请提供的实施例中,将资源限制策略分为第一资源限制策略和第二 资源限制策略,第一资源限制策略是指根据目标应用程序的前台运行时长控制目标应用程序进入资源限制状态的策略,第二资源限制策略是指根据目标应用程序切换到后台的时长控制目标应用程序进入冻结状态的策略。当用户依赖程度为第一级依赖程度时,说明用户对电子设备的使用频率过高,则可以对目标应用程序的前台运行和后台运行都进行资源限制处理。Obtain a corresponding resource restriction policy according to the degree of user dependency, and perform resource restriction processing on the target application according to the resource restriction policy. In the embodiment provided by the present application, the resource restriction policy is divided into a first resource restriction policy and a second resource restriction policy, where the first resource restriction policy refers to controlling the target application to enter the resource limitation state according to the foreground running time of the target application. The policy, the second resource restriction policy refers to a policy of controlling the target application to enter a frozen state according to the duration of the target application switching to the background. When the degree of user dependency is the first level of dependency, indicating that the frequency of use of the electronic device by the user is too high, the resource limitation processing may be performed on the foreground running and the background running of the target application.
操作412,当用户依赖程度为第二级依赖程度时,获取第二资源限制策略。In operation 412, when the degree of dependency of the user is the degree of dependence of the second level, the second resource restriction policy is acquired.
当用户依赖程度为第二级依赖程度时,说明用户对电子设备的使用频率为正常,则可以只将目标应用程序的后台运行进行资源限制,即获取第二资源限制策略,通过第二资源限制策略。When the degree of user dependency is the second level of dependency, indicating that the frequency of use of the electronic device is normal, the background operation of the target application may be limited, that is, the second resource restriction policy is acquired, and the second resource restriction is adopted. Strategy.
操作414,根据第一资源限制策略对目标应用程序进行资源限制处理,和/或根据第二资源限制策略对目标应用程序进行资源限制处理。 Operation 414, performing resource restriction processing on the target application according to the first resource restriction policy, and/or performing resource restriction processing on the target application according to the second resource restriction policy.
在一个实施例中,根据第一资源限制策略对目标应用程序进行资源限制处理包括:获取目标应用程序的前台运行时长;当前台运行时长超过第一时长阈值时,控制目标应用程序进入资源限制状态。处于资源限制状态的应用程序在运行时对电子设备的资源占用率小于占用率阈值,当目标应用程序处于资源限制状态时,目标应用程序对电子设备的资源占用率就不能超过占用率阈值,这样可以控制目标应用程序在前台的运行效率,降低用户对电子设备的依赖。例如,控制目标应用程序在运行时的CPU占用率不能超过5%,以减少目标应用程序对CPU的过度消耗,降低用户对手机的依赖。在手机系统中可以通过cgroups(control groups,控制组)来控制目标应用程序的CPU、内存、IO等资源占用率,即控制所获取的目标应用程序进入资源限制状态。In an embodiment, performing resource limitation processing on the target application according to the first resource restriction policy includes: acquiring a foreground running time of the target application; and when the current running time exceeds the first duration threshold, controlling the target application to enter the resource limiting state . When the resource-restricted application is running, the resource usage of the electronic device is less than the occupancy threshold. When the target application is in the resource-restricted state, the target application's resource occupancy rate for the electronic device cannot exceed the occupancy threshold. It can control the running efficiency of the target application in the foreground and reduce the user's dependence on the electronic device. For example, the CPU usage of the control target application should not exceed 5% at runtime to reduce the excessive consumption of CPU by the target application and reduce the user's dependence on the mobile phone. In the mobile phone system, cgroups (control groups) can be used to control the CPU usage of the target application, such as CPU, memory, and IO, that is, the target application accessed by the control enters the resource restriction state.
还可以根据电子设备的资源总占用率来控制目标应用程序进入资源限制状态,其中,资源总占用率是指电子设备中被占用的资源和总资源的比例。当目标应用程序的前台运行时长超过第一时长阈值时,获取电子设备的资源总占用率,并根据资源总占用率来控制目标应用程序进入资源限制状态。具体地,可以预先建立资源总占用率和资源限制级别的对应关系,处于资源限制状态时目标应用程序对电子设备的资源占用率不能超过占用率阈值。处于不同的资源限制级别时,目标应用程序对应的占用率阈值不同。获取电子设备的资源总占用率,并根据资源总占用率获取资源限制级别;控制目标应用程序进入资源限制级别对应的资源限制状态。例如,将电子设备的资源总占用率划分为50%~60%、60%~80%、80%~100%等三个占用级别,然后分别对应轻度资源限制级别、普通资源限制级别和深度资源限制级别等三个等级,根据资源总占用率可以获取对应的资源限制级别,不同的资源限制级别对应的占用率阈值不同。可以理解的是,不同资源对应的占用率阈值可以不同。比如,CPU占用率阈值可以为5%,内存占用率阈值可以为10%。The target application can also be controlled to enter the resource restriction state according to the total resource occupancy rate of the electronic device, where the total resource occupancy rate refers to the ratio of the occupied resources and the total resources in the electronic device. When the foreground running time of the target application exceeds the first duration threshold, the total resource occupancy rate of the electronic device is acquired, and the target application enters the resource limiting state according to the total resource occupancy rate. Specifically, the correspondence between the total resource occupancy rate and the resource restriction level may be established in advance, and the resource usage rate of the target application to the electronic device may not exceed the occupancy rate threshold when the resource is restricted. When the resource limit level is different, the target application has different occupancy thresholds. Obtain a total resource occupation rate of the electronic device, and obtain a resource restriction level according to the total resource occupancy rate; and control the target application to enter a resource restriction state corresponding to the resource restriction level. For example, the total resource occupancy rate of the electronic device is divided into three occupation levels of 50% to 60%, 60% to 80%, and 80% to 100%, and then corresponding to the light resource restriction level, the common resource restriction level, and the depth. The resource limit level is three levels, and the corresponding resource limit level can be obtained according to the total resource usage rate. The occupancy thresholds corresponding to different resource limit levels are different. It can be understood that the occupancy thresholds corresponding to different resources may be different. For example, the CPU usage threshold can be 5%, and the memory usage threshold can be 10%.
在其他实施例中,还可以根据目标应用程序的应用优先级来控制对资源的占用情况,预先建立应用优先级与资源限制级别的对应关系,然后根据目标应用程序的应用优先级来控制进入资源限制状态的资源限制级别。具体可以包括:当前台运行时长超过第一时长阈值时,获取目标应用程序对应的应用优先级;根据应用优先级获取对应的资源限制级别;控制目标应用程序进入资源限制级别对应的资源限制状态。In other embodiments, the occupancy of the resource may be controlled according to the application priority of the target application, the correspondence between the application priority and the resource restriction level is established in advance, and then the access resource is controlled according to the application priority of the target application. Limit the resource limit level of the state. The method may include: obtaining an application priority corresponding to the target application when the current running time exceeds the first duration threshold; acquiring a corresponding resource restriction level according to the application priority; and controlling the target application to enter a resource limitation state corresponding to the resource limitation level.
在本申请提供的实施例中,根据第二资源限制策略对目标应用程序进行资源限制处理包括:当检测到目标应用程序从前台切换到后台时,开始计时;当计时时长超过第二时长阈值时,则控制目标应用程序进入冻结状态。进入冻结状态的目标应用程序,无法再继续运行,这样可以减少目标应用程序对电子设备的资源占用。冻结后的目标应用程序还可以被唤醒,用户或系统可以对唤醒的条件进行设置。In the embodiment provided by the present application, performing resource restriction processing on the target application according to the second resource restriction policy includes: starting when the target application is detected to switch from the foreground to the background; when the timing duration exceeds the second duration threshold , then control the target application to enter a frozen state. The target application that enters the frozen state can no longer continue to run, which can reduce the resource consumption of the electronic device by the target application. The frozen target application can also be woken up, and the user or system can set the conditions for wakeup.
另外,当用户依赖程度为第三级依赖程度的时候,可以不对目标应用程序进行资源限制处理,也可以根据第三资源限制处理策略将目标应用程序进行资源限制处理。具体地,当用户依赖程度为第三级依赖程度时,获取第三资源限制策略。根据第三资源限制策略对 目标应用程序进行资源限制处理包括:当检测到目标应用程序从前台切换到后台时,开始计时;当计时时长超过第三时长阈值时,控制目标应用程序进入冻结状态。其中,第二时长阈值小于第三时长阈值。In addition, when the degree of user dependency is the third level of dependency, the target application may not be subjected to resource restriction processing, and the target application may be subjected to resource limitation processing according to the third resource limitation processing policy. Specifically, when the degree of user dependency is the third level dependency degree, the third resource restriction policy is acquired. The resource restriction processing on the target application according to the third resource restriction policy includes: starting when the target application is detected to switch from the foreground to the background, and when the timing duration exceeds the third duration threshold, the control target application enters a frozen state. The second duration threshold is less than the third duration threshold.
以Android系统中,实现应用程序的冻结和唤醒的方法有多种。以其中一种为例,可以通过pm(package manager,包管理)命令来实现,在pm命令中,可以通过冻结命令pm disable[–user USER_ID]PACKAGE_OR_COMPONENT将应用程序设置为冻结状态,然后还可以通过解冻命令pm enable[–user USER_ID]PACKAGE_OR_COMPONENT将处于冻结状态的应用程序进行唤醒,通过冻结列表查询命令pm list packages–d获取处于冻结状态的应用程序列表,以查看处于冻结状态的应用程序。可以理解的是,本申请中以Android操作系统为例对应用程序处理方法进行说明,但是本申请的应用程序处理方法并不仅限于在Android系统中实现,还可以应用在IOS(IPhone Operating System)、塞班、Windows、MAC OS(Macintosh Operating System)等操作系统中。In the Android system, there are various ways to implement application freezing and wake-up. For example, one can be implemented by the pm (package manager) command. In the pm command, the application can be set to a frozen state by the freeze command pm disable[–user USER_ID]PACKAGE_OR_COMPONENT, and then passed. The defrosting command pm enable[–user USER_ID]PACKAGE_OR_COMPONENT wakes up the application in the frozen state, and obtains the list of applications in the frozen state by freezing the list query command pm list packages–d to view the frozen application. It can be understood that the application processing method is described by taking the Android operating system as an example in the present application, but the application processing method of the present application is not limited to being implemented in the Android system, and can also be applied to the IOS (IPhone Operating System), In operating systems such as Symbian, Windows, and MAC OS (Macintosh Operating System).
操作416,获取从对目标应用程序进行资源限制处理的时刻到当前时刻的限制时长。Operation 416, obtaining a time limit from the time when the resource restriction processing is performed on the target application to the current time.
在对目标应用程序进行资源限制处理之后,电子设备启动计时器,然后通过计时器开始计时。电子设备可以针对每一个目标应用程序建立一个对应的计时器,每个目标应用程序进行资源限制处理时,都可以根据对应的计时器进行计时。预先建立目标应用程序的目标应用标识与计时器的计时标识的对应关系,通过目标应用标识对应的计时标识查找并启动计时器开始计时。以Android系统为例,系统可以预先定义一个计时器,当检测到目标应用程序被唤醒时,目标应用标识查找对应的计时器,并通过timer.setBase(SystemClock.elapsedRealtime())将计时器清零,然后通过timer.start()函数启动计时器,开始计时。After the resource limit processing is performed on the target application, the electronic device starts a timer and then starts counting through the timer. The electronic device can establish a corresponding timer for each target application, and each target application can perform timing according to the corresponding timer when performing resource limitation processing. Corresponding relationship between the target application identifier of the target application and the timing identifier of the timer is established in advance, and the timer is searched and started by the timing identifier corresponding to the target application identifier. Taking the Android system as an example, the system can predefine a timer. When it is detected that the target application is awakened, the target application identifier searches for a corresponding timer, and the timer is cleared by timer.setBase(SystemClock.elapsedRealtime()). Then start the timer with the timer.start() function and start timing.
操作418,当限制时长超过限制时长阈值时,将目标应用程序恢复到正常运行状态。 Operation 418, when the limit duration exceeds the limit duration threshold, the target application is restored to a normal operating state.
当限制时长超过限制时长阈值时,将目标应用程序恢复到正常运行状态。当目标应用程序处于资源限制状态时,解除电子设备对目标应用程序的资源限制。当目标应用程序处于冻结状态时,将目标应用程序从冻结状态中唤醒。恢复到正常运行状态后,目标应用程序对电子设备资源的使用不再受到限制。When the limit duration exceeds the limit duration threshold, the target application is restored to normal operation. When the target application is in the resource limit state, the electronic device's resource limit to the target application is released. Wakes up the target application from a frozen state when the target application is frozen. After returning to normal operation, the target application's use of electronic device resources is no longer restricted.
图5为一个实施例中应用程序的资源限制状态的示意图。如图5所示,电子设备的资源包括CPU、内存、IO、网络资源等,应用程序的状态可以分为正常运行状态、资源限制状态和冻结状态。其中,资源限制状态又可以分为轻度资源限制状态、普通资源限制状态和深度资源限制状态。在不同资源限制状态下,对应的可用资源502和不可用资源504不相同。从轻度资源限制状态、普通资源限制状态到深度资源限制状态,可用资源502递减。在正常运行状态下,应用程序的可用资源502为100%。FIG. 5 is a schematic diagram of a resource restriction state of an application in an embodiment. As shown in FIG. 5, the resources of the electronic device include a CPU, a memory, an IO, a network resource, and the like, and the state of the application may be classified into a normal running state, a resource limiting state, and a frozen state. The resource restriction state may be further divided into a light resource restriction state, a normal resource restriction state, and a deep resource restriction state. In different resource limitation states, the corresponding available resource 502 and the unavailable resource 504 are different. From the light resource limit state, the normal resource limit state to the deep resource limit state, the available resource 502 is decremented. In normal operation, the application's available resource 502 is 100%.
上述实施例提供的应用程序处理方法,可以根据电子设备中各个应用程序的历史运行数据获取用户属性信息,根据电子设备的平均运行时长获取用户依赖程序,并根据用户依赖程度获取第一资源限制策略和第二资源限制策略。然后根据获取的第一资源限制策略和第二资源限制策略对目标应用程序进行资源限制处理。这样可以根据用户对电子设备的使用习惯,实现对电子设备中应用程序的运行的控制,针对不同用户做不同的处理,使得电子设备能够更准确地对应用程序进行控制,提高了电子设备的用户黏度。The application processing method provided by the foregoing embodiment may obtain user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain a first resource restriction policy according to the degree of user dependency. And a second resource restriction policy. Then, the target application is subjected to resource restriction processing according to the obtained first resource restriction policy and the second resource restriction policy. In this way, according to the user's habit of using the electronic device, the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
应该理解的是,虽然图3和图4的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图3和图4中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the operations in the flowcharts of FIGS. 3 and 4 are sequentially displayed as indicated by the arrows, these operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and the operations may be performed in other sequences. Moreover, at least some of the operations in FIGS. 3 and 4 may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, or The order of execution of the stages is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-operations or stages of other operations or other operations.
在一个实施例中,如图6所示,提供了一种电子设备的部分架构图。其中,该电子设备的架构系统中包括JAVA空间层61、本地框架层62以及内核(Kernel)空间层63。JAVA空间层61上可包含策略应用程序610,电子设备可通过该策略应用程序610来发起对各个应用程序的冻结和解冻策略,从而实现对电子设备中的各个应用程序实现冻结和解冻的操作。例如,通过策略应用程序610来判断后台耗电的应用程序,并发起对该后台耗电的应用程序做冻结操作。本地框架层62中包含资源优先级和限制管理模块620及平台冻结管理模块622。电子设备可通过资源优先级和限制管理模块620来实时维护应用程序的优先级和对应的资源组,根据上层的需求来调整应用程序的优先级和资源组,从而达到优化性能,节省功耗的作用。电子设备可通过平台冻结管理模块622将后台可以冻结的任务按照进入冻结时间的长短,分配到对应预设的不同层次的冻结层,可选地,该冻结层可包括:CPU限制睡眠模式、CPU冻结睡眠模式、进程深度冻结模式。内核空间层63中包括UID管理模块630、Cgroup模块632、超时冻结退出模块634、Binder管控模块636、进程内存回收模块638。其中,UID管理模块630可以基于应用程序的用户身份标识(User Identifier,UID)来管理第三方应用程序的资源或进行冻结。相比较于基于进程身份标识(Process Identifier,PID)来进行进程管控,通过UID更便于统一管理一个用户的应用的资源。Cgroup模块632用于提供一套完善的中央处理器(Central Processing Unit,CPU)、CPUSET、内存(memory)、输入/输出(input/output,I/O)和Net相关的资源限制机制。超时冻结退出模块634用于解决出现冻结超时场景产生的异常。Binder管控模块636用于实现后台binder通信的优先级的控制。进程内存回收模块638用于实现进程的深度冻结模式,当第三方应用程序长期处于冻结状态的时候,可以释放进程的文件区,从而达到节省内存的模块,也加快该应用程序在下次启动时的速度。通过上述的架构,可实现本申请各个实施例中的应用程序处理方法。In one embodiment, as shown in FIG. 6, a partial architectural diagram of an electronic device is provided. The architecture system of the electronic device includes a JAVA space layer 61, a local frame layer 62, and a Kernel space layer 63. The JAVA spatial layer 61 can include a policy application 610 through which the electronic device can initiate a freeze and thaw strategy for each application, thereby implementing freezing and thawing operations for each application in the electronic device. For example, the policy application 610 determines the background power consumption application and initiates a freeze operation on the background power consumption application. The local framework layer 62 includes a resource priority and restriction management module 620 and a platform freeze management module 622. The electronic device can maintain the priority of the application and the corresponding resource group in real time through the resource priority and restriction management module 620, and adjust the priority and the resource group of the application according to the requirements of the upper layer, thereby achieving optimized performance and saving power consumption. effect. The electronic device can allocate the tasks that can be frozen in the background to the frozen layer corresponding to the preset level by the platform freeze management module 622. Optionally, the frozen layer can include: the CPU limits the sleep mode, and the CPU Freeze sleep mode, process deep freeze mode. The kernel space layer 63 includes a UID management module 630, a Cgroup module 632, a timeout freeze exit module 634, a Binder management module 636, and a process memory recovery module 638. The UID management module 630 can manage resources of the third-party application or freeze based on the User Identifier (UID) of the application. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID. The Cgroup module 632 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms. The timeout freeze exit module 634 is configured to resolve an exception generated by the freeze timeout scenario. The Binder management module 636 is used to implement the priority control of the background binder communication. The process memory recovery module 638 is configured to implement a deep freeze mode of the process. When the third-party application is in a frozen state for a long time, the file area of the process can be released, thereby saving the memory module and speeding up the application at the next startup. speed. Through the above architecture, the application processing method in various embodiments of the present application can be implemented.
图7为一个实施例中应用程序处理装置的结构示意图。如图7所示,该应用程序处理装置700包括用户信息获取模块702、依赖程度获取模块704、策略获取模块706和应用处理模块708。其中:FIG. 7 is a schematic structural diagram of an application processing apparatus in an embodiment. As shown in FIG. 7, the application processing apparatus 700 includes a user information acquisition module 702, a dependency degree acquisition module 704, a policy acquisition module 706, and an application processing module 708. among them:
用户信息获取模块702,用于获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息。The user information obtaining module 702 is configured to acquire historical running data of each application in the electronic device, and obtain user attribute information corresponding to the user who uses the electronic device according to the historical running data.
依赖程度获取模块704,用于获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度。The dependency degree obtaining module 704 is configured to acquire an average running time of the electronic device, and obtain a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, The degree of user dependency is used to indicate how much the user is dependent on the electronic device.
策略获取模块706,用于根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略。The policy obtaining module 706 is configured to obtain a target application according to the user attribute information, and obtain a resource restriction policy according to the user dependency degree.
应用处理模块708,用于根据所述资源限制策略对所述目标应用程序进行资源限制处理。The application processing module 708 is configured to perform resource limitation processing on the target application according to the resource restriction policy.
上述实施例应用程序处理装置,可以根据电子设备中各个应用程序的历史运行数据获取用户属性信息,根据电子设备的平均运行时长获取用户依赖程序,并根据用户依赖程度获取资源限制策略。然后根据获取的资源限制策略对目标应用程序进行资源限制处理。这样可以根据用户对电子设备的使用习惯,实现对电子设备中应用程序的运行的控制,针对不同用户做不同的处理,使得电子设备能够更准确地对应用程序进行控制,提高了电子设备的用户黏度。The application processing device of the above embodiment can obtain user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain a resource restriction policy according to the degree of user dependence. The target application is then subjected to resource restriction processing according to the obtained resource restriction policy. In this way, according to the user's habit of using the electronic device, the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
图8为另一个实施例中应用程序处理装置的结构示意图。如图8所示,该应用程序处理装置800包括用户信息获取模块802、依赖程度获取模块804、策略获取模块806、应 用处理模块808和应用恢复模块810。其中:FIG. 8 is a schematic structural diagram of an application processing apparatus in another embodiment. As shown in FIG. 8, the application processing apparatus 800 includes a user information acquisition module 802, a dependency degree acquisition module 804, a policy acquisition module 806, an application processing module 808, and an application recovery module 810. among them:
用户信息获取模块802,用于获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息。The user information obtaining module 802 is configured to acquire historical running data of each application in the electronic device, and obtain user attribute information corresponding to the user who uses the electronic device according to the historical running data.
依赖程度获取模块804,用于获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度。The dependency degree obtaining module 804 is configured to acquire an average running time of the electronic device, and obtain a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, The degree of user dependency is used to indicate how much the user is dependent on the electronic device.
策略获取模块806,用于根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略。The policy obtaining module 806 is configured to obtain a target application according to the user attribute information, and obtain a resource restriction policy according to the user dependency degree.
应用处理模块808,用于根据所述资源限制策略对所述目标应用程序进行资源限制处理。The application processing module 808 is configured to perform resource limitation processing on the target application according to the resource restriction policy.
应用恢复模块810,用于获取从对所述目标应用程序进行资源限制处理的时刻到当前时刻的限制时长;当所述限制时长超过限制时长阈值时,将所述目标应用程序恢复到正常运行状态。The application recovery module 810 is configured to acquire a time limit from a time when the resource limiting process is performed on the target application to a current time limit, and restore the target application to a normal running state when the limit duration exceeds a limit duration threshold. .
上述实施例应用程序处理装置,可以根据电子设备中各个应用程序的历史运行数据获取用户属性信息,根据电子设备的平均运行时长获取用户依赖程序,并根据用户依赖程度获取资源限制策略。然后根据获取的资源限制策略对目标应用程序进行资源限制处理。这样可以根据用户对电子设备的使用习惯,实现对电子设备中应用程序的运行的控制,针对不同用户做不同的处理,使得电子设备能够更准确地对应用程序进行控制,提高了电子设备的用户黏度。The application processing device of the above embodiment can obtain user attribute information according to historical operation data of each application in the electronic device, acquire a user dependent program according to an average running time of the electronic device, and obtain a resource restriction policy according to the degree of user dependence. The target application is then subjected to resource restriction processing according to the obtained resource restriction policy. In this way, according to the user's habit of using the electronic device, the operation of the application in the electronic device can be controlled, and different processes can be performed for different users, so that the electronic device can more accurately control the application and improve the user of the electronic device. Viscosity.
在一个实施例中,用户信息获取模块802还用于获取电子设备中各个应用程序的耗电量,根据所述耗电量获取耗电应用程序,并根据耗电应用程序获取使用所述电子设备的用户所对应的用户属性信息;和/或获取电子设备中各个应用程序的运行频率,根据所述运行频率获取频率应用程序,并根据所述频率应用程序使用所述电子设备的用户所对应的用户属性信息。In an embodiment, the user information obtaining module 802 is further configured to acquire power consumption of each application in the electronic device, obtain a power consumption application according to the power consumption, and acquire and use the electronic device according to the power consumption application. User attribute information corresponding to the user; and/or obtaining an operating frequency of each application in the electronic device, acquiring a frequency application according to the operating frequency, and using a user corresponding to the electronic device according to the frequency application User attribute information.
在一个实施例中,用户信息获取模块802还用于获取所述耗电量超过电量阈值的应用程序,作为耗电应用程序;和/或根据所述耗电量将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序。In an embodiment, the user information obtaining module 802 is further configured to acquire the application that consumes the power consumption exceeding the power threshold as a power consumption application; and/or sort the application according to the power consumption. And get the specified number of applications in the sorted application as a power-consuming application.
在一个实施例中,用户信息获取模块802还用于获取所述运行频率超过频率阈值的应用程序,作为频率应用程序;和/或根据运行频率将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为频率应用程序。In one embodiment, the user information obtaining module 802 is further configured to acquire the application whose operating frequency exceeds the frequency threshold as a frequency application; and/or sort the applications according to the operating frequency, and after sorting The application gets the specified number of bits in the application as a frequency application.
在一个实施例中,依赖程度获取模块804还用于获取所述电子设备的平均运行时长,确定所述平均运行时长落入的目标时长区间;根据所述目标时长区间获取对应的用户依赖程度。In one embodiment, the dependency degree acquisition module 804 is further configured to acquire an average running time of the electronic device, determine a target duration interval in which the average running time falls, and obtain a corresponding user dependency degree according to the target duration interval.
在一个实施例中,策略获取模块806还用于当所述用户依赖程度为第一级依赖程度时,获取第一资源限制策略和第二资源限制策略;当所述用户依赖程度为第二级依赖程度时,获取第二资源限制策略。In an embodiment, the policy obtaining module 806 is further configured to: when the degree of user dependency is a first level of dependency, acquire a first resource limiting policy and a second resource limiting policy; when the user dependency level is a second level When the degree of dependency is reached, the second resource restriction policy is obtained.
在一个实施例中,应用处理模块808还用于根据所述第一资源限制策略对所述目标应用程序进行资源限制处理;和/或根据所述第二资源限制策略对所述目标应用程序进行资源限制处理。In an embodiment, the application processing module 808 is further configured to perform resource limitation processing on the target application according to the first resource restriction policy; and/or perform the target application according to the second resource restriction policy. Resource limit processing.
在一个实施例中,应用处理模块808还用于获取所述目标应用程序的前台运行时长;当所述前台运行时长超过第一时长阈值时,控制所述目标应用程序进入资源限制状态。In an embodiment, the application processing module 808 is further configured to acquire a foreground running time of the target application; when the foreground running time exceeds a first duration threshold, the target application is controlled to enter a resource limiting state.
在一个实施例中,应用处理模块808还用于当检测到所述目标应用程序从前台切换到后台时,开始计时;当计时时长超过第二时长阈值时,控制所述目标应用程序进入冻结状态。In an embodiment, the application processing module 808 is further configured to start timing when detecting that the target application switches from the foreground to the background; and when the timing duration exceeds the second duration threshold, controlling the target application to enter a frozen state. .
上述应用程序处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将应 用程序处理装置按照需要划分为不同的模块,以完成上述应用程序处理装置的全部或部分功能。The division of the various modules in the application processing device described above is for illustrative purposes only. In other embodiments, the application processing device may be divided into different modules as needed to perform all or part of the functions of the application processing device.
本申请实施例中提供的应用程序处理装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。The implementation of each module in the application processing apparatus provided in the embodiments of the present application may be in the form of a computer program. The computer program can run on a terminal or server. The program modules of the computer program can be stored on the memory of the terminal or server. The operation of the method described in the embodiments of the present application is implemented when the computer program is executed by the processor.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行上述实施例提供的应用程序处理方法。The embodiment of the present application also provides a computer readable storage medium. One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to execute the applications provided by the above embodiments Approach.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例提供的应用程序处理方法。A computer program product comprising instructions which, when run on a computer, cause the computer to perform the application processing method provided by the above embodiments.
本申请实施例还提供了一种电子设备。如图9所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该电子设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以电子设备为手机为例:An embodiment of the present application also provides an electronic device. As shown in FIG. 9 , for the convenience of description, only the parts related to the embodiments of the present application are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application. The electronic device can be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an on-board computer, a wearable device, and the like, and the electronic device is used as a mobile phone. :
图9为与本申请实施例提供的电子设备相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(wireless fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图9所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 9 is a block diagram showing a partial structure of a mobile phone related to an electronic device according to an embodiment of the present application. Referring to FIG. 9, the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980. And power supply 990 and other components. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 9 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
其中,RF电路910可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器980处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 910 can be used for receiving and transmitting signals during the transmission and reception of information or during a call. The downlink information of the base station can be received and processed by the processor 980. The uplink data can also be sent to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.); The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. Moreover, memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元930可用于接收输入的数字或字符信息,以及产生与手机900的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控面板931以及其他输入设备932。触控面板931,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板931上或在触 控面板931附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板931可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器980,并能接收处理器980发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板931。除了触控面板931,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 931 or near the touch panel 931. Operation) and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 931 can include two portions of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 980 is provided and can receive commands from the processor 980 and execute them. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 931, the input unit 930 may also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示面板941。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。在一个实施例中,触控面板931可覆盖显示面板941,当触控面板931检测到在其上或附近的触摸操作后,传送给处理器980以确定触摸事件的类型,随后处理器980根据触摸事件的类型在显示面板941上提供相应的视觉输出。虽然在图9中,触控面板931与显示面板941是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板931与显示面板941集成而实现手机的输入和输出功能。The display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 940 can include a display panel 941. In one embodiment, the display panel 941 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. In one embodiment, the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 is The type of touch event provides a corresponding visual output on display panel 941. Although the touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.
手机900还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板941的亮度,接近传感器可在手机移动到耳边时,关闭显示面板941和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The handset 900 can also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and/or when the mobile phone moves to the ear. Or backlight. The motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
音频电路960、扬声器961和传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号输出;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据输出处理器980处理后,经RF电路910可以发送给另一手机,或者将音频数据输出至存储器920以便后续处理。 Audio circuitry 960, speaker 961, and microphone 962 can provide an audio interface between the user and the handset. The audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961. On the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and after being processed by the audio data output processor 980, it can be sent to another mobile phone via the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块970,但是可以理解的是,其并不属于手机900的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology, and the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access. Although FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone 900 and can be omitted as needed.
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器980可包括一个或多个处理单元。在一个实施例中,处理器980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。The processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone. In one embodiment, processor 980 can include one or more processing units. In one embodiment, the processor 980 can integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, a user interface, an application, and the like; the modem processor primarily processes wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
手机900还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 900 also includes a power source 990 (such as a battery) that supplies power to various components. Preferably, the power source can be logically coupled to the processor 980 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
在一个实施例中,手机900还可以包括摄像头、蓝牙模块等。In one embodiment, the handset 900 can also include a camera, a Bluetooth module, and the like.
在本申请实施例中,该电子设备所包括的处理器980执行存储在存储器上的计算 机程序时实现上述实施例提供的应用程序处理方法的操作。In the embodiment of the present application, the processor 980 included in the electronic device implements the operation of the application processing method provided by the foregoing embodiment when executing the computer program stored in the memory.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to a memory, storage, database or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as an external cache. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization. Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the claims. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (21)

  1. 一种应用程序处理方法,包括:An application processing method, including:
    获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息;Obtaining historical running data of each application in the electronic device, and acquiring user attribute information corresponding to the user who uses the electronic device according to the historical running data;
    获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度;Acquiring an average running time of the electronic device, and acquiring a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, and the user dependency degree is used to indicate a user pair The degree of dependence of the electronic device;
    根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略;及Obtaining a target application according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and
    根据所述资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the resource restriction policy.
  2. 根据权利要求1所述的方法,其特征在于,所述获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息包括以下方式中至少一种:The method according to claim 1, wherein the acquiring the historical running data of each application in the electronic device, and acquiring the user attribute information corresponding to the user using the electronic device according to the historical running data comprises the following manner At least one of:
    获取电子设备中各个应用程序的耗电量,根据所述耗电量获取耗电应用程序,并根据耗电应用程序获取使用所述电子设备的用户所对应的用户属性信息;及Obtaining power consumption of each application in the electronic device, acquiring a power consumption application according to the power consumption, and acquiring user attribute information corresponding to a user using the electronic device according to the power consumption application; and
    获取电子设备中各个应用程序的运行频率,根据所述运行频率获取频率应用程序,并根据所述频率应用程序使用所述电子设备的用户所对应的用户属性信息。Obtaining an operating frequency of each application in the electronic device, acquiring a frequency application according to the operating frequency, and using user attribute information corresponding to a user of the electronic device according to the frequency application.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述耗电量获取耗电应用程序包括以下方式中至少一种:The method according to claim 2, wherein the obtaining the power consumption application according to the power consumption comprises at least one of the following manners:
    获取所述耗电量超过电量阈值的应用程序,作为耗电应用程序;Obtaining the application that consumes more power than the power threshold as a power consumption application;
    根据所述耗电量将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序;Sorting the application according to the power consumption, and acquiring an application with a specified number of bits in the sorted application as a power consumption application;
    所述根据所述运行频率获取频率应用程序包括以下方式中至少一种:The acquiring the frequency application according to the operating frequency includes at least one of the following manners:
    获取所述运行频率超过频率阈值的应用程序,作为频率应用程序;及Obtaining an application whose operating frequency exceeds a frequency threshold as a frequency application; and
    根据运行频率将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为频率应用程序。The applications are sorted according to the running frequency, and the application with the specified number of bits is obtained as a frequency application in the sorted application.
  4. 根据权利要求1所述的方法,其特征在于,所述获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度包括:The method according to claim 1, wherein the obtaining an average running time of the electronic device, and obtaining a user dependency according to the average running time comprises:
    获取所述电子设备的平均运行时长,确定所述平均运行时长落入的目标时长区间;及Obtaining an average running time of the electronic device, and determining a target duration interval in which the average running time falls; and
    根据所述目标时长区间获取对应的用户依赖程度。Obtaining a corresponding degree of user dependency according to the target duration interval.
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述用户依赖程度获取资源限制策略包括:The method according to claim 1, wherein the obtaining a resource restriction policy according to the degree of user dependency comprises:
    当所述用户依赖程度为第一级依赖程度时,获取第一资源限制策略和第二资源限制策略;Obtaining the first resource restriction policy and the second resource restriction policy when the user dependency degree is a first level dependency degree;
    当所述用户依赖程度为第二级依赖程度时,获取第二资源限制策略,其中所述第一级依赖程度高于所述第二级依赖程度;Obtaining a second resource restriction policy when the degree of user dependency is a second level dependency degree, wherein the first level dependency degree is higher than the second level dependency degree;
    所述根据所述资源限制策略对所述目标应用程序进行资源限制处理包括以下方式中至少一种:The performing resource restriction processing on the target application according to the resource restriction policy includes at least one of the following manners:
    根据所述第一资源限制策略对所述目标应用程序进行资源限制处理;及Performing resource restriction processing on the target application according to the first resource restriction policy; and
    根据所述第二资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the second resource restriction policy.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述第一资源限制策略对所述目标应用程序进行资源限制处理包括:The method according to claim 5, wherein the performing resource restriction processing on the target application according to the first resource restriction policy comprises:
    获取所述目标应用程序的前台运行时长;Obtaining the foreground running time of the target application;
    当所述前台运行时长超过第一时长阈值时,控制所述目标应用程序进入资源限制状态;Controlling the target application to enter a resource restriction state when the foreground running time exceeds a first duration threshold;
    所述根据所述第二资源限制策略对所述目标应用程序进行资源限制处理包括:The performing resource restriction processing on the target application according to the second resource restriction policy includes:
    当检测到所述目标应用程序从前台切换到后台时,开始计时;及Start timing when it is detected that the target application switches from the foreground to the background; and
    当计时时长超过第二时长阈值时,控制所述目标应用程序进入冻结状态。When the timing duration exceeds the second duration threshold, the target application is controlled to enter a frozen state.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 6, wherein the method further comprises:
    获取从对所述目标应用程序进行资源限制处理的时刻到当前时刻的限制时长;及Obtaining a time limit from a time when the resource limiting process is performed on the target application to a current time; and
    当所述限制时长超过限制时长阈值时,将所述目标应用程序恢复到正常运行状态。When the limit duration exceeds the limit duration threshold, the target application is restored to a normal operating state.
  8. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations:
    获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息;Obtaining historical running data of each application in the electronic device, and acquiring user attribute information corresponding to the user who uses the electronic device according to the historical running data;
    获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度;Acquiring an average running time of the electronic device, and acquiring a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, and the user dependency degree is used to indicate a user pair The degree of dependence of the electronic device;
    根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略;及Obtaining a target application according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and
    根据所述资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the resource restriction policy.
  9. 根据权利要求8所述的电子设备,其特征在于,所述处理器执行所述获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息时,还执行如下操作中至少一种:The electronic device according to claim 8, wherein the processor executes the historical operation data of each application in the acquisition electronic device, and acquires, according to the historical operation data, a user corresponding to the user who uses the electronic device. When the user attribute information is used, at least one of the following operations is also performed:
    获取电子设备中各个应用程序的耗电量,根据所述耗电量获取耗电应用程序,并根据耗电应用程序获取使用所述电子设备的用户所对应的用户属性信息;及Obtaining power consumption of each application in the electronic device, acquiring a power consumption application according to the power consumption, and acquiring user attribute information corresponding to a user using the electronic device according to the power consumption application; and
    获取电子设备中各个应用程序的运行频率,根据所述运行频率获取频率应用程序,并根据所述频率应用程序使用所述电子设备的用户所对应的用户属性信息。Obtaining an operating frequency of each application in the electronic device, acquiring a frequency application according to the operating frequency, and using user attribute information corresponding to a user of the electronic device according to the frequency application.
  10. 根据权利要求9所述的电子设备,其特征在于,所述处理器执行所述根据所述耗电量获取耗电应用程序时,还执行以下操作中至少一种:The electronic device according to claim 9, wherein the processor further performs at least one of the following operations when the processor acquires the power consumption application according to the power consumption:
    获取所述耗电量超过电量阈值的应用程序,作为耗电应用程序;Obtaining the application that consumes more power than the power threshold as a power consumption application;
    根据所述耗电量将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序;Sorting the application according to the power consumption, and acquiring an application with a specified number of bits in the sorted application as a power consumption application;
    所述处理器执行所述根据所述运行频率获取频率应用程序时,还执行以下操作中至少一种:The processor further performs at least one of the following operations when the acquiring the frequency application according to the operating frequency:
    获取所述运行频率超过频率阈值的应用程序,作为频率应用程序;及Obtaining an application whose operating frequency exceeds a frequency threshold as a frequency application; and
    根据运行频率将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为频率应用程序。The applications are sorted according to the running frequency, and the application with the specified number of bits is obtained as a frequency application in the sorted application.
  11. 根据权利要求8所述的电子设备,其特征在于,所述处理器执行所述获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度时,还执行如下操作:The electronic device according to claim 8, wherein the processor performs the obtaining an average running time of the electronic device, and when acquiring the user dependency degree according to the average running time, performing the following operations:
    获取所述电子设备的平均运行时长,确定所述平均运行时长落入的目标时长区间;及Obtaining an average running time of the electronic device, and determining a target duration interval in which the average running time falls; and
    根据所述目标时长区间获取对应的用户依赖程度。Obtaining a corresponding degree of user dependency according to the target duration interval.
  12. 根据权利要求8所述的电子设备,其特征在于,所述处理器执行所述根据所述用户依赖程度获取资源限制策略时,还执行如下操作:The electronic device according to claim 8, wherein when the processor executes the resource restriction policy according to the degree of user dependency, the processor further performs the following operations:
    当所述用户依赖程度为第一级依赖程度时,获取第一资源限制策略和第二资源限制策略;Obtaining the first resource restriction policy and the second resource restriction policy when the user dependency degree is a first level dependency degree;
    当所述用户依赖程度为第二级依赖程度时,获取第二资源限制策略,其中所述第一级依赖程度高于所述第二级依赖程度;Obtaining a second resource restriction policy when the degree of user dependency is a second level dependency degree, wherein the first level dependency degree is higher than the second level dependency degree;
    所述处理器执行所述根据所述资源限制策略对所述目标应用程序进行资源限制处理 时,还执行如下操作中至少一种:And performing, by the processor, the resource limiting processing on the target application according to the resource restriction policy, and performing at least one of the following operations:
    根据所述第一资源限制策略对所述目标应用程序进行资源限制处理;及Performing resource restriction processing on the target application according to the first resource restriction policy; and
    根据所述第二资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the second resource restriction policy.
  13. 根据权利要求12所述的电子设备,其特征在于,所述处理器执行所述根据所述第一资源限制策略对所述目标应用程序进行资源限制处理时,还执行如下操作:The electronic device according to claim 12, wherein when the processor performs the resource limiting process on the target application according to the first resource restriction policy, the processor further performs the following operations:
    获取所述目标应用程序的前台运行时长;Obtaining the foreground running time of the target application;
    当所述前台运行时长超过第一时长阈值时,控制所述目标应用程序进入资源限制状态;Controlling the target application to enter a resource restriction state when the foreground running time exceeds a first duration threshold;
    所述处理器执行所述根据所述第二资源限制策略对所述目标应用程序进行资源限制处理时,还执行如下操作:When the processor performs the resource limitation processing on the target application according to the second resource restriction policy, the processor further performs the following operations:
    当检测到所述目标应用程序从前台切换到后台时,开始计时;及Start timing when it is detected that the target application switches from the foreground to the background; and
    当计时时长超过第二时长阈值时,控制所述目标应用程序进入冻结状态。When the timing duration exceeds the second duration threshold, the target application is controlled to enter a frozen state.
  14. 根据权利要求8至13任一项所述的电子设备,其特征在于,所述处理器还执行如下操作:The electronic device according to any one of claims 8 to 13, wherein the processor further performs the following operations:
    获取从对所述目标应用程序进行资源限制处理的时刻到当前时刻的限制时长;及Obtaining a time limit from a time when the resource limiting process is performed on the target application to a current time; and
    当所述限制时长超过限制时长阈值时,将所述目标应用程序恢复到正常运行状态。When the limit duration exceeds the limit duration threshold, the target application is restored to a normal operating state.
  15. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下操作:A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to:
    获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息;Obtaining historical running data of each application in the electronic device, and acquiring user attribute information corresponding to the user who uses the electronic device according to the historical running data;
    获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度,所述平均运行时长表示所述电子设备在单位时长内平均运行的时长,所述用户依赖程度用于表示用户对所述电子设备的依赖程度;Acquiring an average running time of the electronic device, and acquiring a user dependency degree according to the average running time length, where the average running time length indicates an average running time of the electronic device in a unit time length, and the user dependency degree is used to indicate a user pair The degree of dependence of the electronic device;
    根据所述用户属性信息获取目标应用程序,并根据所述用户依赖程度获取资源限制策略;及Obtaining a target application according to the user attribute information, and acquiring a resource restriction policy according to the user dependency degree; and
    根据所述资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the resource restriction policy.
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算机程序被处理器执行所述获取电子设备中各个应用程序的历史运行数据,根据所述历史运行数据获取使用所述电子设备的用户所对应的用户属性信息时,还执行如下操作中至少一种:The computer readable storage medium according to claim 15, wherein the computer program is executed by the processor to acquire historical operation data of each application in the electronic device, and use the electronic device according to the historical operation data acquisition When the user attribute information corresponding to the user of the device is performed, at least one of the following operations is also performed:
    获取电子设备中各个应用程序的耗电量,根据所述耗电量获取耗电应用程序,并根据耗电应用程序获取使用所述电子设备的用户所对应的用户属性信息;及Obtaining power consumption of each application in the electronic device, acquiring a power consumption application according to the power consumption, and acquiring user attribute information corresponding to a user using the electronic device according to the power consumption application; and
    获取电子设备中各个应用程序的运行频率,根据所述运行频率获取频率应用程序,并根据所述频率应用程序使用所述电子设备的用户所对应的用户属性信息。Obtaining an operating frequency of each application in the electronic device, acquiring a frequency application according to the operating frequency, and using user attribute information corresponding to a user of the electronic device according to the frequency application.
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机程序被处理器执行所述根据所述耗电量获取耗电应用程序时,还执行以下操作中至少一种:The computer readable storage medium according to claim 16, wherein the computer program is further executed by the processor when the power consumption application is acquired according to the power consumption, and at least one of the following operations is performed:
    获取所述耗电量超过电量阈值的应用程序,作为耗电应用程序;Obtaining the application that consumes more power than the power threshold as a power consumption application;
    根据所述耗电量将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为耗电应用程序;Sorting the application according to the power consumption, and acquiring an application with a specified number of bits in the sorted application as a power consumption application;
    所述计算机程序被处理器执行所述根据所述运行频率获取频率应用程序时,还执行以下操作中至少一种:The computer program is further executed by the processor when the frequency application is acquired according to the operating frequency, and at least one of the following operations is performed:
    获取所述运行频率超过频率阈值的应用程序,作为频率应用程序;及Obtaining an application whose operating frequency exceeds a frequency threshold as a frequency application; and
    根据运行频率将所述应用程序进行排序,并在排序后的应用程序中获取指定位数的应用程序作为频率应用程序。The applications are sorted according to the running frequency, and the application with the specified number of bits is obtained as a frequency application in the sorted application.
  18. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算机程序被 处理器执行所述获取所述电子设备的平均运行时长,根据所述平均运行时长获取用户依赖程度时,还执行如下操作:The computer readable storage medium according to claim 15, wherein the computer program is executed by the processor to obtain an average running time of the electronic device, and when the user is dependent on the average running time, Do the following:
    获取所述电子设备的平均运行时长,确定所述平均运行时长落入的目标时长区间;及Obtaining an average running time of the electronic device, and determining a target duration interval in which the average running time falls; and
    根据所述目标时长区间获取对应的用户依赖程度。Obtaining a corresponding degree of user dependency according to the target duration interval.
  19. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算机程序被处理器执行所述根据所述用户依赖程度获取资源限制策略时,还执行如下操作:The computer readable storage medium according to claim 15, wherein when the computer program is executed by the processor to obtain a resource restriction policy according to the degree of user dependency, the computer program further performs the following operations:
    当所述用户依赖程度为第一级依赖程度时,获取第一资源限制策略和第二资源限制策略;Obtaining the first resource restriction policy and the second resource restriction policy when the user dependency degree is a first level dependency degree;
    当所述用户依赖程度为第二级依赖程度时,获取第二资源限制策略,其中所述第一级依赖程度高于所述第二级依赖程度;Obtaining a second resource restriction policy when the degree of user dependency is a second level dependency degree, wherein the first level dependency degree is higher than the second level dependency degree;
    所述计算机程序被处理器执行所述根据所述资源限制策略对所述目标应用程序进行资源限制处理时,还执行如下操作中至少一种:When the computer program is executed by the processor, performing resource limitation processing on the target application according to the resource restriction policy, performing at least one of the following operations:
    根据所述第一资源限制策略对所述目标应用程序进行资源限制处理;及Performing resource restriction processing on the target application according to the first resource restriction policy; and
    根据所述第二资源限制策略对所述目标应用程序进行资源限制处理。Performing resource restriction processing on the target application according to the second resource restriction policy.
  20. 根据权利要求19所述的计算机可读存储介质,其特征在于,所述计算机程序被处理器执行所述根据所述第一资源限制策略对所述目标应用程序进行资源限制处理时,还执行如下操作:The computer readable storage medium according to claim 19, wherein when the computer program is executed by the processor to perform resource limitation processing on the target application according to the first resource restriction policy, the computer program is further executed as follows operating:
    获取所述目标应用程序的前台运行时长;Obtaining the foreground running time of the target application;
    当所述前台运行时长超过第一时长阈值时,控制所述目标应用程序进入资源限制状态;Controlling the target application to enter a resource restriction state when the foreground running time exceeds a first duration threshold;
    所述计算机程序被处理器执行所述根据所述第二资源限制策略对所述目标应用程序进行资源限制处理时,还执行如下操作:When the computer program is executed by the processor, performing resource limitation processing on the target application according to the second resource restriction policy, performing the following operations:
    当检测到所述目标应用程序从前台切换到后台时,开始计时;及Start timing when it is detected that the target application switches from the foreground to the background; and
    当计时时长超过第二时长阈值时,控制所述目标应用程序进入冻结状态。When the timing duration exceeds the second duration threshold, the target application is controlled to enter a frozen state.
  21. 根据权利要求15至20任一项所述的计算机可读存储介质,其特征在于,所述计算机程序被处理器执行时,还执行如下操作:The computer readable storage medium according to any one of claims 15 to 20, wherein when the computer program is executed by the processor, the following operations are further performed:
    获取从对所述目标应用程序进行资源限制处理的时刻到当前时刻的限制时长;及Obtaining a time limit from a time when the resource limiting process is performed on the target application to a current time; and
    当所述限制时长超过限制时长阈值时,将所述目标应用程序恢复到正常运行状态。When the limit duration exceeds the limit duration threshold, the target application is restored to a normal operating state.
PCT/CN2018/116532 2017-12-29 2018-11-20 Application program processing method, electronic device, and computer readable storage medium WO2019128546A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711489113.2 2017-12-29
CN201711489113.2A CN110008008A (en) 2017-12-29 2017-12-29 Applied program processing method and device, electronic equipment, computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019128546A1 true WO2019128546A1 (en) 2019-07-04

Family

ID=67063022

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116532 WO2019128546A1 (en) 2017-12-29 2018-11-20 Application program processing method, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110008008A (en)
WO (1) WO2019128546A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124632B (en) * 2019-12-06 2024-02-13 西安易朴通讯技术有限公司 Optimization method and device of mobile terminal, terminal equipment and storage medium
CN111124674B (en) * 2019-12-11 2024-04-02 深圳创维-Rgb电子有限公司 Management method of hardware resources, storage medium and terminal
CN111240704B (en) * 2020-01-02 2022-03-25 联想(北京)有限公司 Processing method and processing device
CN112288206A (en) * 2020-02-18 2021-01-29 北京沃东天骏信息技术有限公司 Resource allocation method and device, computer storage medium and electronic equipment
CN111355848B (en) * 2020-03-11 2021-04-13 Oppo广东移动通信有限公司 Positioning control method and device of electronic equipment, storage medium and electronic equipment
CN111538636B (en) * 2020-04-24 2021-11-19 深圳华锐金融技术股份有限公司 Computer equipment determination method and device and storage medium
CN112083931A (en) * 2020-09-15 2020-12-15 上海眼控科技股份有限公司 Program processing method, device and equipment
CN112650564A (en) * 2020-12-18 2021-04-13 北京紫光展锐通信技术有限公司 Application limiting method and electronic equipment
CN115237323A (en) * 2022-07-06 2022-10-25 Oppo广东移动通信有限公司 Interface display method and device, electronic equipment and storage medium
CN115454989B (en) * 2022-09-29 2023-12-08 深圳市手心游戏科技有限公司 Data processing method and device for application program data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239195A (en) * 2014-09-17 2014-12-24 可牛网络技术(北京)有限公司 Method for processing power consumption of electronic equipment, and electronic equipment
CN105094282A (en) * 2015-07-22 2015-11-25 深圳市金立通信设备有限公司 Management method for application programs and terminal
CN105528055A (en) * 2015-12-30 2016-04-27 小米科技有限责任公司 Running object processing method and device
CN107391603A (en) * 2017-06-30 2017-11-24 北京奇虎科技有限公司 User's portrait method for building up and device for mobile terminal
CN107506019A (en) * 2017-08-07 2017-12-22 北京小米移动软件有限公司 Management method and device, terminal, the storage medium of application program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957809B (en) * 2012-11-26 2014-05-07 广东欧珀移动通信有限公司 Method for optimizing application programs on intelligent mobile phone
CN106066810B (en) * 2016-05-26 2019-04-26 Oppo广东移动通信有限公司 A kind of application management method, device and mobile terminal
CN106096352B (en) * 2016-05-26 2018-09-14 广东欧珀移动通信有限公司 A kind of control method for preventing indulging of mobile terminal, device and mobile terminal
CN106125882B (en) * 2016-06-15 2019-04-26 深圳市万普拉斯科技有限公司 A kind of management method and electronic equipment of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239195A (en) * 2014-09-17 2014-12-24 可牛网络技术(北京)有限公司 Method for processing power consumption of electronic equipment, and electronic equipment
CN105094282A (en) * 2015-07-22 2015-11-25 深圳市金立通信设备有限公司 Management method for application programs and terminal
CN105528055A (en) * 2015-12-30 2016-04-27 小米科技有限责任公司 Running object processing method and device
CN107391603A (en) * 2017-06-30 2017-11-24 北京奇虎科技有限公司 User's portrait method for building up and device for mobile terminal
CN107506019A (en) * 2017-08-07 2017-12-22 北京小米移动软件有限公司 Management method and device, terminal, the storage medium of application program

Also Published As

Publication number Publication date
CN110008008A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
WO2019128546A1 (en) Application program processing method, electronic device, and computer readable storage medium
WO2020024732A1 (en) Process processing method, electronic device, and computer-readable storage medium
WO2019128540A1 (en) Resource management method, mobile terminal and computer readable storage medium
WO2020093208A1 (en) Application processing method and apparatus, computer device, and computer readable storage medium
CN107577508B (en) Application processing method and device, readable storage medium and mobile terminal
CN106775685B (en) Awakening lock release method and device and mobile terminal
CN110032267B (en) Information processing method and device, mobile terminal and computer readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
WO2019128598A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019024804A1 (en) Cpu monitoring method, computer readable storage medium, and mobile terminal
WO2019128537A1 (en) Application freezing method, and computer device and computer-readable storage medium
CN110032321B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
WO2019128588A1 (en) Process processing method and apparatus, electronic device, computer readable storage medium
WO2019128573A1 (en) Information processing method, apparatus, computer device and computer-readable storage medium
WO2019128574A1 (en) Information processing method and device, computer device and computer readable storage medium
WO2019128571A1 (en) Resource management method and device, mobile terminal, as well as computer readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
WO2019128586A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019128569A1 (en) Method and apparatus for freezing application, and storage medium and terminal
CN110032397B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
WO2019128553A1 (en) Application processing method, electronic device, and computer-readable storage medium
CN109992369B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18895501

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18895501

Country of ref document: EP

Kind code of ref document: A1