[go: up one dir, main page]

CN105786670B - A kind of operating system method for restarting and device - Google Patents

A kind of operating system method for restarting and device Download PDF

Info

Publication number
CN105786670B
CN105786670B CN201410806739.1A CN201410806739A CN105786670B CN 105786670 B CN105786670 B CN 105786670B CN 201410806739 A CN201410806739 A CN 201410806739A CN 105786670 B CN105786670 B CN 105786670B
Authority
CN
China
Prior art keywords
memory capacity
application
operating system
electronic equipment
time period
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
CN201410806739.1A
Other languages
Chinese (zh)
Other versions
CN105786670A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201410806739.1A priority Critical patent/CN105786670B/en
Publication of CN105786670A publication Critical patent/CN105786670A/en
Application granted granted Critical
Publication of CN105786670B publication Critical patent/CN105786670B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of operating system method for restarting and device, wherein os starting method, include: the memory size situation of change for obtaining current electronic device, memory size situation of change show in the first time period pace of change of memory size and/or in second time period memory size amplitude of variation;The various applications that run on electronic equipment in this way can show the occupancy situation of memory size with memory volume change situation.When memory size situation of change satisfaction restarts condition, the operating system of electronic equipment is restarted.In operating system restarting process, the data for being stored in memory various applications are also cleaned, to realize that the memory size occupied with reboot operation system to resident applications and system application is cleared up.

Description

