[go: up one dir, main page]

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

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

Info

Publication number
CN109992380B
CN109992380B CN201711489142.9A CN201711489142A CN109992380B CN 109992380 B CN109992380 B CN 109992380B CN 201711489142 A CN201711489142 A CN 201711489142A CN 109992380 B CN109992380 B CN 109992380B
Authority
CN
China
Prior art keywords
application program
background
account information
background application
account
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
CN201711489142.9A
Other languages
Chinese (zh)
Other versions
CN109992380A (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 CN201711489142.9A priority Critical patent/CN109992380B/en
Publication of CN109992380A publication Critical patent/CN109992380A/en
Application granted granted Critical
Publication of CN109992380B publication Critical patent/CN109992380B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • 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/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • 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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/504Resource capping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application relates to an application program processing method, an application program processing device, electronic equipment and a computer readable storage medium. The method comprises the following steps: if the fact that a foreground application program calls an account login function of a background application program is detected, whether the background application program is in a frozen state or not is detected, wherein the account login function represents a function of logging in an application account through account information of the application program; if the background application program is in a frozen state, unfreezing the background application program; running the unfrozen background application program to acquire background account information corresponding to the background application program; and sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to carry out account login. The application processing method, the application processing device, the electronic equipment and the computer readable storage medium can realize accurate processing of the application.

Description

Application program processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The smart device may implement different application operations through the application program, such as purchasing goods through a shopping-like application program, viewing videos through a video-like application program, and the like. The application program can be frozen, the frozen application program can not continue to run, processor resources in the intelligent device cannot be occupied, power consumption of the intelligent device is reduced, and fluency of foreground application programs is improved. However, since the application program is still present in the smart device, resources such as memory and hardware in the smart device are also occupied.
Disclosure of Invention
The embodiment of the application program processing method and device, the electronic equipment and the computer readable storage medium can enable the equipment to accurately process the application program.
An application processing method, comprising:
if the fact that a foreground application program calls an account login function of a background application program is detected, whether the background application program is in a frozen state or not is detected, wherein the account login function represents a function of logging in an application account through account information of the application program;
if the background application program is in a frozen state, unfreezing the background application program;
running the unfrozen background application program to acquire background account information corresponding to the background application program;
and sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to carry out account login.
An application processing apparatus comprising:
the system comprises a state detection module, a state detection module and a state detection module, wherein the state detection module is used for detecting whether a background application program is in a frozen state or not if the condition that a foreground application program calls an account login function of the background application program is detected, and the account login function represents a function of logging in an application account through account information of the application program;
the application unfreezing module is used for unfreezing the background application program if the background application program is in a frozen state;
the information acquisition module is used for running the unfrozen background application program and acquiring background account information corresponding to the background application program;
and the information sending module is used for sending the background account information to the foreground application program, and the background account information is used for indicating the foreground application program to carry out account login.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
if the fact that a foreground application program calls an account login function of a background application program is detected, whether the background application program is in a frozen state or not is detected, wherein the account login function represents a function of logging in an application account through account information of the application program;
if the background application program is in a frozen state, unfreezing the background application program;
running the unfrozen background application program to acquire background account information corresponding to the background application program;
and sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to carry out account login.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
if the fact that a foreground application program calls an account login function of a background application program is detected, whether the background application program is in a frozen state or not is detected, wherein the account login function represents a function of logging in an application account through account information of the application program;
if the background application program is in a frozen state, unfreezing the background application program;
running the unfrozen background application program to acquire background account information corresponding to the background application program;
and sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to carry out account login.
According to the application program processing method and device, the electronic equipment and the computer readable storage medium, when the foreground application program calls the account login function of the background application program, whether the background application program is in the frozen state or not can be detected. And if the background application program is in the frozen state, the background application program is unfrozen. And running the unfrozen background application program to acquire background account information and sending the background account information to the foreground application program. Therefore, when the foreground application program needs account login, the background account information can be ensured to be normally acquired, and the foreground application program can log in according to the background account information, so that the condition that the foreground cannot log in is avoided, and the device can accurately process the application program.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram showing an internal structure of an electronic apparatus according to an embodiment;
FIG. 2 is a flow diagram of a method for application processing in one embodiment;
FIG. 3 is a flowchart of an application processing method in another embodiment;
FIG. 4 is a flowchart of an application processing method in yet another embodiment;
FIG. 5 is a diagram illustrating the processing flow of an application program in one embodiment;
FIG. 6 is a partial block diagram of a system in an electronic device in one embodiment;
FIG. 7 is a block diagram of an application processing device in one embodiment;
FIG. 8 is a diagram showing the structure of an application processing apparatus according to another embodiment;
fig. 9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein 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.
As shown in fig. 1, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, a memory, and a display screen connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory is used for storing data, programs, instruction codes and/or the like, and at least one computer program is stored on the memory, and the computer program can be executed by the processor to realize the application program processing method suitable for the electronic device provided in the embodiment of the 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-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 to implement an application processing method provided by various embodiments of the present application. The internal memory provides a cached execution environment for the operating system and computer programs in the non-volatile storage medium. The display screen may be a touch screen, such as a capacitive screen or an electronic screen, and is configured to display interface information of an application corresponding to a foreground process, and also may be configured to detect a touch operation applied to the display screen, and generate a corresponding instruction, such as a switching instruction for performing foreground and background applications.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the electronic devices to which the subject application may be applied, and that a particular electronic device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. For example, the electronic device further includes a network interface connected via the system bus, where the network interface may be an ethernet card or a wireless network card, and the like, and is used for communicating with an external electronic device, such as a server.
FIG. 2 is a flow diagram that illustrates a method for processing an application in one embodiment. The application processing method in this embodiment is described by taking the application processing method running on the terminal or the server in fig. 1 as an example. As shown in fig. 2, the application processing method includes steps 202 to 208. Wherein:
step 202, if it is detected that the foreground application calls the account login function of the background application, detecting whether the background application is in a frozen state, wherein the account login function represents a function of logging in an application account through account information of the application.
In one embodiment, an Application (APP) refers to software written for a certain Application purpose in an electronic device, and the electronic device can implement a service required by a user through the APP. For example, a user may play games through a game-like application, may watch videos through a video-like application, may play music through a music-like application, and so on. The application program can be divided into a foreground application program and a background application program according to the running state. The foreground application program refers to an application program running in the foreground of the electronic device, and the foreground application program can be displayed on the foreground and can interact with a user. Background applications refer to applications that run in the background of an electronic device, and background applications generally cannot be displayed in the foreground and implement an interactive process with a user. Switching can be performed between the foreground application and the background application.
Generally, an application operation of an application program is collectively performed by one or more processes (processes), which are one-time running activities of the program in a computer on a certain data set and are basic units for resource allocation and scheduling of a system. Meanwhile, one process can correspond to one or more threads, and the threads are a single sequential control flow in a program and are relatively independent and schedulable execution units in the process. The processes may include a foreground process, i.e., a process running in the foreground of the electronic device, and a background process, i.e., a process running in the background of the electronic device. The electronic equipment can control the switching of the foreground process and the background process, the foreground process can be switched to the background process to run, and the background process can also be switched to the foreground process to run. Specifically, the management of the process may be implemented by a process pool, and process identifiers corresponding to one or more processes may be stored in the process pool. The process pool may include a foreground process pool and a background process pool, the foreground process pool includes a process identifier corresponding to a foreground process, and the background process pool includes a process identifier corresponding to a background process. When detecting that the running states of the foreground process and the background process are changed, the process pool can correspondingly add or delete the process identification which is changed. For example, the process identifier of process a is "0123", and when it is detected that process a is changed from a background process to a foreground process, the process identifier of process a, which is "0123", can be removed from the background process pool and added to the foreground process pool.
In particular, applications may be frozen, and applications in the frozen state are not shut down, but are temporarily not running. The application program in the frozen state does not occupy the resources of the processor for running, but still occupies the resources of the memory, hardware and the like of the electronic equipment. The resource priority and restriction management module in the local framework layer of the electronic device can mark the state of the application program, and whether the application program is in the frozen state can be known by reading the application state mark of the application program. When the application program is awakened, the resource priority and restriction management module changes the application state mark of the application program correspondingly, so that the control on the freezing state of the application program is realized through the corresponding application state mark.
In order to ensure the information security of the user, the application program usually sets application accounts, each user corresponds to one application account, and the user can log in the application program through the application accounts. After login is successful, the application program stores the operation data of the user through the application account, and therefore management of user information is achieved. The account login function denotes a function of logging in an application account through account information of an application program. It can be understood that the application account can be used for performing differential management on information of different users, and then different application programs can share one application account for logging in for the same user, so as to facilitate operation of the user. When the foreground application program needs to perform application login, account login functions of other application programs can be called to perform login. Specifically, when the foreground application needs to invoke the account login function of the background application, the login interface of the background application is invoked. The electronic equipment monitors the login interface of the background application program, and if the login interface of the background application program is detected to be called, whether the background application program is in a frozen state is detected. If the background application program is in the frozen state, the background application program cannot run, and the background account information cannot be returned to the previous application program for logging in.
And 204, if the background application program is in the frozen state, unfreezing the background application program.
In one embodiment, the application in the frozen state cannot run, and thus cannot process the data. If the foreground application program calls the account login function of the background application program, the application program in the frozen state cannot receive the signal for acquiring the background account information sent by the foreground application program, so that the foreground application program cannot log in through the background account information of the background application program. The application program in the frozen state can be recorded through a frozen list, the application identifier is recorded in the frozen list, and the application program corresponding to the application identifier stored in the frozen list is in the frozen state. Whether the background application program is in the frozen state or not is detected, the background application identifier of the background application program can be obtained firstly, then the application identifiers in the frozen list are traversed, and if the background application identifier is matched with the application identifiers in the frozen list, the background application program corresponding to the background application identifier is in the frozen state. And if the background application program is detected to be in the frozen state, the background application program can be unfrozen. The unfrozen background application program can run, and the obtained background account information is sent to the foreground application program.
In the Android system, there are various methods for freezing and thawing the application program. Taking one of them as an example, the application can be set to the frozen state by a pm (PACKAGE manager) command, in which the application can be set to the frozen state by a freeze command pm disable [ -USER _ ID ] PACKAGE _ OR _ COMPONENT, and then the application in the frozen state can also be thawed by a thaw command pm enable [ -USER _ ID ] PACKAGE _ OR _ COMPONENT, and the application list in the frozen state is obtained by a freeze list query command pm list PACKAGEs-d to view the application in the frozen state. It can be understood that, in the present application, the application processing method is described by taking the Android Operating System as an example, but the application processing method of the present application is not limited to be implemented in the Android System, and may also be applied in Operating systems such as ios (iphone Operating System), saiban, Windows, and MAC OS (MAC Operating System).
And step 206, running the unfrozen background application program, and acquiring background account information corresponding to the background application program.
The background account information is background account information for making account logins and may include, but is not limited to, account names and account passwords. The account name is used for uniquely identifying background account information of the user, and the account password is used for verifying the identity of the user. The account name and the account password are in one-to-one correspondence, and after the user inputs the account name and the account password, verification can be carried out according to the account name and the account password.
And step 208, sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to perform account login.
If the application program allows the account login function to be called, a login interface for authorizing login and an information acquisition interface special for acquiring background account information are provided. The foreground application program can call the login interface of the background application program to call the account login function, and then the background account information of the background application program is acquired by calling the information acquisition interface of the background application program. The unfrozen background application program can run and acquire corresponding background account information, and then the background account information is sent to the foreground application program through the information acquisition interface. After receiving the background account information of the background application program, the foreground application program initiates a login request to the server according to the received background account information, the server performs verification according to the background account information, and after the verification is passed, a login success message is returned to the client.
In the application processing method provided by the above embodiment, when the foreground application calls the account login function of the background application, it is detected whether the background application is in the frozen state. And if the background application program is in the frozen state, the background application program is unfrozen. And running the unfrozen background application program to acquire background account information and sending the background account information to the foreground application program. Therefore, when the foreground application program needs account login, the background account information can be ensured to be normally acquired, and the foreground application program can log in according to the background account information, so that the condition that the foreground cannot log in is avoided, and the device can accurately process the application program.
In one embodiment, the application processing method may further include:
and 302, if the background application program is in the frozen state, unfreezing the first process and the second process corresponding to the background application program.
When the background application program is detected to be in the frozen state, in order to reduce the occupation of the background application program on the resources of the electronic device during the operation, only the first process and the second process of the background application program can be unfrozen, and other processes except the first process and the second process are still kept in the frozen state. The first process is a process for acquiring background account information, and the second process is a process for sending the background account information. It is understood that, when the background application program obtains the background account information and sends the background account information, the background application program may be completed by multiple threads together, or may be completed by one process. Therefore, the first process may be one or more processes, the second process may also be one or more processes, and the first process and the second process may also be the same process, which is not limited herein.
And step 304, calling the unfrozen first process, and acquiring background account information corresponding to the background application program.
And step 306, calling the unfrozen second process, and sending the background account information to the foreground application program.
After the first process is unfrozen, the unfrozen first process can be called, and background account information corresponding to the background application program is obtained through the first process. And after the first process acquires the background account information, the background account information is sent to the second process. And then calling the unfrozen second process, and sending the background account information to the foreground application program through the second process. Therefore, only the first process and the second process are unfrozen, and other processes are still kept in a frozen state, so that the occupation of resources after other processes are awakened is avoided.
FIG. 4 is a flow diagram of a method for application processing in yet another embodiment. The application processing method in this embodiment is described by taking the application processing method running on the terminal or the server in fig. 1 as an example. As shown in fig. 4, the application processing method includes steps 402 to 420. Wherein:
step 402, if it is detected that the foreground application calls the account login function of the background application, detecting whether the background application is in a frozen state, wherein the account login function represents a function of logging in an application account through account information of the application.
Specifically, if an application needs to use the account login function of another application, the application using the account login function needs to install an installation package for logging in an account. The account login function can only be used after the installation package is decompressed and installed. The application program providing the account login function provides a login interface for authorizing login and an information acquisition interface for acquiring background account information. When the foreground application program calls the login interface provided by the background application program, the account login function of the background application program is called by the foreground application program.
And step 404, if the background application program is in the frozen state, unfreezing the background application program.
And step 406, acquiring the total resource occupancy rate of the electronic equipment.
The resource refers to software or hardware resources that are necessary for the electronic device to process an application event, such as a Central Processing Unit (CPU), a Memory (Memory), hardware, a network resource, and an Input-Output (IO) of the electronic device. The total resource occupancy rate refers to a ratio of occupied resources of the electronic device, and generally refers to a ratio of occupied resources to total resources, which can be expressed in a percentage form. For example, if the total memory of the device has 128GB and the already occupied memory has 56GB, the total resource occupancy of the device can be expressed as the memory occupancy, and the obtained memory occupancy is 43.75%. The resource occupancy rates of all the application programs can be counted in real time in the running process of the electronic equipment, the resource occupancy rates of the application programs refer to the proportion of the resources used by one application program to all the resources of the electronic equipment, and the resource occupancy rates of all the application programs in the electronic equipment are added to obtain the total resource occupancy rates.
Specifically, the electronic device may store a monitoring log file in a preset storage address, and may obtain the total CPU occupancy rate according to the monitoring log file. Meanwhile, a plurality of sub-folders are also stored in the preset storage address, and each process log file is stored in each sub-folder. The process log files record the change of the specific operation condition of the process from the starting to the current time, and the condition of the CPU resource occupied by the process can be obtained according to the process log files, namely the CPU occupancy rate of the process can be obtained. The CPU occupancy rates of all the processes included in the application program are added to obtain the CPU occupancy rate of the application program.
For example, in the Android system, a monitoring log file storing the CPU total occupancy information may be read in a/proc directory. The/proc directory further comprises a plurality of subfolders, and the subfolders store process log files of CPU occupation information corresponding to each process. The file name of the monitoring log file stored in the/proc directory is "stat", the subfolder in the/proc directory stores the process log file, and the file name of the process log file is "stat". The stat file under the/proc directory records the total CPU occupation information, and the stat file in the subfolder under the/proc directory records the CPU occupation information of each process. For example, the stat file under the/proc/PID directory records the CPU occupation information of the PID process.
The electronic device may also count the occupancy rates of resources such as memory, hardware, network resources, and IO in real time, for example, when the total memory amount of the mobile phone can be obtained by reading the information of the file "/proc/meminfo", the current available memory amount may be obtained by an activity manager. In the Android system, a top command can be directly operated to count the occupancy rates of resources such as a CPU, a memory, IO and the like.
And step 408, if the total resource occupancy rate exceeds the first occupancy rate threshold, controlling the thawed background application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state to the electronic device during running is less than a second occupancy rate threshold.
The unfrozen background application program can normally run, and in order to prevent the unfrozen background application program from excessively occupying resources of the electronic equipment in the running process and influencing the operation of the foreground application program, the unfrozen background application program can be controlled to enter a resource limiting state. The method comprises the steps of firstly obtaining the total resource occupancy rate of the electronic equipment, and controlling a thawed background application program to enter a resource limiting state according to the total resource occupancy rate. Specifically, the total resource occupancy rate may be compared with a first occupancy rate threshold, and if the total resource occupancy rate exceeds the first occupancy rate threshold, it is determined that the available resources of the electronic device are relatively small, and the thawed background application program may be controlled to enter a resource restriction state. It can be understood that, when the background application program is in the resource restriction state, the resource occupancy rate in the running process cannot exceed the second occupancy rate threshold, so that the use of the background application program on the resources of the electronic device can be controlled, and the resources of the electronic device are saved. It is understood that the first occupancy threshold is greater than the second occupancy threshold. For example, when the total CPU occupancy rate exceeds 50%, the CPU occupancy rate for controlling the thawed background application program to run cannot exceed 5%, so as to reduce the excessive consumption of the CPU by the thawed background application program. In a mobile phone system, resource occupancy rates of a CPU, a memory, an IO, and the like of a thawed background application program can be controlled through a cgroups (control group), that is, the thawed background application program is controlled to enter a resource restriction state.
Specifically, the resource occupation condition may be controlled according to the priority of the background application program, the correspondence between the priority of the application program and the resource restriction level is pre-established, and then the resource restriction level entering the resource restriction state is controlled according to the priority of the background application program. The priority of the background application program refers to the importance degree of the background application program, and can be set in advance. For example, system level applications may be set to a higher priority and third party applications may be set to a lower priority. Or the priority of the application program can be set according to the type of the application program, the application program of the instant messaging class is set to be higher priority, and the application program of the tool class is set to be lower priority. The priority of the application program may also be set according to other criteria, which are not specifically limited herein. The resource restriction level refers to a degree of restriction on a resource used by an application program. Acquiring a priority corresponding to a background application program, and acquiring a corresponding resource limitation level according to the priority; and controlling the unfrozen background application program to enter a resource limiting state corresponding to the resource limiting level. For example, the corresponding system-level backend application may be set to a light resource limit and the third-party backend application may be set to a deep resource limit.
It will be appreciated that different applications may depend on different resources, and the type of resource restriction of an application may be controlled based on the type of resource on which the application depends. For example, some local applications may use less network resources, while some applications that need to perform network communication use more network resources, and may limit the network resources for the applications that use more network resources. Specifically, resource occupation historical data of the unfrozen background application program is obtained, a dependent resource type corresponding to the background application program is obtained according to the resource occupation historical data, and the unfrozen background application program is controlled to enter a resource limitation state according to the dependent resource type and the resource limitation level. The resource occupation history data refers to data of resources which are historically occupied by the application program, and the dependent resource type is the type of the resource which is depended on when the application program runs.
In one embodiment, a corresponding relationship between the total resource occupancy and the resource restriction level may also be established. And when the total resource occupancy rate exceeds a first occupancy rate threshold value, acquiring a resource limit level according to the total resource occupancy rate, and then controlling the thawed background application program to enter a resource limit state corresponding to the resource limit level. For example, if the first occupancy threshold is 50%, when the total resource occupancy exceeds 50%, the total resource occupancy is divided into three occupancy levels, i.e., 50% to 60%, 60% to 80%, 80% to 100%, and the three occupancy levels respectively correspond to a light resource restriction level, a normal resource restriction level, and a deep resource restriction level, and corresponding resource restriction levels can be obtained according to the total resource occupancy, and the second occupancy thresholds corresponding to different resource restriction levels are different. It is to be understood that the resource limit level may also be obtained by combining the total resource occupancy rate and the priority of the thawed background application program, which is not limited herein.
Step 410, initiating an information acquisition signal to the background application program, and adding the information acquisition signal to a signal processing queue corresponding to the background application program, where the signal processing queue includes one or more processing signals for processing the application program.
In one embodiment, the foreground application may initiate an information acquisition signal to the background application by calling an information acquisition interface. The background application program is provided with a corresponding signal processing queue, and the information acquisition signal is added into the signal processing queue after being sent to the background application program. And after the background application program is unfrozen, the unfrozen background application program can acquire the processing signal in the signal processing queue, and then corresponding processing is carried out according to the processing signal. Specifically, after the processing signal is sent to the application program, the processing signal is stored in a signal processing queue of the application program. The signal processing queue may be a stack space, and the signal processing queue includes one or more processing signals for processing the application program, each processing signal indicating processing of the application program. In particular, the signal processing queue may be a chain queue arranged in sequence, and may be described by a data structure. For example, in the signal processing queue list, it can be described by a signaling data structure. The signaling data structure may include three data, i.e., head, tail, signal, etc., where head is used to point to the first processed signal, tail is used to point to the next pointer of the last processed signal, and signal is used to describe the signal set in the signal processing queue.
And step 412, running the thawed background application program, acquiring a signal processing queue corresponding to the background application program, and sequencing the processing signals in the processing signals according to the signal initiation time.
When the application is in the frozen state, the application cannot receive the signal or process the signal. The processing signals received by the application program are stored in the signal processing queue, and then the processing signals in the signal processing queue are processed after the application program is awakened. When the background application program is unfrozen, the unfrozen background application program can be operated in the electronic equipment. The unfrozen background application program can obtain the corresponding signal processing queue, and then the processing signals in the signal processing queue are processed. And sequencing the processing signals in the signal processing queue according to the signal initiation time, wherein the signal initiation time is the time for initiating the processing signals. The processing signals can be generally arranged according to the sequence of the signal initiation time from first to last, so that the processing signal at the first position of the queue can be preferentially acquired for processing during processing. The processing signals can also be arranged according to the sequence from the beginning of the signal to the end of the signal, and the processing signals at the tail of the queue can be preferentially acquired for processing during processing. In this embodiment, the arrangement order of the signal processing queues and the processing sequence are not specifically limited. For example, the signal processing queue includes three processing signals, the signal initiation time corresponding to the signal a is 12:16, the signal initiation time corresponding to the signal B is 13:22, and the signal initiation time corresponding to the signal C is 13: 50. The signal processing queue may be arranged in the order of signal a, signal B and signal C.
And step 414, sequentially processing the processing signals in the sorted signal processing queue.
Generally, to avoid missing information, after being defrosted, the background application processes the unprocessed processing signals during the freeze period, that is, sequentially processes the processing signals in the ordered signal processing queue. It is understood that after the background application program is thawed, the processing signal in the signal processing queue may not be processed completely, and only a part of the processing signal may be obtained for processing. Optionally, the processing signal is further acquired from the sorted signal processing queue according to the signal initiating object, and the acquired processing signal is processed. The signal initiation object refers to an object that initiates processing of a signal. For example, only the processing signal initiated by the system application may be processed, or only the processing signal whose corresponding signal initiation object is the same as the signal initiation object of the shutdown signal may be processed.
In one embodiment, the processing signals may also be obtained from the sorted signal processing queues according to the signal priorities of the processing signals, and the obtained processing signals are processed. Wherein the signal priority represents an important procedure for processing the signal. For example, the signal priority may be set according to the type of the processing signal, the signal priority of the processing signal corresponding to the instant message is higher, and the signal priority of the processing signal corresponding to the non-instant message is lower. And the processing signals are acquired according to the signal priority, and only the processing signals with higher priority are processed after the background application program is unfrozen, so that the resource of the equipment is saved.
And step 416, acquiring an information acquisition signal from the signal processing queue, and acquiring background account information corresponding to the background application program according to the information acquisition signal.
The processing signals in the signal processing queue are processed, or the signal acquisition signal information in the signal processing queue can be directly processed. According to the information acquisition signal, namely the signal for acquiring the background account information, the foreground application program can call the information acquisition interface and send the information acquisition signal to the unfrozen background application program through the information acquisition interface. And then the unfrozen background application program can acquire background account information according to the information acquisition signal and then return the background account information to the foreground application program through the information acquisition interface.
And 418, sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to perform account login.
And step 420, freezing the thawed background application program if the foreground application program is detected to be successfully logged in or the thawing duration exceeds a duration threshold, wherein the thawing duration refers to the duration from the thawing time of the background application program to the current time.
And after receiving the background account information, the foreground application program logs in according to the background account information. After login is successful, login success information is sent to the background application program. And after receiving the login success information, the background application program enters the frozen state again. And if the background application program does not receive the successful login information, the background application program can wait and count the unfreezing time of the background application program from the unfreezing time to the current time in real time. And if the unfreezing duration exceeds the duration threshold, the background application program is frozen again, so that the background application program is prevented from being in a running state for a long time and occupying the resources of the equipment.
Specifically, the duration threshold may be set according to an application type of the background application program, where the application type of the background application program is first obtained, and then the corresponding duration threshold is obtained according to the application type. For example, the application program may be classified into an instant messaging application type, a social application type, a tool application type, and the like, and since the real-time requirement of the instant messaging application type is relatively high, a relatively large value may be set for the duration threshold corresponding to the instant messaging application program. If the requirements on the real-time performance of the social class application program and the tool class application program are low, a small value can be set for the duration threshold corresponding to the social class application program and the tool class application program. Therefore, different background application programs can be set with different duration thresholds, and for some application programs with lower real-time requirements, the awakened application programs can quickly enter a frozen state so as to reduce the occupation of resources.
In the application processing method provided by the above embodiment, when the foreground application calls the account login function of the background application, it is detected whether the background application is in the frozen state. And if the background application program is in the frozen state, the background application program is unfrozen. And then controlling the background application program to enter a resource limiting state according to the total resource occupancy rate of the electronic equipment, running the unfrozen background application program to acquire background account information, and sending the background account information to the foreground application program. And when the foreground application program is detected to be successfully logged in or the unfreezing duration exceeds the duration threshold, the background application program is frozen again. Therefore, when the foreground application program needs account login, the background account information can be ensured to be normally acquired, and the foreground application program can log in according to the background account information, so that the condition that the foreground cannot log in is avoided, and the device can accurately process the application program. And after thawing, controlling the background application program to enter a resource limiting state, and freezing the background application program again under the condition that the foreground application program is successfully logged in or the thawing time is overtime, so that the resource occupation of the electronic equipment is reduced.
It should be understood that, although the steps in the flowcharts of fig. 2 to 4 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
FIG. 5 is a diagram that illustrates the processing flow of an application program in one embodiment. As shown in fig. 5, when the background application is in the frozen state, whether the foreground application calls the account login function of the background application is monitored in real time. And if so, unfreezing the background application program, and controlling the unfrozen background application program to enter a resource limiting state. And freezing the background application program when the foreground application program is detected to be successfully logged in or the unfreezing duration exceeds a duration threshold. When the background application program is in the frozen state, the background application program cannot run, and the resource occupancy rate corresponding to the background application program cannot be changed. When the device is in the unfreezing state and in the resource limiting state, the background application program can run, but only part of resources of the device can be occupied in the running process.
In one embodiment, as shown in FIG. 6, a partial architecture diagram of an electronic device is provided. The architecture system of the electronic device includes a JAVA space layer 61, a local framework layer 62, and a Kernel space layer 63. Policy applications 610 may be included on the JAVA space layer 61, and the electronic device may initiate a freeze and thaw policy for each application through the policy applications 610, so as to implement a freeze and thaw operation for each application in the electronic device. For example, the policy application 610 determines an application consuming power in the background, and initiates a freeze operation on the application consuming power in the background. 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 program 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 program according to the requirements of the upper layer, thereby achieving the effects of optimizing performance and saving power consumption. The electronic device may allocate, by using the platform freezing management module 622, the task that can be frozen in the background to the freezing layers corresponding to the preset different layers according to the length of the freezing time, where optionally, the freezing layers may include: CPU limited sleep mode, CPU frozen sleep mode, process deep frozen 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 and control module 636, and a process memory recycling module 638. The UID management module 630 may manage or freeze resources of the third-party application based on a User Identifier (UID) of the application. Compared with the Process control based on the Process Identifier (PID), the unified management of the resources of the application of one user is facilitated through the UID. The Cgroup module 632 is used to provide a complete set of resource restriction mechanisms related to Central Processing Unit (CPU), CPU set, memory, input/output (I/O) and Net. The timeout freeze exit module 634 is used to resolve the exception generated by the freeze timeout scenario. The Binder management and control module 636 is used for controlling the priority of background Binder communication. The process memory recycling module 638 is used to implement a deep freezing mode of the process, and when the third-party application program is in a frozen state for a long time, the file area of the process can be released, so as to achieve a memory-saving module and speed up the next time the application program is started. Through the above-mentioned architecture, the application processing method in the embodiments of the present application can be realized.
FIG. 7 is a block diagram of an application processing device in one embodiment. As shown in fig. 7, the application processing apparatus 700 includes a status detection module 702, an application unfreezing module 704, an information sending module 708, and an information sending module 708. Wherein:
the state detection module 702 is configured to detect whether the background application program is in a frozen state if it is detected that the foreground application program invokes an account login function of the background application program, where the account login function indicates a function of logging in an application account through account information of the application program.
An application unfreezing module 704, configured to unfreeze the background application program if the background application program is in a frozen state.
The information obtaining module 706 is configured to run the thawed background application program, and obtain background account information corresponding to the background application program.
An information sending module 708, configured to send the background account information to the foreground application, where the background account information is used to instruct the foreground application to perform account login.
In the application processing apparatus provided in the foregoing embodiment, when the foreground application invokes the account login function of the background application, it may be detected whether the background application is in a frozen state. And if the background application program is in the frozen state, the background application program is unfrozen. And running the unfrozen background application program to acquire background account information and sending the background account information to the foreground application program. Therefore, when the foreground application program needs account login, the background account information can be ensured to be normally acquired, and the foreground application program can log in according to the background account information, so that the condition that the foreground cannot log in is avoided, and the device can accurately process the application program.
Fig. 8 is a schematic structural diagram of an application processing apparatus according to another embodiment. As shown in FIG. 8, the application processing device 800 includes a status detection module 802, an application unfreezing module 804, a resource restriction module 806, a signaling module 808, an information acquisition module 810, an information transmission module 812, and an application freezing module 814. Wherein:
the state detection module 802 is configured to detect whether the background application is in a frozen state if it is detected that the foreground application invokes an account login function of the background application, where the account login function indicates a function of logging in an application account through account information of the application.
And the application unfreezing module 804 is configured to unfreeze the background application program if the background application program is in a frozen state.
A resource limiting module 806, configured to obtain a total resource occupancy rate of the electronic device; and if the total resource occupancy rate exceeds a first occupancy rate threshold value, controlling the unfrozen background application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state to the electronic equipment is smaller than a second occupancy rate threshold value when the application program in the resource limiting state runs.
A signal sending module 808, configured to initiate an information obtaining signal to the background application program, and add the information obtaining signal to a signal processing queue corresponding to the background application program, where the signal processing queue includes one or more processing signals used for processing the application program.
The information obtaining module 810 is configured to run the thawed background application program, obtain the information obtaining signal from the signal processing queue, and obtain background account information corresponding to the background application program according to the information obtaining signal.
An information sending module 812, configured to send the background account information to the foreground application, where the background account information is used to instruct the foreground application to perform account login.
An application freezing module 814, configured to freeze the thawed background application program if it is detected that the foreground application program is successfully logged in or a thawing duration exceeds a duration threshold, where the thawing duration is a duration from a time when the background application program is thawed to a current time.
In the application processing apparatus provided in the foregoing embodiment, when the foreground application invokes the account login function of the background application, it may be detected whether the background application is in a frozen state. And if the background application program is in the frozen state, the background application program is unfrozen. And then controlling the background application program to enter a resource limiting state according to the total resource occupancy rate of the electronic equipment, running the unfrozen background application program to acquire background account information, and sending the background account information to the foreground application program. And when the foreground application program is detected to be successfully logged in or the unfreezing duration exceeds the duration threshold, the background application program is frozen again. Therefore, when the foreground application program needs account login, the background account information can be ensured to be normally acquired, and the foreground application program can log in according to the background account information, so that the condition that the foreground cannot log in is avoided, and the device can accurately process the application program. And after thawing, controlling the background application program to enter a resource limiting state, and freezing the background application program again under the condition that the foreground application program is successfully logged in or the thawing time is overtime, so that the resource occupation of the electronic equipment is reduced.
In one embodiment, the application unfreezing module 804 is further configured to unfreeze the first process and the second process corresponding to the background application.
In an embodiment, the resource limiting module 806 is further configured to obtain a priority corresponding to the background application, and obtain a corresponding resource limiting level according to the priority; and controlling the unfrozen background application program to enter a resource limiting state corresponding to the resource limiting level.
In an embodiment, the information obtaining module 810 is further configured to invoke the unfrozen first process, and obtain background account information corresponding to the background application.
In one embodiment, the information obtaining module 810 is further configured to obtain a signal processing queue corresponding to the background application program, and sort processing signals in the processing signals according to signal initiation time; and sequentially processing the processing signals in the sequenced signal processing queue.
In one embodiment, the information sending module 812 is further configured to call the thawed second process, and send the background account information to the foreground application.
The division of the modules in the application processing apparatus is only for illustration, and in other embodiments, the application processing apparatus may be divided into different modules as needed to complete all or part of the functions of the application processing apparatus.
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 may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the 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 processors to perform the application processing methods provided by the above-described embodiments.
A computer program product containing instructions which, when run on a computer, cause the computer to perform the application processing method provided by the above embodiments.
The embodiment of the application also provides the electronic equipment. As shown in fig. 9, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the electronic device as the mobile phone as an example:
fig. 9 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 9, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 910 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 980; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is 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, the RF circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the 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 program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 920 may include high speed random access memory, and may 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 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, which may also be referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user operating the touch panel 931 or near the touch panel 931 by using a finger, a stylus, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 931 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may 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 may overlay the display panel 941, and when the touch panel 931 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the mobile phone.
Cell phone 900 may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 941 and/or backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 960, speaker 961 and microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and convert the electrical signal into a sound signal for output by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 960, and then outputs the audio data to the processor 980 for processing, and then the audio data can be transmitted to another mobile phone through the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows WiFi module 970, it is to be understood that it does not belong to the essential components of cell phone 900 and may be omitted as desired.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. In one embodiment, processor 980 may include one or more processing units. In one embodiment, the processor 980 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset 900 also includes a power supply 990 (e.g., a battery) for supplying power to various components, which may preferably be logically connected to the processor 980 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 900 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, when the processor 980 included in the electronic device executes the computer program stored in the memory, the steps of the application processing method provided in the above embodiment are implemented.
Any reference to 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 external cache memory. 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), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An application processing method, comprising:
if the fact that a foreground application program calls an account login function of a background application program is detected, whether the background application program is in a frozen state or not is detected, wherein the account login function represents a function of logging in an application account through account information of the application program;
if the background application program is in a frozen state, unfreezing the background application program;
acquiring the total resource occupancy rate of the electronic equipment; if the total resource occupancy rate exceeds a first occupancy rate threshold value, controlling the unfrozen background application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state to the electronic equipment is smaller than a second occupancy rate threshold value when the application program in the resource limiting state runs;
running the unfrozen background application program to acquire background account information corresponding to the background application program;
and sending the background account information to the foreground application program, wherein the background account information is used for indicating the foreground application program to carry out account login.
2. The method of claim 1, wherein unfreezing the background application comprises:
unfreezing a first process and a second process corresponding to the background application program;
the running of the unfrozen background application program and the obtaining of the background account information corresponding to the background application program comprise the following steps:
calling the unfrozen first process to acquire background account information corresponding to the background application program;
the sending the background account information to the foreground application includes:
and calling the unfrozen second process, and sending the background account information to the foreground application program.
3. The method of claim 1, wherein controlling the unfrozen background application to enter a resource-restricted state comprises:
acquiring a priority corresponding to the background application program, and acquiring a corresponding resource limitation level according to the priority;
and controlling the unfrozen background application program to enter a resource limiting state corresponding to the resource limiting level.
4. The method of claim 1, further comprising:
initiating an information acquisition signal to the background application program, and adding the information acquisition signal into a signal processing queue corresponding to the background application program, wherein the signal processing queue comprises one or more processing signals for processing the application program;
the acquiring background account information corresponding to the background application program comprises:
and acquiring the information acquisition signal from the signal processing queue, and acquiring background account information corresponding to the background application program according to the information acquisition signal.
5. The method of claim 4, wherein said obtaining said information-derived signal from said signal processing queue further comprises:
acquiring a signal processing queue corresponding to the background application program, and sequencing processing signals in the processing signals according to signal initiation time;
and sequentially processing the processing signals in the sequenced signal processing queue.
6. The method of any of claims 1-5, wherein sending the background account information to the foreground application further comprises, after:
and if the foreground application program is detected to be successfully logged in or the unfreezing duration exceeds a duration threshold, freezing the unfrozen background application program, wherein the unfreezing duration refers to the duration from the unfreezing moment of the background application program to the current moment.
7. An application processing apparatus, comprising:
the system comprises a state detection module, a state detection module and a state detection module, wherein the state detection module is used for detecting whether a background application program is in a frozen state or not if the condition that a foreground application program calls an account login function of the background application program is detected, and the account login function represents a function of logging in an application account through account information of the application program;
the application unfreezing module is used for unfreezing the background application program if the background application program is in a frozen state;
the resource limiting module is used for acquiring the total resource occupancy rate of the electronic equipment; if the total resource occupancy rate exceeds a first occupancy rate threshold value, controlling the unfrozen background application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state to the electronic equipment is smaller than a second occupancy rate threshold value when the application program in the resource limiting state runs;
the information acquisition module is used for running the unfrozen background application program and acquiring background account information corresponding to the background application program;
and the information sending module is used for sending the background account information to the foreground application program, and the background account information is used for indicating the foreground application program to carry out account login.
8. The apparatus of claim 7, wherein the application unfreezing module is further configured to unfreeze a first process and a second process corresponding to the background application; the information acquisition module is further used for calling the unfrozen first process and acquiring background account information corresponding to the background application program; the information sending module is further configured to call the thawed second process, and send the background account information to the foreground application.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201711489142.9A 2017-12-29 2017-12-29 Application program processing method and device, electronic equipment and computer readable storage medium Active CN109992380B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711489142.9A CN109992380B (en) 2017-12-29 2017-12-29 Application program processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711489142.9A CN109992380B (en) 2017-12-29 2017-12-29 Application program processing method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109992380A CN109992380A (en) 2019-07-09
CN109992380B true CN109992380B (en) 2021-06-08

