CN109992365B - 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 PDF

Info

Publication number
CN109992365B
CN109992365B CN201711480600.2A CN201711480600A CN109992365B CN 109992365 B CN109992365 B CN 109992365B CN 201711480600 A CN201711480600 A CN 201711480600A CN 109992365 B CN109992365 B CN 109992365B
Authority
CN
China
Prior art keywords
application
frozen
applications
read
external storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711480600.2A
Other languages
Chinese (zh)
Other versions
CN109992365A (en
Inventor
方攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711480600.2A priority Critical patent/CN109992365B/en
Publication of CN109992365A publication Critical patent/CN109992365A/en
Application granted granted Critical
Publication of CN109992365B publication Critical patent/CN109992365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation 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
    • 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

Abstract

The application relates to an application processing method, an application processing device, electronic equipment and a computer readable storage medium. The method comprises the following steps: and when the connection of the external storage device is detected, acquiring the frozen application, inquiring the read-write permission of the frozen application, and if the frozen application has the read-write permission, awakening the frozen application. The awakened freezing application scans the files in the external storage device, so that the loss of the files in the external storage device can be avoided, the electronic device does not need to be restarted to read the files in the external storage device, and the reading efficiency is improved.

Description

Application processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an application processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of mobile communication technology, more and more applications appear on electronic devices. However, the storage capacity of the electronic device is limited, and in order not to affect the operating speed of the electronic device, users often share the storage capacity of the electronic device by using an external storage device. In current mobile operating systems, when applications are no longer in use and fall back to the background, the system can conserve power by freezing or killing the applications.
When a user uses the external storage device, the application in the electronic device cannot acquire the file in the external storage device, so that the file in the external storage device is lost.
Disclosure of Invention
The embodiment of the application processing method and device, the electronic device and the computer readable storage medium can avoid file loss in the external storage device.
An application processing method, comprising:
when the connection of the external storage device is detected, acquiring a frozen application;
inquiring the read-write permission of the frozen application;
and if the frozen application has the read-write permission, awakening the frozen application.
An application processing apparatus comprising:
the application acquisition module is used for acquiring the frozen application when detecting that the external storage device is connected;
the permission query module is used for querying the read-write permission of the frozen application;
and the application awakening module is used for awakening the frozen application if the frozen application has the read-write permission.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the application processing method in the various embodiments of the present application when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the application processing method in the various embodiments of the present application.
According to the application processing method and device, the electronic equipment and the computer readable storage medium, when the connection of the external storage equipment is detected, the frozen application is obtained, the read-write permission of the frozen application is inquired, and if the frozen application has the read-write permission, the frozen application is awakened. The awakened freezing application scans the files in the external storage device, so that the loss of the files in the external storage device can be avoided, the electronic device does not need to be restarted to read the files in the external storage device, and the reading efficiency 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 used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram showing an internal structure of an electronic apparatus according to an embodiment;
FIG. 2 is a partial block diagram of a system in an electronic device in one embodiment;
FIG. 3 is a flow diagram 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 flowchart of an application processing method in yet another embodiment;
FIG. 6 is a block diagram showing an example of the structure of an application processing apparatus;
fig. 7 is a block diagram of a partial structure of a cellular phone in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
In one embodiment, as shown in FIG. 1, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, a memory, and a network interface connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory is used for storing data, programs, and/or instruction codes, and the like, and at least one computer program is stored on the memory, and the computer program can be executed by the processor to realize the application processing method suitable for the electronic device provided in the embodiment of the application. The Memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random-Access-Memory (RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a database, and a computer program. The database stores data related to an application processing method provided in the following embodiments, for example, information such as an application read-write permission table and a frozen application list may be stored. The computer program can be executed by a processor to implement an application processing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for the operating system, databases, and computer programs in the non-volatile storage medium. The network interface may be an ethernet card or a wireless network card, etc. for communicating with an external electronic device, such as a server.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the electronic devices to which the subject application may be applied, and that a particular electronic device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, as shown in FIG. 2, a partial architecture diagram of an electronic device is provided. The architecture system of the electronic device includes a JAVA space layer 210, a local framework layer 220, and a Kernel space layer 230. The JAVA space layer 210 may include a freezing management application 212, and the electronic device may implement a freezing policy for each application through the freezing management application 212, and perform a freezing operation on the related application consuming power in the background. A resource priority and restriction management module 222 and a platform freeze management module 224 are contained in the local framework layer 220. The electronic device can maintain different applications in organizations with different priorities and different resources in real time through the resource priority and restriction management module 222, and adjust the resource groups of the application programs according to the requirements of the upper layer, thereby achieving the effects of optimizing performance and saving power consumption. The electronic device may allocate, according to the length of the freezing time, the task that the background can be frozen to the freezing layers corresponding to the preset different levels through the platform freezing management module 224, and optionally, the freezing layers may include three, which are: CPU limited sleep mode, CPU frozen sleep mode, process deep frozen mode. The CPU sleep-restricted mode is to restrict CPU resources occupied by related processes, so that the related processes occupy less CPU resources, and the vacant CPU resources are inclined to other processes which are not frozen, so that the occupation of the CPU resources is restricted, and the occupation of network resources and I/O interface resources is correspondingly restricted; the CPU freezing sleep mode means that related processes are forbidden to use the CPU, the occupation of a memory is reserved, and when CPU resources are forbidden to use, corresponding network resources and I/O interface resources are also forbidden to use; the process deep freezing mode is to further recycle the memory resources occupied by the relevant processes except for forbidding the use of CPU resources, and the recycled memory can be used by other processes. The CPU limited sleep mode may be a mode in which CPU resources are limited within a preset CPU resource threshold, for example, the CPU occupancy is within 10%, 15%, or the like. The electronic device can query the read-write permission of the application through the read-write permission query module 226.
The kernel space layer 230 includes a UID management module 231, a Cgroup module 232, a Binder management module 233, a process memory recycling module 234, and a timeout freeze exit module 235. The UID management module 231 is configured to manage or freeze resources of the third-party application based on a User Identifier (UID) of the application. Compared with the Process control based on the Process Identifier (PID), the unified management of the resources of the application of one user is facilitated through the UID. The Cgroup module 232 is used to provide a complete set of resource restriction mechanisms related to Central Processing Unit (CPU), CPU set, memory, input/output (I/O) and Net. The Binder management and control module 233 is used for controlling the priority of background Binder communication. The interface module of the local framework layer 220 includes a binder interface that is issued to the upper layer, and the framework or application of the upper layer sends a resource restriction or freezing instruction to the resource priority and restriction management module 222 and the platform freezing management module 224 through the provided binder interface. The process memory recycling module 234 is used to implement a deep process freezing mode, so that when a third-party application is in a frozen state for a long time, a file area of a process is mainly released, thereby achieving a memory-saving module and increasing the speed of the application when the application is started next time. The timeout freeze exit module 235 is used to resolve the exception generated by the freeze timeout scenario. Through the above-mentioned architecture, the application processing method in each embodiment of the present application can be realized.
In one embodiment, an application processing method is provided and exemplified by being applied to the electronic device, as shown in fig. 3, including the following steps:
step 302, when it is detected that the external storage device is connected, the frozen application is acquired.
The external storage device is a device which exists outside the electronic device or is embedded in a slot of the electronic device and can be used for storing data, and the common external storage device can be a hard disk, an optical disk, a usb disk, a removable hard disk, a memory card, and the like. The external storage device can be connected with the electronic device and used for expanding the storage capacity of the electronic device. Frozen applications refer to applications that are in a frozen state.
The electronic device can monitor the connection state of the external storage device, and when the electronic device detects that the connection of the external storage device exists, the electronic device can acquire the application in the frozen state.
Step 304, querying the read-write permission of the frozen application.
The read-write permission of the application can be the access permission of the application set by a user or a system default to a certain type of files, and the user can set the read-write permission of the application through application permission management in the electronic equipment. For example, when a user wants to set the read-write permission of the short message application, the read-write permission of the short message application can be set to be forbidden through application permission management in the electronic device, and the short message application loses the read-write permission.
The read-write permission of the application in the frozen state can also be set by the user through application permission management. After the electronic device acquires the application in the frozen state, the electronic device may also query the read-write permission of the application in the frozen state.
And step 306, if the frozen application has the read-write permission, awakening the frozen application.
The read-write authority of the frozen application can be in a forbidden state or an allowed state. And when the read-write authority of the frozen application is in a forbidden state, the frozen application is represented to have no read-write authority, and on the contrary, when the read-write authority of the frozen application is in an allowed state, the frozen application is represented to have the read-write authority.
When the read-write right of the frozen application is in an allowed state, namely the frozen application has the read-write right, the electronic equipment can wake up the frozen application. In particular, the manner in which the electronic device wakes up the frozen application may be by sending a message to the frozen application.
And when the connection of the external storage device is detected, acquiring the frozen application, inquiring the read-write permission of the frozen application, and if the frozen application has the read-write permission, awakening the frozen application. The awakened freezing application scans the files in the external storage device, so that the loss of the files in the external storage device can be avoided, the electronic device does not need to be restarted to read the files in the external storage device, and the reading efficiency is improved.
In an embodiment, the provided application processing method may further include a process of querying the read-write permission of the frozen application, where the specific process includes: and acquiring a preset application read-write permission table, and inquiring the read-write permission of the frozen application from the application read-write permission table.
The application read-write permission table is preset, and the read-write permission table stores read-write permissions of all applications of the electronic equipment, including read-write permission of frozen applications and read-write permission of non-frozen applications.
The electronic equipment can acquire a preset application read-write permission table, and the electronic equipment can also inquire the acquired application read-write permission table to acquire the read-write permission of the frozen application.
And inquiring the read-write permission of the frozen application from the application read-write permission table by acquiring a preset application read-write permission table. Due to the fact that the preset application read-write permission table is obtained, the electronic device can find out the read-write permission of the frozen application more quickly and accurately, and therefore the efficiency of finding out the read-write permission of the frozen application by the electronic device is improved.
In another embodiment, as shown in fig. 4, an application processing method is provided, which includes the following specific steps:
step 402, obtaining a frozen application list, and traversing the frozen applications in the frozen application list.
All the applications in the frozen state are stored in the frozen application list, and the applications in the frozen state in the frozen application list can be arranged according to the length of the frozen time or the priority of the frozen applications. Traversal refers to sequentially making one and only one visit to all nodes in the list along a certain route.
The electronic device may obtain the frozen application list, and traverse the frozen applications according to the order arranged in the frozen application list, that is, sequentially access the frozen applications in the frozen application list.
Step 404, querying the read-write permission of the frozen application in the frozen application list.
In the process of traversing the frozen application, the electronic device can sequentially query the read-write permission of the frozen application. For example, the electronic device may perform READ-WRITE permission search operation of a corresponding application in a corresponding application Management module through WRITE _ EXTERNAL _ STORAGE and READ _ EXTERNAL _ STORAGE in the android System, and the application Management module may be a PMS (Plant Management System device Management System). The electronic device can also query the read-write permission of the frozen application from the application read-write permission table.
And 406, if the frozen application has the read-write permission, marking the frozen application.
When the inquired frozen application is in a read-write permission state, namely has the read-write permission, the electronic equipment can mark the frozen application with the read-write permission.
Step 408, the frozen application with the flag in the frozen application list is waked up.
The freezing application with the mark belongs to the freezing application with the read-write permission, and the electronic equipment can wake up the freezing application with the read-write permission.
The frozen application list is obtained, the frozen applications in the frozen application list are traversed, the read-write permission of the frozen applications in the frozen application list is inquired, if the frozen applications have the read-write permission, the frozen applications are marked, and the frozen applications with the marks in the frozen application list are awakened. The awakened freezing application is marked freezing application with read-write permission, so that the accuracy of awakening the freezing application by the electronic equipment is improved.
As shown in fig. 5, in another embodiment, an application processing method is provided, which includes the following specific steps:
step 502, a monitoring unit of a kernel layer of the operating system monitors a connection event of the external storage device.
The monitoring unit is a unit for monitoring whether the external storage device and the electronic device have a connection relationship. The connection event refers to an event that the external storage device establishes a connection relationship with the electronic device. For example, the monitoring unit may monitor the moved and unounted information of the external storage device, i.e., the connection establishment information and the connection non-establishment information of the external storage device.
After the monitoring unit monitors whether a connection event exists between the external storage device and the electronic device, the monitored result can be sent to the electronic device, and the electronic device can obtain the monitoring result of monitoring the connection event of the external storage device through the monitoring unit of the inner core layer of the operating system.
Step 504, when an event of connecting the external storage device is monitored, it indicates that the external storage device is detected to be connected, and a scan thread is triggered and started.
When the monitoring unit monitors an event of connecting the external storage device, the monitoring unit may send a detection result of detecting the connection event to the electronic device, indicating that the external storage device is connected to the electronic device. When an external storage device is connected to the electronic device, the electronic device may send a message to the local framework layer through the kernel layer of the operating system to trigger the scan thread to start.
Step 506, the frozen application list is obtained through the scanning thread, and the frozen applications in the frozen application list are traversed.
The frozen application list may be pre-set to store applications in a frozen state. The scan thread exists inside the electronic device for scanning various data and applications in the electronic device.
The electronic device can acquire the frozen application list through the scanning thread, and the electronic device can access the frozen applications in sequence according to the sequence in the frozen application list.
Monitoring a connection event of the external storage device through a monitoring unit of an inner core layer of the operating system, when the event of the external storage device is monitored, triggering and starting a scanning thread when the event of the external storage device is detected, acquiring a frozen application list through the scanning thread, and traversing the frozen applications in the frozen application list. By monitoring the connection state of the external storage equipment, the frozen applications in the frozen application list are traversed when the connection of the external storage equipment is monitored, and the accuracy of the electronic equipment in traversing the frozen applications is improved.
In an embodiment, the application processing method provided by the present invention may further include a process of waking up the frozen application, where the specific process includes: and switching the frozen application from a third-stage freezing state to a first-stage freezing state or a normal running state, wherein the third-stage freezing state is a memory limitation state, the first-stage freezing state is a state that the utilization rate of processor resources is less than a processor resource threshold value, and the normal running state is a state that the processor resources are not limited.
The memory limitation state refers to a state in which the resource memory occupied by the application is limited and the application cannot normally run, i.e., a deep freezing state. The state that the utilization rate of the processor resources is less than the threshold value of the processor resources indicates that the resources used by the application are less than the threshold value of the processor resources, the threshold value of the processor resources is preset, and the threshold value of the processor resources of each application can be different. When the application is in a state where the utilization rate of the processor resources is less than the threshold value of the processor resources, the running of the application is partially limited, which is equivalent to the application being in a light sleep state.
The electronic device may wake the frozen application by sending information to the frozen application. The state of the frozen application after waking up can be a state that the utilization rate of the processor resources is less than the threshold value of the processor resources, or a state that the processor resources are not limited.
In one embodiment, the application processing method provided may further include: and scanning the external storage device by the awakened freezing application to acquire a corresponding file in the external storage device. After the electronic device wakes up the frozen application, the woken-up frozen application can scan files in the external storage device, and then the scanned files related to the wakened-up frozen application authority are loaded into the woken-up frozen application. The permission-related file refers to a file that the wakening frozen application can read.
The scanned file is loaded into the awakened freezing application, so that the loss of the file in the external storage device can be avoided.
In an embodiment, the method for processing an application provided may further include a process of performing a hierarchical wakeup on the frozen application, where the specific process is as follows: and classifying the frozen applications according to the read-write permission of the frozen applications to obtain the grades of the frozen applications, and awakening the frozen applications in sequence according to the grades.
The electronic device may rank the frozen applications according to their read-write permissions. For example, applications with both read and write permissions are classified into a first tier, and applications with only read or only write permissions are classified into a second tier. The electronic device may also obtain a level of frozen applications, and applications with a high level of priority may perform a wake-up operation, for example, to wake-up the applications with the first level and then wake-up the applications with the second level.
The electronic equipment grades the frozen applications according to the read-write permission, so that the applications are sequentially awakened according to the application grade, and the problem of system resource waste caused by awakening too many applications at one time can be avoided.
In an embodiment, the method for processing an application provided may further include a process of performing a hierarchical wakeup on the frozen application, where the specific process is as follows: and grouping the frozen applications according to the association degree of the frozen applications with the read-write permission to obtain the quantity information of the frozen applications of different groups, and sequentially waking up the applications of the different groups from more than one to less or from less than one to more according to the quantity of the applications in the frozen application groups.
Wherein, the association degree of the frozen applications refers to the degree of association of different frozen applications. The electronic equipment can group the frozen applications according to the association degree of the frozen applications with the read-write permission, and the associated applications are grouped into one group. For example, the electronic device may divide the short message applications and the chat applications of the frozen received information with the read-write permission into a first group, where the number of the applications in the first group is 2, and may further divide the music playing applications of the frozen played music with the read-write permission into a second group, where the number of the applications in the second group is 1. The electronic device may wake up the applications in order of from many to few or from few to many of the number of applications in each group. For example, the number of applications in the first group is 2, the number of applications in the second group is 1, the electronic device may wake up the applications in the order from the largest number of applications, that is, wake up the applications in the first group first and then wake up the applications in the second group, and the electronic device may wake up the applications in the order from the smallest number of applications, that is, wake up the applications in the second group first and then wake up the applications in the first group.
In one embodiment, the application processing method provided may further include: and after the unfrozen application scans to obtain the file in the external storage device, the file is frozen again.
The unfrozen application can scan files in the external storage device and load the files into the corresponding unfrozen application. After the unfrozen application scans to obtain the file in the external storage device, the electronic device can perform the re-freezing operation on the unfrozen application.
And after the unfrozen application scans to obtain the file in the external storage device, the file is frozen again. By freezing the unfrozen application again, system resources can be saved.
In one embodiment, the application processing method provided may further include: and after the unfrozen application scans to obtain the file in the external storage device, freezing the unfrozen application according to a preset time interval.
The time interval may be preset, and different time intervals may be set for different applications. For example, the time interval of the music playing application may be set to 30 minutes. After the frozen application is unfrozen and scanned to obtain a file in the external storage device, when the unfrozen application is not used at a preset time interval, the electronic device can unfreeze the unfrozen application again. For example, after the music playing application is thawed and a music file in the external storage device is scanned, the electronic device may freeze the music playing application again within 30 minutes without the music playing application being run.
And after the unfrozen application scans to obtain the file in the external storage device, freezing the unfrozen application according to a preset time interval. By refreezing the unused applications at the preset time interval, waste of system resources can be avoided.
In one embodiment, an application processing method is provided, and the specific steps for implementing the method are as follows:
first, the electronic device may monitor a connection event of the external storage device through a monitoring unit of a kernel layer of the operating system. After the monitoring unit monitors whether a connection event exists between the external storage device and the electronic device, the monitored result can be sent to the electronic device, and the electronic device can obtain the monitoring result of monitoring the connection event of the external storage device through the monitoring unit of the inner core layer of the operating system. When an event of connecting the external storage device is monitored, the fact that the external storage device is connected is detected, and the electronic device can trigger to start a scanning thread. The electronic device can also acquire the frozen application list through the scanning thread and traverse the frozen applications in the frozen application list.
Then, when the connection of the external storage device is detected, the electronic device can acquire the frozen application. The external storage device is a device which exists outside the electronic device or is embedded in a slot of the electronic device and can be used for storing data, and the common external storage device can be a hard disk, an optical disk, a usb disk, a removable hard disk, a memory card, and the like. The external storage device can be connected with the electronic device and used for expanding the storage capacity of the electronic device. Frozen applications refer to applications that are in a frozen state. The electronic device can monitor the connection state of the external storage device, and when the electronic device detects that the connection of the external storage device exists, the electronic device can acquire the applications in the frozen state in all the applications.
The electronic device may then query the read-write permissions of the frozen application. The read-write permission of the application in the frozen state can also be set by the user through application permission management. After the electronic device acquires the application in the frozen state, the electronic device may also query the read-write permission of the application in the frozen state. The electronic device can obtain the frozen application list and traverse the frozen applications in the frozen application list. The electronic device may obtain the frozen application list, and traverse the frozen applications according to the order arranged in the frozen application list, that is, sequentially access the frozen applications in the frozen application list. The electronic equipment can also obtain a preset application read-write permission table, and the read-write permission of the frozen application is inquired from the application read-write permission table. The application read-write permission table is preset, and the read-write permission table stores read-write permissions of all applications of the electronic equipment, including read-write permission of frozen applications and read-write permission of non-frozen applications. The electronic equipment can acquire a preset application read-write permission table, and the electronic equipment can also inquire the acquired application read-write permission table to acquire the read-write permission of the frozen application.
Secondly, if the frozen application has the read-write permission, the electronic equipment can wake up the frozen application. The read-write authority of the frozen application can be in a forbidden state or an allowed state. And when the read-write authority of the frozen application is in a forbidden state, the frozen application is represented to have no read-write authority, and on the contrary, when the read-write authority of the frozen application is in an allowed state, the frozen application is represented to have the read-write authority. If the frozen application has the read-write permission, the electronic equipment can mark the frozen application. When the inquired frozen application is in a read-write permission state, namely has the read-write permission, the electronic equipment can mark the frozen application with the read-write permission. The electronic device may wake up the frozen application with the flag in the frozen application list. The freezing application with the mark belongs to the freezing application with the read-write permission, and the electronic equipment can wake up the freezing application with the read-write permission.
The electronic equipment can also switch the frozen application from a third-level frozen state to a first-level frozen state or a normal running state, wherein the third-level frozen state is a memory limitation state, the first-level frozen state is a state in which the utilization rate of processor resources is less than a processor resource threshold value, and the normal running state is a state in which the processor resources are not limited. The memory limitation state refers to a state in which the resource memory occupied by the application is limited and the application cannot normally run. The state that the utilization rate of the processor resources is less than the threshold value of the processor resources indicates that the resources used by the application are less than the threshold value of the processor resources, the threshold value of the processor resources is preset, and the threshold value of the processor resources of each application can be different. When the application is in a state where the utilization rate of the processor resources is less than the threshold value of the processor resources, the running of the application is partially limited, which is equivalent to the application being in a light sleep state.
The electronic equipment can also grade the frozen applications according to the read-write permission of the frozen applications to obtain the grades of the frozen applications, and the frozen applications are awakened according to the grades in sequence. Or the electronic device may group the frozen applications according to the association degrees of the frozen applications with the read-write permission to obtain the quantity information of the frozen applications in different groups, and sequentially awaken the applications in different groups according to the sequence from the number of the applications in the frozen application groups to a large number or from a small number to a large number.
And finally, after the unfrozen application scans to obtain the file in the external storage device, the electronic device can freeze the unfrozen application again. The unfrozen application can scan files in the external storage device and load the files into the corresponding unfrozen application. After the unfrozen application scans to obtain the file in the external storage device, the electronic device can perform the re-freezing operation on the unfrozen application.
After the unfrozen application scans to obtain the file in the external storage device, the electronic device can also freeze the unfrozen application according to a preset time interval. The time interval may be preset, and different time intervals may be set for different applications. For example, the time interval of the music playing application may be set to 30 minutes. After the frozen application is unfrozen and scanned to obtain a file in the external storage device, when the unfrozen application is not used at a preset time interval, the electronic device can unfreeze the unfrozen application again. For example, after the music playing application is thawed and a music file in the external storage device is scanned, the electronic device may freeze the music playing application again within 30 minutes without the music playing application being run.
It should be understood that, although the respective steps in the flowcharts of fig. 3 to 5 are sequentially shown as indicated by arrows, the steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided an application processing apparatus including:
the application obtaining module 610 is configured to obtain the frozen application when it is detected that the external storage device is connected.
And the permission query module 620 is used for querying the read-write permission of the frozen application.
And an application waking module 630, configured to wake up the frozen application if the frozen application has a read-write permission.
In an embodiment, the permission query module 620 may further be configured to obtain a preset application read-write permission table, and query the read-write permission of the frozen application from the application read-write permission table.
In one embodiment, the application obtaining module 610 may be further configured to obtain a frozen application list, and traverse the frozen application in the frozen application list.
The permission query module 620 may further be configured to query the read-write permission of the frozen application in the frozen application list, and mark the frozen application if the frozen application has the read-write permission.
The application wakeup module 630 may also be used to wake up a frozen application with a flag in the frozen application list.
In another embodiment, the application obtaining module 610 may further be configured to listen to a connection event of the external storage device through a listening unit of a kernel layer of the operating system.
The permission query module 620 may be further configured to, when an event that the external storage device is connected is monitored, indicate that the external storage device is connected, and trigger to start the scanning thread.
The application wakeup module 630 may also be configured to retrieve the frozen application list through the scan thread, and traverse the frozen applications in the frozen application list.
In one embodiment, the application wakeup module 630 may be further configured to switch the frozen application from a third-level frozen state to a first-level frozen state or a normal running state, where the third-level frozen state is a memory-limited state, the first-level frozen state is a state in which the utilization rate of the processor resources is less than the processor resource threshold, and the normal running state is a state in which the processor resources are not limited.
In an embodiment, the application obtaining module 610 may be further configured to scan the external storage device to obtain a corresponding file in the external storage device.
In an embodiment, the application wakeup module 630 may be further configured to rank the frozen applications according to the read-write permission of the frozen applications, obtain the rank of the frozen applications, and perform wakeup operations on the frozen applications in sequence according to the rank.
In an embodiment, the application wakeup module 630 may be further configured to group the frozen applications according to the association degrees of the frozen applications with the read-write permission, obtain the quantity information of the different groups of frozen applications, and sequentially wakeup the different groups of applications according to the sequence from a few applications to a many applications in the frozen application group.
In one embodiment, the application wakeup module 630 may be further configured to be frozen again after the thawed application scans a file in the external storage device.
In an embodiment, the application wakeup module 630 may be further configured to freeze the thawed application at a preset time interval after the thawed application scans a file in the external storage device.
In one embodiment, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the application processing method provided in the foregoing embodiments are implemented.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the application processing method provided by the above embodiments.
The embodiment of the application also provides a computer program product. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the application processing method provided by the embodiments described above.
The embodiment of the application also provides the electronic equipment. As shown in fig. 7, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the electronic device as the mobile phone as an example:
fig. 7 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 7, the handset includes: radio Frequency (RF) circuit 710, memory 720, input unit 730, display unit 740, sensor 750, audio circuit 760, wireless fidelity (WiFi) module 770, processor 780, and power supply 790. Those skilled in the art will appreciate that the handset configuration shown in fig. 7 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 710 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 780; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 710 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 720 may be used to store software programs and modules, and the processor 780 may execute various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 720 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 730 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 700. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, which may also be referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on or near the touch panel 731 by using a finger, a stylus, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 731 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 780, and can receive and execute commands from the processor 780. In addition, the touch panel 731 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 730 may include other input devices 732 in addition to the touch panel 731. In particular, other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
The display unit 740 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. In one embodiment, the Display panel 741 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 731 can cover the display panel 741, and when the touch panel 731 detects a touch operation on or near the touch panel 731, the touch operation is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides a corresponding visual output on the display panel 741 according to the type of the touch event. Although the touch panel 731 and the display panel 741 are two independent components in fig. 7 to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 731 and the display panel 741 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 700 may also include at least one sensor 750, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 741 and/or a backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 760, speaker 761, and microphone 762 may provide an audio interface between a user and a cell phone. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 and output; on the other hand, the microphone 762 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 760, and then outputs the audio data to the processor 780 for processing, and then the processed audio data may be transmitted to another mobile phone through the RF circuit 710, or outputs the audio data to the memory 720 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 770, and provides wireless broadband Internet access for the user. Although fig. 7 shows WiFi module 770, it is understood that it does not belong to the essential components of handset 700 and may be omitted as desired.
The processor 780 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 720 and calling data stored in the memory 720, thereby integrally monitoring the mobile phone. In one embodiment, processor 780 may include one or more processing units. In one embodiment, processor 780 may integrate an application processor and a modem processor, where the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 780.
The handset 700 also includes a power supply 790 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 780 via a power management system that may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 700 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, the processor 780 included in the mobile phone implements the steps of the application processing method when executing the computer program stored on the memory.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An application processing method, comprising:
when the connection of the external storage device is detected, acquiring a frozen application;
inquiring the read-write permission of the frozen application;
if the frozen applications have read-write permission, grouping the frozen applications according to the association degree of the frozen applications with the read-write permission to obtain quantity information of different groups of frozen applications, sequentially waking up the different groups of applications from a plurality of groups or from a plurality of groups according to the quantity of the applications in the frozen application groups, scanning the files in the external storage device by the unfrozen applications, and freezing the files again after the unfrozen applications are scanned to obtain the files in the external storage device.
2. The method of claim 1, wherein querying the read-write permission of the frozen application comprises:
acquiring a preset application read-write permission table;
and inquiring the read-write permission of the frozen application from the application read-write permission table.
3. The method of claim 1, further comprising:
acquiring a frozen application list, and traversing frozen applications in the frozen application list;
inquiring the read-write permission of the frozen application in the frozen application list;
if the frozen application has the read-write permission, marking the frozen application;
and waking up the frozen application with the mark in the frozen application list.
4. The method of claim 3, further comprising:
monitoring a connection event of the external storage device through a monitoring unit of a kernel layer of the operating system;
when an event of connecting the external storage device is monitored, the fact that the external storage device is connected is detected, and a scanning thread is triggered and started;
the obtaining of the frozen application list and traversing the frozen applications in the frozen application list comprise:
and acquiring a frozen application list through the scanning thread, and traversing the frozen applications in the frozen application list.
5. The method of any of claims 1 to 4, wherein waking up different groups of applications comprises:
and switching the frozen application from a third-stage frozen state to a first-stage frozen state or a normal running state, wherein the third-stage frozen state is a memory limitation state, the first-stage frozen state is a state in which the utilization rate of processor resources is less than a processor resource threshold value, and the normal running state is a state in which the processor resources are not limited.
6. The method of claim 1, wherein after the unfrozen application scans the file in the external storage device, the application is frozen again, and the method comprises:
and after the unfrozen application scans to obtain the file in the external storage device, freezing the unfrozen application according to a preset time interval.
7. The method of claim 1, further comprising:
after the freezing application is awakened, the awakened freezing application scans the file in the external storage device, and loads the scanned file related to the authority of the awakened freezing application into the awakened freezing application, wherein the authority-related file refers to a file which can be read and identified by the awakened freezing application.
8. An application processing apparatus, comprising:
the application acquisition module is used for acquiring the frozen application when detecting that the external storage device is connected;
the permission query module is used for querying the read-write permission of the frozen application;
and the application awakening module is used for grouping the frozen applications according to the association degree of the frozen applications with the read-write permission to obtain the quantity information of different groups of frozen applications, awakening the different groups of applications in sequence from a large number of applications to a small number of applications or from a small number of applications to a large number of applications in the frozen application group, scanning the files in the external storage device by the unfrozen applications, and freezing the files again after the unfrozen applications scan the files in the external storage device.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the application processing method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201711480600.2A 2017-12-29 2017-12-29 Application processing method and device, electronic equipment and computer readable storage medium Active CN109992365B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN109992365A CN109992365A (en) 2019-07-09
CN109992365B true CN109992365B (en) 2021-08-17

Family

ID=67109805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711480600.2A Active CN109992365B (en) 2017-12-29 2017-12-29 Application processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109992365B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860125B (en) * 2021-03-19 2024-04-16 京东方科技集团股份有限公司 Touch display driving device and method and touch display device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6708259B1 (en) * 2001-02-02 2004-03-16 Cradle Technologies, Inc. Programmable wake up of memory transfer controllers in a memory transfer engine
US7831849B2 (en) * 2007-03-28 2010-11-09 Intel Corporation Platform communication protocol
CN104463034B (en) * 2014-11-19 2018-03-27 广东欧珀移动通信有限公司 A kind of method and device of safe and convenient unloading external connection storage device
CN106126298B (en) * 2016-06-30 2020-02-21 宇龙计算机通信科技(深圳)有限公司 Application freezing method and device and terminal
CN106101437A (en) * 2016-07-28 2016-11-09 宇龙计算机通信科技(深圳)有限公司 A kind of application defreezing method, device and mobile terminal
CN106570059A (en) * 2016-09-29 2017-04-19 宇龙计算机通信科技(深圳)有限公司 Method and system for document opening
CN106681722A (en) * 2016-12-27 2017-05-17 努比亚技术有限公司 Process processing method and electronic device
CN106681822A (en) * 2017-01-19 2017-05-17 努比亚技术有限公司 Signal-based progress freezing and unfreezing device and signal-based progress freezing and unfreezing method

Also Published As

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

Similar Documents

Publication Publication Date Title
CN109992398B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN109144232B (en) Process 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
CN110018902B (en) Memory processing method and device, electronic equipment and computer readable storage medium
WO2019128598A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019128546A1 (en) Application program processing method, electronic device, and computer readable storage medium
CN109445917B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN108541013B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN109992364B (en) Application freezing method and device, computer equipment and computer readable storage medium
CN108549698B (en) File processing method and device, mobile terminal and computer readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN109992399B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN109992375B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
CN110018885B (en) Application program freezing method and device, storage medium and terminal
CN109992309B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN110032397B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN109992365B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN109375995B (en) Application freezing method and device, storage medium and electronic equipment
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
CN109992395B (en) Application freezing method and device, terminal and computer readable storage medium
CN109992369B (en) Application program processing method and device, electronic equipment and computer readable storage medium

Legal Events

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

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

Applicant after: OPPO Guangdong Mobile Communications Co.,Ltd.

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

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

GR01 Patent grant
GR01 Patent grant