Method and device for restarting operating system
Technical Field
The present invention relates to the field of operating system technologies, and in particular, to a method and an apparatus for restarting an operating system.
Background
The android system is an open source code operating system based on Linux and JAVA, which is developed by andylrubin (addi roup) initially, and is led and developed by Google corporation and the open mobile phone alliance after being purchased by Google, and is mainly applicable to portable electronic devices such as mobile phones and tablets.
At present, resident applications in the android system are numerous, such as desktop applications, mobile phone security software and the like, wherein the resident applications are resident memory applications. Usually, the resident application generally has a system authority, and is pre-installed when the electronic device leaves a factory, and a memory expansion phenomenon occurs along with the increase of the resident memory time, so that the available memory capacity of the electronic device is reduced, and the operation of other applications is affected.
However, the current memory cleaning method only aims at applications without system permission, and does not work for the resident applications with system permission, so that a method capable of cleaning the memory capacity occupied by the resident applications is urgently needed at present.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and a device for restarting an operating system, which are used for cleaning up the memory capacity occupied by the resident application and the system application by restarting the operating system. The technical scheme is as follows:
in one aspect, the present invention provides a method for starting an operating system, including:
acquiring the memory capacity change condition of the current electronic equipment, wherein the memory capacity change condition indicates the change speed of the memory capacity in a first time period and/or the change amplitude of the memory capacity in a second time period;
judging whether the memory capacity change condition meets a restarting condition or not, and obtaining a judgment result;
and restarting the operating system of the electronic equipment when the judgment result shows that the memory capacity change condition meets the restarting condition.
Preferably, the method further comprises:
before restarting an operating system of the electronic equipment, recording an application run by the electronic equipment;
starting all or part of the recorded application after the restart of the operating system of the electronic equipment.
Preferably, the method further comprises: recording a volume setting used by the electronic equipment and closing the volume before restarting an operating system of the electronic equipment;
adjusting a volume to the recorded volume setting after a reboot of an operating system of the electronic device.
Preferably, the determining whether the memory capacity change condition meets a restart condition includes:
acquiring the available memory capacity of the current electronic equipment based on the memory capacity change condition;
when the available memory capacity is smaller than the preset memory capacity, acquiring the current running time of the electronic equipment and the application parameters of the stack top application operated by the current electronic equipment;
and when the running time of the electronic equipment is in a restart period and the application parameters of the stack top application indicate that the stack top application is not changed, determining that the memory capacity change condition meets a restart condition.
In another aspect, the present invention further provides an operating system boot apparatus, including:
the device comprises an obtaining unit, a judging unit and a judging unit, wherein the obtaining unit is used for obtaining the memory capacity change condition of the current electronic equipment, and the memory capacity change condition indicates the change speed of the memory capacity in a first time period and/or the change amplitude of the memory capacity in a second time period;
the judging unit is used for judging whether the memory capacity change condition meets a restarting condition or not and obtaining a judging result;
and the control unit is used for restarting an operating system of the electronic equipment when the judgment result shows that the memory capacity change condition meets the restarting condition.
Preferably, the apparatus further comprises:
the first recording unit is used for recording the application run by the electronic equipment before restarting the operating system of the electronic equipment;
the control unit is further configured to start all or part of the recorded applications after the operating system of the electronic device is restarted.
Preferably, the apparatus further comprises: the second recording unit is used for recording the volume setting used by the electronic equipment and closing the volume before restarting the operating system of the electronic equipment;
the control unit is further configured to adjust a volume to the recorded volume setting after a reboot of an operating system of the electronic device.
Preferably, the judging unit includes: the device comprises a first acquisition subunit, a second acquisition subunit and a determination subunit; wherein,
the first obtaining subunit is configured to obtain, based on the memory capacity change condition, an available memory capacity of the current electronic device;
the second obtaining subunit is configured to, when the available memory capacity is smaller than the preset memory capacity, obtain a current operation time of the electronic device and an application parameter of a stack top application that is currently operated by the electronic device;
the determining subunit is configured to determine that the memory capacity change condition meets a restart condition when the operating time of the electronic device is within a restart time period and the application parameter of the top application indicates that the top application is not changed.
According to the technical scheme, the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period are indicated by the change condition of the memory capacity, so that the occupation condition of various applications running on the electronic equipment to the memory capacity can be indicated by the change condition of the memory capacity. And when the memory capacity change condition meets the restart condition, restarting the operating system of the electronic equipment. In the restarting process of the operating system, the data of various applications stored in the memory are also cleaned, so that the resident applications and the memory capacity occupied by the system applications are cleaned by restarting the operating system.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of an operating system reboot method according to an embodiment of the present invention;
FIG. 2 is a flowchart of step 102 of FIG. 1;
fig. 3 is another flowchart of an operating system restarting method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for restarting an operating system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an os reboot apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of the determining unit in FIG. 5;
fig. 7 is a schematic structural diagram of another operating system restarting apparatus according to an embodiment of the present invention.
Detailed Description
The inventor finds that the existing memory cleaning method cannot clean the memory capacity occupied by the resident application and the system application, so that the memory expansion phenomenon occurs when the residence time of the resident application and the system application in the memory is prolonged, the available memory capacity of the electronic equipment is reduced, and the running of other applications is influenced. And the memory is cleared up together in the restarting process of the operating system, so one of the core ideas of the invention is as follows: and cleaning the memory capacity occupied by the resident application and the system application by restarting the operating system.
In order to make those skilled in the art better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an operating system booting method according to an embodiment of the present invention is shown, where the method includes the following steps:
101: acquiring the memory capacity change condition of the current electronic equipment, wherein the memory capacity change condition indicates the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period.
The first time period and the second time period may be the same time period or different time periods, and may be generally determined according to a time interval from a normal memory capacity to a memory expansion phenomenon, and specific values of the first time period and the second time period are not limited in this embodiment of the present invention.
In the embodiment of the present invention, the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period are used to indicate whether the memory capacity changes abruptly in a certain time period. For example, as the resident time of the resident application in the memory increases, a memory expansion phenomenon occurs, which indicates that the memory capacity changes suddenly within a certain period of time.
Further, the memory capacity variation can be represented by an available memory capacity, where the available memory capacity is a remaining memory capacity except for an occupied capacity, and the method is obtained as follows:
available memory capacity R-total memory-memory capacity occupied by system applications-average memory capacity CM occupied by resident applicationsavgAverage memory capacity CM occupied by resident applicationsavgThe statistical period is a time interval for the electronic device to determine whether to automatically restart by using the method for restarting the operating system provided by the embodiment of the present invention, and the statistical period may be a day statistical period or a week statistical period.
In the embodiment of the invention, the average memory capacity CM occupied by the resident applicationavgThe acquisition process comprises the following steps: obtaining memory consumption CM of resident application in each time period Tii nThen to the memory consumption CM of the resident applicationi nAveraging to obtain the average memory capacity CM occupied by the resident applicationavg=average(CMi n). Wherein n is the total number of time periods, i is the ith time period, which is the time for acquiring the memory consumption of the resident application, for example, the time period Ti may be a time period in hours, such as (0-8 o 'clock, 8-12 o' clock, 12-18 o 'clock, 18-0 o' clock), and the memory consumption CM of the resident application in the four time periods is acquiredi n
102: and judging whether the memory capacity change condition meets the restarting condition or not, and obtaining a judgment result.
In the embodiment of the present invention, the restart condition is used to indicate whether the operating system needs to be restarted, and different conditions may be specifically adopted as the restart condition. One possible way of restarting the condition is: when the memory capacity change condition is represented by the available memory capacity, the restart condition may be a preset memory capacity, where the preset memory capacity is a maximum memory capacity occupied by other applications except the system application and the resident application.
When the available memory capacity is not larger than the preset memory capacity, the available memory capacity is indicated to be incapable of meeting the requirements of other applications except the system application and the resident application, and the memory capacity change condition is determined to meet the restarting condition; and when the available memory capacity is larger than the preset memory capacity, the available memory capacity is shown to meet the requirements of other applications except the system application and the resident application, and the memory capacity change condition is determined not to meet the restarting condition.
Another possible way of restarting the condition is: as shown in fig. 2, fig. 2 shows a manner for determining whether a memory capacity change condition meets a restart condition according to an embodiment of the present invention, where the manner may include the following steps:
1021: and acquiring the available memory capacity of the current electronic equipment based on the memory capacity change condition. Wherein the available memory capacity is the available memory capacity R in step 101, and the obtaining manner refers to the related description in step 101, and is not described in detail here.
1022: and when the available memory capacity is smaller than the preset memory capacity, acquiring the running time of the current electronic equipment and the application parameters of the stack top application operated by the current electronic equipment.
In the embodiment of the present invention, the running time is used to indicate the current operating time of the electronic device, and may be obtained from a clock generation circuit in the electronic device. The application parameter is used for indicating a stack top application currently residing on the stack top, and at least comprises an application name of the stack top application, wherein the application name can be acquired by calling a getTopApp () method in an operating system.
1023: when the running time of the electronic equipment is in a restarting period and the application parameters of the stack top application indicate that the stack top application is not changed, determining that the memory capacity change condition meets the restarting condition.
The restart time period may be determined by monitoring a time at which the operating system is manually restarted, and when it is monitored that the operating system is manually restarted a plurality of times at a certain time, a certain time period centered at the certain time is taken as the restart time period. Of course, the restart time period may also be set according to the work and rest habits of the user, and the restart time period is not specifically limited in this embodiment of the present invention.
After the application parameters are acquired, the currently acquired application parameters are compared with the last acquired application parameters to judge whether the stack top application changes. And when the currently acquired application parameters are the same as the last acquired application parameters, indicating that the stack top application is not changed. When the application at the top of the stack is not changed, the user does not operate the electronic equipment, and at the moment, when the running time is determined to be within the restarting time, the memory capacity change condition can be determined to meet the restarting condition.
When the currently acquired application parameters are different from the last acquired application parameters, the change of the stack top application is indicated, and when the change of the stack top application is indicated, a user is indicated to operate the electronic equipment, so that the condition that the memory capacity change condition does not meet the restarting condition is determined.
Fig. 2 illustrates that the available memory capacity, the operating time, and the application parameters of the stack top application currently operating in the electronic device may be used to determine whether the memory capacity change condition meets the restart condition, which may consider both the available memory capacity and the user operation, so that the restart of the operating system can better meet the user requirement, and the probability of restarting the operating system during the operation of the electronic device by the user is reduced.
103: and when the judgment result shows that the memory capacity change condition meets the restart condition, restarting the operating system of the electronic equipment.
When the change condition of the memory capacity meets the restart condition, the change speed of the memory capacity in a first time period is high and/or the change amplitude of the memory capacity in a second time period is large, so that the memory capacity is suddenly changed in a certain time period, the sudden change may cause the memory to expand, at the moment, the memory needs to be cleaned so that the available memory capacity meets the requirements of other applications, and therefore, when the change condition of the memory capacity meets the restart condition, the operating system is restarted.
In the restarting process of the operating system, the data of various applications stored in the memory are also cleaned, so that the resident applications and the memory capacity occupied by the system applications are cleaned by restarting the operating system.
Referring to fig. 3, another flowchart of an operating system restarting method according to an embodiment of the present invention is shown, where the method includes the following steps:
301: acquiring the memory capacity change condition of the current electronic equipment, wherein the memory capacity change condition indicates the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period.
302: and judging whether the memory capacity change condition meets the restarting condition or not, and obtaining a judgment result.
303: and when the judgment result shows that the memory capacity change condition meets the restart condition, restarting the operating system of the electronic equipment.
Wherein step 301 to step 303: similar to steps 101 to 103, steps 301 to 303 are not described in detail in this embodiment of the present invention.
304: before restarting an operating system of the electronic equipment, recording an application run by the electronic equipment.
305: the recorded all or part of the application is started after the operating system of the electronic device is restarted.
During the restart of the operating system, the historical data of each application stored in the memory is cleared, and because the historical data is increased along with the increase of the residence time of the application in the memory, the historical data can not occupy the memory capacity any more after the restart of the operating system, so that all or part of the applications recorded after the restart of the operating system can still clear the memory capacity.
Further, when part of the applications are started, the number of the started applications is smaller than that of the applications for starting all the applications, so that more available memory capacity can be obtained for other applications to use, but the applications before the restart can be started when the operating system is started to restart all the applications automatically, the same applications running on the electronic equipment before and after the restart are ensured, and all the applications residing in the memory can be cleaned automatically under the condition that a user does not know.
Referring to fig. 4, another flowchart of an operating system restarting method according to an embodiment of the present invention is shown, where the method includes the following steps:
401: acquiring the memory capacity change condition of the current electronic equipment, wherein the memory capacity change condition indicates the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period.
402: and judging whether the memory capacity change condition meets the restarting condition or not, and obtaining a judgment result.
403: and when the judgment result shows that the memory capacity change condition meets the restart condition, restarting the operating system of the electronic equipment.
Wherein steps 401 to 403: similar to the above steps 101 to 103, the steps 401 to 403 are not described in detail for this embodiment of the present invention.
404: recording a volume setting used by the electronic device and turning off the volume before restarting an operating system of the electronic device.
405: adjusting the volume to the recorded volume setting after the operating system of the electronic device is restarted.
In embodiments of the present invention, the recorded volume setting may be a volume setting that is commonly used by the user. The volume is adjusted to the recorded volume setting after the operating system is restarted so that the user does not need to manually change the volume setting after the operating system is restarted. Of course, the processing procedure for the volume in the embodiment of the present invention may also be applied to the flowchart shown in fig. 3, and the embodiment of the present invention is not described again.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Corresponding to the above method embodiment, an embodiment of the present invention further provides an operating system restarting apparatus, a schematic structural diagram of which can be shown in fig. 5, including: an acquisition unit 11, a judgment unit 12 and a control unit 13. Wherein,
the obtaining unit 11 is configured to obtain a memory capacity change condition of the current electronic device, where the memory capacity change condition indicates a change speed of the memory capacity in a first time period and/or a change amplitude of the memory capacity in a second time period.
The first time period and the second time period may be the same time period or different time periods, and may be generally determined according to a time interval from a normal memory capacity to a memory expansion phenomenon, and specific values of the first time period and the second time period are not limited in this embodiment of the present invention.
In the embodiment of the present invention, the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period are used to indicate whether the memory capacity changes abruptly in a certain time period. For example, as the resident time of the resident application in the memory increases, a memory expansion phenomenon occurs, which indicates that the memory capacity changes suddenly within a certain period of time.
Further, the memory capacity variation can be represented by an available memory capacity, where the available memory capacity is a remaining memory capacity except for an occupied capacity, and the method is obtained as follows:
available memory capacity R-total memory-memory capacity occupied by system applications-average memory capacity CM occupied by resident applicationsavgAverage memory capacity CM occupied by resident applicationsavgThe statistical period is a time interval for the electronic device to determine whether to automatically restart by using the method for restarting the operating system provided by the embodiment of the present invention, and the statistical period may be a day statistical period or a week statistical period.
In the embodiment of the invention, the average memory capacity CM occupied by the resident applicationavgThe acquisition process comprises the following steps: obtaining memory consumption CM of resident application in each time period Tii nThen to the memory consumption CM of the resident applicationi nAveraging to obtain the average memory capacity CM occupied by the resident applicationavg=average(CMi n). Wherein n is the total number of time periods, i is the ith time period, which is the time for acquiring the memory consumption of the resident application, for example, the time period Ti may be a time period in hours, such as (0-8 o 'clock, 8-12 o' clock, 12-18 o 'clock, 18-0 o' clock), and the memory consumption CM of the resident application in the four time periods is acquiredi n
And the judging unit 12 is configured to judge whether the memory capacity change condition meets a restart condition, and obtain a judgment result.
In the embodiment of the present invention, the restart condition is used to indicate whether the operating system needs to be restarted, and different conditions may be specifically adopted as the restart condition. One possible way of restarting the condition is: when the memory capacity change condition is represented by the available memory capacity, the restart condition may be a preset memory capacity, where the preset memory capacity is a maximum memory capacity occupied by other applications except the system application and the resident application.
When the available memory capacity is not larger than the preset memory capacity, the available memory capacity is indicated to be incapable of meeting the requirements of other applications except the system application and the resident application, and the memory capacity change condition is determined to meet the restarting condition; and when the available memory capacity is larger than the preset memory capacity, the available memory capacity is shown to meet the requirements of other applications except the system application and the resident application, and the memory capacity change condition is determined not to meet the restarting condition.
Another possible way of restarting the condition is: adding other conditions on the basis of the preset memory capacity, specifically referring to the schematic structural diagram of the determining unit 12 shown in fig. 6, the determining unit 12 may include: a first acquisition subunit 121, a second acquisition subunit 122 and a determination subunit 123. Wherein,
the first obtaining subunit 121 is configured to obtain an available memory capacity of the current electronic device based on a memory capacity change condition. Wherein the available memory capacity is the available memory capacity R in step 101, and the obtaining manner refers to the related description in step 101, and is not described in detail here.
The second obtaining subunit 122 is configured to, when the available memory capacity is smaller than the preset memory capacity, obtain the operation time of the current electronic device and an application parameter of a stack top application operated by the current electronic device. In the embodiment of the present invention, the running time is used to indicate the current operating time of the electronic device, and may be obtained from a clock generation circuit in the electronic device. The application parameter is used for indicating a stack top application currently residing on the stack top, and at least comprises an application name of the stack top application, wherein the application name can be acquired by calling a getTopApp () method in an operating system.
The determining subunit 123 is configured to determine that the memory capacity change condition meets a restart condition when the running time of the electronic device is within a restart time period and the application parameter of the top-of-stack application indicates that the top-of-stack application is not changed.
The restart time period may be determined by monitoring a time at which the operating system is manually restarted, and when it is monitored that the operating system is manually restarted a plurality of times at a certain time, a certain time period centered at the certain time is taken as the restart time period. Of course, the restart time period may also be set according to the work and rest habits of the user, and the restart time period is not specifically limited in this embodiment of the present invention.
After the application parameters are acquired, the currently acquired application parameters are compared with the last acquired application parameters to judge whether the stack top application changes. And when the currently acquired application parameters are the same as the last acquired application parameters, indicating that the stack top application is not changed. When the application at the top of the stack is not changed, the user does not operate the electronic equipment, and at the moment, when the running time is determined to be within the restarting time, the memory capacity change condition can be determined to meet the restarting condition.
When the currently acquired application parameters are different from the last acquired application parameters, the change of the stack top application is indicated, and when the change of the stack top application is indicated, a user is indicated to operate the electronic equipment, so that the condition that the memory capacity change condition does not meet the restarting condition is determined.
Fig. 2 illustrates that the available memory capacity, the operating time, and the application parameters of the stack top application currently operating in the electronic device may be used to determine whether the memory capacity change condition meets the restart condition, which may consider both the available memory capacity and the user operation, so that the restart of the operating system can better meet the user requirement, and the probability of restarting the operating system during the operation of the electronic device by the user is reduced.
And the control unit 13 is configured to restart the operating system of the electronic device when the determination result indicates that the memory capacity change condition meets the restart condition.
When the change condition of the memory capacity meets the restart condition, the change speed of the memory capacity in a first time period is high and/or the change amplitude of the memory capacity in a second time period is large, so that the memory capacity is suddenly changed in a certain time period, the sudden change may cause the memory to expand, at the moment, the memory needs to be cleaned so that the available memory capacity meets the requirements of other applications, and therefore, when the change condition of the memory capacity meets the restart condition, the operating system is restarted.
In the restarting process of the operating system, the data of various applications stored in the memory are also cleaned, so that the resident applications and the memory capacity occupied by the system applications are cleaned by restarting the operating system.
Referring to fig. 7, another structural diagram of an operating system restart apparatus according to an embodiment of the present invention is shown, and on the basis of fig. 5, the operating system restart apparatus may further include: the first recording unit 14 is configured to record an application run by the electronic device before restarting an operating system of the electronic device. The corresponding control unit 13 is also used to start all or part of the recorded applications after the operating system of the electronic device is restarted.
During the restart of the operating system, the historical data of each application stored in the memory is cleared, and because the historical data is increased along with the increase of the residence time of the application in the memory, the historical data can not occupy the memory capacity any more after the restart of the operating system, so that all or part of the applications recorded after the restart of the operating system can still clear the memory capacity.
Further, when part of the applications are started, the number of the started applications is smaller than that of the applications for starting all the applications, so that more available memory capacity can be obtained for other applications to use, but the applications before the restart can be started when the operating system is started to restart all the applications automatically, the same applications running on the electronic equipment before and after the restart are ensured, and all the applications residing in the memory can be cleaned automatically under the condition that a user does not know.
In addition, the operating system restart apparatus provided above may further include: and the second recording unit is used for recording the volume setting used by the electronic equipment and closing the volume before restarting the operating system of the electronic equipment. The control unit 13 adjusts the volume to the recorded volume setting after the operating system of the electronic device is restarted.
In embodiments of the present invention, the recorded volume setting may be a volume setting that is commonly used by the user. The volume is adjusted to the recorded volume setting after the operating system is restarted so that the user does not need to manually change the volume setting after the operating system is restarted.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and the device for restarting the operating system provided by the invention are described in detail above, a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. An operating system boot method, comprising:
acquiring the memory capacity change condition of the current electronic equipment, wherein the memory capacity change condition indicates the change speed of the memory capacity in a first time period and/or the change amplitude of the memory capacity in a second time period, the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period are used for indicating whether the memory capacity is suddenly changed in a certain time period, and the sudden change of the memory capacity in the certain time period indicates that the resident application and the system application have a memory expansion phenomenon;
judging whether the memory capacity change condition meets a restarting condition or not, and obtaining a judgment result;
and restarting the operating system of the electronic equipment to clear the memory capacity of the electronic equipment occupied by the resident application and the system application when the judgment result shows that the memory capacity change condition meets the restarting condition.
2. The method of claim 1, further comprising:
before restarting an operating system of the electronic equipment, recording an application run by the electronic equipment;
starting all or part of the recorded application after the restart of the operating system of the electronic equipment.
3. The method according to claim 1 or 2, characterized in that the method further comprises: recording a volume setting used by the electronic equipment and closing the volume before restarting an operating system of the electronic equipment;
adjusting a volume to the recorded volume setting after a reboot of an operating system of the electronic device.
4. The method of claim 1, wherein determining whether the memory capacity change condition satisfies a reboot condition comprises:
acquiring the available memory capacity of the current electronic equipment based on the memory capacity change condition;
when the available memory capacity is smaller than a preset memory capacity, acquiring the current running time of the electronic equipment and the application parameters of the stack top application operated by the current electronic equipment;
and when the running time of the electronic equipment is in a restart period and the application parameters of the stack top application indicate that the stack top application is not changed, determining that the memory capacity change condition meets a restart condition.
5. An operating system boot apparatus, comprising:
the device comprises an obtaining unit, a judging unit and a judging unit, wherein the obtaining unit is used for obtaining the memory capacity change condition of the current electronic equipment, the memory capacity change condition indicates the change speed of the memory capacity in a first time period and/or the change amplitude of the memory capacity in a second time period, the change speed of the memory capacity in the first time period and/or the change amplitude of the memory capacity in the second time period are used for indicating whether the memory capacity is suddenly changed in a certain time period, and the sudden change of the memory capacity in the certain time period represents that the resident application and the system application have a memory expansion phenomenon;
the judging unit is used for judging whether the memory capacity change condition meets a restarting condition or not and obtaining a judging result;
and the control unit is used for restarting the operating system of the electronic equipment when the judgment result shows that the memory capacity change condition meets the restarting condition so as to clear the memory capacity of the electronic equipment occupied by the resident application and the system application.
6. The apparatus of claim 5, further comprising:
the first recording unit is used for recording the application run by the electronic equipment before restarting the operating system of the electronic equipment;
the control unit is further configured to start all or part of the recorded applications after the operating system of the electronic device is restarted.
7. The apparatus of claim 5 or 6, further comprising: the second recording unit is used for recording the volume setting used by the electronic equipment and closing the volume before restarting the operating system of the electronic equipment;
the control unit is further configured to adjust a volume to the recorded volume setting after a reboot of an operating system of the electronic device.
8. The apparatus according to claim 5, wherein the judging unit includes: the device comprises a first acquisition subunit, a second acquisition subunit and a determination subunit; wherein,
the first obtaining subunit is configured to obtain, based on the memory capacity change condition, an available memory capacity of the current electronic device;
the second obtaining subunit is configured to, when the available memory capacity is smaller than a preset memory capacity, obtain a current operation time of the electronic device and an application parameter of a stack top application that is currently operated by the electronic device;
the determining subunit is configured to determine that the memory capacity change condition meets a restart condition when the operating time of the electronic device is within a restart time period and the application parameter of the top application indicates that the top application is not changed.
CN201410806739.1A 2014-12-22 2014-12-22 A kind of operating system method for restarting and device Active CN105786670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410806739.1A CN105786670B (en) 2014-12-22 2014-12-22 A kind of operating system method for restarting and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410806739.1A CN105786670B (en) 2014-12-22 2014-12-22 A kind of operating system method for restarting and device