Family

ID=67111426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711489142.9A Active CN109992380B (en) 2017-12-29 2017-12-29 Application program processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109992380B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110691401B (en) * 2019-08-28 2021-04-09 华为技术有限公司 System application management method and device
CN111651261B (en) * 2020-07-07 2023-04-07 Oppo(重庆)智能科技有限公司 Process management method and device, terminal equipment and computer readable storage medium
CN114518924B (en) * 2022-01-29 2024-02-02 苏州达家迎信息技术有限公司 Page display method, device and equipment of mobile client and storage medium
CN115562743B (en) * 2022-03-31 2023-10-27 荣耀终端有限公司 Application program loading method and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193653A (en) * 2017-04-28 2017-09-22 北京小米移动软件有限公司 Method for allocating bandwidth resources, device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8656268B2 (en) * 2005-07-01 2014-02-18 Microsoft Corporation Queueing events in an interactive media environment
KR102148948B1 (en) * 2013-12-06 2020-08-27 삼성전자주식회사 Multi tasking method of electronic apparatus and electronic apparatus thereof
CN105099985B (en) * 2014-04-21 2018-09-07 百度在线网络技术(北京)有限公司 Multiple utility program logs in implementation method and device
CN106648849A (en) * 2016-10-18 2017-05-10 上海传英信息技术有限公司 Process freezing method and mobile terminal
CN107066320B (en) * 2017-01-19 2021-06-15 努比亚技术有限公司 Android process freezing and unfreezing device and method
CN107479952A (en) * 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 background process management method, device, storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193653A (en) * 2017-04-28 2017-09-22 北京小米移动软件有限公司 Method for allocating bandwidth resources, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ShuffleDog: Characterizing and Adapting User-Perceived Latency of Android Apps;Gang Huang;《IEEE Transactions on Mobile Computing》;20170111;第16卷(第10期);2913 - 2926 *
基于Android App安全登录认证解决方案;廖露阳;《现代计算机》;20170321(第35期);9-12 *

Also Published As

Publication number Publication date
CN109992380A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109992438A (en) Information processing method, apparatus, computer device, and computer-readable storage medium
CN109144232B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110032321B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN110008008A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN109992965B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN107544842A (en) Application program processing method and device, computer equipment, storage medium
CN110032267A (en) Information processing method, device, mobile terminal and computer readable storage medium
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110032429A (en) Information processing method, device, mobile terminal and computer readable storage medium
CN109992376B (en) Application freezing method, device, terminal and computer readable storage medium
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN109992309B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992425A (en) Information processing method, apparatus, computer device, and computer-readable storage medium
CN109992363B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992362B (en) Application processing method and apparatus, electronic device, and computer-readable storage medium
CN110046033B (en) Application processing method and apparatus, electronic device, and computer-readable storage medium
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
CN109992369B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109375995B (en) Application freezing method and device, storage medium and electronic equipment
CN109388487B (en) Application processing method and apparatus, electronic device, and computer-readable storage medium
CN110045811B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN110753909B (en) Service scheduling method and device, computer equipment and computer readable storage medium
CN110045994B (en) Application program processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant