WO2019128553A1 - Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur - Google Patents

Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur Download PDF

Info

Publication number
WO2019128553A1
WO2019128553A1 PCT/CN2018/116607 CN2018116607W WO2019128553A1 WO 2019128553 A1 WO2019128553 A1 WO 2019128553A1 CN 2018116607 W CN2018116607 W CN 2018116607W WO 2019128553 A1 WO2019128553 A1 WO 2019128553A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
resource
level
obtaining
processed
Prior art date
Application number
PCT/CN2018/116607
Other languages
English (en)
Chinese (zh)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019128553A1 publication Critical patent/WO2019128553A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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]
    • 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

Definitions

  • the present application relates to the field of computer technologies, and in particular, to an application processing method, an electronic device, and a computer readable storage medium.
  • Smart devices can implement different application operations through applications, such as purchasing products through a shopping application, viewing videos through a video application, and the like.
  • the application can be frozen, and the frozen application can no longer continue to run without taking up processor resources in the smart device. However, since the application still exists in the smart device, it also occupies resources such as memory and hardware in the smart device.
  • an application processing method an electronic device, and a computer readable storage medium are provided.
  • An application processing method including:
  • the to-be-processed application is subjected to resource limitation processing according to the resource restriction policy.
  • An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations:
  • the to-be-processed application is subjected to resource limitation processing according to the resource restriction policy.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to:
  • the to-be-processed application is subjected to resource limitation processing according to the resource restriction policy.
  • the application processing method, the electronic device, and the computer readable storage medium acquire the lost frame number of the image frame when detecting that a continuous image frame output by the electronic device is lost.
  • the rating of the foreground application is determined according to the number of lost frames, and the pending application is obtained according to the foreground application.
  • the resource restriction policy is obtained according to the Carton level, and the resource restriction processing is performed on the application to be processed according to the obtained resource restriction policy. In this way, when the electronic device detects the stuck, the resource occupied by the background application is recovered by the resource limitation processing, so as to ensure the efficient operation of the foreground application and improve the operating efficiency of the application.
  • FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment.
  • FIG. 2 is a schematic diagram showing the internal structure of an electronic device in an embodiment.
  • 3 is a flow chart of an application processing method in one embodiment.
  • FIG. 4 is a flow chart of an application processing method in another embodiment.
  • FIG. 5 is a schematic diagram of a resource restriction state of an application in an embodiment.
  • FIG. 6 is a partial structural diagram of an electronic device in an embodiment.
  • FIG. 7 is a schematic structural diagram of an application processing apparatus in an embodiment.
  • FIG. 8 is a schematic structural diagram of an application processing apparatus in another embodiment.
  • FIG. 9 is a block diagram showing a partial structure of a mobile phone related to an electronic device according to an embodiment of the present application.
  • first may be referred to as a second client
  • second client may be referred to as a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment.
  • the application environment includes a client 102 and a server 104.
  • An application can be installed on the client 102, and the application can output a contact image frame when the foreground of the client 102 is running.
  • the client 102 acquires the number of lost frames of the image frame when outputting consecutive image frames; acquires the stuck level of the foreground application according to the number of lost frames; acquires the to-be-processed application from the background application according to the foreground application, and according to the The level obtains the resource restriction policy; the resource to be processed is restricted by the resource according to the resource restriction policy.
  • the server 104 can be used to push an application processing algorithm to the client 102, and the client 102 processes the application according to the application processing algorithm.
  • the client 102 is an electronic device that is mainly used for inputting user information and outputting processing results at the outermost periphery of the computer network, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like.
  • the server 104 is a device for providing a computing service in response to a service request, and may be, for example, one or more computers. It can be understood that, in other embodiments provided by the present application, the application environment of the application processing method may only include the client 102.
  • the electronic device includes a processor, memory, and display screen connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement an application processing method suitable for an electronic device provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the computer program can be executed by a processor for implementing an application processing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for operating systems and computer programs in non-volatile storage media.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as performing front and back Application switching instructions, etc.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
  • the specific electronic device may be It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • the electronic device further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external electronic device, for example, for communicating with a server.
  • FIG. 3 is a flow chart of an application processing method in one embodiment.
  • the application processing method in this embodiment is described by using the terminal or server running in FIG. 1 as an example.
  • the application processing method includes operations 302 through 308. among them:
  • Operation 302 when the electronic device outputs a continuous image frame, acquires the number of lost frames of the image frame.
  • An application refers to a software written for an application purpose in an electronic device, and the electronic device can implement a service demanded by the user through an application. For example, users can play games through a game-like application, watch videos through a video-like application, and play music through a music-like application.
  • Applications can be divided into foreground applications and background applications based on the state of the run.
  • the foreground application refers to an application running in the foreground of the electronic device, and the foreground application can be displayed and interacted with the user in the foreground.
  • a background application refers to an application that runs in the background of an electronic device. The background application generally cannot display and interact with the user in the foreground.
  • the process is a running activity of the program in the computer on a certain data set, and is a basic unit for the system to perform resource allocation and scheduling.
  • a process can correspond to one or more threads.
  • a thread is a single sequential control process in a program, and is a relatively independent, schedulable execution unit within a process.
  • the process may include a foreground process and a background process, and the foreground process is a process running in the foreground of the electronic device, and the background process is a process running in the background of the electronic device.
  • the electronic device can control the switching between the foreground process and the background process, and the foreground process can switch to the background operation, and the background process can also switch to the foreground operation.
  • the process can be managed by the process pool, and the process identifier corresponding to one or more processes can be stored in the process pool.
  • the process ID is used to uniquely identify a process.
  • the process pool may include a foreground process pool and a background process pool.
  • the foreground process pool includes a process identifier corresponding to the foreground process
  • the background process pool includes a process identifier corresponding to the background process.
  • the process ID of process A is “0123”.
  • the process ID “0123” of process A can be removed from the background process pool and added to the foreground process. In the pool.
  • the files of the foreground application are displayed on the output device of the electronic device, and the user can interact with the electronic device through the input device and the output device.
  • an electronic device can display an image in an output device while playing video or entering a game interface.
  • a continuous sequence of image frames is often played in the output device, and the images in the sequence of image frames form a continuous animation.
  • a continuous animation interface is formed, wherein each image in the sequence of image frames can be referred to as an image frame.
  • the foreground application displays a sequence of consecutive image frames in the output device, it plays timing and plays each image frame in the order of the sequence of image frames.
  • the number of lost frames is the number of image frames lost by the electronic device when outputting consecutive image frames. For example, if the number of consecutive image frames to be played is 10 frames, and only 7 frames are actually played, the number of lost frames of the image frame is 3 frames.
  • Operation 304 obtaining a Karton level of the foreground application according to the number of lost frames.
  • the occupancy rate of the outputted continuous frame image is generally lost due to the high occupancy rate of resources such as the network of the electronic device and the CPU (Central Processing Unit).
  • a continuous image frame of the playback is lost, it can be determined that the operation of the foreground application in the electronic device has caused a jam.
  • the Carton level is the severity of the front-end application jam. The more frames that are lost in the image frame, the more the foreground application is stuck and the higher the card level. Corresponding relationship between the number of lost frames and the Karton level is established in advance, and then the corresponding card level is obtained according to the obtained number of lost frames.
  • the Carton level can be divided into a heavy card, a normal card, and a light carton. Assuming that the continuous image frame includes a total of 20 frames, the correspondence between the number of lost frames and the Karton level can be established. When the number of lost frames is [0, 5], [5, 15], [15, 20], it corresponds to three levels of light, such as light, common, and heavy.
  • Operation 306 obtaining a to-be-processed application from the background application according to the foreground application, and obtaining a resource restriction policy according to the Karton level.
  • a pending application is an application that requires resource throttling. It can be understood that the application running in the electronic device can be divided into a foreground application and a background application. When the current application generates a jam, the resources of the electronic device are relatively tight. The resources occupied by the background application can be controlled to use more resources in the electronic device for the running of the foreground application.
  • the obtaining the to-be-processed application may include: obtaining a foreground application priority of the foreground application; and acquiring a background application whose application priority is lower than the foreground application priority, as the to-be-processed application. Application priority is used to indicate the importance of the application.
  • the application priority of the system application can be defined to be higher than the application priority of the third-party application, or the application priority can be defined according to the type of the application, and the application priority of the instant messaging application is higher than that of the game application.
  • the user or the system can customize the application priority, which is not specifically limited in this embodiment.
  • the resource restriction policy refers to a policy for processing resource restriction processing on an application, pre-establishes a correspondence between a card level and a resource restriction policy, and then acquires a corresponding resource restriction policy according to the card level. For example, when the Karton level is severely stuck, the application to be processed is frozen; when the Karton level is lightly stuck, the resources occupied by the application to be processed are recycled.
  • Operation 308 the resource to be processed is subjected to resource limitation processing according to the resource restriction policy.
  • a resource is a software or hardware resource that an electronic device must use to process an application event, such as an CPU, memory, hardware, network resources, and IO (Input-Output) of an electronic device.
  • Resource limit processing refers to the process of restricting the resources occupied by the application.
  • the resource limit processing can be, but is not limited to, controlling the application to enter a frozen state or a resource restricted state, and the application in the frozen state is not closed, but is not temporarily running. When the application is frozen, the application does not consume processor resources, but still occupies resources such as memory and hardware of the electronic device.
  • the resource limit state refers to the state in which the resources of the electronic device used by the application at runtime are restricted. For example, the CPU usage of the control application at runtime cannot exceed 5%.
  • the resource limiting process is performed on the to-be-processed application according to the resource restriction policy, which can limit the consumption of the electronic device resources by the background pending application.
  • the application processing method acquires the number of lost frames of the image frame when it is detected that the continuous image frame outputted by the electronic device is lost.
  • the rating of the foreground application is determined according to the number of lost frames, and the pending application is obtained according to the foreground application.
  • the resource restriction policy is obtained according to the Carton level, and the resource restriction processing is performed on the application to be processed according to the obtained resource restriction policy.
  • FIG. 4 is a flow chart of an application processing method in another embodiment.
  • the application processing method in this embodiment is described by using the terminal or server running in FIG. 1 as an example.
  • the application processing method includes operations 402 through 416. among them:
  • Operation 402 when the electronic device outputs a continuous image frame, acquires the number of lost frames of the image frame.
  • the number of consecutive lost frames of the image frame may be acquired, and then the stuck level of the foreground application is obtained based on the number of consecutive lost frames.
  • the number of consecutive lost frames refers to the number of consecutive lost image frames when the foreground application outputs the display during actual operation.
  • the continuous image frames output by the foreground application in the electronic device are arranged according to a certain regularity.
  • the so-called continuous loss is the uninterrupted loss, that is, the number of consecutive loss of image frames.
  • the continuous image frames played in the electronic device are marked by the image frame identifier and arranged in a certain order. The electronic device obtains the image frame identifier corresponding to the actually output image frame, and can know which image frames are lost when outputting. .
  • the continuous image frame played by the electronic device includes 10 image frames, and the image frame identifiers corresponding to the first image frame to the last image frame are “01”, “02”, . . . “10”, respectively.
  • the electronic device output can be judged.
  • the lost image frames are "04", "05", “06”, and since "04", "05”, and "06" are consecutive image frames, the number of consecutive lost frames of the acquired image frames It is 3 frames.
  • the electronic device can acquire the number of consecutive consecutive lost frames and obtain the maximum consecutive lost frames according to the maximum consecutive lost frames. Get the Carton level. For example, the electronic device outputs consecutive image frames whose image frame identifiers are “01”, “02”, . . . “10”, and the actual output image frame sequence is “01” ⁇ “02” ⁇ “03” ⁇ “07” ⁇ “10”, it can be judged that when the electronic device outputs continuous image frames, the lost image frames are “04”, “05”, “06”, “08”, “09”.
  • “04”, “05” and “06” are consecutive image frames
  • “08” and “09” are consecutive image frames
  • the consecutive lost frames corresponding to “04”, “05” and “06” are In 3 frames
  • the number of consecutive lost frames corresponding to "08” and “09” is 2 frames
  • the maximum number of consecutive lost frames acquired is 3 frames.
  • the electronic device can continuously update the maximum number of consecutive lost frames during playback.
  • the continuous image frame outputted by the electronic device may be further divided into a preset number of image frame sequences, and then the lost frame of the image frame in each image frame sequence is counted when the electronic device outputs the continuous image frame.
  • Number and obtain the maximum number of lost frames from the number of lost frames obtained; obtain the Receive level of the foreground application according to the maximum number of lost frames. For example, it is necessary to output consecutive image frames whose image frame identifiers are “01”, “02”, . . . “18”, and divide the continuous image frame into “01”, “02”, . . .
  • each electronic image frame sequence is counted when the electronic device outputs continuous image frames.
  • the number of lost frames of the corresponding image frame, and the maximum number of lost frames is obtained from the number of lost frames obtained. It can be understood that when the electronic device outputs a continuous image frame, each complete output of one image frame sequence generates a corresponding number of lost frames. Therefore, during the process of outputting consecutive image frames, the maximum number of lost frames is continuously updated.
  • Operation 404 determining a target frame number interval in which the number of lost frames falls, and obtaining a carton level of the foreground application according to the target frame number interval.
  • the number of lost frames is divided into two or more frame number intervals in advance, and then the correspondence relationship between each frame number interval and the Karton level is established.
  • the target frame number range in which the number of lost frames falls is obtained, and then the corresponding card level is obtained according to the target frame number interval.
  • the divided frame number interval can be set according to the total number of consecutive image frames.
  • the frame number interval may be set according to the percentage of the total number of consecutive image frames, for example, the number of lost frames is divided into 4 frame number intervals, which may be 0 to 25%, 25% to 50%, 50% according to the total number. 75% and 75% to 100% calculate the frame number interval.
  • Operation 406 Obtain a dependent application that is dependent on the foreground application from the background application, and obtain a background application other than the dependent application as the to-be-processed application.
  • relying on data that indicates that one application needs to utilize one or more applications can successfully implement the relationship to the execution of that one application.
  • the application A depends on the application B, or the application B is dependent on the application A, that is, the application A needs to utilize the data of the application B to implement the execution of the application A.
  • the application A is an application that depends on application B
  • application B is an application that is dependent on application A.
  • the dependent application refers to a background application that is relied upon by the foreground application.
  • obtaining the dependent application corresponding to the foreground application comprises: obtaining a background application having a communication relationship with the foreground application as a dependent application.
  • the communication relationship between applications is established by defining a communication mechanism.
  • the communication mechanism includes Socket, Binder, shared memory and so on.
  • Binder communication is an efficient IPC (Inter-Process Communication) mechanism implemented in the Android system. It is a client-server (client-server) communication structure.
  • the client and the server define a corresponding proxy interface.
  • the proxy interface method packages the client parameters into a Parcel object, and then the proxy interface sends the Parcel object to the Binder in the kernel layer. drive.
  • the server can read the request data in the Binder driver, then parse and process the Parcel object, and return the processing result.
  • Socket communication allows communication between two network applications to enable data exchange between applications on the network.
  • local inter-application communication can uniquely identify an application through PID (Process Identity), but there is no way to communicate between network applications.
  • IP Internet Protocol
  • the "protocol + port” can uniquely identify the application in the host, so in the Socket communication, it is usually passed. IP address + protocol + port” form to uniquely identify an application.
  • Shared memory allows two unrelated applications to access the same logical memory. Shared memory is a very efficient way to share and transfer data between two running applications. Memory shared between different applications. Usually arranged as the same piece of physical memory.
  • obtaining the dependent application corresponding to the foreground application includes at least one of the following methods: acquiring a background application having a socket communication relationship with the foreground application as a dependent application; acquiring a binder communication relationship with the foreground application.
  • Operation 408 when the Karton level is greater than the level threshold, acquiring the first resource restriction policy.
  • the resource restriction policy is obtained according to the Karton level of the foreground application, and the resource restriction processing is performed on the application to be processed according to the resource restriction policy.
  • the resource restriction policy may be divided into a first resource restriction policy and a second resource restriction policy.
  • the first resource restriction policy refers to a policy for controlling a pending application to enter a frozen state according to a Carton level
  • the second resource restriction policy refers to a The level controls the policy that the pending application enters the resource limit state.
  • Operation 410 Acquire a second resource restriction policy when the Carton level is less than or equal to the level threshold.
  • the acquired pending application may be frozen.
  • the pending application after freezing cannot continue to run and does not consume CPU resources.
  • the Karton level is less than or equal to the level threshold, it indicates that the running of the foreground application is lighter, and the running state of the to-be-processed application can be maintained, and the pending application is restricted during the running process of the to-be-processed application. Occupied resources.
  • the to-be-processed application is subjected to resource limitation processing according to the first resource restriction policy; or the to-be-processed application is subjected to resource limitation processing according to the second resource restriction policy.
  • the resource limiting processing of the to-be-processed application according to the first resource restriction policy includes: controlling the to-be-processed application to enter a frozen state.
  • the pending application that enters the frozen state can no longer continue to run, which can reduce the resource consumption of the electronic device by the pending application.
  • the frozen pending application can also be woken up, and the user or system can set the conditions for the wakeup.
  • the Android system there are various ways to implement application freezing and wake-up.
  • the pm (package manager) command In the pm command, the application can be set to a frozen state by the freeze command pm disable[–user USER_ID]PACKAGE_OR_COMPONENT, and then passed.
  • the defrosting command pm enable[–user USER_ID]PACKAGE_OR_COMPONENT wakes up the application in the frozen state, and obtains the list of applications in the frozen state by freezing the list query command pm list packages–d to view the frozen application.
  • the application processing method is described by taking the Android operating system as an example in the present application, but the application processing method of the present application is not limited to being implemented in the Android system, and can also be applied to the IOS (IPhone Operating System), In operating systems such as Symbian, Windows, and MAC OS (Macintosh Operating System).
  • IOS IPhone Operating System
  • MAC OS Macintosh Operating System
  • the resource limiting process to be processed by the application according to the second resource restriction policy includes: obtaining a corresponding resource restriction level according to the Carton level, and controlling the to-be-processed application to enter a resource restriction level corresponding resource limitation state, where
  • the resource-restricted state application has a resource occupancy rate for the electronic device at runtime that is less than the occupancy threshold.
  • the to-be-processed application is in the resource-restricted state, the resource usage rate of the electronic device to be processed cannot exceed the occupancy threshold. This can control the resource usage of the electronic device by the application to be processed, and reduce the occupation of resources by the background. Improve the efficiency of the front desk.
  • controlling the CPU usage of the pending application at runtime should not exceed 5% to reduce the excessive consumption of the CPU by the application to be processed and reduce the user's dependence on the mobile phone.
  • cgroups control groups
  • the CPU usage such as CPU, memory, and IO of the application to be processed, that is, the acquired application to be processed enters the resource limitation state.
  • the resource restriction level is used to indicate the degree of resource limitation to the application, and the correspondence between the carton level and the resource restriction level is established in advance.
  • the corresponding resource restriction level is obtained according to the Karton level.
  • the Carton level can be divided into four levels: Level 1, Level 2, Level 3, Level 4, etc., and the degree of Carton increases from Level 1 to Level 4.
  • the level threshold may be level 3.
  • the corresponding resource restriction level is obtained according to the level of the card.
  • the resource limit level can be divided into three levels: the light resource limit level, the common resource limit level, and the deep resource limit level.
  • the corresponding card level is level 1, level 2, level 3, and the corresponding resource limit level is occupied.
  • the rate threshold is different. It can be understood that the occupancy thresholds corresponding to different resources can also be set to be different. For example, the CPU usage threshold can be 5%, and the memory usage threshold can be 10%.
  • Operation 414 when it is detected that the foreground application switches to the background, starts timing.
  • the electronic device can monitor the foreground application.
  • the electronic device starts the timer and then starts counting through the timer.
  • the timer established by the electronic device can be associated with the foreground application, and when the current application switches to the background, the start timer starts counting.
  • the correspondence between the foreground application identifier of the foreground application and the timing identifier of the timer is established in advance, and the timer is searched for and started by the timer identifier corresponding to the foreground application identifier.
  • the system can predefine a timer.
  • the foreground application identifier searches for the corresponding timer, and clears the timer by timer.setBase(SystemClock.elapsedRealtime()). Zero, then start the timer through the timer.start() function and start timing.
  • the pending application is controlled to return to the normal operating state.
  • the pending application When the timing duration exceeds the duration threshold, the pending application is restored to normal operation. Specifically, when the to-be-processed application is in the resource-restricted state, the resource limitation of the electronic device to be processed by the application is released. The pending application wakes up from a frozen state when the pending application is frozen. After returning to normal operation, the pending application's use of electronic device resources is no longer restricted. In addition, when a switching instruction to switch the application to be processed from the background to the foreground is detected, the pending application is controlled to return to the normal operating state. This ensures that the pending application can process the instructions of the electronic device in time and improve the operating efficiency of the electronic device.
  • FIG. 5 is a schematic diagram of a resource restriction state of an application in an embodiment.
  • the resources of the electronic device include a CPU, a memory, an IO, a network resource, and the like, and the state of the application may be classified into a normal running state, a resource limiting state, and a frozen state.
  • the resource restriction state may be further divided into a light resource restriction state, a normal resource restriction state, and a deep resource restriction state.
  • the corresponding available resource 502 and the unavailable resource 504 are different. From the light resource limit state, the normal resource limit state to the deep resource limit state, the available resource 502 is decremented. In normal operation, the application's available resource 502 is 100%.
  • the application processing method acquires the number of lost frames of the image frame when it is detected that the continuous image frame outputted by the electronic device is lost.
  • the rating of the foreground application is determined according to the number of lost frames, and the pending application is obtained according to the foreground application.
  • the resource restriction policy is obtained according to the Carton level, and the resource restriction processing is performed on the application to be processed according to the obtained resource restriction policy.
  • FIGS. 3 and 4 are sequentially displayed as indicated by the arrows, these operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and the operations may be performed in other sequences. Moreover, at least some of the operations in FIGS. 3 and 4 may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, or The order of execution of the stages is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-operations or stages of other operations or other operations.
  • the architecture system of the electronic device includes a JAVA space layer 61, a local frame layer 62, and a Kernel space layer 63.
  • the JAVA spatial layer 61 can include a policy application 610 through which the electronic device can initiate a freeze and thaw strategy for each application, thereby implementing freezing and thawing operations for each application in the electronic device.
  • the policy application 610 determines the background power consumption application and initiates a freeze operation on the background power consumption application.
  • the local framework layer 62 includes a resource priority and restriction management module 620 and a platform freeze management module 622.
  • the electronic device can maintain the priority of the application and the corresponding resource group in real time through the resource priority and restriction management module 620, and adjust the priority and the resource group of the application according to the requirements of the upper layer, thereby achieving optimized performance and saving power consumption. effect.
  • the electronic device can allocate the tasks that can be frozen in the background to the frozen layer corresponding to the preset level by the platform freeze management module 622.
  • the frozen layer can include: the CPU limits the sleep mode, and the CPU Freeze sleep mode, process deep freeze mode.
  • the kernel space layer 63 includes a UID management module 630, a Cgroup module 632, a timeout freeze exit module 634, a Binder management module 636, and a process memory recovery module 638.
  • the UID management module 630 can manage resources of the third-party application or freeze based on the User Identifier (UID) of the application. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID.
  • the Cgroup module 632 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms.
  • the timeout freeze exit module 634 is configured to resolve an exception generated by the freeze timeout scenario.
  • the Binder management module 636 is used to implement the priority control of the background binder communication.
  • the process memory recovery module 638 is configured to implement a deep freeze mode of the process.
  • the file area of the process can be released, thereby saving the memory module and speeding up the application at the next startup. speed.
  • FIG. 7 is a schematic structural diagram of an application processing apparatus in an embodiment.
  • the application processing apparatus 700 includes a frame number acquisition module 702, a level acquisition module 704, a policy acquisition module 706, and an application processing module 708. among them:
  • the frame number obtaining module 702 is configured to acquire the number of lost frames of the image frame when the electronic device outputs the continuous image frame.
  • the level obtaining module 704 is configured to obtain a carton level of the foreground application according to the number of lost frames.
  • the policy obtaining module 706 is configured to obtain a to-be-processed application from the background application according to the foreground application, and obtain a resource restriction policy according to the card-level.
  • the application processing module 708 is configured to perform resource limiting processing on the to-be-processed application according to the resource restriction policy.
  • the application processing device acquires the number of lost frames of the image frame when it detects that a continuous image frame output by the electronic device is lost.
  • the rating of the foreground application is determined according to the number of lost frames, and the pending application is obtained according to the foreground application.
  • the resource restriction policy is obtained according to the Carton level, and the resource restriction processing is performed on the application to be processed according to the obtained resource restriction policy.
  • FIG. 8 is a schematic structural diagram of an application processing apparatus in another embodiment.
  • the application processing apparatus 800 includes a frame number acquisition module 802, a level acquisition module 804, a policy acquisition module 806, an application processing module 808, and an application recovery module 810. among them:
  • the frame number obtaining module 802 is configured to acquire the number of lost frames of the image frame when the electronic device outputs the continuous image frame.
  • the level obtaining module 804 is configured to obtain a card level of the foreground application according to the number of lost frames.
  • the policy obtaining module 806 is configured to obtain a to-be-processed application from the background application according to the foreground application, and obtain a resource restriction policy according to the card-level.
  • the application processing module 808 is configured to perform resource limiting processing on the to-be-processed application according to the resource restriction policy.
  • the application recovery module 810 is configured to start timing when detecting that the foreground application switches to the background; and when the timing duration exceeds the duration threshold, control the to-be-processed application to return to a normal running state.
  • the application processing device acquires the number of lost frames of the image frame when it detects that a continuous image frame output by the electronic device is lost.
  • the rating of the foreground application is determined according to the number of lost frames, and the pending application is obtained according to the foreground application.
  • the resource restriction policy is obtained according to the Carton level, and the resource restriction processing is performed on the application to be processed according to the obtained resource restriction policy.
  • the level obtaining module 804 is further configured to determine a target frame number interval in which the number of lost frames falls, and obtain a carding level of the foreground application according to the target frame number interval.
  • the policy obtaining module 806 is further configured to: obtain a dependent application that is dependent on the foreground application from a background application, and obtain a background application other than the dependent application as a to-be-processed application. .
  • the policy obtaining module 806 is further configured to obtain a background application that has a communication relationship with the foreground application as a dependent application.
  • the policy obtaining module 806 is further configured to: when the cardinal level is greater than a level threshold, acquire a first resource limiting policy; when the cardinal level is less than or equal to a level threshold, acquire a second resource limiting policy. .
  • the application processing module 808 is further configured to perform resource limiting processing on the to-be-processed application according to the first resource restriction policy; or perform the to-be-processed application according to the second resource restriction policy. Resource limit processing.
  • the application processing module 808 is further configured to control the to-be-processed application to enter a frozen state.
  • the application processing module 808 is further configured to obtain a corresponding resource restriction level according to the card level, and control the to-be-processed application to enter the resource restriction level corresponding resource limitation state, where the resource is in the resource
  • the resource-occupying rate of the restricted-state application to the electronic device at runtime is less than the occupancy threshold.
  • each module in the above application processing device is for illustrative purposes only. In other embodiments, the application processing device may be divided into different modules as needed to complete all or part of the functions of the application processing device.
  • each module in the application processing apparatus may be in the form of a computer program.
  • the computer program can run on a terminal or server.
  • the program modules of the computer program can be stored on the memory of the terminal or server.
  • the operation of the method described in the embodiments of the present application is implemented when the computer program is executed by the processor.
  • the embodiment of the present application also provides a computer readable storage medium.
  • One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to execute the applications provided by the above embodiments Approach.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the application processing method provided by the above embodiments.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 9 , for the convenience of description, only the parts related to the embodiments of the present application are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application.
  • the electronic device can be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an on-board computer, a wearable device, and the like, and the electronic device is used as a mobile phone. :
  • FIG. 9 is a block diagram showing a partial structure of a mobile phone related to an electronic device according to an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980.
  • RF radio frequency
  • the structure of the handset shown in FIG. 9 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the RF circuit 910 can be used for receiving and transmitting signals during the transmission and reception of information or during a call.
  • the downlink information of the base station can be received and processed by the processor 980.
  • the uplink data can also be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 910 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General
  • the memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920.
  • the memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 900.
  • the input unit 930 may include a touch panel 931 and other input devices 932.
  • the touch panel 931 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 931 or near the touch panel 931. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 931 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 980 is provided and can receive commands from the processor 980 and execute them.
  • the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 940 can include a display panel 941.
  • the display panel 941 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 is The type of touch event provides a corresponding visual output on display panel 941.
  • touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.
  • the handset 900 can also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 960, speaker 961, and microphone 962 can provide an audio interface between the user and the handset.
  • the audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961.
  • the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and after being processed by the audio data output processor 980, it can be sent to another mobile phone via the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access.
  • FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone 900 and can be omitted as needed.
  • the processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • processor 980 can include one or more processing units.
  • the processor 980 can integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, a user interface, an application, and the like; the modem processor primarily processes wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
  • the mobile phone 900 also includes a power source 990 (such as a battery) that supplies power to various components.
  • a power source 990 such as a battery
  • the power source can be logically coupled to the processor 980 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the handset 900 can also include a camera, a Bluetooth module, and the like.
  • the processor 980 included in the electronic device implements the operation of the application processing method provided by the foregoing embodiment when executing the computer program stored in the memory.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • synchronization Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).