Publications (2)

Publication Number Publication Date
CN105786670A CN105786670A (en) 2016-07-20
CN105786670B true CN105786670B (en) 2019-06-25

Family

ID=56385480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410806739.1A Active CN105786670B (en) 2014-12-22 2014-12-22 A kind of operating system method for restarting and device

Country Status (1)

Country Link
CN (1) CN105786670B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581014B (en) * 2020-03-30 2024-03-22 中国建设银行股份有限公司 Method and device for restarting automatic control host and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873616A (en) * 2010-06-21 2010-10-27 宇龙计算机通信科技(深圳)有限公司 Mobile terminal self-check method and system and mobile terminal
CN103856615A (en) * 2012-12-04 2014-06-11 赛龙通信技术(深圳)有限公司 Method for displaying dynamic variation data of state parameters of mobile phone

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999026121A2 (en) * 1997-11-13 1999-05-27 Hyperspace Communications, Inc. File transfer system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873616A (en) * 2010-06-21 2010-10-27 宇龙计算机通信科技(深圳)有限公司 Mobile terminal self-check method and system and mobile terminal
CN103856615A (en) * 2012-12-04 2014-06-11 赛龙通信技术(深圳)有限公司 Method for displaying dynamic variation data of state parameters of mobile phone

Also Published As

