CN110727473B - Resource control method, device, system, storage medium and electronic equipment - Google Patents

Resource control method, device, system, storage medium and electronic equipment Download PDF

Info

Publication number
CN110727473B
CN110727473B CN201910957155.7A CN201910957155A CN110727473B CN 110727473 B CN110727473 B CN 110727473B CN 201910957155 A CN201910957155 A CN 201910957155A CN 110727473 B CN110727473 B CN 110727473B
Authority
CN
China
Prior art keywords
target
application
resource occupation
module
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910957155.7A
Other languages
Chinese (zh)
Other versions
CN110727473A (en
Inventor
杜冰
宋世典
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910957155.7A priority Critical patent/CN110727473B/en
Publication of CN110727473A publication Critical patent/CN110727473A/en
Application granted granted Critical
Publication of CN110727473B publication Critical patent/CN110727473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a resource control method, a resource control device, a resource control system, a storage medium and electronic equipment, and relates to the technical field of computers. The resource control method comprises the following steps: responding to an application program starting instruction, and detecting whether a currently started target application program is an application program in a preset application set; if the target application program is an application program in a preset application set, generating an application starting message and determining a target resource occupation module operated in the background; and sending an application starting message to the target resource occupation module so that the target resource occupation module can respond to the application starting message, determine one or more target background behaviors executed by the target resource occupation module and stop the one or more target background behaviors. The method and the device can improve the response speed of starting and running the application program.

Description

Resource control method, device, system, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a resource control method, a resource control device, a resource control system, a storage medium, and an electronic apparatus.
Background
With the development of mobile terminal technology and the increasing demands of people for daily life, various types of applications are installed on a mobile terminal, and even if an application is not displayed on the current interface, the application may run in the background.
The background running application program occupies system resources, and when an application program with a relatively large resource requirement is required to be started at present, the problems of blocking and slow response speed can occur.
For example, in the case where a video application, a communication chat application, or the like is run in the background, when a user opens a game application, a problem of screen sticking or unsmooth operation may occur.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a resource control method, a resource control device, a resource control system, a storage medium, and an electronic apparatus, so as to overcome, at least to some extent, the problem of slow response speed when a new application program is started due to other programs running in the background.
According to a first aspect of the present disclosure, there is provided a resource control method applied to a mobile terminal, including: responding to an application program starting instruction, and detecting whether a currently started target application program is an application program in a preset application set; if the target application program is an application program in a preset application set, generating an application starting message and determining a target resource occupation module operated in the background; and sending an application starting message to the target resource occupation module so that the target resource occupation module responds to the application starting message, determining one or more target background behaviors executed by the target resource occupation module and stopping the one or more target background behaviors.
According to a second aspect of the present disclosure, there is provided a resource control device applied to a mobile terminal, including: the application detection module is used for responding to an application program starting instruction and detecting whether a currently started target application program is an application program in a preset application set or not; the starting message generation module is used for generating an application starting message and determining a target resource occupation module operated in the background if the target application program is an application program in a preset application set; and the starting message sending module is used for sending an application starting message to the target resource occupation module so that the target resource occupation module responds to the application starting message, determines one or more target background behaviors executed by the target resource occupation module and stops the one or more target background behaviors.
According to a third aspect of the present disclosure, there is provided a resource control system applied to a mobile terminal, comprising: the resource control device is used for responding to an application program starting instruction, detecting whether a currently started target application program is an application program in a preset application set, generating an application starting message if the target application program is the application program in the preset application set, determining a target resource occupation module operated in the background, and sending the application starting message to the target resource occupation module; and the target resource occupation module is used for responding to the application starting message, determining one or more target background behaviors executed by the target resource occupation module and stopping the one or more target background behaviors.
According to a fourth aspect of the present disclosure, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described resource control method.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described resource control method via execution of the executable instructions.
In some embodiments of the present disclosure, in the case that a currently started target application is an application in a predetermined application set, an application start message is generated, a target resource occupation module running in the background is determined, and the application start message is sent to the target resource occupation module, so that the target resource occupation module stops one or more target background behaviors in response to the application start message, and then releases the background resources occupied by the target resource occupation module. On the one hand, when the currently started target application program is judged to be the preset application program, the background resource occupied by the background running target resource occupation module is released, so that the target application program can run smoothly, and the response speed of starting and running the target application program is improved; on the other hand, with respect to the scheme that the release of the resources by the system may cause some important services to be disabled, in the exemplary embodiment of the present disclosure, the target resource occupation module executes the operation of releasing the background resources occupied by the target resource occupation module, so that smooth execution of the background important services can be ensured, and the problem that some services or systems have errors is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 illustrates a schematic diagram of a resource control framework in accordance with an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a resource control method according to an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates an interaction diagram of an overall resource control process, taking a game scenario as an example, according to an exemplary embodiment of the present disclosure;
fig. 4 schematically illustrates a block diagram of a resource control device according to an exemplary embodiment of the present disclosure;
fig. 5 schematically illustrates a block diagram of a resource control device according to another exemplary embodiment of the present disclosure;
fig. 6 schematically illustrates a block diagram of a resource control device according to yet another exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a resource control system according to an example embodiment of the present disclosure;
fig. 8 schematically illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only and not necessarily all steps are included. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The mobile terminal described in the exemplary embodiments of the present disclosure may include, but is not limited to, a mobile phone, a tablet computer, a smart watch, etc., and the present disclosure does not limit the type of the mobile terminal.
When the mobile terminal starts and runs some application programs with larger resource consumption, the problems of screen blocking, slow response speed, unsmooth and the like possibly exist due to insufficient background resources, and normal use and experience of a user are seriously affected. For example, when a user runs a game program, there may be problems such as untimely operation response, screen jamming, etc. due to insufficient background resources.
In some schemes, when some application programs with larger resource consumption are operated, the mobile terminal can stop background behavior and release resources so that the application programs can be operated smoothly. However, when the mobile terminal stops the background behavior, some necessary system behaviors or some important application background behaviors may not be operated, thereby possibly causing problems of reduced stability of the terminal system or system errors.
In view of this, the exemplary embodiments of the present disclosure provide a new resource control method that ensures the stability of a system and that important services can work properly while releasing background resources.
Fig. 1 shows a schematic diagram of a resource control framework of an exemplary embodiment of the present disclosure.
The resource control module 11 may be communicatively coupled to a resource occupancy module, which may include a background running module 13, a background running module 14, a background running module 15, and so on. Specifically, each background running module may register a target event monitor, monitor a predetermined application program start and shut down.
The resource control device 11 may determine whether or not the currently started target application is an application in a predetermined application set based on the application list stored in the database 12 in response to the application start instruction. If the target application is an application in a predetermined set of applications, an application launch message may be generated and sent to the modules running in the background.
For example, the background running module 13 may determine one or more target background behaviors in response to the application start message, where the one or more target background behaviors may be background behaviors that are more resource consuming and less important. Next, the background running module 13 may stop the one or more target background behaviors. Similarly, a background-running module 14 may cease one or more target background behaviors corresponding to the background-running module 14 and a background-running module 15 may cease one or more target background behaviors corresponding to the background-running module 15.
The resource control device 11 may send an application shutdown message to each of the modules running in the background in response to the application shutdown instruction. The modules running in the background may resume the stopped one or more target background behaviors in response to the application shutdown message.
Fig. 2 schematically illustrates a flow chart of a resource control method according to an exemplary embodiment of the present disclosure. It should be understood that the method shown in fig. 2 may be performed by a resource control device deployed at a mobile terminal, the resource control device being a specially configured program execution unit of the present disclosure. Referring to fig. 2, the resource control method of the exemplary embodiment of the present disclosure may include the steps of:
S22, responding to an application program starting instruction, and detecting whether the currently started target application program is an application program in a preset application set.
In an exemplary embodiment of the present disclosure, the application launch instruction may be an instruction generated by the mobile terminal in response to a user's launch operation for an application, where the launch operation is, for example, the user clicking on an application icon. In addition, it is readily understood that a jump between applications may also trigger the generation of the application launch instruction.
The predetermined set of applications may include a plurality of applications that consume significant amounts of background resources. In one embodiment of the present disclosure, the applications may be of the same type, e.g., the applications are all gaming applications. However, it is readily understood that if the exemplary methods described in this disclosure are applied in a live video scenario, these applications may also all be live video applications.
In another embodiment of the present disclosure, these applications may be of different types, for example, these applications may include gaming applications, augmented reality applications, live video applications, text or image processing applications, and so forth.
In the case where the predetermined application set includes a plurality of application programs, the application programs may be determined manually. For example, on a configuration interface, a user may select an application program to execute the disclosed solution, constituting a predetermined set of applications.
Furthermore, the predetermined application set may also include only one application program that consumes a large amount of resources. The application may be a user-specified application. For example, if a user often starts the same game application, which has a slow response speed when started or run, the resource control method according to the exemplary embodiment of the present disclosure may be applied, that is, the game application may be regarded as an application program in a predetermined application set.
The resource control means may detect whether the currently started target application is an application in the predetermined application set in response to the application start instruction. Specifically, the package names of the application programs in the predetermined application set may be recorded in an application list, which may be stored in the database 12 described above. In this case, first, the resource control device may parse the package name of the currently started target application. Next, it may be detected whether the package name of the target application is in the application list. If in the application list, the target application is an application in the predetermined set of applications.
Some embodiments of the present disclosure also relate to a scheme of updating the application list.
In an embodiment in which the application programs in the predetermined application set belong to the same predetermined type, when the mobile terminal installs a new application program, the resource control device may determine the type of the new application program through a download channel of the new application program, and if the type of the new application program is the predetermined type, may save the package name of the new application program to the application list. Wherein the predetermined type may be, for example, a game type, the type of the new application may be acquired from an application store that downloaded the new application.
In another embodiment, when the mobile terminal installs a new application, if the new application does not belong to the predetermined application set, that is, the package name of the new application is not in the application list, a popup window may be presented for the user to select whether to determine the new application as an application in the predetermined application set. Next, the package name of the new application program may be added to the application list in response to a determination operation by the user to enable updating of the predetermined application set.
S24, if the target application program is an application program in the preset application set, an application starting message is generated, and a target resource occupation module operated in the background is determined.
In an exemplary embodiment of the present disclosure, the application launch message is a message characterizing the launching of the target application. The resource control means may generate the application start message in case the resource control means determines that the target application is an application in the predetermined set of applications.
According to some embodiments of the present disclosure, the target resource occupation module may be all modules running in the background, which occupy system resources because different services are provided.
According to other embodiments of the present disclosure, the target resource occupation module may be some modules with larger resource occupation for background operation. Specifically, resource occupation evaluation can be performed on all modules running in the background, and a module with larger resource occupation is screened out of all modules according to a resource occupation evaluation result and is used as a target resource occupation module.
For example, the resource occupancy score of each module running in the background may be calculated, where the resource occupancy score may be a weighted calculation result of the metrics such as CPU (Central Processing Unit ) resource consumption, memory resource consumption, network resource consumption, etc. of the module. And if the resource occupation score is larger than a score threshold, determining the corresponding module as a target resource occupation module.
According to further embodiments of the present disclosure, first, one or more modules registered with the target event listener may be determined from all the resource consuming modules running in the background, resulting in a set of candidate resource occupancy modules. The monitoring event corresponding to the target event monitor is to start an application program in a preset application set and to close the application program in the preset application set. In addition, the number of the candidate resource occupation modules in the candidate resource occupation module set is not limited in the present disclosure, and one or more candidate resource occupation modules may be used.
Next, a target resource occupancy module may be determined from the set of candidate resource occupancy modules. Specifically, the resource occupation score of the candidate resource occupation module in the candidate resource occupation module set is calculated, and the score can be a weighted calculation result of indexes such as CPU resource consumption, memory resource consumption, network resource consumption and the like of the module. And determining the candidate resource occupation module with the resource occupation score larger than a scoring threshold as a target resource occupation module.
The resource occupancy score for a module may be calculated by:
S=A1×W1+A2×W2+A3×W3
wherein S is the resource occupation score of the module, A1, A2 and A3 respectively represent the CPU resource consumption, the memory resource consumption and the network resource consumption of the module, W1, W2 and W3 are corresponding weights, and in addition, W1, W2 and W3 are all between 0 and 1 and the sum is 1.
S26, sending an application starting message to the target resource occupation module so that the target resource occupation module responds to the application starting message, determining one or more target background behaviors executed by the target resource occupation module and stopping the one or more target background behaviors.
It should be understood that the number of the target resource occupation modules determined in step S24 may be one or more. The following operations may be performed for each target resource occupation module.
The target resource occupation module may determine one or more target background behaviors that it itself performs in response to an application start message sent by the resource control device, and stop the one or more target background behaviors.
According to some embodiments of the present disclosure, the one or more target background behaviors may be all operations performed by the target resource occupancy module background. That is, all the background behaviors of the target resource occupation module may be determined as target background behaviors. The number of target background behaviors may be one or more.
In this case, the target background behavior may be stopped. The term "stop" may be understood as temporarily freezing the corresponding process, taking as an example that the target background behavior is to acquire network data, after which the network data will not be acquired temporarily.
According to other embodiments of the present disclosure, the target resource occupancy module may determine all of its background behaviors as candidate background behaviors, for each candidate background behavior, determine the occupied resources and the importance level. If the occupied resource is greater than a resource occupancy threshold and the importance level is below a level threshold, the candidate background behavior may be determined to be the target background behavior. Wherein, the resource occupation threshold and the grade threshold can be set by human self.
In one embodiment, the importance level of the candidate background behavior may be determined first, and if the importance level is greater than the level threshold, the candidate background behavior is indicated as an important behavior and may not be stopped. In this case, it is not necessary to perform a process of judging that resources are occupied.
In another embodiment, the resources occupied by the candidate background behavior may be determined first, and if the occupied resources are less than the resource occupancy threshold, it is indicated that the resources occupied by the candidate background behavior are small, in which case the candidate background behavior may not be stopped.
Taking starting the game application as an example, after stopping the target background behavior of the target resource occupation module, the target background behavior is not executed when the game application runs, so that more background resources can serve the game application.
In addition, when the target application is closed, the resource control device may generate an application closing message and transmit the application closing message to the target resource occupation module. The target resource occupation module can respond to the application closing message to resume the one or more target background behaviors so as to ensure that each service of the target resource occupation module is normally executed.
Taking a currently started target application as a game application and a target resource occupation module as a cloud service module as an example, the resource control method of the exemplary embodiment of the present disclosure is described.
In the case where the game application is an application in a predetermined application set, when the game application is started, the resource control device may send a message of the start of the game application to the cloud service module. The cloud service module can respond to the starting message to determine one or more target background behaviors which are corresponding to the cloud service module and have larger resource consumption and lower importance, and the cloud service module automatically stops the one or more target background behaviors. In addition, when the game application is closed, the resource control device may send a message of closing the game application to the cloud service module. The cloud service module may resume the one or more target background behaviors in a stopped state in response to the shutdown message.
Fig. 3 schematically illustrates an interaction diagram of an overall resource control process, taking a game scenario as an example, according to an exemplary embodiment of the present disclosure.
In step S302, the resource control device may detect whether the package name of the currently started target application is in the game application list; in step S304, if the package name of the target application program is in the game application list, a game start message is generated; in step S306, the resource control device may send a game start message to the target resource occupation module; in step S308, the target resource occupation module determines background behaviors that need to be stopped in response to the game start message, and performs stopping operations of the background behaviors.
In step S310, if the game application is closed, the resource control device generates a game closing message; in step S312, the resource control device transmits a game close message to the target resource occupation module; in step S314, the target resource occupation module resumes the stopped background behavior in response to the game close message.
In summary, by using the resource control method according to the exemplary embodiment of the present disclosure, on one hand, when it is determined that the currently started target application is the predetermined application, the background resource occupied by the target resource occupation module of the background operation is released, so that the target application can be smoothly operated, and the response speed of starting and operating the target application is improved; on the other hand, with respect to the scheme that the release of the resources by the system may cause some important services to be disabled, in the exemplary embodiment of the present disclosure, the target resource occupation module executes the operation of releasing the background resources occupied by the target resource occupation module, so that smooth execution of the background important services can be ensured, and the problem that some services or systems have errors is avoided.
It should be noted that although the steps of the methods in the present disclosure are depicted in the accompanying drawings in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
Further, the present exemplary embodiment also provides a resource control device.
Fig. 4 schematically illustrates a block diagram of a resource control device of an exemplary embodiment of the present disclosure. Referring to fig. 4, the resource control device 4 according to an exemplary embodiment of the present disclosure may include an application detection module 41, a start message generation module 43, and a start message transmission module 45.
Specifically, the application detection module 41 may be configured to respond to an application program start instruction, and detect whether a currently started target application program is an application program in a predetermined application set; the initiation message generation module 43 may be configured to generate an application initiation message and determine a target resource occupation module for background operation if the target application is an application in a predetermined application set; the initiation message sending module 45 may be configured to send an application initiation message to the target resource occupancy module, so that the target resource occupancy module determines one or more target background behaviors performed by the target resource occupancy module in response to the application initiation message, and stops the one or more target background behaviors.
According to the resource control device of the exemplary embodiment of the disclosure, on one hand, when the currently started target application program is judged to be the preset application program, the background resource occupied by the background running target resource occupation module is released, so that the target application program can run smoothly, and the response speed of starting and running the target application program is improved; on the other hand, with respect to the scheme that the release of the resources by the system may cause some important services to be disabled, in the exemplary embodiment of the present disclosure, the target resource occupation module executes the operation of releasing the background resources occupied by the target resource occupation module, so that smooth execution of the background important services can be ensured, and the problem that some services or systems have errors is avoided.
According to an example embodiment of the present disclosure, the application detection module 41 may be configured to perform: analyzing the package name of the target application program; detecting whether the package name of the target application program is in an application list or not, wherein the application list comprises package names of application programs in a preset application set; wherein the target application is an application in the predetermined application set if the package name of the target application is in the application list.
According to an exemplary embodiment of the present disclosure, referring to fig. 5, the resource control device 5 may further include an application list update module 51, as compared to the resource control device 4.
In particular, the application list update module 51 may be configured to perform: when a new application program is installed on the mobile terminal, determining the type of the new application program through a downloading channel; if the new application is of a predetermined type, the package name of the new application is saved to the application list.
According to an example embodiment of the present disclosure, the process of the initiation message generation module 43 determining the target resource occupancy module of the background operation may be configured to perform: determining one or more modules registered with a target event monitor from all modules consuming resources operated in the background to obtain a candidate resource occupation module set; and determining a target resource occupation module from the candidate resource occupation module set.
According to an example embodiment of the present disclosure, the process of the initiation message generation module 43 determining a target resource occupancy module from a set of candidate resource occupancy modules may be configured to perform: calculating the resource occupation scores of the candidate resource occupation modules in the candidate resource occupation module set; and determining the candidate resource occupation module with the resource occupation score larger than a scoring threshold as a target resource occupation module.
According to an exemplary embodiment of the present disclosure, referring to fig. 6, the resource control device 6 may further include an application shutdown processing module 61, as compared to the resource control device 4.
Specifically, the application shutdown processing module 61 may be configured to perform: when the target application program is closed, an application closing message is generated; and sending an application closing message to the target resource occupation module so that the target resource occupation module restores the one or more target background behaviors.
Since each functional module of the resource control device in the embodiment of the present invention is the same as that in the embodiment of the present invention, the description thereof is omitted herein.
Further, a resource control system is also provided in this example embodiment.
Fig. 7 schematically illustrates a block diagram of a resource control system of an exemplary embodiment of the present disclosure. Referring to fig. 7, a resource control device 7 according to an exemplary embodiment of the present disclosure may include a resource control device 71 and a target resource occupancy module 72.
Specifically, the resource control device 71 may be configured to respond to an application program starting instruction, detect whether a currently started target application program is an application program in a predetermined application set, if the target application program is an application program in the predetermined application set, generate an application starting message, determine a target resource occupation module running in the background, and send the application starting message to the target resource occupation module; the target resource occupation module 72 may be configured to determine one or more target background behaviors performed by the target resource occupation module in response to an application launch message and to stop the one or more target background behaviors.
On the one hand, when the currently started target application program is judged to be the preset application program, the background resource occupied by the background running target resource occupation module is released, so that the target application program can run smoothly, and the response speed of starting and running the target application program is improved; on the other hand, with respect to the scheme that the release of the resources by the system may cause some important services to be disabled, in the exemplary embodiment of the present disclosure, the target resource occupation module executes the operation of releasing the background resources occupied by the target resource occupation module, so that smooth execution of the background important services can be ensured, and the problem that some services or systems have errors is avoided.
According to an example embodiment of the present disclosure, the target resource occupancy module 72 may be further configured to perform: determining resources occupied by a candidate background behavior of a target resource occupation module and importance levels of the candidate background behavior; and if the resources occupied by the candidate background behaviors are larger than a resource occupation threshold value and the importance level of the candidate background behaviors is lower than a level threshold value, determining the candidate background behaviors as target background behaviors.
According to an exemplary embodiment of the present disclosure, the resource control device 71 may be further configured to perform: when the current target application program is closed, an application closing message is generated and sent to the target resource occupation module 72; the target resource occupancy module 72 is further configured to perform: and restoring the one or more target background behaviors in response to the application shutdown message.
Since the resource control device 71 and the target resource occupation module 72 in the resource control system 7 according to the embodiment of the present invention are the same as those in the embodiment of the present invention, they are not described in detail herein.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
The program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical disk, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to such an embodiment of the invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting the different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 810 may perform steps S22 to S26 as shown in fig. 2.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (7)

1. A resource control method applied to a mobile terminal, comprising:
responding to an application program starting instruction, and detecting whether a currently started target application program is an application program in a preset application set;
if the target application program is an application program in the preset application set, generating an application starting message, and determining one or more modules registered with a target event monitor from all modules consuming resources running in the background to obtain a candidate resource occupation module set; wherein the modules occupy system resources because of providing different services; calculating the resource occupation scores of the candidate resource occupation modules in the candidate resource occupation module set; determining the candidate resource occupation module with the resource occupation score larger than a scoring threshold as a target resource occupation module;
Sending the application starting message to the target resource occupation module so that the target resource occupation module responds to the application starting message, determining one or more target background behaviors executed by the target resource occupation module and stopping the one or more target background behaviors; the target resource occupation module determines all background behaviors as candidate background behaviors, determines occupied resources and importance levels for each candidate background behavior, and determines the candidate background behaviors as target background behaviors if the occupied resources are smaller than a resource occupation threshold and the importance levels are lower than a level threshold;
when the target application program is closed, an application closing message is generated;
and sending the application closing message to the target resource occupation module so that the target resource occupation module restores the one or more target background behaviors to ensure that each service of the target resource occupation module is normally executed.
2. The method of claim 1, wherein detecting whether the currently launched target application is an application in a predetermined set of applications comprises:
Analyzing the package name of the target application program;
detecting whether the package name of the target application program is in an application list or not, wherein the application list comprises package names of application programs in the preset application set;
and if the package name of the target application program is in the application list, the target application program is an application program in the preset application set.
3. The resource control method according to claim 2, characterized in that the resource control method further comprises:
when a new application program is installed on the mobile terminal, determining the type of the new application program through a downloading channel;
and if the type of the new application program is a preset type, saving the package name of the new application program to the application list.
4. A resource control device applied to a mobile terminal, comprising:
the application detection module is used for responding to an application program starting instruction and detecting whether a currently started target application program is an application program in a preset application set or not;
the starting message generating module is used for generating an application starting message if the target application program is an application program in the preset application set, and determining one or more modules registered with the target event monitor from all modules consuming resources running in the background to obtain a candidate resource occupation module set; wherein the modules occupy system resources because of providing different services; calculating the resource occupation scores of the candidate resource occupation modules in the candidate resource occupation module set; determining the candidate resource occupation module with the resource occupation score larger than a scoring threshold as a target resource occupation module;
A start message sending module, configured to send the application start message to the target resource occupation module, so that the target resource occupation module responds to the application start message, determines one or more target background behaviors executed by the target resource occupation module, and stops the one or more target background behaviors; the target resource occupation module determines all background behaviors as candidate background behaviors, determines occupied resources and importance levels for each candidate background behavior, and determines the candidate background behaviors as target background behaviors if the occupied resources are smaller than a resource occupation threshold and the importance levels are lower than a level threshold;
the resource control device is further configured to perform: when the target application program is closed, an application closing message is generated, and the application closing message is sent to the target resource occupation module; and responding to the application closing message, and recovering the one or more target background behaviors to ensure that each service of the target resource occupation module is normally executed.
5. A resource control system for use in a mobile terminal, comprising:
The resource control device is used for responding to an application program starting instruction, detecting whether a currently started target application program is an application program in a preset application set, generating an application starting message if the target application program is the application program in the preset application set, and determining one or more modules registered with a target event monitor from all modules consuming resources running in the background to obtain a candidate resource occupation module set; wherein the modules occupy system resources because of providing different services; calculating the resource occupation scores of the candidate resource occupation modules in the candidate resource occupation module set; determining the candidate resource occupation module with the resource occupation score larger than a scoring threshold as a target resource occupation module; sending the application starting message to the target resource occupation module;
the target resource occupation module is used for responding to the application starting message, determining one or more target background behaviors executed by the target resource occupation module and stopping the one or more target background behaviors; the target resource occupation module determines all background behaviors as candidate background behaviors, determines occupied resources and importance levels for each candidate background behavior, and determines the candidate background behaviors as target background behaviors if the occupied resources are smaller than a resource occupation threshold and the importance levels are lower than a level threshold;
The resource control device is further configured to perform: when the target application program is closed, an application closing message is generated, and the application closing message is sent to the target resource occupation module;
the target resource occupancy module is further configured to perform: and responding to the application closing message, and recovering the one or more target background behaviors to ensure that each service of the target resource occupation module is normally executed.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the resource control method of any one of claims 1 to 3.
7. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the resource control method of any of claims 1 to 3 via execution of the executable instructions.
CN201910957155.7A 2019-10-10 2019-10-10 Resource control method, device, system, storage medium and electronic equipment Active CN110727473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910957155.7A CN110727473B (en) 2019-10-10 2019-10-10 Resource control method, device, system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910957155.7A CN110727473B (en) 2019-10-10 2019-10-10 Resource control method, device, system, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110727473A CN110727473A (en) 2020-01-24
CN110727473B true CN110727473B (en) 2023-11-03

Family

ID=69219846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910957155.7A Active CN110727473B (en) 2019-10-10 2019-10-10 Resource control method, device, system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110727473B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148448B (en) * 2020-09-22 2024-01-19 抖音视界有限公司 Resource allocation method, apparatus, device and computer readable medium
CN113434149B (en) * 2021-07-07 2023-09-08 腾讯科技(深圳)有限公司 Application program generating and loading method, device and medium
CN113676881B (en) * 2021-08-06 2024-05-07 Oppo广东移动通信有限公司 Equipment control method, device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107734616A (en) * 2017-10-31 2018-02-23 广东欧珀移动通信有限公司 Closing application program method, apparatus, storage medium and electronic equipment
WO2019034104A1 (en) * 2017-08-16 2019-02-21 捷开通讯(深圳)有限公司 Method of automatically releasing resource occupied by background process of terminal, storage medium and terminal
CN109857544A (en) * 2018-12-27 2019-06-07 努比亚技术有限公司 Resource reclaim control method, terminal and computer readable storage medium
CN109857555A (en) * 2019-01-15 2019-06-07 Oppo广东移动通信有限公司 Method for recovering internal storage and device, storage medium and electronic equipment
CN109992438A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium
CN109992370A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Applied program processing method and device, electronic equipment, computer readable storage medium
CN110018904A (en) * 2018-01-10 2019-07-16 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium
CN110045809A (en) * 2018-01-12 2019-07-23 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080005190A1 (en) * 2006-06-28 2008-01-03 Nokia Corporation System, Method, Apparatus and Computer Program Product for Providing Resource Reclamation in a Virtual Machine

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019034104A1 (en) * 2017-08-16 2019-02-21 捷开通讯(深圳)有限公司 Method of automatically releasing resource occupied by background process of terminal, storage medium and terminal
CN107734616A (en) * 2017-10-31 2018-02-23 广东欧珀移动通信有限公司 Closing application program method, apparatus, storage medium and electronic equipment
CN109992438A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium
CN109992370A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Applied program processing method and device, electronic equipment, computer readable storage medium
CN110018904A (en) * 2018-01-10 2019-07-16 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium
CN110045809A (en) * 2018-01-12 2019-07-23 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium
CN109857544A (en) * 2018-12-27 2019-06-07 努比亚技术有限公司 Resource reclaim control method, terminal and computer readable storage medium
CN109857555A (en) * 2019-01-15 2019-06-07 Oppo广东移动通信有限公司 Method for recovering internal storage and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN110727473A (en) 2020-01-24

Similar Documents

Publication Publication Date Title
US10303457B2 (en) Initiating update operations
CN110727473B (en) Resource control method, device, system, storage medium and electronic equipment
CN109857555B (en) Memory recovery method and device, storage medium and electronic equipment
CN110351572B (en) Method, device and equipment for updating live broadcast room information and storage medium
CN110489306A (en) A kind of alarm threshold value determines method, apparatus, computer equipment and storage medium
US10470133B2 (en) Electronic device and method for controlling application and component
CN109726076B (en) Applet life cycle management method and system
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
CN110908494A (en) Method, device, terminal and storage medium for detecting and controlling to-be-managed application
CN111338672B (en) Method for optimizing update of application program, electronic device and computer storage medium
CN110502345A (en) A kind of overload protection method, device, computer equipment and storage medium
CN104809054A (en) Method and system for realizing program testing
WO2020052472A1 (en) Method and device for detecting and controlling abnormal application, terminal, and storage medium
CN112256354B (en) Application starting method and device, storage medium and electronic equipment
CN109783261A (en) The collapse processing method and processing device of terminal applies, electronic equipment, storage medium
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN111542048A (en) Method and device for restarting acquisition function of code detection equipment, server and storage medium
CN106775639B (en) Information processing method, information processing apparatus, and computer device
CN114064376A (en) Page monitoring method and device, electronic equipment and medium
CN111162960A (en) Method and server for starting debugging panel
CN113127051B (en) Application resource packaging process monitoring method, device, equipment and medium
CN116737428B (en) Air quality mode operation stability checking method and device and electronic equipment
CN113127001B (en) Method, device, equipment and medium for monitoring code compiling process
CN111680867B (en) Resource allocation method and device and electronic equipment
CN116107414A (en) Equipment control method and device, storage medium and electronic equipment

Legal Events

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