Landscapes

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

Abstract

La présente invention concerne un procédé de traitement d'application qui comprend : l'obtention du nombre de trames abandonnées de la trame d'image lorsqu'un dispositif électronique délivre des trames d'image successives (302); l'obtention du niveau de bourrage d'une application de premier plan en fonction du nombre de trames abandonnées (304); l'obtention, selon l'application de premier plan, d'une application à traiter à partir d'une application d'arrière-plan, et l'obtention d'une politique de limitation de ressources en fonction du niveau de bourrage (306); et la réalisation, en fonction de la politique de limitation de ressources, de la limitation de ressources sur l'application à traiter (308).
PCT/CN2018/116607 2017-12-29 2018-11-21 Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur WO2019128553A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711480554.6 2017-12-29
CN201711480554.6A CN109992363B (zh) 2017-12-29 2017-12-29 应用程序处理方法和装置、电子设备、计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019128553A1 true WO2019128553A1 (fr) 2019-07-04

Family

ID=67063016

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116607 WO2019128553A1 (fr) 2017-12-29 2018-11-21 Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur

Country Status (2)

Country Link
CN (1) CN109992363B (fr)
WO (1) WO2019128553A1 (fr)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966493B (zh) * 2020-08-07 2023-07-21 Oppo广东移动通信有限公司 进程处理方法、电子设备及存储介质
CN115033306B (zh) * 2022-06-29 2024-05-24 维沃移动通信有限公司 应用退出方法和装置
CN116089096B (zh) * 2023-04-09 2023-09-01 荣耀终端有限公司 负载资源调度方法及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375912A (zh) * 2014-11-28 2015-02-25 广东欧珀移动通信有限公司 移动终端卡顿的测量方法与装置
CN104461546A (zh) * 2014-12-15 2015-03-25 北京奇虎科技有限公司 基于应用程序的计算设备优化方法及装置
CN105094869A (zh) * 2014-05-14 2015-11-25 腾讯科技(深圳)有限公司 目标程序确定方法及装置
CN106445783A (zh) * 2016-09-27 2017-02-22 北京金山安全软件有限公司 一种检测电子设备卡顿的方法、装置及电子设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024768B (zh) * 2011-09-23 2017-05-17 中兴通讯股份有限公司 一种端对端可视电话业务质量评价方法及系统
CN104050035B (zh) * 2014-05-14 2018-05-25 小米科技有限责任公司 应用程序的处理方法及装置
CN104572287B (zh) * 2015-01-30 2018-12-25 西安酷派软件科技有限公司 一种系统切换时保持应用状态的方法、装置及终端
CN106326137B (zh) * 2015-07-02 2020-09-22 腾讯科技(深圳)有限公司 一种内存优化方法、装置及用户设备
CN105893153A (zh) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 移动终端的内存清理方法和装置
CN107341818A (zh) * 2016-04-29 2017-11-10 北京博酷科技有限公司 用于触摸屏响应性能测试的图像分析算法
CN106547640A (zh) * 2016-11-23 2017-03-29 深圳市金立通信设备有限公司 一种后台清理的方法及终端
CN106792165A (zh) * 2016-12-02 2017-05-31 武汉斗鱼网络科技有限公司 一种资源动态调整方法及装置
CN107045443A (zh) * 2017-04-14 2017-08-15 北京安云世纪科技有限公司 后台进程控制方法、装置及智能终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094869A (zh) * 2014-05-14 2015-11-25 腾讯科技(深圳)有限公司 目标程序确定方法及装置
CN104375912A (zh) * 2014-11-28 2015-02-25 广东欧珀移动通信有限公司 移动终端卡顿的测量方法与装置
CN104461546A (zh) * 2014-12-15 2015-03-25 北京奇虎科技有限公司 基于应用程序的计算设备优化方法及装置
CN106445783A (zh) * 2016-09-27 2017-02-22 北京金山安全软件有限公司 一种检测电子设备卡顿的方法、装置及电子设备