Publication number Publication date
CN105786670A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
US8832592B2 (en) Apparatus and method for loading application of portable device
CN105468409A (en) Application program closing method and device and electronic equipment
EP3186742B1 (en) System and method for improved security for a processor in a portable computing device (pcd)
CN104503828B (en) A kind of process management method and terminal
TWI628588B (en) System, method and terminal for cleaning memory
US20130254527A1 (en) Bios firmware updating method and electronic device
CN105446776A (en) Application program closing method and device and electronic equipment
US20140143477A1 (en) Computer system and data recovery method thereof
CN111580445B (en) Electrical equipment operation switching method and device, electronic equipment and storage medium
KR101934378B1 (en) Computer system having the hazard protection, and method thereof
WO2014201770A1 (en) Application migration method, device and system for mobile terminal
CN107506244B (en) CPU scheduling method, mobile terminal and CPU scheduling system
CN105260655A (en) Application program starting protection method, device and system
EP3128789A1 (en) Method, device and mobile terminal for reducing power consumption
US9582069B2 (en) Electronic apparatus and wake-up method thereof
CN105786670B (en) A kind of operating system method for restarting and device
US9411602B2 (en) Techniques for booting an information processing system
CN107924303B (en) Electronic equipment
CN107943259B (en) Power failure reset method and device based on VxWorks system
US20200192761A1 (en) Load and Save Recovery Partition Using Mobile Device
CN112087353B (en) Function recommendation method of equipment, cloud server and storage medium
CN105653992B (en) Switching control method, device and mobile terminal of mobile terminal
EP3977821B1 (en) Providing a notification for a lighting device without user-specified power-switch behavior
CN106855824B (en) Task stopping method and device and electronic equipment
WO2018053916A1 (en) Application download method, device and terminal, and computer storage medium

Legal Events

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