CN110032321B - Application processing method and device, electronic equipment and computer readable storage medium - Google Patents
Application processing method and device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110032321B CN110032321B CN201810032302.5A CN201810032302A CN110032321B CN 110032321 B CN110032321 B CN 110032321B CN 201810032302 A CN201810032302 A CN 201810032302A CN 110032321 B CN110032321 B CN 110032321B
- Authority
- CN
- China
- Prior art keywords
- application program
- application
- resource
- foreground
- voice
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 25
- 230000000670 limiting effect Effects 0.000 claims abstract description 97
- 238000000034 method Methods 0.000 claims abstract description 86
- 238000012545 processing Methods 0.000 claims abstract description 55
- 230000001419 dependent effect Effects 0.000 claims description 29
- 238000004891 communication Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 14
- 230000008014 freezing Effects 0.000 claims description 14
- 238000007710 freezing Methods 0.000 claims description 14
- 238000001514 detection method Methods 0.000 claims description 9
- 238000011084 recovery Methods 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 abstract description 12
- 230000008569 process Effects 0.000 description 70
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 13
- 238000007726 management method Methods 0.000 description 12
- 239000011230 binding agent Substances 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 230000002829 reductive effect Effects 0.000 description 3
- 238000010257 thawing Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000036961 partial effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000002618 waking effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/167—Audio in a user interface, e.g. using voice commands for navigating, audio feedback
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/504—Resource capping
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Stored Programmes (AREA)
Abstract
The application provides an application processing method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: when detecting that a foreground application running in the electronic equipment is in a full screen mode, monitoring whether the electronic equipment receives a voice limiting instruction or not; if the electronic equipment receives the voice limiting instruction, acquiring a target application program from a background application program; and carrying out resource limitation processing on the target application program according to the voice limitation instruction. The application processing method and device, the electronic device and the computer readable storage medium can improve the running efficiency of the application.
Description
Technical Field
The present invention 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, such as purchasing merchandise through a shopping class application, viewing video through a video class application, and so forth. The application program can be frozen, and the frozen application program can not continue to run any more, so that the processor resource in the intelligent device can not be occupied. However, since the application program exists in the intelligent device, the application program also occupies resources such as memory, hardware and the like in the intelligent device.
Disclosure of Invention
The embodiment of the application provides an application processing method and device, electronic equipment and a computer readable storage medium, which can improve the running efficiency of an application.
An application processing method, comprising:
when detecting that a foreground application running in the electronic equipment is in a full screen mode, monitoring whether the electronic equipment receives a voice limiting instruction or not;
if the electronic equipment receives the voice limiting instruction, acquiring a target application program from a background application program;
and carrying out resource limitation processing on the target application program according to the voice limitation instruction.
An application processing apparatus comprising:
the instruction detection module is used for monitoring whether the electronic equipment receives a voice limiting instruction or not when detecting that a foreground application program running in the electronic equipment is in a full-screen mode;
the application acquisition module is used for acquiring a target application program from a background application program if the electronic equipment receives a voice limiting instruction;
and the application processing module is used for carrying out resource limitation processing on the target application program according to the voice limitation instruction.
An electronic device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
When detecting that a foreground application running in the electronic equipment is in a full screen mode, monitoring whether the electronic equipment receives a voice limiting instruction or not;
if the electronic equipment receives the voice limiting instruction, acquiring a target application program from a background application program;
and carrying out resource limitation processing on the target application program according to the voice limitation instruction.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
when detecting that a foreground application running in the electronic equipment is in a full screen mode, monitoring whether the electronic equipment receives a voice limiting instruction or not;
if the electronic equipment receives the voice limiting instruction, acquiring a target application program from a background application program;
and carrying out resource limitation processing on the target application program according to the voice limitation instruction.
The application processing method and device, the electronic device and the computer readable storage medium can monitor whether a voice limiting instruction is received when the electronic device detects that the foreground application is in a full screen mode. And if the voice limiting instruction is received, acquiring a target application program from the background application program, and carrying out a resource limiting instruction on the target application program according to the voice limiting instruction. A user can initiate a voice limiting instruction to control the operation of the background application program, and the occupation of the background application program to resources is controlled through resource limiting processing, so that the efficient operation of the foreground application program is ensured, and the operation efficiency of the application program is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of an application processing method in one embodiment;
FIG. 2 is a schematic diagram of an internal structure of an electronic device in one embodiment;
FIG. 3 is a flow chart of a method of application processing in one embodiment;
FIG. 4 is a flowchart of an application processing method in another embodiment;
FIG. 5 is a diagram of a resource restriction state of an application in one embodiment;
FIG. 6 is a partial architectural diagram of an electronic device in one embodiment;
FIG. 7 is a schematic diagram of an application processing device according to an embodiment;
FIG. 8 is a schematic diagram of an application processing device according to another embodiment;
fig. 9 is a block diagram of a part of a structure of a mobile phone related to an electronic device according to 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 will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It will be understood that the terms "first," "second," and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. 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.
FIG. 1 is a schematic diagram of an application environment of an application processing method in one embodiment. As shown in fig. 1, the application environment includes a client 102 and a server 104. The client 102 can be provided with an application program, and monitors whether a voice limiting instruction is received or not when the running foreground application program is detected to be in a full-screen mode; if a voice limiting instruction is received, acquiring a target application program from a background application program; and carrying out resource limitation processing on the target application program according to the voice limitation instruction. Server 104 may be configured to push application processing algorithms to client 102, according to which client 102 processes the application. The client 102 is an electronic device located at the outermost periphery of a computer network, and is mainly used for inputting user information and outputting processing results, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, etc. Server 104 is a device, such as one or more computers, that responds to requests for services while providing computing services. It is understood that in other embodiments provided herein, the application environment of the application processing method may include only the client 102.
As shown in fig. 2, a schematic 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 configured to provide computing and control capabilities to support operation of the entire electronic device. The memory is used for storing data, programs, instruction codes and the like, and at least one computer program is stored on the memory and can be executed by the processor, so as to realize the application program processing method suitable for the electronic device. The Memory may include a nonvolatile 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 is executable by a processor for implementing an application processing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for 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 used for displaying interface information of an application corresponding to a foreground process, and may also be used for detecting a touch operation acting on the display screen, and generating a corresponding instruction, such as a switching instruction of a foreground application and a background application.
It will be appreciated by those skilled in the art that the structure shown in fig. 2 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the electronic device to which the present application is applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components. The electronic device may further comprise a network interface connected via a system bus, which may be an ethernet card or a wireless network card, etc., for communicating with an external electronic device, such as a server.
FIG. 3 is a flow chart of a method of application processing in one embodiment. The application processing method in this embodiment is described by taking the terminal or the server in fig. 1 as an example. As shown in fig. 3, the application processing method includes steps 302 to 308. Wherein:
in step 302, when detecting that a foreground application running in the electronic device is in full screen mode, monitoring whether the electronic device receives a voice limiting instruction.
Application (APP) refers to software written for some Application purpose in an electronic device, through which the electronic device can implement a demand service for a user. For example, a user may play a game through a game-like application, may see video through a video-like application, may play music through a music-like application, and so on. The application programs can be divided into foreground application programs and background application programs according to the running state. A foreground application refers to an application running in the foreground of an electronic device that may be displayed in the foreground and interact with a user. Background applications refer to applications that run in the background of an electronic device, which typically cannot be displayed in the foreground and which implement interactive procedures with a user.
Generally, application operations of an application program are commonly completed by one or more processes (processes), which are one-time operation activities of the program in a computer with respect to a certain data set, and are a basic unit of resource allocation and scheduling by the system. Meanwhile, a process can correspond to one or more threads, and the threads are a single sequential control flow in the program and are relatively independent and schedulable execution units in the process. The processes may include a foreground process and a background process, where the foreground process is a process running in the foreground of the electronic device, and the background process is a process running in the background of the electronic device. The electronic device can control the switching of the foreground process and the background process, the foreground process can be switched to the background operation, and the background process can also be switched to the foreground operation. Specifically, the process can be managed by a process pool, and one or more process identifiers corresponding to the processes can be stored in the process pool. The process identifier is used to uniquely identify a process. The process pool can comprise a foreground process pool and a background process pool, wherein the foreground process pool comprises process identifiers corresponding to the foreground process, and the background process pool comprises process identifiers corresponding to the background process. When detecting that the running states of the foreground process and the background process are changed, the process pool correspondingly adds or deletes the process identification generating the change. For example, the process identifier of the process a is "0123", and when it is detected that the process a is changed from the background process to the foreground process, the process identifier "0123" of the process a may be removed from the background process pool and added to the foreground process pool.
Full screen mode refers to a mode in which a view or graphic in an application is enlarged to the entire screen of an electronic device. When the application program is operated, a user can initiate a full-screen instruction through the electronic equipment, so that the application program is in a full-screen mode. When the application program is in the full-screen mode, the user can also initiate a shrinking instruction to enable the application program to exit the full-screen mode and restore to the original size. For example, when a user views a video, a video window is only displayed in a part of the application program interface, and at this time, the user can initiate a full-screen instruction to zoom the video into a full-screen mode, and the video occupies the whole screen of the electronic device in the full-screen mode, so that the user can view the video conveniently. When playing the game, the game interface can be enlarged to the size of the whole screen, so that the operation of a user is convenient.
Step 304, if the electronic device receives the voice limiting instruction, the target application program is obtained from the background application program.
The voice restriction instruction is an instruction for instructing to perform resource restriction processing on the application program. When detecting that a foreground application running in the electronic equipment is in a full-screen mode, the electronic equipment can collect voice and analyze the collected voice, and detecting whether the collected voice is a voice limiting instruction or not. Specifically, the electronic device may pre-establish a correspondence between the target keyword and the voice limitation instruction. After the electronic device collects the voice information, the voice information is converted into text information. And then extracting keywords in the text information, and matching the extracted keywords with target keywords. If the keyword matched with the target keyword exists, the electronic equipment is considered to receive the voice limiting instruction.
For example, if the target keyword is "freeze", the correspondence between the "freeze" and the voice restriction instruction is established. When the electronic equipment detects that the foreground application program is in a full-screen mode, voice information of a user is collected, the voice information is converted into a text sequence, keywords in the text sequence are extracted, and the extracted keywords are compared with 'frozen'. If the keyword matched with the freezing exists, the electronic equipment is judged to receive the voice limiting instruction.
The target application is an application that needs to perform resource restriction processing. It will be appreciated that applications running in an electronic device can be divided into foreground applications and background applications, with foreground applications being considered important applications when in full screen mode. In order to ensure the running efficiency of the foreground application program, the occupation of resources by the background application program can be reduced. For example, the priority of the foreground application may be compared with the priority of the background application, and then the target application may be obtained from the background application. And keeping the background application program with higher priority in a normal running state, and taking the background application program with low priority as a target application program to carry out resource limiting processing.
In one embodiment, all the background applications may be used as the target application, or the target application may be acquired according to the application priority of the background application. The acquiring the target application program may specifically include: acquiring a foreground application priority of a foreground application program; and acquiring a background application program with application priority lower than that of the foreground application, and taking the background application program as a target application program. The application priority is used to represent the importance of the application. For example, the application priority of the system application may be defined to be higher than that of the third party application, or the application priority may be defined according to the type of application, and the application priority of the instant messaging application may be defined to be higher than that of the game application. The user or system may customize the application priority, and is not specifically limited in this embodiment.
And 308, performing resource limitation processing on the target application program according to the voice limitation instruction.
The resource refers to a software or hardware resource that must be used by the electronic device when processing an application event, such as a CPU (Central Processing Unit ), a Memory (Memory), hardware, a network resource, an IO (Input-Output), and the like of the electronic device. The resource restriction processing refers to processing for restricting resources occupied by an application program. The resource restriction process may be, but is not limited to, controlling the application to enter a frozen state or a resource restriction state, where the application is not turned off, but is temporarily not running. If the application program is in a frozen state, the application program does not occupy the processor resources, but still occupies the resources such as the memory and hardware of the electronic device. The resource limitation state refers to a state in which resources of the electronic device used by the application program at the time of running are limited, for example, the CPU occupancy rate used by the control application program at the time of running cannot exceed 5%.
When the foreground application is in full screen mode, the user can perform resource limitation processing on the target application by initiating a voice limitation instruction. For example, when a user plays a game to generate a click, the user can call out a sentence of "freeze", and then the electronic device obtains the target application program from the background application program according to the voice limiting instruction, controls the target application program to enter a frozen state, and prohibits the operation of the target application program, thereby reducing the occupation of the target application program to the CPU resource and ensuring the smoothness of the operation of the foreground application program.
According to the application program processing method provided by the embodiment, when the electronic equipment detects that the foreground application program is in the full-screen mode, whether a voice limiting instruction is received or not is monitored. And if the voice limiting instruction is received, acquiring a target application program from the background application program, and carrying out a resource limiting instruction on the target application program according to the voice limiting instruction. A user can initiate a voice limiting instruction to control the operation of the background application program, and the occupation of the background application program to resources is controlled through resource limiting processing, so that the efficient operation of the foreground application program is ensured, and the operation efficiency of the application program is improved.
FIG. 4 is a flowchart of an application processing method in another embodiment. The application processing method in this embodiment is described by taking the terminal or the server in fig. 1 as an example. As shown in fig. 4, the application processing method includes steps 402 to 410. Wherein:
in step 402, when detecting that a foreground application running in the electronic device is in full screen mode, monitoring whether the electronic device receives a voice limiting instruction.
In one embodiment, the electronic device may modify a configuration file of the foreground application after detecting the full screen instruction, setting the foreground application to full screen mode. Meanwhile, the electronic equipment can monitor the screen and detect whether the screen is in a full-screen mode or a non-full-screen mode. For example, in the android system, the state of the screen can be acquired by the this, getwindow (). GetAttributes (). Flags function, and when the value acquired by the function is 66816, the current screen is in full screen mode; when the value obtained by the function is 65792, the current screen is in a non-full screen mode.
In step 404, if the electronic device receives the voice limiting instruction, the dependent application program that is dependent on the foreground application program is obtained from the background application program, and the background application program except the dependent application program is obtained as the target application program.
In one embodiment, the relationship of execution of one application program is facilitated by relying on data representing that the one application program needs to be utilized by another application program or programs. There are two applications of the dependency relationship, namely a dependent application and a dependent application. For example, the application a depends on the application B, or the application B depends on the application a, that is, the application a needs to use the data of the application B to implement the execution of the application a, and at this time, the application a is an application dependent on the application B, and the application B is an application dependent on the application a. Specifically, in the embodiment of the present application, the dependent application refers to a background application that is dependent on by a foreground application.
The dependencies between applications are not constant at all times, but rather vary in real time. The electronic device may record the dependencies between the applications. Specifically, the interdependence between two applications is based on the fact that they need to communicate with each other. Thus, acquiring a dependent application that is dependent on by a foreground application includes: and acquiring a background application program which has a communication relation with the foreground application program as a dependent application program.
In an operating system, communication relationships between applications are established by defining communication mechanisms. The communication mechanism includes Socket, binder, shared memory, and the like. Binder communication is an efficient IPC (Inter-Process Communication) mechanism implemented in the Android system, and is a client-server communication structure. The client and the server define a corresponding proxy interface, when the client calls a method in the proxy interface, the method of the proxy interface packages parameters of the client into a Parcel object, and then the proxy interface sends the Parcel object to a Binder driver in a kernel layer. The server can read the request data in the Binder driver, then analyze and process the Parcel object, and return the processing result. Socket communication can carry out communication connection on two network application programs, so that data exchange of the application programs on the network is realized. In particular, local inter-application communication may uniquely identify an application by PID (Process Identity), but there is no way to achieve communication between network applications. Whereas in network communications IP (Internet Protocol, protocol interconnected between networks) addresses may uniquely identify hosts in the network, "protocol + port" may uniquely identify an application in a host, and thus in Socket communications an application is typically uniquely identified in the form of "IP address + protocol + port". Shared memory is a very efficient way to allow two unrelated applications to access the same logical memory, sharing and transferring data between two running applications, with the memory shared between different applications typically being arranged as the same piece of physical memory.
Optionally, acquiring the dependent application that is dependent on by the foreground application includes at least one of: acquiring a background application program with a socket communication relation with a foreground application program as a dependent application program; acquiring a background application program with a binding communication relation with a foreground application program as a dependent application program; and acquiring a background application program which performs memory sharing with the foreground application program as a dependent application program.
In step 406, if the voice restriction instruction is an application freeze instruction, the target application is controlled to enter a freeze state.
In this embodiment, the voice limiting instruction may include an application freeze instruction for controlling the application program to enter the frozen state and a resource limiting instruction for controlling the application program to enter the resource limiting state. The electronic device may store a plurality of target keywords in advance, and respectively establish correspondence between the target keywords and each voice limitation instruction. After the voice information is acquired, the electronic equipment converts the voice information into text information, extracts keywords in the text information, and then matches the extracted keywords with each target keyword. If the keyword matched with the target keyword exists, the electronic equipment is considered to receive the voice limiting instruction, and then the corresponding voice limiting instruction is acquired according to the matched target keyword. The keyword in the extracted voice information may be an algorithm such as TF-IDF (Term Frequency-reverse document Frequency), textRank (text ranking), etc., which is not limited in this embodiment.
For example, the electronic device pre-stores two target keywords "freeze" and "limit," where "freeze" corresponds to an application freeze instruction and "limit" corresponds to a resource limit instruction. The electronic equipment collects the voice information, converts the voice information into text information and extracts keywords in the text information. If the keyword matched with the target keyword is frozen, the electronic device detects an application freezing instruction. If the keyword matched with the target keyword 'limit' exists, the electronic equipment detects the resource limit instruction.
When the voice limiting instruction is an application limiting instruction, the user is required to freeze the background application program. The target application program entering the frozen state cannot continue to run, and does not occupy CPU resources, so that the occupation of the target application program on the resources of the electronic equipment can be reduced, and the running of the foreground application program is ensured. The frozen target application may also be awakened, and the user or system may set the awakening conditions, which are not specifically limited herein.
In the Android system, various methods for realizing freezing and waking up of application programs exist. Taking one example, the method can be implemented through a pm (PACKAGE manager) command, in which, an application program can be set to a frozen state through a freezing command pm disable [ -user_id ] pack_or_component, then, the application program in the frozen state can be awakened through a thawing command pm enable [ -user_id ] pack_or_component, and an application program list in the frozen state is acquired through a freezing list query command pm list PACKAGEs-d to view the application program in the frozen state. It is to 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 is not limited to be implemented in the Android system, and may be applied to operating systems such as IOS, saint, windows, MAC OS (Macintosh Operating System), and the like.
In step 408, if the voice limitation instruction is a resource limitation instruction, the target application program is controlled to enter a resource limitation state, wherein the resource occupancy rate of the application program in the resource limitation state on the electronic device is smaller than the occupancy rate threshold when the application program in the resource limitation state is running.
In one embodiment, if the received voice restriction instruction is a resource restriction instruction, the target application may be controlled to enter a resource restriction state. The resource occupancy rate of the application program in the resource limiting state to the electronic equipment is smaller than an occupancy rate threshold value when the application program runs. When the target application program is in a resource limiting state, the resource occupancy rate of the target application program to the electronic equipment cannot exceed the occupancy rate threshold, so that the resource occupancy of the target application program to the electronic equipment can be controlled, the occupancy of the background to the resource is reduced, and the operation efficiency of the foreground is improved. For example, the CPU occupancy of the control target application at run-time cannot exceed 5% to reduce excessive consumption of the CPU by the target application. In the mobile phone system, the occupancy rate of resources such as a CPU, a memory, and an IO of the target application program can be controlled through a cgroups (control groups), that is, the acquired target application program is controlled to enter a resource limitation state.
The resource occupancy rate of each application program can be counted in real time in the running process of the electronic equipment, and then the total occupancy rate of the resources is obtained by adding the resource occupancy rates of all the application programs in the electronic equipment. Specifically, the electronic device may store a monitoring log file in a preset storage address, and according to the monitoring log file, the total occupancy rate of resources of the electronic device may be obtained. Meanwhile, a plurality of subfolders are also stored in the preset storage address, and each process log file is stored in the subfolders. The process log files record the change of the specific running condition of the process from the starting to the current moment, and the condition of the resources occupied by the process can be obtained according to the process log files, so that the resource occupancy rate of the process can be obtained. And adding the resource occupancy rates of all the processes contained in the application program to obtain the resource occupancy rate of the application program.
For example, in the Android system, a monitoring log file storing the total occupation information of the CPU may be read in the/proc directory. The/proc directory also comprises a plurality of subfolders, and process log files of CPU occupation information corresponding to each process are stored in the subfolders. The file name of the monitoring log file stored in the proc directory is "stat", and the file name of the progress log file is "stat" stored in the subfolder in the proc directory. The stat file under the proc directory records the total occupation information of the CPU, 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 occupancy information of the PID process.
The electronic device may also count the occupancy rate of resources such as memory, hardware, network resources, and IO in real time, for example, the total memory amount of the mobile phone may be obtained by reading the information of the file "/proc/meminfo", and the current available memory amount may be obtained by an actigy manager. In the Android system, top commands can be directly operated to count the occupancy rate of resources such as CPU, memory, IO and the like.
The higher the resource occupancy of the foreground application, the higher the demand for resources by the foreground application. Accordingly, the target application may be resource-constrained by the resource occupancy of the foreground application. Specifically, obtaining a foreground resource occupancy rate corresponding to a foreground application program; and controlling the target application program to enter a resource limiting state according to the foreground resource occupancy rate. The foreground resource occupancy rate represents the occupancy rate of the foreground application program to the resources of the electronic equipment.
In one embodiment, the resource limitation level may be obtained first according to the foreground resource occupancy rate, and then the target application is controlled to enter a resource limitation state corresponding to the resource limitation level. The resource restriction level is used to represent the degree of resource restriction of the corresponding application. The foreground resource occupancy rate can be divided into two or more occupancy rate intervals in advance, and then the corresponding relation between each occupancy rate interval and the resource restriction level is established. And determining a target occupancy rate interval according to the acquired foreground resource occupancy rate, and acquiring a corresponding resource restriction level according to the target occupancy rate interval. For example, the foreground resource occupancy rate is divided into three occupancy rate intervals of [0,20% ], 20%,70% ] and [70%,100% ], which correspond to three resource restriction level levels of a light resource restriction level, a normal resource restriction level and a deep resource restriction level, respectively, and the occupancy rate thresholds corresponding to the different resource restriction levels are different. If the acquired foreground resource occupancy rate is 60%, the corresponding target occupancy rate interval is [20%,70% ], and the corresponding resource restriction level is the depth resource restriction level.
In other embodiments provided herein, the resource occupation of the electronic device by the target application may also be controlled according to the resource remaining rate of the electronic device. Specifically, the resource remaining rate of the electronic equipment is obtained, and the resource control rate is calculated according to the foreground resource occupancy rate and the resource remaining rate; acquiring a corresponding resource restriction level according to the resource control rate; and controlling the target application program to enter a resource limiting state corresponding to the resource limiting level. The resource remaining rate refers to a ratio of remaining resources of the electronic device to total resources. For example, the application programs running in the electronic device may include a foreground application program and a background application program, where the foreground resource occupancy rate of the foreground application program is 30%, the background resource occupancy rate of the background application program is 45%, and then the available resource remaining rate is 100% -30% -45% = 25%.
The calculating the resource control rate according to the foreground resource occupancy rate and the resource residual rate specifically may include: dividing the foreground resource occupancy rate by the resource residual rate to obtain the resource control rate. The larger the foreground resource occupancy rate is, the smaller the resource residual rate of the electronic equipment is, the larger the calculated resource control rate is, and the larger the resource requirement when the foreground application program runs is indicated. For example, the foreground resource occupancy rate is 50%, the resource remaining rate is 20%, and the calculated resource control rate is 50% ++20% = 2.5. The corresponding relation between the resource control rate and the resource limitation level can be established in advance, and then the corresponding resource limitation level is obtained according to the calculated resource control rate.
FIG. 5 is a diagram of a resource restriction state of an application in one embodiment. As shown in fig. 5, the resources of the electronic device include CPU, memory, IO, network resources, etc., and the states of the application programs may be classified into a normal operation state, a resource limitation state, and a frozen state. The resource limitation state can be divided into a light resource limitation state, a common resource limitation state and a deep resource limitation state. In different resource constraint states, the corresponding available resources 502 and unavailable resources 504 are not identical. From the light resource limitation state, the normal resource limitation state, to the deep resource limitation state, the available resources 502 are decremented. In a normal operating state, the available resources 502 of the application are 100%.
In step 410, if it is detected that the foreground application program exits the full-screen mode, the control target application program is restored to the normal running state.
In the embodiment provided by the application, when the foreground application program is detected to exit the full-screen mode, the target application program can be controlled to recover the normal running state. Specifically, if the target application is in the resource limitation state, the resource limitation of the electronic device on the target application is released. And if the target application program is in the frozen state, waking up the target application program from the frozen state. After the normal operation state is restored, the use of the electronic equipment resources by the target application program is not limited any more.
In one embodiment, the target application may be controlled to resume the normal running state after the foreground application exits full screen mode for a period of time. Specifically, step 410 may include: if the foreground application program is detected to exit the full screen mode, starting timing; and if the timing duration exceeds the duration threshold, controlling the target application program to return to the normal running state. For example, after the foreground application exits full screen mode for 5 seconds, the target application is restored to the normal running state. Taking an Android system as an example, the system can predefine a timer, when detecting that a foreground application program exits from a full screen mode, the system searches for the predefined timer, clears the timer through a timer.
It can be understood that after the foreground application program exits the full-screen mode, the foreground application program may still keep running, so long as the foreground application program is still running in the foreground, the resources occupied by the background application program may be limited, so as to ensure the fluency of the foreground application program. Step 410 may specifically include: if the foreground application program is detected to exit the full screen mode, detecting whether the foreground application program exits the foreground; and if the foreground application program is detected to exit the foreground, the control target application program is restored to the normal running state.
According to the application program processing method provided by the embodiment, when the electronic equipment detects that the foreground application program is in the full-screen mode, whether a voice limiting instruction is received or not is monitored. And if the voice limiting instruction is received, acquiring a target application program from the background application program, and carrying out a resource limiting instruction on the target application program according to the voice limiting instruction. And when the foreground application program is detected to exit the full-screen mode, the target application program is restored to the normal running state. A user can initiate a voice limiting instruction to control the operation of the background application program, and the occupation of the background application program to resources is controlled through resource limiting processing, so that the efficient operation of the foreground application program is ensured, and the operation efficiency of the application program is improved. When the foreground application program exits the full screen mode, the normal running state of the target application program is restored, so that the normal running of the application program in the electronic equipment can be ensured.
It should be understood that, although the steps in the flowcharts of fig. 3 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 3 and 4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of the other steps or sub-steps of other steps.
In one embodiment, as shown in FIG. 6, a partial architectural diagram of an electronic device is provided. The architecture system of the electronic device includes a JAVA space layer 61, a local framework layer 62, and a Kernel (Kernel) space layer 63. The JAVA space layer 61 may include a policy application 610 thereon, through which the electronic device may initiate a freezing and thawing policy for each application, so as to implement freezing and thawing operations for each application in the electronic device. For example, the policy application 610 determines the application consuming power in the background and initiates a freeze operation to the application consuming power in the background. The local framework layer 62 includes a resource priority and constraint 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 limitation management module 620, and adjust the priority of the application program and the resource group according to the requirement of an upper layer, thereby achieving the effects of optimizing the performance and saving the power consumption. The electronic device may distribute, through the platform freezing management module 622, tasks that may be frozen in the background to the corresponding preset frozen layers of different levels according to the length of the freezing time, where the frozen layers may optionally include: the CPU limits the sleep mode, the CPU freezes the sleep mode, the process depth freezes the mode. The kernel space layer 63 includes a UID management module 630, a Cgroup module 632, a timeout freeze exit module 634, a Binder management module 636, and a process memory reclamation 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. By UID it is more convenient to uniformly manage resources of one user's application than to perform process management based on process identity (Process Identifier, PID). The Cgroup module 632 is used to provide a complete set of central processing units (Central Processing Unit, CPU), CPUSET, memory, input/output (I/O) and Net related resource limiting mechanisms. The timeout freeze exit module 634 is used to resolve anomalies generated by the occurrence of a freeze timeout scenario. The Binder management module 636 is used to implement control of the priority of the background Binder communication. The process memory reclamation module 638 is configured to implement a deep freeze mode of a process, and when a third party application program is in a frozen state for a long period of time, release a file area of the process, thereby achieving a memory-saving module, and also accelerating a next start-up speed of the application program. Through the architecture, the application processing method in each embodiment of the application can be realized.
FIG. 7 is a schematic diagram of an application processing device according to an embodiment. As shown in fig. 7, the application processing apparatus 700 includes an instruction detection module 702, an application acquisition module 704, and an application processing module 706. Wherein:
the instruction detection module 702 is configured to monitor whether the electronic device receives a voice restriction instruction when detecting that a foreground application running in the electronic device is in a full screen mode.
And the application acquisition module 704 is configured to acquire the target application program from the background application program if the electronic device receives the voice limiting instruction.
And the application processing module 706 is configured to perform resource restriction processing on the target application program according to the voice restriction instruction.
According to the application processing device provided by the embodiment, when the electronic equipment detects that the foreground application is in the full-screen mode, whether a voice limiting instruction is received or not is monitored. And if the voice limiting instruction is received, acquiring a target application program from the background application program, and carrying out a resource limiting instruction on the target application program according to the voice limiting instruction. A user can initiate a voice limiting instruction to control the operation of the background application program, and the occupation of the background application program to resources is controlled through resource limiting processing, so that the efficient operation of the foreground application program is ensured, and the operation efficiency of the application program is improved.
Fig. 8 is a schematic structural diagram of an application processing device in another embodiment. As shown in fig. 8, the application processing apparatus 800 includes an instruction detection module 802, an application acquisition module 804, an application processing module 806, and an application recovery module 808. Wherein:
the instruction detection module 802 is configured to monitor whether the electronic device receives a voice restriction instruction when detecting that a foreground application running in the electronic device is in a full screen mode.
The application obtaining module 804 is configured to obtain the target application program from the background application program if the electronic device receives the voice limiting instruction.
And the application processing module 806 is configured to perform resource restriction processing on the target application program according to the voice restriction instruction.
And the application recovery module 808 is configured to control the target application program to recover to a normal running state if the foreground application program is detected to exit the full-screen mode.
According to the application processing device provided by the embodiment, when the electronic equipment detects that the foreground application is in the full-screen mode, whether a voice limiting instruction is received or not is monitored. And if the voice limiting instruction is received, acquiring a target application program from the background application program, and carrying out a resource limiting instruction on the target application program according to the voice limiting instruction. And when the foreground application program is detected to exit the full-screen mode, the target application program is restored to the normal running state. A user can initiate a voice limiting instruction to control the operation of the background application program, and the occupation of the background application program to resources is controlled through resource limiting processing, so that the efficient operation of the foreground application program is ensured, and the operation efficiency of the application program is improved. When the foreground application program exits the full screen mode, the normal running state of the target application program is restored, so that the normal running of the application program in the electronic equipment can be ensured.
In one embodiment, the application acquisition module 804 is further configured to acquire a dependent application that is dependent on the foreground application from the background application, and acquire a background application other than the dependent application as a target application.
In one embodiment, the application acquisition module 804 is further configured to acquire a background application program that has a communication relationship with the foreground application program, as a dependent application program.
In one embodiment, the application processing module 806 is further configured to control the target application program to enter a frozen state if the voice restriction instruction is an application freeze instruction; and if the voice limiting instruction is a resource limiting instruction, controlling the target application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state on the electronic equipment is smaller than an occupancy rate threshold value when the application program in the resource limiting state runs.
In one embodiment, the application processing module 806 is further configured to obtain a foreground resource occupancy rate corresponding to the foreground application, where the foreground resource occupancy rate indicates an occupancy rate of resources of the electronic device by the foreground application; and controlling the target application program to enter a resource limiting state according to the foreground resource occupancy rate.
In one embodiment, the application processing module 806 is further configured to obtain a resource restriction level according to the foreground resource occupancy rate, and control the target application program to enter a resource restriction state corresponding to the resource restriction level.
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 run on a terminal or a server. Program modules of the computer program may be stored in the memory of the terminal or server. Which when executed by a processor, performs the steps of the methods described in the embodiments of the present application.
Embodiments of the present application also provide 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 embodiments.
A computer program product comprising instructions which, when run on a computer, cause the computer to perform the application processing method provided by the above embodiments.
The embodiment of the application also provides electronic equipment. As shown in fig. 9, for convenience of explanation, only the portions related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method portions 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 an example of the mobile phone:
Fig. 9 is a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present application. Referring to fig. 9, the mobile phone includes: radio Frequency (RF) circuitry 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuitry 960, wireless fidelity (wireless fidelity, wiFi) module 970, processor 980, power source 990, and so forth. It will be appreciated by those skilled in the art that the handset construction shown in fig. 9 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The RF circuit 910 may be configured to receive and send information or receive and send signals during a call, and may receive downlink information of a base station and process the downlink information for the processor 980; the uplink data may be transmitted to the base station. Typically, RF circuitry includes, but is not limited to, antennas, at least one amplifier, transceivers, couplers, low noise amplifiers (Low Noise Amplifier, LNAs), diplexers, and the like. In addition, the RF circuitry 910 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE)), email, short message service (Short Messaging Service, SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 performs various functional applications and data processing 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, application programs required for at least one function (such as an application program of a sound playing function, an application program of an image playing function, etc.), and the like; the data storage area may store data (such as audio data, address book, etc.) created according to the use of the cellular phone, etc. In addition, 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 to generate key signal inputs related to user settings and function control of the handset 900. In particular, 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 touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 931 or thereabout using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a predetermined program. In one embodiment, the touch panel 931 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth 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 detection device and converts it into touch point coordinates, which are then sent to the processor 980, and can receive commands from the processor 980 and execute them. In addition, the touch panel 931 may be implemented in various types such as resistive, capacitive, infrared, and 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 a 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 (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 a touch operation is detected on or near the touch panel 931, the touch operation is transmitted to the processor 980 to determine the type of touch event, and the processor 980 then 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 implemented as two separate components for the input and output functions of the mobile phone, in some embodiments, the touch panel 931 may be integrated with the display panel 941 to implement the input and output functions of the mobile phone.
The handset 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 and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 941 and/or the backlight when the mobile phone moves to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the acceleration in all directions, the gravity and the direction can be detected when the motion sensor is static, and the motion sensor can be used for identifying the application of the gesture of a mobile phone (such as switching of a transverse screen and a vertical screen), vibration identification related functions (such as a pedometer and knocking) and the like; in addition, the mobile phone can be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor and the like.
Audio circuitry 960, speaker 961, and microphone 962 may provide an audio interface between a user and a cell phone. Audio circuit 960 may transmit the received electrical signal converted from audio data to speaker 961, where it is converted to a sound signal by speaker 961 for output; on the other hand, microphone 962 converts the collected sound signals into electrical signals, which are received by audio circuit 960 and converted into audio data, which are processed by audio data output processor 980, and then transmitted to another mobile phone via RF circuit 910, or the audio data are output to memory 920 for subsequent processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 970, so that wireless broadband Internet access is provided for the user. Although fig. 9 shows a WiFi module 970, it is understood that it is not a necessary component of the handset 900 and may be omitted as desired.
The processor 980 is a control center of the handset, connecting various parts of the entire handset using various interfaces and lines, performing various functions and processing data of the handset by running or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, thereby performing overall monitoring of the handset. In one embodiment, processor 980 may include one or more processing units. In one embodiment, processor 980 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, application programs, and the like; the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset 900 further includes a power supply 990 (e.g., a battery) for powering the various components, which may be logically connected to the processor 980 by a power management system, such as for performing charge, discharge, and power management functions by the power management system.
In one embodiment, the handset 900 may also include a camera, bluetooth module, etc.
In the embodiment of the present application, the steps of the application processing method provided in the foregoing embodiment are implemented when the processor 980 included in the electronic device executes a computer program stored on a memory.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. The nonvolatile 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 DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (10)
1. An application processing method, comprising:
when detecting that a foreground application running in the electronic equipment is in a full-screen mode, collecting voice, analyzing the voice, and detecting whether the voice is a voice limiting instruction or not; the voice limiting instruction comprises an application freezing instruction and a resource limiting instruction;
if the electronic equipment receives a voice limiting instruction, a dependent application program which is depended on by the foreground application program is obtained from a background application program, and the background application program except the dependent application program is obtained as a target application program;
if the voice limiting instruction is an application freezing instruction, controlling the target application program to enter a freezing state; if the voice limiting instruction is a resource limiting instruction, controlling the target application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state on the electronic equipment is smaller than an occupancy rate threshold value when the application program in the resource limiting state runs;
And if the foreground application program is detected to exit the full-screen mode, controlling the target application program to recover to a normal running state.
2. The method of claim 1, wherein the retrieving, from a background application, a dependent application that is dependent by the foreground application comprises:
and acquiring a background application program which has a communication relation with the foreground application program as a dependent application program.
3. The method of claim 1, wherein the controlling the target application to enter a resource restricted state comprises:
acquiring a foreground resource occupancy rate corresponding to the foreground application program, wherein the foreground resource occupancy rate represents the occupancy rate of the foreground application program to the resources of the electronic equipment;
and controlling the target application program to enter a resource limiting state according to the foreground resource occupancy rate.
4. The method of claim 3, wherein said controlling the target application to enter a resource restricted state based on the foreground resource occupancy comprises:
and acquiring a resource restriction level according to the foreground resource occupancy rate, and controlling the target application program to enter a resource restriction state corresponding to the resource restriction level.
5. An application processing apparatus, comprising:
the instruction detection module is used for collecting voice when detecting that a foreground application program running in the electronic equipment is in a full-screen mode, analyzing the voice and detecting whether the voice is a voice limiting instruction or not; the voice limiting instruction comprises an application freezing instruction and a resource limiting instruction;
the application acquisition module is used for acquiring a dependent application program which is depended on by the foreground application program from a background application program and acquiring the background application program except the dependent application program as a target application program if the electronic equipment receives the voice limiting instruction;
the application processing module is used for controlling the target application program to enter a frozen state if the voice limiting instruction is an application freezing instruction; if the voice limiting instruction is a resource limiting instruction, controlling the target application program to enter a resource limiting state, wherein the resource occupancy rate of the application program in the resource limiting state on the electronic equipment is smaller than an occupancy rate threshold value when the application program in the resource limiting state runs;
and the application recovery module is used for controlling the target application program to recover to a normal running state if the foreground application program is detected to exit the full-screen mode.
6. The apparatus of claim 5, wherein the application acquisition module is further configured to acquire a background application having a communication relationship with the foreground application as a dependent application.
7. The apparatus of claim 5, wherein the application processing module is further configured to obtain a foreground resource occupancy rate corresponding to the foreground application, the foreground resource occupancy rate representing an occupancy rate of resources of the electronic device by the foreground application; and controlling the target application program to enter a resource limiting state according to the foreground resource occupancy rate.
8. The apparatus of claim 7, wherein the application processing module is further configured to obtain a resource restriction level according to the foreground resource occupancy rate, and control the target application to enter a resource restriction state corresponding to the resource restriction level.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 4.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810032302.5A CN110032321B (en) | 2018-01-12 | 2018-01-12 | Application processing method and device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810032302.5A CN110032321B (en) | 2018-01-12 | 2018-01-12 | Application processing method and device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110032321A CN110032321A (en) | 2019-07-19 |
CN110032321B true CN110032321B (en) | 2024-02-20 |
Family
ID=67234507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810032302.5A Active CN110032321B (en) | 2018-01-12 | 2018-01-12 | Application processing method and device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110032321B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112351476A (en) | 2019-08-06 | 2021-02-09 | 中兴通讯股份有限公司 | Network-based application power consumption regulation and control method, terminal and storage medium |
CN111612377A (en) * | 2020-06-01 | 2020-09-01 | 北京每日优鲜电子商务有限公司 | Information pushing method and device, electronic equipment and computer readable medium |
CN112000374B (en) * | 2020-07-13 | 2024-01-02 | 深圳市智微智能软件开发有限公司 | USB touch screen replacement method, device, equipment and medium applied to android system |
CN114615377B (en) * | 2020-11-25 | 2023-08-15 | 成都鼎桥通信技术有限公司 | Application program control method, device and equipment |
CN116701134B (en) * | 2022-10-14 | 2024-05-17 | 荣耀终端有限公司 | Data processing method and electronic equipment |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103593230A (en) * | 2012-08-13 | 2014-02-19 | 百度在线网络技术(北京)有限公司 | Background task control method of mobile terminal and mobile terminal |
CN103853610A (en) * | 2012-12-07 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Resource optimization method and resource optimization device |
CN104360794A (en) * | 2014-11-21 | 2015-02-18 | 北京奇虎科技有限公司 | Method and device for controlling window pop-up through full screen-identifying mode |
CN104461546A (en) * | 2014-12-15 | 2015-03-25 | 北京奇虎科技有限公司 | Application based computing device optimizing method and device |
CN104572287A (en) * | 2015-01-30 | 2015-04-29 | 西安酷派软件科技有限公司 | Application state maintaining method, device and terminal for use in system switching |
CN105677460A (en) * | 2015-12-28 | 2016-06-15 | 小米科技有限责任公司 | Application processing method and apparatus |
CN105701025A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Memory recovery method and device |
CN105843650A (en) * | 2016-03-31 | 2016-08-10 | 青岛海信移动通信技术股份有限公司 | Application program management method and device in intelligent terminal |
CN106201685A (en) * | 2016-06-30 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | Method, device and the terminal that a kind of application is freezed |
CN106325990A (en) * | 2016-08-19 | 2017-01-11 | 宇龙计算机通信科技(深圳)有限公司 | Control method of application program, control device and terminal |
CN107231469A (en) * | 2017-05-11 | 2017-10-03 | 努比亚技术有限公司 | A kind of terminal applies management method, terminal and computer-readable recording medium |
CN107463436A (en) * | 2017-07-31 | 2017-12-12 | 广东欧珀移动通信有限公司 | Course control method, device, storage medium and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8856447B2 (en) * | 2012-07-17 | 2014-10-07 | Apple Inc. | Converting memory accesses near barriers into prefetches |
-
2018
- 2018-01-12 CN CN201810032302.5A patent/CN110032321B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103593230A (en) * | 2012-08-13 | 2014-02-19 | 百度在线网络技术(北京)有限公司 | Background task control method of mobile terminal and mobile terminal |
CN103853610A (en) * | 2012-12-07 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Resource optimization method and resource optimization device |
CN104360794A (en) * | 2014-11-21 | 2015-02-18 | 北京奇虎科技有限公司 | Method and device for controlling window pop-up through full screen-identifying mode |
CN104461546A (en) * | 2014-12-15 | 2015-03-25 | 北京奇虎科技有限公司 | Application based computing device optimizing method and device |
CN104572287A (en) * | 2015-01-30 | 2015-04-29 | 西安酷派软件科技有限公司 | Application state maintaining method, device and terminal for use in system switching |
CN105677460A (en) * | 2015-12-28 | 2016-06-15 | 小米科技有限责任公司 | Application processing method and apparatus |
CN105701025A (en) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | Memory recovery method and device |
CN105843650A (en) * | 2016-03-31 | 2016-08-10 | 青岛海信移动通信技术股份有限公司 | Application program management method and device in intelligent terminal |
CN106201685A (en) * | 2016-06-30 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | Method, device and the terminal that a kind of application is freezed |
CN106325990A (en) * | 2016-08-19 | 2017-01-11 | 宇龙计算机通信科技(深圳)有限公司 | Control method of application program, control device and terminal |
CN107231469A (en) * | 2017-05-11 | 2017-10-03 | 努比亚技术有限公司 | A kind of terminal applies management method, terminal and computer-readable recording medium |
CN107463436A (en) * | 2017-07-31 | 2017-12-12 | 广东欧珀移动通信有限公司 | Course control method, device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110032321A (en) | 2019-07-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110032321B (en) | Application processing method and device, electronic equipment and computer readable storage medium | |
CN112703714B (en) | Application processing method and device, computer equipment and computer readable storage medium | |
CN108536783B (en) | Data processing method and device, terminal and computer readable storage medium | |
WO2019128546A1 (en) | Application program processing method, electronic device, and computer readable storage medium | |
CN109144232B (en) | Process processing method and device, electronic equipment and computer readable storage medium | |
CN107577508B (en) | Application processing method and device, readable storage medium and mobile terminal | |
CN109992364B (en) | Application freezing method and device, computer equipment and computer readable storage medium | |
CN108334345B (en) | Application processing method and device, readable storage medium and mobile terminal | |
CN109992380B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
CN110018905B (en) | Information processing method, information processing apparatus, computer device, and computer-readable storage medium | |
CN109992323B (en) | Process processing method and device, electronic equipment and computer readable storage medium | |
WO2019128574A1 (en) | Information processing method and device, computer device and computer readable storage medium | |
WO2019128573A1 (en) | Information processing method, apparatus, computer device and computer-readable storage medium | |
CN109992309B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
CN109992360B (en) | Process processing method and device, electronic equipment and computer readable storage medium | |
CN110046033B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
WO2019128553A1 (en) | Application processing method, electronic device, and computer-readable storage medium | |
CN110032397B (en) | Application processing method and device, electronic equipment and computer readable storage medium | |
WO2020061731A1 (en) | Resource processing method, electronic device, and computer-readable storage medium | |
CN109992369B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
CN110032430B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
CN109992376B (en) | Application freezing method, device, terminal and computer readable storage medium | |
CN109511139B (en) | WIFI control method and device, mobile device and computer-readable storage medium | |
CN110045811B (en) | Application program processing method and device, electronic equipment and computer readable storage medium | |
CN109992362B (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 |
Country or region after: China 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. Country or region before: China |
|
GR01 | Patent grant | ||
GR01 | Patent grant |