CN113568748B - Application process processing method and device, storage medium and electronic equipment - Google Patents

Application process processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113568748B
CN113568748B CN202110852359.1A CN202110852359A CN113568748B CN 113568748 B CN113568748 B CN 113568748B CN 202110852359 A CN202110852359 A CN 202110852359A CN 113568748 B CN113568748 B CN 113568748B
Authority
CN
China
Prior art keywords
application program
main process
application
identification information
running
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
CN202110852359.1A
Other languages
Chinese (zh)
Other versions
CN113568748A (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 CN202110852359.1A priority Critical patent/CN113568748B/en
Publication of CN113568748A publication Critical patent/CN113568748A/en
Application granted granted Critical
Publication of CN113568748B publication Critical patent/CN113568748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/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

Landscapes

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

Abstract

The application discloses an application process processing method, an application process processing device, a storage medium and electronic equipment, wherein the method comprises the following steps: and if the process of the application program is loaded in the running memory, freezing the process, acquiring the identification information of the process, and removing the non-main process of the application program in the running memory based on the identification information. By adopting the method and the device, the non-main process of the application program is searched and removed from the running memory by acquiring the identification information of the process of the application program, so that the running memory occupied by the process of the application program when the process of the application program is not running is reduced while the normal starting operation of the application program is ensured, the normal operation of the currently running application program is ensured, and the use effect of the terminal equipment is improved.

Description

Application process processing method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application process processing method, an application process processing device, a storage medium, and an electronic device.
Background
When the user does not need to use the application program at present but needs to use the application program later, the terminal device can pre-start the application program, load and freeze the process of the application program in the running memory, but the loaded process occupies the space of the running memory, thereby influencing the application program currently running, for example, causing the conditions of blocking, flashing and the like, and reducing the use effect of the terminal device.
Disclosure of Invention
The embodiment of the application provides an application process processing method, an application process processing device, a storage medium and electronic equipment, which can reduce the operation memory occupied by the process of an application program when the process of the application program is not operated while ensuring that the application program can be normally started to operate, ensure the normal operation of the currently operated application program and improve the use effect of terminal equipment. The technical scheme is as follows:
In a first aspect, an embodiment of the present application provides an application process processing method, where the method includes:
if the process of the application program is loaded in the running memory, freezing the process;
acquiring the identification information of the process;
Removing the non-main process of the application program in the running memory based on the identification information;
the process is composed of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program.
In a second aspect, an embodiment of the present application provides an application process processing apparatus, where the apparatus includes:
The freezing processing module is used for freezing the process of the application program if the process is loaded in the running memory;
the identification acquisition module is used for acquiring the identification information of the process;
the removal processing module is used for removing the non-main process of the application program in the running memory based on the identification information;
the process is composed of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiments of the application has the beneficial effects that at least:
In one or more embodiments of the present application, if a process of an application program is loaded in an operation memory, freezing the process, obtaining identification information of the process, and removing a non-main process of the application program in the operation memory based on the identification information. By acquiring the identification information of the process of the application program, searching the non-main process of the application program and removing the non-main process from the running memory, the running memory occupied by the process of the application program when the application program is not running is reduced while the normal starting running of the application program is ensured, the normal working of the currently running application program is ensured, and the use effect of the terminal equipment is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an application process processing method according to an embodiment of the present application;
FIG. 3 is a flowchart of an application process processing method according to an embodiment of the present application;
FIG. 3a is an exemplary schematic diagram of a removal process according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an application process processing device according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of an application process processing device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an operating system and user space provided by an embodiment of the present application;
FIG. 8 is an architecture diagram of the android operating system of FIG. 6;
FIG. 9 is an architecture diagram of the IOS operating system of FIG. 6.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it should be noted that, unless expressly specified and limited otherwise, "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The application process processing method provided by the embodiment of the application can be realized by depending on a computer program and can be operated on an application process processing device based on a von neumann system. The computer program may be integrated in the application or may run as a stand-alone tool class application. The application process processing device in the embodiment of the application can be terminal equipment such as mobile phones, personal computers, tablet computers, handheld equipment, vehicle-mounted equipment, wearable equipment and the like, and can also be a module in the terminal equipment for executing the application process processing method. Referring to fig. 1, a schematic structural diagram of a terminal device is provided in an embodiment of the present application, where the terminal device includes a preloading element, a freezing processing element, an operating memory, a start-up management element, and a removal processing element, the preloading element is connected with the operating memory, the freezing processing element is connected with the operating memory, the start-up management element is connected with the operating memory, and the removal processing element is connected with the operating memory. The terminal device may detect a trigger event for the application, which is used to instruct the terminal device to preload the application in preparation for the application to be invoked and run, e.g. the trigger event may copy text for the user with fields related to the application, the terminal device may confirm that the user will open the application in a short time. When the terminal device detects a trigger event for the application program, the preloading element can preload the application program, namely, load the process of the application program in the running memory. If the application program in the running memory is not called and runs for a long time, the space occupied by the application program in the running memory is applied and occupied by other application programs, so that the situations that the main process is incomplete and cannot normally run or the running memory is insufficient and blocked and the like are easily caused when the application program is called and runs. So after detecting that the preloading element finishes loading the process of the application program, in order to avoid the application program from being automatically operated by mistake when not called by a user, and also in order to avoid the space occupied by the process of the application program in the operation memory by other application programs because the application program is not called and operated for a long time in the operation memory, the freezing processing element can freeze the process of the application program in the operation memory, namely, the process of the application program and part of kernel threads are placed in a pause state, the process stops operation in the pause state and the space occupied by the process in the operation memory is not applied and occupied by other application programs, and the process can not end the pause state and start normal operation until the process of the application program is subjected to thawing treatment, namely the application program is called and started. Because the application program can not selectively load the process when being preloaded, all terminal devices can load the process of the application program, and occupy larger space of the running memory, the removal processing element can remove the non-main process of the application program in the running memory, and it is understood that the process consists of a main process and the non-main process, the main process is a process necessary for the running of the application program, and can be a process used for establishing a system framework of the application program, and the non-main process is other processes of the application program except the main process, and can be a process for rendering the appearance of the application program, loading audio, and the like, the non-main process can be automatically loaded when the application program process is preloaded, and can be loaded by the main process after the main process is loaded, the operation of the non-main process depends on the main process, but the normal calling and operation of the application program after the non-main process is removed from the operation memory are not influenced. The starting management element may receive a call instruction, where the call instruction is used to instruct the terminal device to unfreeze the process of the application program, that is, to run the application program, for example, the call instruction may be that the user clicks an icon corresponding to the application program on a screen, and the terminal device may confirm that the user wants to call and run the application program.
The application process processing method provided by the application is described in detail below with reference to specific embodiments.
Referring to fig. 2, a flowchart of an application process processing method is provided in an embodiment of the present application. As shown in fig. 2, the method of the embodiment of the present application may include the following steps S101 to S103.
S101, if the process of the application program is loaded in the running memory, freezing the process.
Specifically, many application programs exist in the existing terminal equipment, a user needs to open or switch the application programs frequently, when the application programs which are not started are opened, the terminal equipment needs a certain time to load the processes required by the application program operation, the waiting time required by the user to open the application programs is too long, and the using effect of the terminal equipment is reduced, so that the terminal equipment can preload the application programs which the user wants to operate but does not need to operate at present, namely, the processes of loading the application programs in an operation memory. If the terminal equipment detects that the process of the application program is loaded in the running memory, freezing the process, avoiding the automatic running of the application program when the application program is not called by a user, and avoiding the occupation of the space occupied by the process of the application program in the running memory by other application programs because the application program is not called and run in the running memory for a long time.
S102, acquiring the identification information of the process.
Specifically, each process has temporary unique identification information, the identification information can be a process identification number (Process Identification, PID) in the operating system, each process is opened and loaded in the terminal device, and the operating system of the terminal device creates a PID for the process. The terminal device may obtain identification information of a process of the application.
And S103, removing the non-main process of the application program in the running memory based on the identification information.
Specifically, the terminal device may distinguish a main process and a non-main process of the application program according to the identification information, where the process of the application program is composed of the main process and the non-main process, the main process is a process necessary for the operation of the application program, and may be a process for building a system framework of the application program, that is, only if the main process exists in the application program, the non-main process is a process of the application program other than the main process, and may be a process for rendering the appearance of the application program, loading audio, and the like, and the operation of the non-main process depends on the main process. Therefore, in order to reduce the space occupied by the process of the application program in the running memory, the terminal device can find the identification information of the non-main process, so that the non-main process of the application program in the running memory is removed.
In the embodiment of the application, if the process of the application program is loaded in the running memory, freezing the process to obtain the identification information of the process, and removing the non-main process of the application program in the running memory based on the identification information. By acquiring the identification information of the process of the application program, searching the non-main process of the application program and removing the non-main process from the running memory, the running memory occupied by the process of the application program when the application program is not running is reduced while the normal starting running of the application program is ensured, the normal working of the currently running application program is ensured, and the use effect of the terminal equipment is improved.
Referring to fig. 3, a flowchart of an application process processing method is provided in an embodiment of the present application. As shown in fig. 3, the method of the embodiment of the present application may include the following steps S201 to S208.
S201, if a trigger event for an application program is detected, loading a process of the application program in a running memory.
Specifically, the terminal device may preload an application program that the user wants to run, but does not need to run at present, that is, a process of loading the application program in the running memory. The terminal device may detect a trigger event for the application program, where the trigger event is used to instruct the terminal device to preload the application program, and if the terminal device detects the trigger event for the application program, the process of the application program is loaded in the running memory.
Optionally, the terminal device may record the application usage habit of the user, save the sequence of using the application program by the user, for example, the number of times the user uses the application program B after using the application program a exceeds a preset threshold in a preset period, where the preset period and the preset threshold may be set in the terminal device, so that the terminal device may confirm that the user has a high probability of using the application program B after using the application program a, and the terminal device may save "user enables the application program a" as a trigger event for the application program B, and when the user enables the application program a, the terminal device may load the process of the application program B in the running memory.
Optionally, if the terminal device detects that the text currently browsed by the user has keywords related to the application program or the text copied by the user, that is, the text last stored in the clipboard by the user has keywords related to the application program, the terminal device can confirm that the user has a high probability of using the application program later, and the terminal device can load the process of the application program in the running memory. The keywords related to the application program may be the name, version number, etc. of the application program.
Optionally, if the application program is not called for a long time or the running memory is insufficient, all processes of the application program in the running memory are deleted by the terminal device, so that enough space of the running memory is cleared for other running application programs. Therefore, when the terminal equipment deletes all the processes of the application program in the running memory, the working state before the deletion of all the processes can be saved, and when the terminal equipment preloads the application program, all the processes can be directly loaded to the working state before the deletion of all the processes.
S202, if the process of the application program is loaded in the running memory, freezing the process.
Specifically, if the terminal device detects that the process of the application program is loaded in the running memory, freezing the process, so that the application program is prevented from running automatically when the application program is not called by a user, and the space occupied by the process of the application program in the running memory is prevented from being occupied by other application programs because the application program is not called and running in the running memory for a long time.
S203, acquiring the identification information of the process.
Specifically, each process has temporary unique identification information, the identification information can be PID in the operating system, each process is opened and loaded in the terminal device, and the operating system of the terminal device creates a PID for the process. The terminal device may obtain identification information of a process of the application.
S204, acquiring first identification information corresponding to the non-main process of the application program in the identification information, and removing the non-main process in the running memory based on the first identification information.
Specifically, the processes include a main process and a non-main process, the main process is a process necessary for the running of the application program, and may be a process used for building a system framework of the application program, and when the terminal device preloads the application program, the terminal device cannot selectively load the process of the application program due to reasons such as a developer of the application program, and only loads all the processes of the application program set by the developer, but in practice, normal calling and running can be realized as long as the main process has the application program, for example, the non-main process used for controlling picture rendering, audio output and the like is not a process necessary for the running of the application program. Therefore, in order to reduce the space of the running memory occupied by the process of the application program, the terminal device can find the first identification information corresponding to the non-main process, so that the removal processing is performed on the non-main process of the application program in the running memory.
It will be appreciated that applications often include non-host processes for loading advertisements, which may result in excessive loading time of the application, and users often do not want to frequently view advertisements, nor to start the application slower due to loading advertisements, which may reduce the effectiveness of the application and the terminal device. Therefore, the non-main processes removed by the terminal equipment can also comprise the non-main processes for loading the advertisements, and the advertisements can not be played again when the application program is formally called and started, so that the starting time of the application program is reduced, and the using effects of the application program and the terminal equipment are improved.
Referring to fig. 3a together, an exemplary schematic diagram of a removal process is provided for an embodiment of the present application, a user is running an application program a on a terminal device, and the terminal device detects a trigger event for the application program B, so that the terminal device loads all processes of the application program B in a running memory and freezes all processes, as shown in fig. 3a, all processes may include a main process, a non-main process 1 and a non-main process 2, and when all processes of the application program B are loaded, all processes have a temporary unique identification information, and the terminal device may obtain first identification information of the non-main process of the application program B in a database, where the identification information of all processes of all application programs may be stored. The terminal equipment can find the non-main process 1 and the non-main process 2 in the running memory according to the first identification information, and then remove the non-main process 1 and the non-main process 2 from the running memory, so that the space occupied by the process of the application program B in the running memory is reduced, and the problems of e.g. blocking, flashing and the like caused by insufficient residual space of the running memory of the application program A running at the moment are avoided.
S205, if a call instruction for the application program is received, call information corresponding to the call instruction is acquired.
Specifically, the terminal device may receive a call instruction for an application program, where the call instruction is used to instruct the terminal device to call and run the application program, for example, the call instruction may be that a user clicks an icon corresponding to the application program on a screen, the user sends a voice instruction for the application program, and so on. After receiving the call instruction, the terminal device can acquire call information corresponding to the call instruction. The terminal device may confirm the specific manner, priority level, etc. of the call instruction according to the call information of the call instruction, for example, the call information may feed back whether the call instruction is issued by the user or generated by clicking the application icon.
S206, judging whether the call information exists in the call permission list.
Specifically, call information is stored in the call permission list, and the call information in the call permission list can be set on the terminal device by a user. If call information corresponding to the call instruction exists in the call permission list, S207 is executed; if there is no call information, S208 is performed.
Optionally, if the call instruction is a voice instruction, for example, the voice detected by the terminal device includes keywords such as "open", "start" and application name, it may be confirmed that the terminal device receives the call instruction for the application, the call information corresponding to the call instruction may be voiceprint information included in the voice of the call instruction, and the terminal device may determine whether the call instruction is issued by the user according to the voiceprint information. The user may input own voiceprint information in the terminal device in advance, and store the voiceprint information in the permission call list as call information, and if the voiceprint information included in the call information corresponding to the call instruction is the same as the voiceprint information included in the call information in the permission call list, the terminal device may confirm that the call information exists in the permission call list, that is, the call instruction is issued by the user and execute S207.
S207, obtaining second identification information corresponding to the main process of the application program, and thawing the main process in the running memory based on the second identification information.
Specifically, the terminal device may obtain second identification information corresponding to the main program of the application program in the database, find the main program according to the second identification information, and perform a defrosting process on the main program in the running memory, where the defrosting process is a process of waking up the frozen process, recovering their running states, and continuing to run the original task. After the main program is unfrozen, the terminal equipment can normally call and run the application program.
S208, outputting a call blocking notification.
Specifically, if the call permission list does not have call information, the terminal device does not execute the call instruction, and can output a call blocking notification through voice, popup window and other modes to inform the user that the call instruction cannot call the application program.
Optionally, after the process of the application program is frozen, the terminal device may add the application program to the startup management list, where the startup management list may manage all application programs in the startup management list, and when the application program exists in the startup management list, only the task set by the operating system of the terminal device may be completed, but may not be invoked by the user by itself, for example, when the application program a exists in the startup management list, the application program a may be started only at 5:00 pm, and may not be invoked by the user. The application program is added into the starting management list, so that the application program can be further prevented from being started by the user when the application program is not called by the user, and the using effect of the terminal equipment is further prevented from being influenced. When call information exists in the call permission list, the terminal equipment can remove the application program from the starting management list, so that the application program can be called by a user; when the call information does not exist in the call permission list, the terminal equipment still places the application program in the start management list.
Optionally, although the normal running of the application program is not affected by deleting the non-main process of the application program, the non-main process can make the function and display of the application program richer and more capable of meeting the diversified demands of users, so when the user formally calls and starts the application program, that is, when the terminal equipment detects that the main process in the running memory is in the running state, the first identification information corresponding to the non-main process of the application program can be obtained in the database, and the non-main process of the application program is loaded in the running memory according to the first identification information. Therefore, the functional and display integrity of the application program can be guaranteed when the application program is formally started, and the application program can occupy smaller running memory space in the preloading stage.
In the embodiment of the application, the application program process is automatically preloaded according to the trigger event by recording the application program using habit of the user, so that the intelligent preloading of the application program is realized, and the loading time required by the user when formally using the application program is reduced. If the process of the application program is detected to be loaded in the running memory, freezing the process, so that the space occupied by the process of the application program in the running memory is prevented from being occupied by other application programs because the application program is not called and run in the running memory for a long time. And then, acquiring first identification information corresponding to the non-main process, and removing the non-main process of the application program in the running memory based on the first identification information, so that the space of the running memory occupied by the process of the application program is reduced. By acquiring the identification information of the process of the application program, searching the non-main process of the application program and removing the non-main process from the running memory, the running memory occupied by the process of the application program when the application program is not running is reduced while the normal starting running of the application program is ensured, the normal working of the currently running application program is ensured, and the use effect of the terminal equipment is improved. If an instruction for the application program is received and call information exists in the call permission list, the main process is subjected to defrosting processing, so that the error call of the application program is avoided, the non-main process of the application program can be loaded after the main process is defrosted, the functional and display integrity of the application program can be ensured when the application program is formally started, and the application program can occupy a smaller running memory space in a preloading stage.
The application process processing device provided by the embodiment of the application will be described in detail with reference to fig. 4 to fig. 6. It should be noted that, in fig. 4 to fig. 6, the application process processing apparatus is used to execute the method of the embodiment shown in fig. 2 and fig. 3, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the embodiment shown in fig. 2 and fig. 3 of the present application.
Referring to fig. 4, a schematic structural diagram of an application process processing apparatus according to an exemplary embodiment of the present application is shown. The application process processing means may be implemented as all or part of the apparatus by software, hardware or a combination of both. The apparatus 1 comprises a freeze processing module 11, an identification acquisition module 12 and a removal processing module 13.
The freezing processing module 11 is configured to freeze a process of an application program if the process is loaded in an operation memory;
An identifier obtaining module 12, configured to obtain identifier information of the process;
the removal processing module 13 is configured to perform removal processing on a non-main process of the application program in the running memory based on the identification information;
the process is composed of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program.
In this embodiment, if the process of the application program is loaded in the running memory, freezing the process to obtain the identification information of the process, and removing the non-main process of the application program in the running memory based on the identification information. By acquiring the identification information of the process of the application program, searching the non-main process of the application program and removing the non-main process from the running memory, the running memory occupied by the process of the application program when the application program is not running is reduced while the normal starting running of the application program is ensured, the normal working of the currently running application program is ensured, and the use effect of the terminal equipment is improved.
Referring to fig. 5, a schematic structural diagram of an application process processing apparatus according to an exemplary embodiment of the present application is shown. The application process processing means may be implemented as all or part of the apparatus by software, hardware or a combination of both. The apparatus 1 comprises a freeze handling module 11, an identification acquisition module 12, a removal handling module 13, a preloading module 14, a program calling module 15, a block calling module 16 and a process loading module 17.
A preloading module 14, configured to load a process of an application program in an operating memory if a trigger event for the application program is detected;
The freezing processing module 11 is configured to perform freezing processing on a process of an application program if it is detected that the process is loaded in the running memory;
An identifier obtaining module 12, configured to obtain identifier information of the process;
the removal processing module 13 is configured to perform removal processing on a non-main process of the application program in the running memory based on the identification information;
the process is composed of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program.
Optionally, the freeze processing module 11 is specifically configured to obtain first identification information corresponding to a non-main process of the application program in the identification information;
Removing the non-main process in the running memory based on the first identification information;
The program calling module 15 is configured to obtain calling information corresponding to a calling instruction if the calling instruction for the application program is received;
If the call information exists in the call permission list, thawing the main process in the running memory;
Optionally, the program calling module 15 is specifically configured to obtain second identification information corresponding to the main process of the application program if the calling information exists in the permission calling list;
and thawing the main process in the running memory based on the second identification information.
A call blocking module 16, configured to output a call blocking notification if the call information does not exist in the call permission list;
The process loading module 17 is configured to obtain first identification information corresponding to the non-main process of the application program if the main process in the running memory is detected to be in a running state;
and loading the non-main process of the application program in the running memory based on the first identification information.
In the embodiment, through recording the application program using habit of the user, the application program process is automatically preloaded according to the trigger event, so that the intelligent preloading of the application program is realized, and the loading time required by the user when formally using the application program is reduced. If the process of the application program is detected to be loaded in the running memory, freezing the process, so that the space occupied by the process of the application program in the running memory is prevented from being occupied by other application programs because the application program is not called and run in the running memory for a long time. And then, acquiring first identification information corresponding to the non-main process, and removing the non-main process of the application program in the running memory based on the first identification information, so that the space of the running memory occupied by the process of the application program is reduced. By acquiring the identification information of the process of the application program, searching the non-main process of the application program and removing the non-main process from the running memory, the running memory occupied by the process of the application program when the application program is not running is reduced while the normal starting running of the application program is ensured, the normal working of the currently running application program is ensured, and the use effect of the terminal equipment is improved. If an instruction for the application program is received and call information exists in the call permission list, the main process is subjected to defrosting processing, so that the error call of the application program is avoided, the non-main process of the application program can be loaded after the main process is defrosted, the functional and display integrity of the application program can be ensured when the application program is formally started, and the application program can occupy a smaller running memory space in a preloading stage.
It should be noted that, when the application process processing apparatus provided in the foregoing embodiment executes the application process processing method, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the application process processing device and the application process processing method embodiment provided in the foregoing embodiments belong to the same concept, which embody the detailed implementation process in the method embodiment, and are not repeated here.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are adapted to be loaded by a processor and executed by the processor, where the specific execution process may refer to the specific description of the embodiment shown in fig. 2-3 a, and details are not repeated herein.
The present application further provides a computer program product, where at least one instruction is stored, where the at least one instruction is loaded by the processor and executed by the processor, where the specific execution process may refer to the specific description of the embodiment shown in fig. 2-3 a, and details are not repeated herein.
Referring to fig. 6, a block diagram of an electronic device according to an exemplary embodiment of the present application is shown. The electronic device of the present application may include one or more of the following components: processor 110, memory 120, input device 130, output device 140, and bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and lines to connect various portions of the overall electronic device, perform various functions of the electronic device 100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-programmable gate array (FPGA), programmable logic array (programmable logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (central processing unit, CPU), an image processor (graphics processing unit, GPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The memory 120 may include a random access memory (random Access Memory, RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, which may be an Android (Android) system, including an Android system-based deep development system, an IOS system developed by apple corporation, including an IOS system-based deep development system, or other systems, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the electronic device in use, such as phonebooks, audiovisual data, chat log data, and the like.
Referring to FIG. 7, the memory 120 may be divided into an operating system space in which the operating system is running and a user space in which native and third party applications are running. In order to ensure that different third party application programs can achieve better operation effects, the operating system allocates corresponding system resources for the different third party application programs. However, the requirements of different application scenarios in the same third party application program on system resources are different, for example, under the local resource loading scenario, the third party application program has higher requirement on the disk reading speed; in the animation rendering scene, the third party application program has higher requirements on the GPU performance. The operating system and the third party application program are mutually independent, and the operating system often cannot timely sense the current application scene of the third party application program, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third party application program.
In order to enable the operating system to distinguish specific application scenes of the third-party application program, data communication between the third-party application program and the operating system needs to be communicated, so that the operating system can acquire current scene information of the third-party application program at any time, and targeted system resource adaptation is performed based on the current scene.
Taking an operating system as an Android system as an example, as shown in fig. 8, a program and data stored in the memory 120 may be stored in the memory 120 with a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, where the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides the underlying drivers for various hardware of the electronic device, such as display drivers, audio drivers, camera drivers, bluetooth drivers, wi-Fi drivers, power management, and the like. The system runtime layer 340 provides the main feature support for the Android system through some C/c++ libraries. For example, the SQLite library provides support for databases, the OpenGL/ES library provides support for 3D graphics, the Webkit library provides support for browser kernels, and the like. Also provided in the system runtime library layer 340 is An Zhuoyun runtime library (Android runtime), which primarily provides some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 360 provides various APIs that may be used in building applications, which developers can also build their own applications by using, for example, campaign management, window management, view management, notification management, content provider, package management, call management, resource management, location management. At least one application program is running in the application layer 380, and these application programs may be native application programs of the operating system, such as a contact program, a short message program, a clock program, a camera application, etc.; and may also be a third party application developed by a third party developer, such as a game-like application, instant messaging program, photo beautification program, remote diagnostics program, and the like.
Taking an operating system as an IOS system as an example, the program and data stored in the memory 120 are shown in fig. 9, the IOS system includes: core operating system layer 420 (Core OS layer), core services layer 440 (Core SERVICES LAYER), media layer 460 (MEDIA LAYER), and touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide more hardware-like functionality for use by the program frameworks at the core services layer 440. The core services layer 440 provides system services and/or program frameworks required by the application, such as a Foundation (Foundation) framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a sports framework, and the like. The media layer 460 provides an interface for applications related to audiovisual aspects, such as a graphics-image related interface, an audio technology related interface, a video technology related interface, an audio video transmission technology wireless play (AirPlay) interface, and so forth. The touchable layer 480 provides various commonly used interface-related frameworks for application development, with the touchable layer 480 being responsible for user touch interactions on the electronic device. Such as a local notification service, a remote push service, an advertisement framework, a game tool framework, a message User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
Among the frameworks illustrated in fig. 9, frameworks related to most applications include, but are not limited to: a base framework in core services layer 440 and UIKit frameworks in touchable layer 480. The infrastructure provides many basic object classes and data types, providing the most basic system services for all applications, independent of the UI. While the class provided by the UIKit framework is a base UI class library for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides the application's infrastructure for building user interfaces, drawing, handling and user interaction events, responding to gestures, and so on.
The manner and principle of implementing data communication between the third party application program and the operating system in the IOS system can refer to the Android system, and the application is not described herein.
The input device 130 is configured to receive input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are a touch display screen for receiving a touch operation thereon or thereabout by a user using a finger, a touch pen, or any other suitable object, and displaying a user interface of each application program. Touch display screens are typically provided on the front panel of an electronic device. The touch display screen may be designed as a full screen, a curved screen, or a contoured screen. The touch display screen may also be designed as a combination of a full screen and a curved screen, and the combination of a special-shaped screen and a curved screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configuration of the electronic device shown in the above-described figures does not constitute a limitation of the electronic device, and the electronic device may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. For example, the electronic device further includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WIRELESS FIDELITY, wiFi) module, a power supply, and a bluetooth module, which are not described herein.
In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is an operating system of the electronic device. The operating system may be an android system, an IOS system, or other operating systems, which is not limited by the embodiments of the present application.
The electronic device of the embodiment of the application can be further provided with a display device, and the display device can be various devices capable of realizing display functions, such as: cathode ray tube displays (cathode ray tubedisplay, CR), light-emitting diode displays (light-emitting diode display, LED), electronic ink screens, liquid Crystal Displays (LCD), plasma display panels (PLASMA DISPLAY PANEL, PDP), and the like. A user may utilize a display device on electronic device 101 to view displayed text, images, video, etc. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality ) device, an automobile, a data storage, an audio playing device, a video playing device, a notebook, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic article of clothing, etc.
In the electronic device shown in fig. 6, the processor 110 may be configured to call an application process handler stored in the memory 120, and specifically perform the following operations:
if the process of the application program is loaded in the running memory, freezing the process;
acquiring the identification information of the process;
Removing the non-main process of the application program in the running memory based on the identification information;
the process is composed of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program.
In one embodiment, when the processor 110 performs the removal processing on the non-main process of the application program in the running memory based on the identification information, the following operations are specifically performed:
acquiring first identification information corresponding to a non-main process of the application program in the identification information;
and removing the non-main process in the running memory based on the first identification information.
In one embodiment, before executing the process of the application program, if the process is loaded in the running memory, the processor 110 further performs the following operations:
If a trigger event for an application is detected, loading a process of the application in a running memory.
In one embodiment, the processor 110, when executing the application process processing method, further performs the following operations:
If a call instruction aiming at the application program is received, call information corresponding to the call instruction is obtained;
and if the call information exists in the call permission list, thawing the main process in the running memory.
In one embodiment, when executing the defrosting processing on the main process in the running memory if the call information exists in the permission call list, the processor 110 specifically performs the following operations:
if the call information exists in the call permission list, acquiring second identification information corresponding to the main process of the application program;
and thawing the main process in the running memory based on the second identification information.
In one embodiment, the processor 110, when executing the application process processing method, further performs the following operations:
and if the call information does not exist in the call permission list, outputting a call blocking notification.
In one embodiment, the processor 110, when executing the application process processing method, further performs the following operations:
If the main process in the running memory is detected to be in a running state, acquiring first identification information corresponding to the non-main process of the application program;
and loading the non-main process of the application program in the running memory based on the first identification information.
In the embodiment, through recording the application program using habit of the user, the application program process is automatically preloaded according to the trigger event, so that the intelligent preloading of the application program is realized, and the loading time required by the user when formally using the application program is reduced. If the process of the application program is loaded in the running memory, freezing the process, so that the space occupied by the process of the application program in the running memory is prevented from being occupied by other application programs because the application program is not called and run for a long time in the running memory. And then, acquiring first identification information corresponding to the non-main process, and removing the non-main process of the application program in the running memory based on the first identification information, so that the space of the running memory occupied by the process of the application program is reduced. By acquiring the identification information of the process of the application program, searching the non-main process of the application program and removing the non-main process from the running memory, the running memory occupied by the process of the application program when the application program is not running is reduced while the normal starting running of the application program is ensured, the normal working of the currently running application program is ensured, and the use effect of the terminal equipment is improved. If an instruction for the application program is received and call information exists in the call permission list, the main process is subjected to defrosting processing, so that the error call of the application program is avoided, the non-main process of the application program can be loaded after the main process is defrosted, the functional and display integrity of the application program can be ensured when the application program is formally started, and the application program can occupy a smaller running memory space in a preloading stage.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (9)

1. An application process processing method, the method comprising:
If the process of the application program is loaded in the running memory, freezing the process, and adding the application program into a starting management list;
acquiring the identification information of the process;
Removing the non-main process of the application program in the running memory based on the identification information;
The process consists of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program;
If a call instruction aiming at the application program is received, call information corresponding to the call instruction is obtained;
And if the call information exists in the call permission list, removing the application program from the starting management list, and thawing the main process in the running memory.
2. The method of claim 1, wherein the removing the non-host process of the application program in the running memory based on the identification information comprises:
acquiring first identification information corresponding to a non-main process of the application program in the identification information;
and removing the non-main process in the running memory based on the first identification information.
3. The method of claim 1, wherein if the process of the application program is loaded in the running memory, before performing the freezing treatment on the process, the method further comprises:
If a trigger event for an application is detected, loading a process of the application in a running memory.
4. The method of claim 1, wherein if the call information exists in the permission call list, the defrosting the main process in the running memory comprises:
if the call information exists in the call permission list, acquiring second identification information corresponding to the main process of the application program;
and thawing the main process in the running memory based on the second identification information.
5. The method according to claim 1, wherein the method further comprises:
and if the call information does not exist in the call permission list, outputting a call blocking notification.
6. The method according to claim 4, wherein the method further comprises:
If the main process in the running memory is detected to be in a running state, acquiring first identification information corresponding to the non-main process of the application program;
and loading the non-main process of the application program in the running memory based on the first identification information.
7. An application process processing apparatus, the apparatus comprising:
the freezing processing module is used for freezing the process of the application program and adding the application program into the starting management list if the process of the application program is loaded in the running memory;
the identification acquisition module is used for acquiring the identification information of the process;
the removal processing module is used for removing the non-main process of the application program in the running memory based on the identification information;
The process consists of a main process and the non-main process, wherein the main process is a process necessary for the running of the application program;
The program calling module is used for acquiring calling information corresponding to the calling instruction if the calling instruction aiming at the application program is received;
And if the call information exists in the call permission list, removing the application program from the starting management list, and thawing the main process in the running memory.
8. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 6.
9. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-6.
CN202110852359.1A 2021-07-27 2021-07-27 Application process processing method and device, storage medium and electronic equipment Active CN113568748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110852359.1A CN113568748B (en) 2021-07-27 2021-07-27 Application process processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110852359.1A CN113568748B (en) 2021-07-27 2021-07-27 Application process processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113568748A CN113568748A (en) 2021-10-29
CN113568748B true CN113568748B (en) 2024-06-18

Family

ID=78168080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110852359.1A Active CN113568748B (en) 2021-07-27 2021-07-27 Application process processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113568748B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114460873A (en) * 2021-12-21 2022-05-10 深圳元戎启行科技有限公司 Vehicle-mounted control system and unmanned vehicle

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664285A (en) * 2018-05-10 2018-10-16 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and mobile terminal
CN108958824A (en) * 2017-05-18 2018-12-07 龙芯中科技术有限公司 Starting method, apparatus, electronic equipment and the storage medium of application program

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729128B (en) * 2017-07-24 2019-09-24 深圳壹账通智能科技有限公司 Application data restoration methods, device, computer equipment and storage medium
CN109144232B (en) * 2018-08-01 2020-12-01 Oppo广东移动通信有限公司 Process processing method and device, electronic equipment and computer readable storage medium
CN111352791A (en) * 2018-12-20 2020-06-30 深圳市优必选科技有限公司 System application detection method and device, terminal equipment and storage medium
CN110377372A (en) * 2019-07-25 2019-10-25 南京中孚信息技术有限公司 The secondary process of target application exits method, apparatus and electronic equipment
CN110413347B (en) * 2019-07-31 2023-08-18 Oppo广东移动通信有限公司 Advertisement processing method and device in application program, storage medium and terminal
CN110806926A (en) * 2019-09-05 2020-02-18 华为技术有限公司 Resource control method and equipment
CN110737606B (en) * 2019-09-27 2022-06-21 Oppo(重庆)智能科技有限公司 Memory recovery processing method and device, electronic equipment and storage medium
CN113032080B (en) * 2021-03-31 2023-06-27 广州虎牙科技有限公司 Page implementation method, application program, electronic device and storage medium
CN113157337A (en) * 2021-04-19 2021-07-23 深圳市中科明望通信软件有限公司 Application program starting method and device, terminal equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958824A (en) * 2017-05-18 2018-12-07 龙芯中科技术有限公司 Starting method, apparatus, electronic equipment and the storage medium of application program
CN108664285A (en) * 2018-05-10 2018-10-16 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and mobile terminal

Also Published As

Publication number Publication date
CN113568748A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN109034115B (en) Video image recognizing method, device, terminal and storage medium
CN109062475B (en) Icon display method and device, terminal and storage medium
US20210048939A1 (en) Icon display method, device, and terminal
CN110300328B (en) Video playing control method and device and readable storage medium
US20230035047A1 (en) Remote assistance method, device, storage medium, and terminal
WO2019047189A1 (en) Message display method and device and terminal
CN110413347B (en) Advertisement processing method and device in application program, storage medium and terminal
CN109656445B (en) Content processing method, device, terminal and storage medium
CN114779987B (en) Method, device, terminal and storage medium for displaying content
CN111124668B (en) Memory release method, memory release device, storage medium and terminal
WO2019047187A1 (en) Navigation bar control method and device
CN109388309B (en) Menu display method, device, terminal and storage medium
WO2019047183A1 (en) Key display method, apparatus, and terminal
CN113568748B (en) Application process processing method and device, storage medium and electronic equipment
CN111913614B (en) Multi-picture display control method and device, storage medium and display
CN112114965A (en) Application program running method and device, terminal and storage medium
CN116048757A (en) Task processing method, device, electronic equipment and storage medium
CN113825022B (en) Method and device for detecting play control state, storage medium and electronic equipment
CN113098859B (en) Webpage page rollback method, device, terminal and storage medium
CN113950043B (en) Communication method, device, storage medium and terminal
CN113286349B (en) Personal hot spot connection method, device, terminal and storage medium
CN112256354A (en) Application starting method and device, storage medium and electronic equipment
CN112612633A (en) Inter-process communication method, device, storage medium and terminal
CN113778386B (en) Component generation method and device, storage medium and electronic equipment
CN112612487B (en) Application installation method, device, storage medium and terminal

Legal Events

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