Also Published As

Publication number Publication date
CN109992363B (zh) 2021-03-26
CN109992363A (zh) 2019-07-09

Similar Documents

Publication Publication Date Title
WO2019128546A1 (fr) Procédé de traitement de programme d'application, dispositif électronique et support de stockage lisible par ordinateur
EP2733995B1 (fr) Procédé et dispositif de contrôle adaptés pour réveiller un terminal intelligent
WO2020024732A1 (fr) Procédé de traitement de processus, dispositif électronique et support de stockage lisible par ordinateur
WO2019128540A1 (fr) Procédé de gestion de ressources, terminal mobile et support d'informations lisible par ordinateur
WO2020093208A1 (fr) Procédé et appareil de traitement d'applications, dispositif informatique, et support de stockage lisible par ordinateur
CN107577508B (zh) 应用程序处理方法、装置、可读存储介质和移动终端
CN110018901B (zh) 内存回收方法、装置、计算机设备和计算机可读存储介质
KR102222337B1 (ko) 전자 기기의 어플리케이션 동기화 방법 및 장치
CN110032267B (zh) 信息处理方法、装置、移动终端及计算机可读存储介质
CN110032266B (zh) 信息处理方法、装置、计算机设备和计算机可读存储介质
WO2019128537A1 (fr) Procédé de gel d'application, dispositif informatique, et support de stockage lisible par ordinateur
CN108334345B (zh) 应用程序处理方法、装置、可读存储介质和移动终端
WO2019128573A1 (fr) Procédé de traitement d'informations, appareil, dispositif informatique et support d'informations lisible par ordinateur
WO2019128588A1 (fr) Procédé et appareil de traitement de processus, dispositif électronique et support d'informations lisible par ordinateur
WO2019128553A1 (fr) Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur
WO2019128574A1 (fr) Procédé et dispositif de traitement d'informations, dispositif informatique et support d'informations lisible par ordinateur
WO2017206901A1 (fr) Procédé de commande de processus et dispositif associé
CN109992380B (zh) 应用程序处理方法和装置、电子设备、计算机可读存储介质
WO2019128586A1 (fr) Procédé de traitement d'applications, dispositif électronique et support de stockage lisible par ordinateur
CN109992360B (zh) 进程处理方法和装置、电子设备、计算机可读存储介质
CN110046033B (zh) 应用程序处理方法和装置、电子设备、计算机可读存储介质
WO2019128569A1 (fr) Procédé et appareil pour geler une application et support de stockage et terminal
CN109992323B (zh) 进程处理方法和装置、电子设备、计算机可读存储介质
CN110032397B (zh) 应用处理方法和装置、电子设备、计算机可读存储介质
WO2019072179A1 (fr) Procédé et appareil de commande d'exécution d'application

Legal Events

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

Ref document number: 18896458

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18896458

Country of ref document: EP

Kind code of ref document: A1