CN115437783B - Searching and killing method, electronic equipment and readable storage medium - Google Patents

Searching and killing method, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115437783B
CN115437783B CN202210986404.7A CN202210986404A CN115437783B CN 115437783 B CN115437783 B CN 115437783B CN 202210986404 A CN202210986404 A CN 202210986404A CN 115437783 B CN115437783 B CN 115437783B
Authority
CN
China
Prior art keywords
memory
application
size
threshold
electronic device
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
CN202210986404.7A
Other languages
Chinese (zh)
Other versions
CN115437783A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device Co 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210986404.7A priority Critical patent/CN115437783B/en
Publication of CN115437783A publication Critical patent/CN115437783A/en
Application granted granted Critical
Publication of CN115437783B publication Critical patent/CN115437783B/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/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/5022Mechanisms to release resources

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 provides a searching and killing method, electronic equipment and a readable storage medium, and relates to the technical field of equipment systems; according to the method, the memory occupation size of the same application in the historical starting process can be learned to obtain the memory required size in the next starting process, so that the memory required size is used as the checking and killing basis in the next starting process, the more reasonable memory occupation size in the starting process of the same application can be obtained, and therefore the application programs running in the background can be checked and killed in advance, and the starting speed of the application programs is improved; in addition, different water lines can be set at different stages when the application is started, for example, a higher water line is selected before the top Activity is started and a lower water line is selected after the top Activity is started; therefore, the background process is killed through the higher water line, so that the residual space of the memory is larger in the application starting process, and the application starting speed is improved.

Description

Searching and killing method, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of device systems, and in particular, to a method for killing a device, an electronic device, and a readable storage medium.
Background
With the increasing functions of the electronic device, the memory space required by the application program running in the electronic device is increased, and meanwhile, in order to rapidly open the application program, when the user finishes using the application program, the application program can be returned to the background running, and the application program running in the background also occupies the memory space.
At present, a water line for killing can be set, and an application program running in the background can be killed under the condition that the residual memory space is smaller than or equal to the water line for killing. However, when an application is newly started, a large amount of memory is typically consumed during the application start-up process. And under the condition that the memory residual space is smaller than or equal to the checking and killing waterline due to the consumption of the memory space by the newly started application, the application program running in the background is checked and killed again, so that the application starting process is slower.
Disclosure of Invention
The application provides a searching and killing method, electronic equipment and a readable storage medium, which can improve the starting speed of an application.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, the present application provides a method for killing a plant, including:
the electronic equipment monitors a first event, and the first event is related to the starting of a first application;
The electronic equipment acquires the required size of the memory of the first application when the first application is started, and the required size of the memory is determined by the memory occupation size of the first application when the first application is started in a historical manner;
if the difference value between the remaining memory space of the electronic device and the memory is smaller than or equal to the first threshold value, the electronic device searches and kills the application programs running in the background.
In the method, after an event related to the starting of the first application is monitored, the memory occupation size of the first application when the first application is started in a history mode can be obtained, so that the memory required size in the starting time is determined based on the memory occupation size in the history starting time, and then processes of application programs running in the background are checked and killed when the difference value between the memory residual space and the memory required size is smaller than or equal to a first threshold value to release the memory space; when the memory space is large, the system allocates a large amount of resources to the application program being started, and the starting speed of the first application can be increased.
As an implementation manner of the first aspect of the present application, the method further includes:
the electronic equipment monitors a second event, and the second event is related to whether the memory occupation size of the first application is stable when the first application is started;
The electronic equipment samples the memory occupation size of the first application to obtain a plurality of sampled data;
the electronic equipment obtains the memory occupation size of the first application when the first application is started at this time according to the plurality of sampling data, stores the memory occupation size of the first application when the first application is started at this time, and the memory occupation size of the first application when the first application is started at this time is used for determining the required size of the memory when the first application is started next time.
In the application, after the memory occupation size of the first application is stable when the first application is started, the memory occupation size can be sampled, however, when the first application is started next time, the memory occupation size of the first application when the first application is started can be used as a basis of the memory required size of the first application when the first application is started next time, so that the memory required size of the first application when the first application is started can be determined by a learning method, the situation that the survival of other application programs is influenced due to excessive searching and killing is avoided, or the starting speed is influenced due to the fact that the searching and killing are triggered after the waterline is killed in the starting process due to the too small searching and killing.
As another implementation manner of the first aspect of the present application, the obtaining, by the electronic device, a memory occupation size of the first application when the first application is started at this time according to the plurality of sampling data includes:
the electronic equipment calculates data characteristic values of a plurality of sampling data, and the memory occupation size of the first application at the time of starting is the data characteristic values of the plurality of sampling data.
As another implementation manner of the first aspect of the present application, the calculating, by the electronic device, a data characteristic value of the plurality of sampling data includes:
the electronic equipment removes the maximum value and the minimum value of the plurality of sampling data to obtain a plurality of screening data;
the electronic equipment calculates data characteristic values of a plurality of screening data, wherein the data characteristic values of a plurality of sampling data are the data characteristic values of a plurality of screening data.
In the application, in order to avoid abnormality in the starting process or unreasonable setting of sampling time, the data characteristic value can be calculated after deleting the maximum value and the minimum value in a plurality of sampling data, so that the more accurate memory occupation size is obtained.
As another implementation manner of the first aspect of the present application, before the electronic device calculates the data feature values of the plurality of filtering data, the method further includes:
the electronic equipment calculates standard deviations of a plurality of screening data;
the electronic device determines that a standard deviation of the plurality of screening data is less than a first value.
In the application, the memory occupation size tends to be stable when the application is started normally through testing, so that the standard deviation of screening data can be calculated to avoid collecting the memory occupation size when the application is started abnormally, the screening data in the data set is determined based on the standard deviation, the memory occupation size when the application is started this time can be obtained, and therefore the effective and reasonable memory occupation size can be obtained, and the effective and reasonable memory required size can be provided for subsequent starting.
As another implementation manner of the first aspect of the present application, after the electronic device stores the memory occupation size when the first application is started, the method further includes:
the method comprises the steps that the electronic equipment obtains a plurality of memory occupation sizes which belong to latest storage of a first application;
the electronic equipment performs sliding window filtering on the multiple memory occupation sizes to obtain an average value of the multiple memory occupation sizes, wherein the average value of the multiple memory occupation sizes is the size required by the memory when the first application is started next time.
In the method, the average value of the memory occupation sizes is calculated by adopting a sliding window filtering mode, so that smoothness of the memory required size obtained by calculation is higher, and the fluctuation of the memory required size calculated each time is avoided being larger.
As another implementation manner of the first aspect of the present application, before the electronic device performs sliding window filtering on the multiple memory occupation sizes, the method further includes:
the electronic device determines that the number of the plurality of memory footprint sizes is greater than or equal to 5.
In this application, at least 5 data are needed in the sliding window filtering manner, so that the number of the memory occupation sizes limited to the latest storage in practical application is greater than or equal to 5.
As another implementation manner of the first aspect of the present application, the method further includes:
the electronic equipment determines that the number of the memory occupation sizes is smaller than 5;
the electronic device calculates an average of the plurality of memory sizes.
In the present application, when the number of times of starting the first application or the number of times of obtaining the effective memory occupation size is smaller than 5, the required size of the memory when the first application is started next time may be determined by directly calculating the average value.
As another implementation of the first aspect of the present application, the first event includes: an event of a start of the first application; the second event includes: the top Activity of the first application initiates the completed event.
In the application, in order to timely search and kill an application program running in the background when the first application is started, a trigger event for judging whether to search and kill is set to be when the first application starts to be started, and in order to obtain stable sampling data, the trigger event for starting to sample can be set to be after the top Activity of the first application is started.
As another implementation manner of the first aspect of the present application, after the electronic device monitors the second event, the method further includes:
if the memory residual space of the electronic equipment is smaller than or equal to a second threshold value, the electronic equipment searches and kills the application programs running in the background, wherein the second threshold value is smaller than or equal to the first threshold value.
In the present application, after the first application is started, whether to search and kill other application programs running in the background is determined according to the remaining memory space and the search and kill waterline (for example, the second threshold).
Of course, in practical application, the water lines before and after the first application is started may be the same or different. For example, the water line for killing before the completion of the startup can be set to be larger than the water line for killing after the completion of the startup, so that the residual memory space in the startup process is larger, and the residual memory space after the completion of the startup can be smaller, thereby not only improving the startup speed of the application program, but also improving the keep-alive requirements of other application programs after the completion of the startup.
As another implementation of the first aspect of the present application, the second threshold value is smaller than the first threshold value;
the searching and killing threshold value of the electronic equipment comprises a first-level threshold value and a second-level threshold value, wherein the second-level threshold value is higher than the first-level threshold value, the second-level threshold value comprises a first threshold value and a second threshold value, and the first-level threshold value comprises a third threshold value and a fourth threshold value;
if the difference between the remaining memory space of the electronic device and the memory is smaller than or equal to the first threshold, the electronic device searches and kills the application program running in the background, including:
If the difference value between the memory residual space of the electronic equipment and the memory required size is smaller than or equal to a first threshold value and larger than a third threshold value, the electronic equipment searches and kills a first type of application program running in the background;
if the difference value between the remaining memory space of the electronic device and the memory is smaller than or equal to a third threshold value, the electronic device searches and kills the first type of application program and the second type of application program running in the background, and the keep-alive requirement of the second type of application program is larger than that of the first type of application program.
In the application, a multi-level searching and killing water line can be further arranged, so that when the memory residual space is determined to be lower according to the relation between the memory residual space and the multi-level searching and killing water line, the application program with lower keep-alive requirement is killed preferentially; when the residual space of the memory is low, the application programs with higher keep-alive requirements can be killed, and the quick starting of the application and the keep-alive of the background application programs are balanced.
As another implementation manner of the first aspect of the present application, if the remaining memory space of the electronic device is less than or equal to the second threshold, the electronic device searches and kills an application running in the background, including:
if the remaining memory space of the electronic equipment is smaller than or equal to the second threshold value and larger than the fourth threshold value, the electronic equipment searches and kills the first type of application programs running in the background;
If the memory residual space of the electronic equipment is smaller than or equal to a fourth threshold value, the electronic equipment searches and kills the first type application program and the second type application program which run in the background, and the fourth threshold value is smaller than the third threshold value.
Of course, after the application is started, a multi-level water line of kill may also be employed to balance between fast running of the application and keep-alive of the background application.
As another implementation manner of the first aspect of the present application, before the electronic device obtains the required size of the memory of the first application at the time of starting, the method further includes:
the electronic device determines a required size of a memory in the electronic device in which the first application is stored, wherein the second threshold is equal to the first threshold.
As another implementation manner of the first aspect of the present application, the method further includes:
the electronic equipment monitors a first event;
the electronic equipment determines the size of a memory which does not store the first application in the electronic equipment;
the method comprises the steps that an electronic device obtains the memory setting size of a first application, the memory setting size of the first application is the memory consumption size of the first application, which is estimated in advance, when the first application is started, a second threshold is smaller than the first threshold, a checking threshold of the electronic device comprises a first level threshold and a second level threshold, the second level threshold is higher than the first level threshold, the second level threshold comprises the first threshold and the second threshold, and the first level threshold comprises a third threshold and a fourth threshold;
If the difference value between the remaining memory space of the electronic device and the memory setting size is smaller than or equal to a first threshold value and larger than a third threshold value, the electronic device searches and kills the first type of application programs running in the background;
if the difference value between the remaining memory space of the electronic device and the memory setting size is smaller than or equal to a third threshold value, the electronic device searches and kills the first type of application program and the second type of application program running in the background, and the keep-alive requirement of the second type of application program is larger than that of the first type of application program.
In the application, the method and the device can judge whether the checking and killing are needed or not by adopting the learned memory required size when the application program with the learned memory required size is started, and timely check and kill the application program when the checking and killing are needed, and timely release the memory, so that the starting speed of the application program is improved.
And when the application program with the required size of the memory is not learned, different water line searching and killing modes can be adopted in the starting process and after the starting is completed, so that the residual space of the memory is higher in the starting process, and the starting speed of the application program is improved.
Of course, the two modes can be simultaneously applied to the starting process and the running process of the application program, namely the method can be used for judging whether the application program needs to be checked and killed by adopting the learned memory required size when the application program with the memory required size is started, and timely checking and killing the application program when the application program needs to be checked and killed, and timely releasing the memory, so that the starting speed of the application program is improved, meanwhile, when judging whether the application program needs to be checked and killed, a higher checking and killing waterline is adopted in the starting process, and a lower checking and killing waterline is adopted after the starting is finished.
Various application modes are provided.
As another implementation manner of the first aspect of the present application, the method further includes:
after the electronic equipment monitors the second event, if the remaining memory space of the electronic equipment is smaller than or equal to a second threshold value and larger than a fourth threshold value, the electronic equipment searches and kills the first type application programs running in the background;
if the memory residual space of the electronic equipment is smaller than or equal to a fourth threshold value, the electronic equipment searches and kills the first type application program and the second type application program which run in the background, and the fourth threshold value is smaller than the third threshold value.
In a second aspect, there is provided an electronic device comprising a processor for executing a computer program stored in a memory, implementing the method of any of the first aspects of the present application.
In a third aspect, there is provided a system on a chip comprising a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the method of any of the first aspects of the present application.
In a fourth aspect, there is provided a computer readable storage medium storing a computer program which when executed by one or more processors performs the method of any of the first aspects of the present application.
In a fifth aspect, the present application provides a computer program product for, when run on a device, causing the device to perform the method of any one of the first aspects of the present application.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
Fig. 1 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a change of a memory remaining space in an application starting process according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a change of a remaining memory space during an application starting process according to another embodiment of the present disclosure;
fig. 4 is a schematic technical architecture of a method for killing according to an embodiment of the present application;
fig. 5 is a timing chart of a method for killing according to an embodiment of the present application;
fig. 6 is a schematic diagram illustrating a change in memory occupation size in an application starting process according to an embodiment of the present application;
FIG. 7 is a timing chart of another method of killing according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a change of a water line for checking before and after an application start is finished according to an embodiment of the present application;
Fig. 9 is a schematic flow chart of another method for killing according to an embodiment of the present application;
fig. 10 is a timing chart of another method for killing according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that in embodiments of the present application, "one or more" means one, two, or more than two; "and/or", describes an association relationship of the association object, indicating that three relationships may exist; for example, a and/or B may represent: a alone, a and B together, and B alone, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," "fourth," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The searching and killing method provided by the embodiment of the application can be applied to electronic equipment such as tablet computers, mobile phones, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like. The embodiment of the application does not limit the specific type of the electronic equipment.
Fig. 1 shows a schematic structural diagram of an electronic device. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. Among other things, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store application programs (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system.
In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio signals to analog audio signal outputs and also to convert analog audio inputs to digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to listening to voice information. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The camera 193 is used to capture still images or video. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1.
The embodiment of the present application is not particularly limited to a specific structure of an execution body of a killing method, as long as it is possible to process with a killing method provided according to the embodiment of the present application by running a code recorded with the killing method of the embodiment of the present application. For example, the execution body of the killing method provided in the embodiment of the present application may be a functional module in the electronic device that can call a program and execute the program, or a processing apparatus, for example, a chip, applied to the electronic device.
One or more applications may be running in the memory of the electronic device. When a new application program is started, a large amount of memory is generally consumed, and when the remaining memory space of the electronic device is small, in order to ensure that the new application program is started normally or started quickly, part or all of other application programs (processes) currently running in the memory of the electronic device can be killed, so that the memory space is released. The process of the system killing some or all of the other applications (processes) running in the memory of the electronic device may be referred to as the process of the system killing the applications.
In practical application, a water line for checking and killing can be set. The water line can be used as the basis for the system to check and kill the application program. For example, if the remaining memory space is less than or equal to the water line, the electronic device needs to search and kill the application program (process) running in the memory to kill some or all of the application programs running in the memory to release the memory, so that the remaining memory space after release is greater than the water line. If the remaining space of the memory is larger than the checking and killing waterline, the electronic equipment does not trigger checking and killing of the currently running application program in the memory.
Because keep-alive requirements for different applications may be different, applications in a system can be categorized into at least two broad categories: applications with high keep-alive requirements and applications with low keep-alive requirements; dividing the water line into two stages of water lines: a first-level water line checking and killing and a second-level water line checking and killing. The second-level water checking and killing line is larger than the first-level water checking and killing line. As an example, the second level water line is 1000MB and the first level water line is 600MB.
When the residual space of the memory is smaller than or equal to the second-level water line and larger than the first-level water line, the application program with low keep-alive requirement can be killed, and the memory space is released; when the residual memory space is smaller than or equal to the first-level water line, the application programs with high keep-alive requirements can be killed, and the memory space is released. In this way, when the residual space of the memory is lower (less than or equal to the second-level water line and greater than the first-level water line), the application programs with low keep-alive requirements can be killed preferentially, and the application programs with high keep-alive requirements can continue to run in the background; when the residual space of the memory is very low (less than or equal to the first-level water line), the application programs with high keep-alive requirements can be killed for the normal operation of the system. Thus a balance is struck between the keep-alive of the running application in the background and the fast start of the newly started application.
Of course, the above embodiment is merely used as an example, and in practical applications, one type of application may be set as an application that is continuously kept alive during the system running. And a multi-level water line can be set, and corresponding application programs with more types of keep-alive requirements can be set.
In some low-and-medium-end electronic devices, in order to improve the keep-alive rate of the background application program, the water line is usually set to be lower, so that more application programs run in a memory which is not large. The smaller the memory residual space is, the more intense the system resources are, the fewer the resources are allocated to each process, and the slower the processing speed for a single process is; therefore, the application program starting process is slower.
Even if the configuration of the high-end electronic device is higher, the memory space is larger, however, as the version of some application programs is upgraded, the memory occupied during starting and running is higher and higher, and the situation that the memory residual space is smaller can occur, so that the phenomenon that the starting process of the application programs is slower can also occur.
In addition, during the starting process of the application program, when the memory is consumed to be less than or equal to the water line for searching and killing, the system starts to search and kill other running application programs in the memory, so that the searching and killing process is lagged, and the starting process of the application program is slower.
In addition, when some applications with larger memory consumption are started, the system may not be able to determine how much memory space is needed in the starting process of the application being started, so that the system is not timely checked and killed, the remaining memory space may be smaller, and the phenomenon of slower application starting process may occur. In particular, reference may be made to the schematic diagram of memory change at the start of an application program with a large memory consumption shown in fig. 2, where the time value in the diagram is only used to represent time change, and does not represent time value in absolute sense.
As shown in fig. 2, between time 0 and time 6, the application program is started, gradually consumes the memory, and gradually reduces the remaining memory space.
At time 6, the remaining memory space is reduced to 1000MB (second-level kill water line), and at this time, the system starts to kill the application program with lower keep-alive requirement running in the background, so as to recover the memory.
In the range of 6-12, the system recovers the memory and consumes the memory while the newly started application program; the recovered memory is larger than the consumed memory, so that the memory residual space is enlarged, the recovered memory is smaller than the consumed memory, and the memory residual space is reduced. However, the remaining memory space is between the primary (600 MB) and secondary water lines.
At 12, the remaining memory space is reduced (the recovered memory is less than the consumed memory) to a first-level checking and killing waterline, and at this time, the system can check and kill the application programs with higher keep-alive requirements running in the background to recover the memory. Of course, after the remaining space of the memory is reduced to the first-level searching and killing waterline, if the application program with lower keep-alive requirement still exists in the background, the application program with lower keep-alive requirement can be preferentially searched and killed.
After 12 hours, the system recovers the memory while the newly started application consumes the memory, and likewise, the recovered memory is larger than the consumed memory, so that the memory residual space is enlarged, the recovered memory is smaller than the consumed memory, and the memory residual space is reduced. Along with the process of checking and killing the system, the residual space of the memory is larger and larger until the residual space is larger than the second-level checking and killing waterline.
As can be appreciated from this illustration, over time, the system does not determine the amount of memory required by the application to start (whether it will touch the secondary and primary water lines) but only kills a portion of the application if it is determined that the remaining memory space is less than or equal to the secondary water line, and if over time the application is still insufficient, the remaining memory space will be reduced to (or less than) the primary water line, at which point the killing of a portion of the application continues. The system can not be checked and killed in time, so that the residual memory space of a newly started application program is reduced to be lower than a first-stage checking and killing waterline in the starting process, and the phenomenon that the newly started application program is started too slowly can be caused.
In order to solve the problem, a size required by the memory can be set for an application program consuming a larger memory in the starting process, and when the application program is started, the system kills part or all of the application programs running in the background in the memory so as to kill the memory to be larger than the size required by the memory, however, the mode often causes multiple kills, and the keep-alive rate of the background application is affected. Reference is specifically made to the schematic diagram of the memory change at the start of the application program with the memory of the required size shown in fig. 3, where the time value in this diagram is only used to indicate the time change and not to indicate the time value in absolute sense.
As shown in fig. 3, during the starting process of the application program, the remaining memory space does not reach the second-level water line, and the system starts to kill other running application programs in the background, so as to ensure that the remaining memory space of the system is greater than or equal to the optimal remaining memory space. However, in practice this approach can result in multiple killing of the background running application, affecting the keep-alive rate of the background application.
In view of this, an embodiment of the present application provides a method for searching and killing, where the size of memory occupied by different applications when started is monitored, and then the size of memory occupied by the application when started is used as a basis for the size of memory required by the application when started subsequently, and when the application is started subsequently, the system searches and kills based on the size of memory required by the application.
Referring to fig. 4, a technical architecture diagram of a method for killing is provided in an embodiment of the present application.
There are an application layer, a Java framework layer, a native framework layer, a kernel layer, and a hardware layer in the system architecture of the electronic device. Only the hierarchical structure related to the embodiment of the present application is shown in the technical architecture diagram, and in practical application, other hierarchical structures or hierarchical structures different from the embodiment of the present application may be further included.
The application layer has a plurality of applications, for example, application 1, application 2, … …, and application N. These applications may be off state, background running state, foreground running state, etc. Applications may switch between these states, e.g., after an application is started, from a closed state to a foreground running state.
The Java framework layer is provided with an application state module and a memory management module. The application state module is used for managing the states of the application programs. The memory management module is used for being matched with other modules to realize the searching and killing method provided by the embodiment of the application. For example, the memory management module may implement monitoring of the state of the application program, identify the memory occupation size of the application program during the starting process of the application program, and when the same application is subsequently restarted, use the identified memory occupation size as the basis of the size of the memory of the same application, so as to trigger the searching and killing of the application program running in the background when the remaining memory space is smaller.
The memory management module comprises a state monitoring module, a memory size identification module and an application checking and killing processing module.
The state monitoring module is used for acquiring the state of the application program from the application state module;
the memory size identification module is used for identifying the occupied memory size of the application program in the starting process of the application program, and taking the occupied memory size as the basis of the required memory size of the application program in the subsequent starting process;
the application searching and killing processing module is used for triggering searching and killing of the background application program under the condition that the residual memory space is judged to touch the searching and killing waterline based on the size required by the memory of the application when the application is started.
The native framework layer has file modules. The file module is used for generating a file according to the memory occupation size (or the memory required size) identified by the memory size identification module.
The kernel layer is provided with a memory information module and a file read-write module. The memory information module is used for providing the current residual space of the memory and the memory occupation size in the application starting process for the memory size identification module; and the file reading and writing module is used for writing the file generated according to the occupied size of the memory (or the size required by the memory) into the memory or reading the file from the memory.
The hardware layer has a memory for storing files where the memory footprint (or the memory size needed) is located.
Based on the technical architecture, a killing method as shown in fig. 5 can be realized.
S101, a state monitoring module monitors state change information of an application.
The state change information of the application can be obtained in an application state module of the Java framework layer.
S102, after the state monitoring module monitors that the application 2 (any application program in the application layer) starts to start, starting information is sent to the memory size identification module, the starting information carries a unique identifier of the application 2 which is currently started, and the starting information is used for indicating the memory size identification module to sample the memory occupation size of the application 2 which is currently started in the starting process.
S105, the memory size identification module samples the memory occupation size of the application 2 currently being started in the starting process, and sampling data of the memory occupation size are obtained.
The memory size identification module can acquire sampling data of the memory occupation size in the starting process of the application 2 from the memory information module of the kernel layer.
In practical applications, after receiving the start-up information, sampling data of the memory occupation size of the application 2 may be obtained from the memory information module at preset time intervals (preset sampling periods).
In order to obtain more accurate sampling data of the memory occupation size, reference may be made to a schematic diagram of the memory occupation size change during the application start-up process, and in particular, reference may be made to fig. 6.
As shown in fig. 6, in the starting process, the memory occupation size of an application becomes larger gradually and then becomes stable. By testing the starting process of a plurality of applications, the memory occupation size is found to be stable within 2s after the topatity of the applications is started. For example, the application in fig. 6 begins to stabilize the memory footprint size after the 1 st s.
The topatity is an Activity corresponding to the top interface (excluding advertisement page, blank page, transition page, etc.) of the application after the application is started.
In the application, the memory occupation size obtained by sampling is the memory size required to be occupied in the application starting process and is also the basis of the memory size required in the next starting process, so that the memory occupation size after the memory occupation size is stable in the application starting process is sampled with emphasis. To avoid acquiring more noisy sampled data (e.g., data before the memory size is stable), the sampling may be started after the topaticity of the application is started.
As an example, the memory footprint size of an application may be collected at preset time intervals (e.g., 0.05s, 0.1s, 0.2s, etc.) after the topaticity of the application completes starting (or after 2s completes starting).
Of course, the triggering condition or time node for starting to collect the memory occupation size of the application at a preset time interval is not limited, and the important point is that the collection is started after the memory occupation size is stable.
In view of the above description, embodiments of the present application may provide: the memory size identification module starts to sample the memory occupation size of the application 2 after receiving the completion of starting the topatity of the application 2.
I.e. before step S105, the method further comprises the steps of:
s103, the state monitoring module monitors the information of the ending of the toppaper startup of the application 2.
S104, after the state monitoring module monitors the information of the ending of the topaticity starting of the application 2, the information of the ending of the topaticity starting is sent to the memory size identification module, and the information of the ending of the topaticity starting can also carry the unique identifier of the application 2.
In addition, frequent acquisition of the memory occupation size also increases the CPU load, and thus, acquisition may be stopped after n times (for example, 5 times, 6 times, 7 times, etc.) of data are acquired.
And S106, the memory size identification module obtains the memory occupation size of the application 2 in the starting process according to the sampling data.
In the application, after sampling to obtain a plurality of sampled data, the data characteristic values of the plurality of sampled data can be used as the memory occupation size in the starting process of the application 2.
As an example, an average value in a plurality of sampling data may be used as the memory occupation size in the current starting process; the maximum value in the sampling data can be used as the memory occupation size in the starting process; the average value of the sampling data remained after the maximum value and the minimum value of the sampling data are removed can be used as the memory occupation size in the starting process; the average value or the maximum value of the sampling data remaining after the plurality of sampling data remove part of the sampling data (such as points with obvious errors, points deviating from the trend, etc.) can also be used as the memory occupation size in the starting process.
Of course, the data characteristic value may also be a median, a mode, etc. of a plurality of sampled data, and the embodiment of the present application does not limit the manner of obtaining the data characteristic value of n sampled data.
The memory occupation size calculated in the embodiment of the present application is used as a size required by a memory when the same application is started later, and in order to avoid inaccuracy of data, the memory occupation size can be considered to belong to an effective data feature value only when the sampled data of the calculated data feature value is relatively concentrated. The sampled data of the calculated data characteristic value may be data after deducting the abnormal data, or data after deducting the maximum value and the minimum value.
As an example, n-time sampled data is first removed by one maximum value and one minimum value, then the standard deviation of n-2 times data (data after removal of the maximum value and the minimum value) is calculated, and in the case where the standard deviation is smaller than the threshold value, n-2 times data is considered as valid data, and then the average value (median, mode, maximum value, etc.) of n-2 times data is calculated. The average value (median, mode, maximum value, etc.) is used as the memory occupation size at the time of starting. Otherwise, the data collected in the starting process is considered as invalid data, and is discarded.
As another example, n-time sampled data is first removed from 3 pieces of abnormal data, then, a standard deviation of n-3 times data (data after removing 3 pieces of abnormal data) is calculated, and in the case where the standard deviation is smaller than a threshold value, n-3 times data is considered as valid data, and then, an average value (median, mode, maximum value, etc.) of n-3 times data is calculated. The average value (median, mode, maximum value, etc.) is used as the memory occupation size at the time of starting. Otherwise, the data collected in the starting process is considered as invalid data, and is discarded.
And S107, the memory size identification module stores the calculated memory occupation size of the application 2 when the application is started this time in a memory. The specific storage process may refer to the related description in the technical architecture shown in fig. 4, which is not described herein.
By the method, the memory occupation size of the application in the starting process can be stored in the memory, and the memory occupation size can be read from the memory as the basis of the memory required by the next starting process when the same application is started next time.
As described above, the memory occupation size obtained according to the sampling data in the application starting process can be used as a basis for the memory required by the same application in the subsequent starting process. Therefore, in the application starting process, not only the process of obtaining the memory occupation size at the time of starting from S101 to S107, but also the process of searching and killing by taking the stored historical memory occupation size as the basis of the memory required size at the time of starting is required.
In view of this, in the embodiment of the present application, S101 to S107 may be used as a procedure executed when the application 2 is started for the 1 st time (or the effective historical memory occupation size is not yet obtained), and since there is no stored historical memory occupation size, only the memory occupation size at the time of starting needs to be sampled, and the procedure of searching and killing using the memory occupation size as the basis of the memory required size is not executed.
In order to more clearly understand the killing manner provided in the embodiments of the present application, reference may be made to step S108 to step S118, which is a killing process when the same application is started next time.
S108, the state monitoring module monitors state change information of the application.
This step may refer to the description of step S101, and will not be described here.
And S109, after the state monitoring module monitors that the application 2 (any application program in the application layer) starts to start, sending starting information to the memory size identification module, wherein the starting information carries the unique identifier of the application 2 which starts to start currently.
The starting information is used for indicating the memory size identification module to sample the memory occupation size of the currently started application 2 in the starting process. The startup information is also used to instruct the memory size identification module to determine whether to execute the checking and killing process based on the historical memory occupation size of the application 2 stored in the memory.
After the application 2 is monitored to be started, the first aspect may refer to steps S110 to S113, where the size of the memory occupied by the application 2 when it is started is required to be obtained as the size of the memory required when it is started this time, so as to determine whether to check and kill the application program currently running in the background.
The second aspect may refer to steps S114 to S118, where S114 to S118 and S103 to S107 are the same, and the memory occupation size in the current startup process of the application 2 needs to be sampled to use the memory occupation size in the current startup process as a basis for checking and killing the application 2 when it is started next time.
In practical applications, the sampling of the memory occupancy is usually performed after the topaticity is started, but in order to avoid affecting the current starting process, the earlier the searching and killing operation is, so, although the two processes may be performed simultaneously as described above, in practical applications, the first aspect may be performed preferentially to the second aspect. Of course, the specific execution sequence (and the completion sequence) is not specifically set, and is based on the result of the internal processing of the system.
S110, the memory size identification module obtains the memory occupation size of the stored application 2 in the historical starting process from the memory.
In this embodiment of the present application, the memory occupation size of the same application at the last start may be used as the memory required size at the present start, and of course, in the case that the sampled data at the last start is invalid data to be discarded, the memory occupation size of the last start may also be used as the memory required size at the present start, and the memory occupation size of the latest storage (which is stored only in the case of valid data) corresponding to the same application may be used as the memory required size at the present start.
In this embodiment of the present application, if the memory stores only the memory occupation size of 1 time of the application 2 history, the memory occupation size of 1 time of the history may be used as the memory required size when the application 2 is started. Of course, in practical application, a value obtained by adding or multiplying the historical memory occupation size for 1 time by a constant (a preset positive number, a preset negative number, a preset number greater than 1 or a preset number smaller than 1) may be used as the memory size required in the current starting.
S111, the memory size identification module acquires the memory residual space from the memory information module.
And S112, the memory size identification module sends the memory occupation size serving as the size required by the memory and the memory residual space to the application checking and killing processing module.
S113, the application checking and killing processing module determines whether to check and kill the application program of the background according to the required size of the memory, the residual space of the memory and the checking and killing waterline. In the embodiment of the application, under the condition that the current memory residual space is smaller than or equal to the memory required size and still larger than the checking and killing waterline, the background application program is not required to be checked and killed.
The water line can be the second water line or the first water line.
As described above, the setting of the second-level water line and the first-level water line can improve the keep-alive rate of some applications with higher keep-alive requirements, so that when the current memory residual space minus the memory required size is smaller than or equal to the second-level water line and the current memory residual space minus the memory required size is larger than the first-level water line, the applications with low keep-alive requirements running in the background need to be killed, and the memory space is released. Under the condition that the current memory residual space is less than or equal to the first-level checking and killing waterline after the memory required size is subtracted, the application programs with high keep-alive requirements running in the background can be killed, and certainly, the application programs with low keep-alive requirements running in the background are killed preferentially during checking and killing.
As an example, the second level water line is 1000MB, the first level water line is 600MB, the remaining memory space is 1200MB, and the size required for application startup is 500MB. Then, under the condition that the current memory residual space (1200 MB) minus the memory required size (500 MB) is smaller than or equal to the secondary checking and killing waterline (1000 MB), and the current memory residual space (1200 MB) minus the memory required size (500 MB) is larger than the primary checking and killing waterline (600 MB), the application program with low keep-alive requirement running in the background needs to be killed, and the memory space is released.
If the application is not checked and killed, the residual memory space is reduced to 700MB in the application starting process, and the residual memory space (700 MB) in the application starting process is smaller than the second-level checking and killing waterline (1000 MB) and larger than the first-level checking and killing waterline (600 MB), so that the checking and killing are needed, and the application program with lower keep-alive requirement running in the background can be killed.
The difference between the residual memory space (700 MB) and the secondary check and kill water line (1000 MB) in the application starting process is 300MB, so that at least 300MB of memory space is required to be released by check and kill.
S114, the state monitoring module monitors the information of the ending of the toppaper startup of the application 2.
S115, after the state monitoring module monitors the information of the ending of the topaticity starting of the application 2, the information of the ending of the topaticity starting is sent to the memory size identification module, and the information of the ending of the topaticity starting can also carry the unique identifier of the application 2.
S116, the memory size identification module samples the memory occupation size of the application 2 currently being started in the starting process, and sampling data of the memory occupation size are obtained.
S117, the memory size identification module obtains the memory occupation size of the application 2 in the starting process according to the sampling data.
S118, the memory size identification module stores the calculated memory occupation size of the application 2 when the application is started this time in a memory.
As described above, in the case where the memory stores only one historical memory footprint of the same application, the memory footprint is taken as the size required by the present memory. Under the condition that a plurality of historical memory occupation sizes of the same application are stored in the memory, the memory required size in the starting time can be calculated based on the plurality of historical memory occupation sizes.
As another example, a data characteristic value based on the memory occupation size at the time of M times of startup stored last historically is used as the memory required size at the time of this startup.
For example, if the application 2 is started for the jth time and the memory stores a plurality of memory occupation sizes, the data characteristic values of the M memory occupation sizes stored latest can be selected as the memory required size at the time of the current start.
The data characteristic values of the M memory occupancy sizes stored at the latest may be the average value of the M memory occupancy sizes stored at the latest. Since the stored memory footprint size is validated data, the maximum and minimum values may no longer be removed from the latest stored M memory footprint sizes.
Of course, the data characteristic value of the latest stored M memory occupancy sizes may also be a weighted average of the latest stored M memory occupancy sizes. When calculating the data characteristic values of M memory occupation sizes stored at the latest, a sliding window filtering algorithm can be adopted.
The sliding window filtering algorithm is to set a sliding block with a constant width (for example, 4) in a data queue formed by a plurality of data, slide the sliding block from left to right (or from right to left) on the data queue, calculate the difference value of the leftmost data and the rightmost data in the sliding block when the sliding block is positioned at different positions of the data queue, find two groups (4) of data with the minimum difference value, and calculate the average value of the two groups (4) of data. If this method is used, at least 5 data (5 memory sizes) are required to be present in the data queue. Therefore, M can be set to be a value larger than or equal to 5, when the number of memory occupied sizes of the same application stored in the memory is larger than or equal to M, M memory occupied sizes stored at the latest are selected, and a sliding window filtering algorithm is adopted to calculate an average value, so that the size required by the memory in the starting time is obtained; if the number of the memory occupied sizes of the same application stored in the memory is smaller than M, selecting all the stored memory occupied sizes, and if the all the memory occupied sizes are larger than or equal to 5, calculating an average value by adopting a sliding window filtering algorithm to obtain the required size of the memory at the time of starting; if the total memory size is less than 5, directly calculating the average value of the total memory occupied size of the stored application.
It can be understood through this step that the memory occupation size of the application at the time of starting is obtained from the memory when the application is started each time, and the memory required size at the time of starting is obtained according to the obtained memory occupation size or sizes stored latest. After the topatity in the starting process is started, the memory occupation size in the starting process is sampled, so that the obtained memory occupation size is stored in a memory for use in the next starting process under the condition that the sampled data are effective data.
In addition, it should be further described that the cold start process of the application is from the start of the system to the completion of the start, so the memory occupation size of the cold start process of the application is relatively stable, and therefore, the embodiment of the application can be applied to the cold start process of the application.
As described above, after acquiring the sampling data in each starting process of the application, obtaining the memory occupation size in the starting process according to the sampling data, and storing the memory occupation size in the starting process of the application in the memory; the latest memory occupation sizes of the application stored in the memory can be obtained when the application is started next time, and then the needed memory size is determined based on the memory occupation sizes. However, the process of determining the size of the memory required based on the plurality of historical memory occupancy sizes requires time, and if the process is set when the application is monitored to be started or in the application starting process, early searching and killing (searching and killing before the memory occupancy size is stable, and timely releasing the memory) during the application starting process is not facilitated, and the starting process of the application may be affected. Therefore, the embodiment of the application can also be set after sampling data is acquired in each starting process of the application (at this time, the topactity of the memory is already started, the memory occupation size is already stable), the memory occupation size in the starting process of the application is obtained according to the sampling data, and the memory occupation size in the starting process of the application is stored in the memory; then, a plurality of memory occupation sizes of the application, which are latest in storage, are obtained, the memory required size at the next starting time is determined based on the memory occupation sizes, and the memory required size is stored in the storage. The method has the advantages that the needed size of the memory can be directly obtained from the memory when the application is started next time, the process of calculating the needed size of the memory according to the occupied sizes of the memories is not executed, time is saved, the application can be checked and killed in advance when the application is started next time (before the occupied size of the memory is stable, the memory can be timely released), and the application can be started quickly. Referring to fig. 7, the other killing process provided in the embodiment of the present application is shown.
S201, a state monitoring module monitors state change information of an application.
S202, after the state monitoring module monitors that the application 2 (any application program in the application layer can also be recorded as a first application) starts to start, starting information is sent to the memory size identification module, and the starting information carries a unique identifier of the application 2 which starts to start currently.
It should be noted that, in an actual application, the information that the application 2 starts to start may be generated by triggering an event monitored by the electronic device, where the event may be any event from the operation of starting the application 2 by the user to the state monitoring module monitoring that the application 2 starts to start. For example, the event may be an operation by which the user clicks an icon of application 2 on the system desktop. For ease of distinction, this event may be denoted as the first event.
S203, the memory size identification module obtains the memory required size in the stored historical starting process of the application 2 from the memory.
S204, the memory size identification module obtains the memory residual space from the memory information module.
S205, the memory size identification module sends the size required by the memory and the remaining memory space to the application checking and killing processing module.
S206, the application checking and killing processing module determines whether to check and kill the application program in the background according to the required size of the memory, the residual space of the memory and the checking and killing waterline.
S207, the state monitoring module monitors the information of the ending of the toppaper startup of the application 2.
S208, after the state monitoring module monitors the information of the ending of the topaticity starting of the application 2, the information of the ending of the topaticity starting is sent to the memory size identification module, and the information of the ending of the topaticity starting can also carry the unique identifier of the application 2.
S209, after receiving the topaticity starting of the application 2 or after the first time, the memory size recognition module samples the memory occupation size of the currently started application 2 in the starting process, and obtains the sampling data of the memory occupation size.
It should be noted that, in this embodiment of the present application, an event that triggers the memory size identification module to sample the memory occupation size of the currently-started application 2 in the starting process may be recorded as a second event, where the second event may be that the topaticity of the application 2 is started, and may also be that a first duration from a timer to the topaticity of the application 2 is started. Of course, in practical application, the second event is an event after the memory occupation size of the application 2 starts to be stable or stable when the application 2 is started, so in practical application, if the memory occupation size of the application 2 is tested to be stable, other events can also be the second event.
S210, the memory size identification module obtains the memory occupation size of the application 2 in the starting process according to the sampling data.
S211, the memory size identification module stores the memory occupation size of the application 2 in the starting process.
S212, the memory size identification module obtains M memory occupation sizes of the latest storage of the application 2 from the memory.
S213, the memory size identification module calculates the memory size required by the next starting based on the latest stored M times of memory occupied sizes.
S214, the memory size identification module stores the memory required size in the next starting time in the memory.
In practical application, the memory size identification module may not store the memory occupation size in the starting process after obtaining the memory occupation size in the starting process according to the sampling data, firstly obtain the latest M-1 times of memory occupation size of the application stored in the memory, and then calculate the memory required size in the next starting process based on the obtained M-1 times of memory occupation size and the memory occupation size in the starting process; and finally, storing the size required by the memory at the next starting and the memory occupation size in the starting process in a memory.
It should be noted that, although the killing process described in steps S203 to S206 precedes the sampling process described in steps S209 to S214, in practical application, the killing process and the sampling process are independent two processes, and there may be a time intersection, for example, the killing process has not yet ended and the sampling process has started.
In addition, in the embodiment of the present application, whether the technical architecture or the division of each module in the above flow may be re-divided, in practical application, a plurality of modules may be combined into one module, and one module may also be split into a plurality of modules.
In addition, the functions implemented by the steps executed by each module may be rearranged, and in practical applications, the steps executed in one module or the functions implemented by the steps executed by the other modules in the above embodiment may also be implemented by other modules.
As another embodiment of the present application, the water line is also adjustable. In practical applications, in order to improve user experience, the starting speed of the application needs to be increased, so that the water line is set higher before the topaticity of the application is started and is reduced by a certain value after the topaticity of the application is started. And when the toppaper startup of the application is monitored to be completed, the water line is adjusted to a second value, and the first value is larger than the second value. By setting the water line for searching and killing higher when the application is started, more memory remains in the system in the application starting process, the system is not busy, and enough resources are allocated to the application being started, so that the speed of starting the application can be improved, and the user experience is further improved.
Of course, in practical application, when there are multiple levels of water lines, the multiple levels of water lines may be set to be higher in the application start process (before the topaticity start is finished) than after the application start is finished (after the topaticity start is finished).
As an example, referring to fig. 8, the secondary water line before the topatity start of the application is finished may be set to 1200MB, the secondary water line after the topatity start of the application is finished is 1000MB, the primary water line before the topatity start of the application is finished is 800MB, and the primary water line after the topatity start of the application is finished is 600MB.
As can be appreciated based on the above examples, the kill threshold (kill watermark) of the electronic device includes a first level threshold (first level kill watermark) and a second level threshold (second level kill watermark), the second level threshold being higher than the first level threshold, the second level threshold including a first threshold and a second threshold, the first level threshold including a third threshold and a fourth threshold.
Before the topactiony is started, if the difference value between the memory residual space and the memory required size of the electronic equipment is smaller than or equal to a first threshold value and larger than a third threshold value, the electronic equipment searches and kills a first type application program running in the background;
If the difference value between the remaining memory space of the electronic device and the memory is smaller than or equal to a third threshold value, the electronic device searches and kills the first type of application program and the second type of application program running in the background, and the keep-alive requirement of the second type of application program is larger than that of the first type of application program.
After the toppaper is started, if the remaining memory space of the electronic device is smaller than or equal to the second threshold and larger than the fourth threshold, the electronic device searches and kills the first type application programs running in the background.
If the memory residual space of the electronic equipment is smaller than or equal to a fourth threshold value, the electronic equipment searches and kills the first type application program and the second type application program which run in the background, and the fourth threshold value is smaller than the third threshold value.
Of course, the above values are merely used as examples, and in practical applications, more levels of the water line may be set according to the memory of the electronic device itself, and other values may be used as the water line.
In practical application, whether topactyy starting of the application is finished or not can be used as a basis for water line checking and killing adjustment, and of course, in practical application, other time nodes in the application starting process can also be used as a basis for water line checking and killing adjustment.
As an example, the method of killing may refer to a flow chart shown in fig. 9.
After the application starts to be started, the electronic equipment acquires the residual space of the memory, the required size of the memory of the started application and a high-value water line for checking and killing; the required size of the memory may be a required size of the memory at startup set in advance for the application, or may be a required size of the memory learned in the above embodiment, for example, a required size of the memory of the application acquired from the memory or a required size of the memory calculated from M memory occupation sizes of the latest stored application acquired from the memory. When only one level of water line is needed, the high-value water line is the water line value before the topactigy of the application is started, and the low-value water line is the water line value after the topactigy of the application is started. When the multi-level water line is present, the high-value water line is the water line value of each level before the topactigy start of the application is completed, and the low-value water line is the water line value of each level after the topactigy start of the application is completed. For example, the high value water lines are 1200MB (the second level water line before the completion of the topactyToxicity startup of the application) and 800MB (the first level water line before the completion of the topactyToxicity startup of the application) in the embodiment shown in FIG. 8; the low value water lines are 1000MB (secondary water line after the topactyy start of the application) and 600MB (primary water line after the topactyy start of the application) in the embodiment shown in fig. 8.
The electronic equipment determines whether the checking and killing can be triggered according to the acquired memory residual space, the memory required size and the high-value checking and killing waterline; for example, an application with a lower need for active kill will be triggered when the memory remaining space minus the memory needed size is less than or equal to the high value secondary kill water line (the secondary kill water line before the topactyStart of the application) and the memory remaining space minus the memory needed size is greater than the high value primary kill water line (the primary kill water line before the topactyStart of the application). Under the condition that the size required by subtracting the memory from the memory residual space is smaller than or equal to the high-value first-stage checking and killing waterline, checking and killing can be triggered, and the application program with higher keeping-alive requirement can be checked and killed.
Of course, in the checking and killing process, whether the residual space of the memory is larger than the high-value checking and killing waterline can be monitored, and if the residual space of the memory is larger than the high-value checking and killing waterline, checking and killing are finished; if the remaining space of the memory is not larger than the high-value checking and killing waterline, continuing checking and killing.
After the topatity of the application is started, the electronic device obtains the remaining space of the memory and the low-value water line.
The electronic device judges whether the remaining space of the memory is larger than a low-value checking and killing waterline so as to determine whether checking and killing can be triggered. For example, in the case where the remaining memory space is less than or equal to the low value secondary water line (the secondary water line after the topagv ty startup of the application) and the remaining memory space is greater than the low value primary water line (the primary water line after the topagv ty startup of the application), the application program with lower need for the keep-alive will be checked and killed will be triggered. Under the condition that the residual space of the memory is smaller than or equal to the low-value first-stage searching and killing waterline, searching and killing can be triggered, and application programs with higher keep-alive requirements can be searched and killed.
Of course, in the checking and killing process, whether the residual space of the memory is larger than the low-value checking and killing waterline can be monitored, and if the residual space of the memory is larger than the low-value checking and killing waterline, checking and killing are finished; if the remaining space of the memory is not larger than the low-value checking and killing waterline, continuing checking and killing.
In practical applications, after it is monitored that an application starts to start, if the memory stores the historical memory usage size of the application or the memory required size determined according to the historical memory usage size, the embodiment shown in fig. 5 or fig. 7 may be executed. If the memory does not store the historical memory usage size of the application or the memory required size determined according to the historical memory usage size, the memory set size (the pre-estimated memory consumption size when the first application is started) set for the application may be obtained, and the embodiment shown in fig. 9 is executed.
Of course, in practical applications, one embodiment of fig. 5 or fig. 7 and the embodiment shown in fig. 9 may also be performed simultaneously. Under the condition that the historical memory occupation size of the application or the memory required size determined according to the historical memory occupation size is stored in a memory, the memory required size is used as a basis for checking and killing, and meanwhile, the scheme of different checking and killing waterlines before and after the topatity of the application is started is executed. The residual space of the memory, the required size of the memory and the high-value checking and killing waterline are taken together as checking and killing basis before the topatity of the application is started; the remaining space of the memory and the low-value checking and killing waterline are used together as checking and killing basis after the topactity of the application is started.
As another embodiment of the present application, reference is made to a timing chart of the killing method shown in fig. 10.
S401, a state monitoring module monitors state change information of an application.
S402, after the state monitoring module monitors that the application 2 (any application program in the application layer) starts to start, starting information is sent to the memory size identification module, and the starting information carries a unique identifier of the application 2 which starts to start currently.
S403, the memory size identification module obtains the memory required size in the stored historical starting process of the application 2 from the memory.
S404, the memory size identification module acquires the memory residual space from the memory information module.
S405, the memory size identification module sends the size required by the memory and the remaining memory space to the application checking and killing processing module.
S406, the application checking and killing processing module determines whether to check and kill the application program in the background according to the required size of the memory, the residual space of the memory and the high-value checking and killing waterline. It should be noted that the water line for killing may also be stored in the memory, and may also be set in an application program to which the processing module for killing is applied. If the data is arranged in the memory, the memory size identification module can acquire the water line to be checked and killed and then send the water line to the application checking and killing processing module, and the application checking and killing processing module can also directly acquire the water line to be checked and killed from the memory.
In practical applications, the killing operation may be instructed by the application killing processing module to other modules, for example, sending a killing instruction to other modules to instruct the other modules to perform the killing operation.
S407, the state monitoring module monitors the information of the ending of the toppaper startup of the application 2.
S408, after the state monitoring module monitors the information of the ending of the topaticity starting of the application 2, the information of the ending of the topaticity starting is sent to the memory size identification module, and the information of the ending of the topaticity starting can also carry the unique identifier of the application 2.
S409, after the memory size identification module receives the starting end information, the memory residual space is obtained from the memory information module.
S410, the memory size identification module sends the memory residual space to the application checking and killing processing module.
S411, the application killing processing module judges whether to trigger killing or not based on the residual space of the memory and the low-value killing waterline.
Of course, if the kill is triggered, the kill will begin.
And S412, the memory size identification module samples the memory occupation size of the application 2 to obtain sampling data at the first time length after receiving the information of the ending of the topaticity starting of the application 2.
S413, the memory size identification module obtains the memory occupation size of the application 2 in the starting process according to the sampling data.
S414, the memory size identification module stores the memory occupation size of the application 2 in the starting process.
S415, the memory size identification module acquires M memory occupation sizes of latest storage of the application 2 from the memory;
s416, the memory size identification module calculates the memory size required by the next starting based on the latest stored M memory occupied sizes.
S417, the memory size identification module stores the size required by the memory when the application 2 is started next time in the memory.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
The embodiments of the present application also provide a computer readable storage medium storing a computer program, where the computer program can implement the steps in the above-mentioned method embodiments when executed by a processor.
Embodiments of the present application also provide a computer program product enabling an electronic device to carry out the steps of the various method embodiments described above when the computer program product is run on the electronic device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a first device, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The embodiments of the present application also provide a chip system, where the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any of the method embodiments of the present application. The chip system can be a single chip or a chip module composed of a plurality of chips.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (16)

1. A method of killing, comprising:
the method comprises the steps that the electronic equipment monitors a first event, wherein the first event is related to the starting of a first application;
the electronic equipment obtains the required size of the memory of the first application when the first application is started, and the required size of the memory is determined by the memory occupation size of the first application when the first application is started in a historical manner;
if the difference value between the remaining space of the memory of the electronic equipment and the required size of the memory is smaller than or equal to a first threshold value, the electronic equipment searches and kills the application programs running in the background;
the electronic equipment monitors a second event, and the second event is related to whether the memory occupation size of the first application is stable or not when the first application is started;
if the remaining memory space of the electronic equipment is smaller than or equal to a second threshold, the electronic equipment searches and kills the application programs running in the background, and the second threshold is smaller than the first threshold;
if the difference between the remaining memory space of the electronic device and the memory is smaller than or equal to a first threshold, the electronic device searches and kills an application program running in the background, including:
if the difference value between the remaining space of the memory of the electronic equipment and the required size of the memory is smaller than or equal to a first threshold value and larger than a third threshold value, the electronic equipment searches and kills the first type of application programs running in the background;
If the difference value between the remaining space of the memory of the electronic device and the required size of the memory is smaller than or equal to the third threshold value, the electronic device searches and kills the first type of application program and the second type of application program running in the background, and the keep-alive requirement of the second type of application program is larger than that of the first type of application program.
2. The method of claim 1, wherein after the electronic device monitors the second event, the method further comprises:
the electronic equipment samples the memory occupation size of the first application to obtain a plurality of sampled data;
the electronic equipment obtains the memory occupation size of the first application when the first application is started at this time according to the plurality of sampling data, stores the memory occupation size of the first application when the first application is started at this time, and the memory occupation size of the first application when the first application is started at this time is used for determining the required size of the memory when the first application is started next time.
3. The method of claim 2, wherein the obtaining, by the electronic device, the memory occupation size of the first application at the current start-up according to the plurality of sampling data includes:
the electronic equipment calculates the data characteristic values of the plurality of sampling data, and the memory occupation size of the first application at the time of starting is the data characteristic values of the plurality of sampling data.
4. The method of claim 3, wherein the computing, by the electronic device, the data characteristic values of the plurality of sampled data comprises:
the electronic equipment removes the maximum value and the minimum value of the plurality of sampling data to obtain a plurality of screening data;
the electronic equipment calculates the data characteristic values of the plurality of screening data, wherein the data characteristic values of the plurality of sampling data are the data characteristic values of the plurality of screening data.
5. The method of claim 4, wherein prior to the electronic device calculating the data characteristic values for the plurality of screening data, the method further comprises:
the electronic equipment calculates standard deviations of the screening data;
the electronic device determines that a standard deviation of the plurality of screening data is less than a first value.
6. The method of claim 2, wherein after the electronic device stores the memory footprint size of the first application at the time of current startup, the method further comprises:
the electronic equipment acquires a plurality of memory occupation sizes belonging to latest storage of the first application;
the electronic equipment performs sliding window filtering on the memory occupation sizes to obtain an average value of the memory occupation sizes, wherein the average value of the memory occupation sizes is the size required by the memory when the first application is started next time.
7. The method of claim 6, wherein prior to sliding window filtering the plurality of memory footprint sizes by the electronic device, the method further comprises:
the electronic device determines that the number of the memory occupation sizes is greater than or equal to 5.
8. The method of claim 7, wherein the method further comprises:
the electronic equipment determines that the number of the memory occupation sizes is smaller than 5;
and the electronic equipment calculates the average value of the memory occupation sizes.
9. The method of any of claims 1 to 8, wherein the first event comprises: an event of a start of the first application; the second event includes: the top Activity of the first application initiates a completed event.
10. The method of claim 1, wherein,
the killing threshold of the electronic equipment comprises a first-level threshold and a second-level threshold, the second-level threshold is higher than the first-level threshold, the second-level threshold comprises the first threshold and the second threshold, and the first-level threshold comprises a third threshold and a fourth threshold.
11. The method of claim 10, wherein if the remaining memory space of the electronic device is less than or equal to the second threshold, the electronic device performs the killing of the application running in the background, including:
If the remaining memory space of the electronic equipment is smaller than or equal to the second threshold value and larger than the fourth threshold value, the electronic equipment searches and kills the first type of application programs running in the background;
if the remaining memory space of the electronic device is smaller than or equal to the fourth threshold, the electronic device searches and kills the first type application program and the second type application program running in the background, and the fourth threshold is smaller than the third threshold.
12. The method of claim 1, wherein before the electronic device obtains the required size of memory of the first application at startup, the method further comprises:
the electronic device determines a size required by a memory in which the first application is stored in the electronic device.
13. The method of claim 1, wherein the method further comprises:
the electronic equipment monitors a first event;
the electronic equipment determines the size required by a memory in which the first application is not stored in the electronic equipment;
the electronic equipment acquires the memory setting size of the first application, wherein the memory setting size of the first application is a memory consumption size which is estimated in advance when the first application is started, the second threshold is smaller than the first threshold, the searching and killing threshold of the electronic equipment comprises a first-level threshold and a second-level threshold, the second-level threshold is higher than the first-level threshold, the second-level threshold comprises the first threshold and the second threshold, and the first-level threshold comprises a third threshold and a fourth threshold;
If the difference value between the remaining memory space of the electronic device and the memory setting size is smaller than or equal to the first threshold value and larger than the third threshold value, the electronic device searches and kills the first type application programs running in the background;
if the difference value between the remaining memory space of the electronic device and the memory setting size is smaller than or equal to the third threshold value, the electronic device searches and kills the first type of application program and the second type of application program running in the background, and the keep-alive requirement of the second type of application program is larger than that of the first type of application program.
14. The method of claim 13, wherein the method further comprises:
after the electronic equipment monitors the second event, if the remaining memory space of the electronic equipment is smaller than or equal to the second threshold and larger than the fourth threshold, the electronic equipment searches and kills the first type application programs running in the background;
if the remaining memory space of the electronic device is smaller than or equal to the fourth threshold, the electronic device searches and kills the first type application program and the second type application program running in the background, and the fourth threshold is smaller than the third threshold.
15. An electronic device comprising a processor for executing a computer program stored in a memory to cause the electronic device to implement the method of any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by one or more processors, implements the method of any of claims 1 to 14.
CN202210986404.7A 2022-08-17 2022-08-17 Searching and killing method, electronic equipment and readable storage medium Active CN115437783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210986404.7A CN115437783B (en) 2022-08-17 2022-08-17 Searching and killing method, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210986404.7A CN115437783B (en) 2022-08-17 2022-08-17 Searching and killing method, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115437783A CN115437783A (en) 2022-12-06
CN115437783B true CN115437783B (en) 2023-08-04

Family

ID=84241705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210986404.7A Active CN115437783B (en) 2022-08-17 2022-08-17 Searching and killing method, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115437783B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824673A (en) * 2016-03-21 2016-08-03 乐视网信息技术(北京)股份有限公司 Method and device for operating application program
CN110221921A (en) * 2019-06-13 2019-09-10 深圳Tcl新技术有限公司 EMS memory management process, terminal and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946486A (en) * 2012-11-20 2013-02-27 惠州Tcl移动通信有限公司 Background application automatic clearing method based on mobile phone and mobile phone
CN105975348A (en) * 2016-05-31 2016-09-28 宇龙计算机通信科技(深圳)有限公司 Memory optimization method, optimization device and terminal
CN107766128B (en) * 2016-08-17 2021-01-29 华为技术有限公司 Method and device for starting application
CN106528216A (en) * 2016-10-26 2017-03-22 深圳市金立通信设备有限公司 Method for starting application and terminal
CN107346285A (en) * 2017-05-26 2017-11-14 郑州云海信息技术有限公司 A kind of method for detecting memory leakage and device
CN112363841B (en) * 2020-11-27 2022-11-04 Oppo(重庆)智能科技有限公司 Application process searching and killing method and device, electronic equipment and storage medium
CN115809139A (en) * 2021-06-16 2023-03-17 荣耀终端有限公司 Memory management method and electronic equipment
CN113626203B (en) * 2021-08-27 2024-02-13 广东九联科技股份有限公司 Memory environment real-time optimization method and system for android system
CN113986559B (en) * 2021-12-24 2022-06-24 荣耀终端有限公司 Memory management method and related device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824673A (en) * 2016-03-21 2016-08-03 乐视网信息技术(北京)股份有限公司 Method and device for operating application program
CN110221921A (en) * 2019-06-13 2019-09-10 深圳Tcl新技术有限公司 EMS memory management process, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN115437783A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
US11244672B2 (en) Speech recognition method and apparatus, and storage medium
EP3813221B1 (en) Battery charging method, battery charging apparatus and storage medium
CN108320751B (en) Voice interaction method, device, equipment and server
CN113448482B (en) Sliding response control method and device of touch screen and electronic equipment
WO2020019858A1 (en) Microphone hole clogging detection method and related products
CN115858046B (en) Method for preloading memory pages, electronic equipment and chip system
CN112423176A (en) Earphone noise reduction method and device, storage medium and noise reduction earphone
CN115437783B (en) Searching and killing method, electronic equipment and readable storage medium
CN114968543A (en) Method for processing document page and related device
CN117135721A (en) Network access method and terminal equipment
CN113905302B (en) Method and device for triggering prompt message and earphone
CN115878500A (en) Memory recovery method and device, electronic equipment and readable storage medium
CN116048679B (en) Layer processing method, electronic equipment and readable storage medium
CN113593563A (en) Voice processing method, remote controller and system
CN113837338A (en) Detection method, terminal, user identification card, electronic equipment and storage medium
CN113011497A (en) Image comparison method and system
CN115562742B (en) Application starting method, electronic device and readable storage medium
CN116707050B (en) Method and device for recording charge and discharge times, electronic equipment and readable storage medium
CN115543470B (en) Application starting method, electronic device and readable storage medium
CN117528333B (en) State detection method and device of ear-wearing type audio equipment, audio equipment and medium
CN116028265B (en) Snapshot acquisition method, electronic equipment and readable storage medium
CN111638897B (en) System updating method, device, terminal equipment and storage medium
CN110972166B (en) Network processing method and device, storage medium and terminal equipment
EP4276622A1 (en) Task scheduling method, electronic device, chip system, and storage medium
CN117130826A (en) Data backup method, electronic equipment, data backup system and 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
GR01 Patent grant
GR01 Patent grant