Summary of the invention
In order to solve the problems of the technologies described above at least, the invention provides a kind of method and apparatus that the operating-system resources of electronic equipment is cleared up of being used for.
According to first aspect present invention, a kind of method that the operating-system resources of electronic equipment is cleared up of being used for is provided, comprising:
Judge whether said electronic equipment is in predefined state;
Be at said electronic equipment under the situation of said predefined state, utilize the moving of the said electronic equipment of gravity sensor sensing of said electronic equipment whether to satisfy predefined condition;
Satisfy under the situation of said predefined condition said moving, the operating-system resources of said electronic equipment is cleared up; And
The result's of the said cleaning of output reflection information on said electronic equipment.
Preferably; Said method also comprises: be at said electronic equipment under the situation of said predefined state; Before whether the displacement of the said electronic equipment of gravity sensor sensing that utilizes said electronic equipment satisfies the step of predefined condition; Judge that whether said gravity sensor is registered, if having not yet registered, then registers.
Preferably; Said predefined state comprises: the screen of said electronic equipment opened and the situation of release under, the desktop state of the operating system of said electronic equipment, the application program that is used for said operating-system resources is cleared up state, the application list interfacial state of said operating system and the system's setup menu state in the said operating system when said operating system front stage operation.
Preferably, said predefined condition is: said electronic equipment reciprocatingly moves, and in the unit interval, the initial acceleration that said electronic equipment one way moves surpasses predefined number of times greater than the number of times of threshold acceleration.
Preferably, said moving back and forth is moving back and forth of carrying out in any direction at any angle of said electronic equipment.
Preferably, said threshold acceleration is to confirm according to maximum initial acceleration and predefined coefficient that the present one way of said electronic equipment moves.
Preferably; Wherein said predefined condition is: said electronic equipment reciprocatingly moves along reciprocal first direction and second direction; And in the unit interval, the initial acceleration that said electronic equipment moves along the first direction one way surpasses predefined number of times greater than the number of times of first direction threshold acceleration and the initial acceleration that moves along the second direction one way greater than the number of times sum of second direction threshold acceleration; And/or the initial acceleration that moves greater than the number of times of first direction threshold acceleration with along the second direction one way of the initial acceleration that moves along the first direction one way greater than the number of times of second direction threshold acceleration respectively greater than predefined first number and predefined second number.
Preferably, wherein said predefined condition is:
(1) said electronic equipment reciprocatingly moves along reciprocal first direction and second direction; And
(2) suppose that initial acceleration that said electronic equipment moves along the first direction one way is situation a greater than the situation of first direction threshold acceleration; Suppose that initial acceleration that said electronic equipment moves along the second direction one way is situation b greater than the situation of second direction threshold acceleration; In the unit interval; The summation of the number of times of the number of times of situation a and situation b surpasses predefined number of times; Wherein occurring twice continuously or when more times situation a or twice or more times situation b, in said summation, only counting situation a or situation b for the first time for the first time; And/or
(3) number of times of the number of times of situation a and situation b is respectively greater than predefined first number and predefined second number; Wherein occurring twice continuously or when more times situation a or twice or more times situation b, in the number of times of the number of times of said situation a or situation b, only counting situation a or situation b for the first time for the first time.
Preferably; Said first direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the first direction one way moves according to said electronic equipment, and said second direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the second direction one way moves according to said electronic equipment.
Preferably; Under said threshold acceleration, said first direction threshold acceleration or the situation of said second direction threshold acceleration less than predefined minimum acceleration, with said predefined minimum acceleration as said threshold acceleration, said first direction threshold acceleration or said second direction threshold acceleration.
The step of preferably, the operating-system resources of said electronic equipment being cleared up comprises: cleaning is at the process of said operating system running background and the garbage files in the said operating system.
Preferably, said method also comprises: in the said step that moves under the situation that satisfies said predefined condition, the operating-system resources of said electronic equipment is cleared up, the expression cleaning is carried out on said electronic equipment.
Preferably, said method also comprises: in the step of the result's of the said cleaning of output reflection information, output reflects the information of the situation that said electronic equipment moves on said electronic equipment on said electronic equipment.
Preferably; The information that reflects the result of said cleaning is first exponential quantity that the size according to the quantity of the process of being cleared up and garbage files calculates, and the information that reflects the situation that said electronic equipment moves is second exponential quantity that number of times that the maximum initial acceleration that moves according to said electronic equipment one way and said electronic equipment move back and forth calculates.
Preferably, said method also comprises: be not at said electronic equipment under the situation of said predefined state, judge whether said gravity sensor is registered, if register, then said gravity sensor is nullified.
According to second aspect present invention, a kind of device that the operating-system resources of electronic equipment is cleared up of being used for is provided, comprising:
Judge module is used to judge whether said electronic equipment is in predefined state;
Sensing module is used for being under the situation of said predefined state at said electronic equipment, utilizes the moving of the said electronic equipment of gravity sensor sensing of said electronic equipment whether to satisfy predefined condition;
The cleaning module is used for satisfying under the situation of said predefined condition said moving, and the operating-system resources of said electronic equipment is cleared up; And
First information output module is used on said electronic equipment the result's of the said cleaning of output reflection information.
Preferably; Said device also comprises: Registering modules; Be used under said electronic equipment is in the situation of said predefined state, utilize before whether the displacement of the said electronic equipment of gravity sensor sensing of said electronic equipment satisfy predefined condition at said sensing module; Judge that whether said gravity sensor is registered, if having not yet registered, then registers.
Preferably; Said predefined state comprises: the screen of said electronic equipment opened and the situation of release under, the desktop state of the operating system of said electronic equipment, the application program that is used for said operating-system resources is cleared up state, the application list interfacial state of said operating system and the system's setup menu state in the said operating system when said operating system front stage operation.
Preferably, said predefined condition is: said electronic equipment reciprocatingly moves, and in the unit interval, the initial acceleration that said electronic equipment one way moves surpasses predefined number of times greater than the number of times of threshold acceleration.
Preferably, said moving back and forth is moving back and forth of carrying out in any direction at any angle of said electronic equipment.
Preferably, said threshold acceleration is to confirm according to maximum initial acceleration and predefined coefficient that the present one way of said electronic equipment moves.
Preferably; Said predefined condition is: said electronic equipment reciprocatingly moves along reciprocal first direction and second direction; And in the unit interval, the initial acceleration that said electronic equipment moves along the first direction one way surpasses predefined number of times greater than the number of times of first direction threshold acceleration and the initial acceleration that moves along the second direction one way greater than the number of times sum of second direction threshold acceleration; And/or the initial acceleration that moves greater than the number of times of first direction threshold acceleration with along the second direction one way of the initial acceleration that moves along the first direction one way greater than the number of times of second direction threshold acceleration respectively greater than predefined first number and predefined second number.
Preferably, said predefined condition is:
(1) said electronic equipment reciprocatingly moves along reciprocal first direction and second direction; And
(2) suppose that initial acceleration that said electronic equipment moves along the first direction one way is situation a greater than the situation of first direction threshold acceleration; Suppose that initial acceleration that said electronic equipment moves along the second direction one way is situation b greater than the situation of second direction threshold acceleration; In the unit interval; The summation of the number of times of the number of times of situation a and situation b surpasses predefined number of times; Wherein occurring twice continuously or when more times situation a or twice or more times situation b, in said summation, only counting situation a or situation b for the first time for the first time; And/or
(3) number of times of the number of times of situation a and situation b is respectively greater than predefined first number and predefined second number; Wherein occurring twice continuously or when more times situation a or twice or more times situation b, in the number of times of the number of times of said situation a or situation b, only counting situation a or situation b for the first time for the first time.
Preferably; Said first direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the first direction one way moves according to said electronic equipment, and said second direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the second direction one way moves according to said electronic equipment.
Preferably; Under said threshold acceleration, said first direction threshold acceleration or the situation of said second direction threshold acceleration less than predefined minimum acceleration, with said predefined minimum acceleration as said threshold acceleration, said first direction threshold acceleration or said second direction threshold acceleration.
Preferably, satisfy under the situation of said predefined condition said moving, said cleaning module cleaning is at the process of said operating system running background and the garbage files in the said operating system.
Preferably; Said device also comprises representation module; Be used for when saidly moving under the situation satisfy said predefined condition, said cleaning module clears up the operating-system resources of said electronic equipment, the expression cleaning is carried out on said electronic equipment.
Preferably; Said device also comprises: second message output module; Be used for said first information output module is exported the result's who reflects said cleaning information on said electronic equipment when the information of the situation that the said electronic equipment of output reflection moves on said electronic equipment.
Preferably; The information that reflects the result of said cleaning is first exponential quantity that the size according to the quantity of the process of being cleared up and garbage files calculates, and the information that reflects the situation that said electronic equipment moves is second exponential quantity that number of times that the maximum initial acceleration that moves according to said electronic equipment one way and said electronic equipment move back and forth calculates.
Preferably, said device also comprises: nullify module, be used for not being under the situation of said predefined state at said electronic equipment, judge whether said gravity sensor is registered, if register, then said gravity sensor is nullified.
The invention provides a kind of method and apparatus that the operating-system resources of electronic equipment is cleared up of being used for.According to embodiments of the invention; The user can clear up at the process of the operating system running background of electronic equipment and the garbage files in the operating system through shaking this directly perceived, simple mode of electronic equipment; And need not in being exclusively used in the application program of cleaning, to carry out complicated operations, this has greatly improved user experience.Even if the user (particularly old man and child) that operating experience is abundant inadequately also can easily accomplish the cleaning to operating-system resources, thereby accelerate the travelling speed of electronic equipment, the electric power that expends when reducing the electronic equipment operation and make the user obtain more available memory space.
Embodiment
In following detailed description, in order to explain and the purpose of example, several details are described, so that the complete understanding for each embodiment is provided.Yet, for those of ordinary skills, can not have to realize these embodiment under the situation of these details.The component names that uses in the following description only is for easy explanation, rather than in order to carry out any restriction.
Fig. 1 is the process flow diagram of the method that is used for according to an embodiment of the invention the operating-system resources of electronic equipment is cleared up.According to embodiments of the invention, said electronic equipment includes but not limited to be equipped with the following electronic equipment of operating system: portable computing devices such as mobile phone, panel computer, notebook, navigating instrument, audio frequency and/or video player, radio, mobile TV, multifunctional remote controlller; Fixed computing equipments such as desk-top computer, mainframe computer, printer, facsimile recorder, duplicating machine, all-in-one multifunctional machine, STB, public information query facility, interaction of multimedia information equipment; And other is equipped with the electronic equipment of operating system.
Hereinafter; With the electronic equipment that Android operating system is installed is example; Principle of the present invention is carried out exemplary description; Yet this description only is exemplary, and scope of the present invention is not limited to this, and principle of the present invention also goes for being equipped with the electronic equipment of other operating system (for example Linux, iOS, Window Phone, Symbian etc.).
Referring to Fig. 1,, at the beginning, in step S101, judge whether said electronic equipment is in predefined state in the method that is used for according to an embodiment of the invention the operating-system resources of electronic equipment is cleared up.
According to embodiments of the invention; Said predefined state comprises: the screen of said electronic equipment opened and the situation of release under, the desktop state of the operating system of said electronic equipment, the application program that is used for said operating-system resources is cleared up state, the application list interfacial state of said operating system and the system's setup menu state in the said operating system when said operating system front stage operation.
In above-mentioned steps S101; At first judge the on off state of electronic equipment screen; In Android operating system; (Application Programming Interface API) (is used to call the correlation technique of corresponding POWER SERVICE service) and judges that screen is to open or close for example can to pass through PowerManager related application DLL.Then; Judge whether said electronic equipment is in the screen locking state; In Android operating system; For example can judge whether this electronic equipment is in the screen locking state through KeyguardManager related application DLL (being used to call the correlation technique of corresponding KEYGUARD SERVICE service); And in the Android system, installed under the situation of third party's screen locking software, then to combine ActivityManager related application DLL (being used to call the correlation technique of corresponding ACTIVITY SERVICE service) to come the screen locking state is judged.Then; Judge whether to be in the desktop state of Android system, state, the application list interfacial state of system and the system setup menu state in system of application program when system's front stage operation that is used for clearing up again, this judgement can be carried out according to the habitual mechanism that is applicable to the Android system.To judge whether that being in desktop state is example; At first seek the bag name at " android.intent.action.MAIN " place of all activity that are claimed as Home through API PackageManager; Obtain a bag list of file names; Obtain the application program that all belong to desktop; Obtain the bag name of the topActivity among the RunningTasks then through API ActivityManager, if this bag name before in the bag list of file names that obtains, just can think the current desktop state that is in.
Above-mentioned predefined state is and is fit to carry out the state according to cleaning of the present invention, and the purpose of carrying out the judgement among the step S101 is to prevent under other unaccommodated state, to clear up, and influences the normal running of system or other application program.
According to embodiments of the invention; When in step S101, judging under the situation that said electronic equipment is in said predefined state; Can execution in step S102: whether the gravity sensor of judging said electronic equipment be registered, if having not yet registered, then registers; And when in step S101, judging under the situation that said electronic equipment is not in said predefined state, can execution in step S102 ': judge whether said gravity sensor has been registered,, then said gravity sensor is nullified if registered.Fig. 2 is the FB(flow block) of each step of method of being used for according to an embodiment of the invention the operating-system resources of electronic equipment is cleared up, and it has represented the relation between the steps such as step S101, step S102, step S102 '.
Because in subsequent step according to technical scheme of the present invention; Need utilize gravity sensor to come the mobile sensing that carries out to electronic equipment; Therefore when in step S101, judging under the situation that said electronic equipment is in said predefined state, the gravity sensor that has not yet registered is registered.And for fear of meaningless power consumption under the situation that need not register gravity sensor; When in step S101, judging under the situation that said electronic equipment is not in said predefined state; Gravity sensor to having registered is nullified; This cancellation occurs in before the registration generation of other application program to gravity sensor, therefore can not influence the normal use of other program to gravity sensor.
Next, in step S103, be at said electronic equipment under the situation of said predefined state, utilize the moving of the said electronic equipment of gravity sensor sensing of said electronic equipment whether to satisfy predefined condition.According to embodiments of the invention, said predefined condition is: said electronic equipment reciprocatingly moves, and in the unit interval, the initial acceleration that said electronic equipment one way moves surpasses predefined number of times greater than the number of times of threshold acceleration.
Specifically; When said electronic equipment screen has been opened and release; And under the situation of state, the application list interfacial state or system's setup menu state of the application program that be in desktop state, is used to clear up when system's front stage operation; Utilize said gravity sensor to come the mobile sensing that carries out to said electronic equipment, said mobile for example user causes with hand moving (rocking) said electronic equipment.Reciprocatingly move when said gravity sensor senses said electronic equipment, and in the unit interval, the initial acceleration that said electronic equipment one way moves surpasses predefined number of times greater than the number of times of threshold acceleration, has just satisfied said predefined condition.
According to embodiments of the invention; Said moving back and forth is moving back and forth of carrying out in any direction at any angle of said electronic equipment, and said threshold acceleration is to confirm according to maximum initial acceleration and predefined coefficient that the present one way of said electronic equipment moves.
Below; Use palmistry vertically to grip electronic equipment and the electronic equipment that on direction parallel to the ground relatively, rocks from side to side is described as example with the user for ground; Yet this only is an example; As indicated above, the present invention can be applied to the situation that said electronic equipment moves back and forth in any direction at any angle.
For instance, suppose that said predefined condition is: in 1 second, the initial acceleration that said electronic equipment one way moves is greater than the number of times (that is, more than or equal to five times) above four times of threshold acceleration.For example, the user shakes electronic equipment to the right earlier, shakes left then, and then shakes to the right, and then shake left, and the rest may be inferred.Be merely example with four times as said predefined number of times, this number of times can be set according to actual needs, also can according to operating habit this number of times be set by the user.When this predefined number of times was big, said predefined condition is difficult to be satisfied, and the possibility of maloperation simultaneously is also less; And when this predefined number of times hour, said predefined condition is easier to satisfy, the possibility of while maloperation is also bigger.
According to embodiments of the invention, said threshold acceleration for example can be the maximum initial acceleration that moves of the present one way of said electronic equipment and the product of predefined coefficient.Suppose that said predefined coefficient is 0.75, this coefficient value is merely example, and the value of this coefficient can be set according to actual needs, and the value of this coefficient also can be set according to operating habit by the user.When this predefined coefficient value was big, said predefined condition is difficult to be satisfied, and the possibility of maloperation simultaneously is also less; And when this predefined coefficient value hour, said predefined condition is easier to satisfy, the possibility of while maloperation is also bigger.
According to embodiments of the invention, when supposing to shake electronic equipment repeatedly about the user is on direction parallel to the ground relatively, the initial acceleration that each time shaken in 1 second is respectively:
(1) shakes to the right for the first time: 9m/s
2
(2) shake left for the first time: 10m/s
2
(3) shake to the right for the second time: 7m/s
2
(4) shake left for the second time: 8m/s
2
(5) shake to the right for the third time: 6.8m/s
2
(6) shake left for the third time: 11m/s
2
Shake to the right for (7) the 4th times: 10m/s
2
Shake left for (8) the 4th times: 8m/s
2
Suppose that (1) shakes for the first time as once shaking of beginning most to the right and do not add up, do not judge that promptly whether its initial acceleration is greater than threshold acceleration interior.After shake for the first time (1), obtained maximum initial acceleration-9m/s that present one way moves to the right
2, be that threshold acceleration at this moment is 9m/s under 0.75 the situation at said predefined coefficient
2* 0.75=6.75m/s
2
Because the initial acceleration that shake left for the first time (2) is 10m/s
2, it is greater than 6.75m/s
2, so this is for the first time to have satisfied initial acceleration that the electronic equipment one way the moves condition greater than threshold acceleration.At this moment, at present the maximum initial acceleration that moves of one way is 10m/s
2, threshold acceleration also becomes 7.5m/s
2
Because the initial acceleration that shake to the right for the second time (3) is 7m/s
2,, therefore do not satisfy the condition of initial acceleration greater than threshold acceleration less than threshold acceleration.
Because the initial acceleration that shake left for the second time (4) is 8m/s
2, greater than threshold acceleration, so this is for the second time to have satisfied initial acceleration that the electronic equipment one way the moves condition greater than threshold acceleration.
Because the initial acceleration that shake to the right for the third time (5) is 6.8m/s
2, greater than threshold acceleration, so this is to have satisfied initial acceleration that the electronic equipment one way the moves condition greater than threshold acceleration for the third time.
Because the initial acceleration that shake left for the third time (6) is 11m/s
2, greater than threshold acceleration, so this is to have satisfied initial acceleration that the electronic equipment one way the moves condition greater than threshold acceleration for the 4th time.Simultaneously, at present the maximum initial acceleration that moves of one way is 11m/s
2, threshold acceleration also becomes 8.25m/s
2
Because the initial acceleration of shaking to the right for (7) the 4th times is 10m/s
2, greater than threshold acceleration, so this is to have satisfied initial acceleration that the electronic equipment one way the moves condition greater than threshold acceleration for the 5th time.
Because the initial acceleration of shaking left for (8) the 4th times is 8m/s
2,, therefore do not satisfy the condition of initial acceleration greater than threshold acceleration less than threshold acceleration.
Therefore, have and satisfied initial acceleration that the electronic equipment one way moves condition for five times, surpassed said predefined number of times-four, satisfied said predefined condition greater than threshold acceleration.
In alternative embodiment according to the present invention; The direction that said electronic equipment moves back and forth is respectively first direction and second direction; Said predefined condition is: in the unit interval, the initial acceleration that said electronic equipment moves along the first direction one way surpasses predefined number of times greater than the number of times of first direction threshold acceleration and the initial acceleration that moves along the second direction one way greater than the number of times sum of second direction threshold acceleration; And/or the initial acceleration that moves greater than the number of times of first direction threshold acceleration with along the second direction one way of the initial acceleration that moves along the first direction one way greater than the number of times of second direction threshold acceleration respectively greater than predefined first number and predefined second number.Wherein, Said first direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the first direction one way moves according to said electronic equipment, and said second direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the second direction one way moves according to said electronic equipment.
Specifically; Still use palmistry vertically to grip electronic equipment and the electronic equipment that on direction parallel to the ground relatively, rocks from side to side is described as example for ground with the user; Suppose that first direction is direction to the right; Second direction is direction left; And suppose that said predefined condition is: in 1 second, the initial acceleration that said electronic equipment moves along direction one way to the right greater than the number of times of direction threshold acceleration to the right and the initial acceleration that moves along direction one way left greater than the number of times sum (that is, more than or equal to five times) above four times of direction threshold acceleration left.
Certainly; This only is for example; As previously mentioned, said predefined condition can also be said electronic equipment to the right the initial acceleration that moves of one way surpass predefined first number and predefined second number greater than the number of times of direction threshold acceleration to the right and the initial acceleration that moves along direction one way left respectively greater than the number of times of direction threshold acceleration left.Equally, said predefined number of times, said predefined first number, said predefined second number can be set according to actual needs, also can according to operating habit these number of times be set by the user.When these number of times were big, said predefined condition is difficult to be satisfied, and the possibility of maloperation simultaneously is also less; And when these number of times hour, said predefined condition is easier to satisfy, the possibility of maloperation simultaneously is also bigger.
Suppose that still said predefined coefficient is 0.75, this coefficient value is merely example, and the value of this coefficient can be set according to actual needs, and the value of this coefficient also can be set according to operating habit by the user.
Here, hypothesis each time identical with the embodiment of front initial acceleration of shaking still has such 8 times and shakes (reciprocal 4 times) to dextrad is left in promptly 1 second:
(1 ') shakes to the right for the first time: 9m/s
2
(2 ') shakes left for the first time: 10m/s
2
(3 ') shakes to the right for the second time: 7m/s
2
(4 ') shakes left for the second time: 8m/s
2
(5 ') shakes to the right for the third time: 6.8m/s
2
(6 ') shakes left for the third time: 11m/s
2
(7 ') shakes to the right for the 4th time: 10m/s
2
(8 ') shakes left for the 4th time: 8m/s
2
Suppose that (1 ') shakes for the first time as once moving along the one way of direction to the right of beginning most to the right and do not add up, do not judge that promptly its initial acceleration is whether greater than direction threshold acceleration to the right interior.After shaking for the first time in (1 '), obtained present maximum initial acceleration-9m/s that electronic equipment moves along direction one way to the right to the right
2, be that the threshold acceleration of direction to the right at this moment is 9m/s under 0.75 the situation at said predefined coefficient
2* 0.75=6.75m/s
2
Suppose that (2 ') shakes for the first time as once moving along the one way of direction left of beginning most left and do not add up, do not judge that promptly its initial acceleration is whether greater than direction threshold acceleration left interior.After shaking for the first time in (1 '), obtained present maximum initial acceleration-10m/s that electronic equipment moves along direction one way left left
2, be that the threshold acceleration of direction left at this moment is 10m/s under 0.75 the situation at said predefined coefficient
2* 0.75=7.5m/s
2
Because the initial acceleration that (3 ') shakes to the right for the second time is 7m/s
2, greater than direction threshold acceleration to the right, so this is to have satisfied initial acceleration that electronic equipment moves along direction one way to the right for the first time greater than the condition of direction threshold acceleration to the right.
Because the initial acceleration that (4 ') shakes left for the second time is 8m/s
2, greater than direction threshold acceleration left, so this is to have satisfied initial acceleration that electronic equipment moves along direction one way left for the first time greater than the condition of direction threshold acceleration left.
Because the initial acceleration that (5 ') shakes to the right for the third time is 6.8m/s
2, greater than direction threshold acceleration to the right, so this is to have satisfied initial acceleration that electronic equipment moves along direction one way to the right for the second time greater than the condition of direction threshold acceleration to the right.
Because the initial acceleration that (6 ') shakes left for the third time is 11m/s
2, greater than direction threshold acceleration left, so this is to have satisfied initial acceleration that electronic equipment moves along direction one way left for the second time greater than the condition of direction threshold acceleration left.Simultaneously, the present maximum initial acceleration that moves along direction one way left is 11m/s
2, the direction threshold acceleration also becomes 8.25m/s left
2
Because the initial acceleration that (7 ') shakes to the right for the 4th time is 10m/s
2, greater than direction threshold acceleration to the right, so this is to have satisfied initial acceleration that electronic equipment moves along direction one way to the right for the third time greater than the condition of direction threshold acceleration to the right.Simultaneously, the present maximum initial acceleration that moves along direction one way to the right is 10m/s
2, the direction threshold acceleration also becomes 7.5m/s left
2
Because the initial acceleration that (8 ') shakes left for the 4th time is 8m/s
2,, therefore do not satisfy initial acceleration that electronic equipment moves along direction one way left greater than the condition of direction threshold acceleration left less than direction threshold acceleration left.
Therefore; Have and satisfied initial acceleration that electronic equipment moves along direction one way left for twice greater than the condition of direction threshold acceleration left; Have and satisfied initial acceleration that electronic equipment moves along direction one way to the right for three times greater than the condition of direction threshold acceleration to the right; Amount to five times, surpassed said predefined number of times-four, said predefined condition is reached.
In alternative embodiment according to the present invention; In said predefined condition, set up subsidiary condition; Promptly; (be made as situation a) should alternately occur greater than the situation of direction threshold acceleration (being made as situation b) left with the initial acceleration that moves along direction one way left the initial acceleration that electronic equipment moves along direction one way to the right greater than the situation of direction threshold acceleration to the right; And occur twice continuously or more times situation a (situation b does not appear in the centre) or twice or more times situation b (centre situation do not occur a) time; At the number of times that is used for comparing, only count situation a or situation b for the first time for the first time, and get rid of other one or many situation a or the situation b that the back occurs continuously with predefined number of times.
Specifically, still shake for these 8 times and be example, suppose that the initial acceleration that (4 ') shake for the second time changes 7.4m/s into left with top (1 ') to (8 ')
2, the initial acceleration that other each time is shaken is constant.Like this because since (the 4 ') initial acceleration of shaking left for the second time less than direction threshold acceleration left, so the initial acceleration that moves along direction one way left of unmet electronic equipment is greater than the condition of direction threshold acceleration left.Simultaneously; Make that the initial acceleration that moves of direction one way is greater than the situation of direction threshold acceleration to the right (promptly for twice electronic equipment edge that (3 ') and (5 ') become continuous appearance to the right; Situation a); Therefore (5 ') as the situation a second time that occurs continuously, is not counted in to be used for the number of times that compares with predefined number of times.Therefore; In this example; Once satisfied initial acceleration that electronic equipment moves along direction one way left greater than the condition of direction threshold acceleration left, had and satisfied initial acceleration that electronic equipment moves along direction one way to the right for twice, amounted to for three times greater than the condition of direction threshold acceleration to the right; Do not surpass said predefined number of times-four, said predefined condition is not reached.
According to embodiments of the invention; Under said threshold acceleration, said first direction threshold acceleration or the situation of said second direction threshold acceleration less than predefined minimum acceleration, with said predefined minimum acceleration as said threshold acceleration, said first direction threshold acceleration or said second direction threshold acceleration.For example can be set to 6m/s by this predefined minimum acceleration
2, but this only is an example, can also select other suitable predefined minimum acceleration according to the concrete parameter of gravity sensor.Because in two embodiment before this, said threshold acceleration, said first direction threshold acceleration or said second direction threshold acceleration at each constantly all greater than 6m/s
2, therefore need not 6m/s
2As said threshold acceleration, said first direction threshold acceleration or said second direction threshold acceleration.But if threshold acceleration is less than 6m/s
2Situation, then should threshold acceleration at that time be set to 6m/s
2, in order to avoid gravity sensor also is designated as normal moving with slight rocking.
According to embodiments of the invention; After the above-mentioned unit interval (for example 1 second); Said threshold acceleration in above-mentioned each situation, said first direction threshold acceleration or said second direction threshold acceleration are reset respectively; Like this, just can in the next unit interval, obtain new threshold acceleration according to the situation of shaking.
With reference to Fig. 1 and Fig. 2, next, execution in step S105 promptly, satisfies under the situation of said predefined condition said moving, and the operating-system resources of said electronic equipment is cleared up once more.Promptly; Do not surpass predefined number of times if do not satisfy initial acceleration that this condition-said electronic equipment reciprocatingly moves and its one way moves in the unit interval greater than the number of times of threshold acceleration; Then the operating-system resources of electronic equipment is not cleared up, this has just prevented under the user does not have the situation of the machine of initiatively shaking the hand (when for example mobile phone falls, in user's operating handset when walking, user under general operating position during cell phone) false triggering clearing function.
According to embodiments of the invention, the step that the operating-system resources of said electronic equipment is cleared up comprises: cleaning is at the process of said operating system running background and the garbage files in the said operating system.The cleaning background process can be accelerated the travelling speed of electronic equipment, the electric power that expends when reducing the electronic equipment operation, and the rubbish cleaning file can make the user obtain more available memory capacity.
According to embodiments of the invention, as shown in Figure 2, in execution in step S105, can execution in step S105 ': the expression cleaning be carried out on said electronic equipment.For example, on the display screen of electronic equipment, show the bead of a motion, along with the carrying out of cleaning; The animation that shows the bead motion, at this moment, if the user continues to shake electronic equipment; Can make speeding up of bead motion, and can utilize moving of gravity sensor sensing electronic equipment this moment, and on display screen, show the animation that moves with the mobile corresponding bead that senses; For example, sense the electronic equipment move left and right, then show the animation of bead side-to-side movement.Alternatively, can also represent to clear up with the mode of sound and carry out, for example, through the loudspeaker plays voice messaging " just in clear system resources, please wait a moment " of mobile phone.In addition, display frame simultaneously also plays sound, and representes to clear up and carries out.Other expression is cleared up ongoing mode and is also contained within the scope of the invention.
According to embodiments of the invention, as depicted in figs. 1 and 2, after execution in step S105, can execution in step S106: the result's of the said cleaning of output reflection information on said electronic equipment; Simultaneously, can also execution in step S106 ': the information of the situation that the said electronic equipment of output reflection moves on said electronic equipment.The information that for example can on the display screen of electronic equipment, show below: " clear up successfully! You have regained the storage space of free memory and the 1GB of 200MB "; show the information of the situation that the reflection electronic equipment moves simultaneously; for example: " distance that you shake electronic equipment amounts to 200 centimetres, and you have consumed the heat of 3 cards through shaking electronic equipment ".
In addition; Can also show the result of the said cleaning of reflection and the information of the situation that said electronic equipment moves vivider, more intuitively; According to embodiments of the invention; The result's of the said cleaning of said reflection information is first exponential quantity that the size according to the quantity of the process of being cleared up and garbage files calculates, and the information of the situation that the said electronic equipment of said reflection moves is second exponential quantity that number of times that the maximum initial acceleration that moves according to said electronic equipment one way and said electronic equipment move back and forth calculates.For example referring to Fig. 3, it has shown the exemplary view of the picture of the information that reflects the result of cleaning and the situation that electronic equipment moves according to an embodiment of the invention.In Fig. 3; " system's cleaning+20 minutes " is said first exponential quantity; It is that size according to the quantity of the process of being cleared up and garbage files calculates; And " exercise intensity+52 minute " are said second exponential quantity, its be the maximum initial acceleration that moves according to said electronic equipment one way (in for example above-mentioned (1 ') to (8 ') " (6 ') shakes left for the third time: 11m/s
2") and the number of times (for example above-mentioned (1 ') is to (8 '); reciprocal 4 times) that moves back and forth of said electronic equipment calculate; can also above-mentioned exercise intensity be converted into heat simultaneously, show that as shown in Figure 3 " you have consumed the heat of a fish ball through motion! " and so on information.In addition; Shown in Figure 3 " mobile phone healthy+16 minutes " calculates according to being used for according to an embodiment of the invention how many functions are the application program that said operating system is cleared up opened, and " safety contribution+10 minutes " is to calculate according to the quantity of user through application program report rubbish/advertisement/swindle note of being used for according to an embodiment of the invention said operating-system resources is cleared up (can be the perhaps historical total amount of note quantity in a period of time).The user through when according to the method for the invention the operating-system resources of electronic equipment being cleared up; Statistics and the exponential quantity of calculating relevant above-mentioned " mobile phone is healthy " and " safety contribution "; And after cleaning, show with above-mentioned first exponential quantity and second exponential quantity; Simultaneously can also be with these exponential quantity additions, thus " aggregative index 98 minutes " so total exponential quantity as shown in Figure 3 obtained.
Equally, can also export above-mentioned information, also can export above-mentioned information with the mode of picture and sound simultaneously through the mode of sound.In addition, shortcut is provided also in the interface of Fig. 3, these information has been shared with the good friend through social networks instruments such as microbloggings for the user.
The invention provides a kind of method that the operating-system resources of electronic equipment is cleared up of being used for; According to embodiments of the invention; The user can clear up at the process of the operating system running background of electronic equipment and the garbage files in the operating system through shaking this directly perceived, simple mode of electronic equipment; And need not in being exclusively used in the application program of cleaning, to carry out complicated operations, this has greatly improved user experience.Even if the user (particularly old man and child) that operating experience is abundant inadequately also can easily accomplish the cleaning to operating-system resources, thereby accelerate the travelling speed of electronic equipment, the electric power that expends when reducing the electronic equipment operation and make the user obtain more available memory space.
Simultaneously; The present invention is through judging whether electronic equipment is in moving of predefined state mentioned above and sensing electronic equipment and whether satisfies predefined condition mentioned above; Determine whether to carry out above-mentioned cleanup step, avoided the false triggering cleanup step.And be not at electronic equipment under the situation of said predefined state, the gravity sensor of having registered is nullified, thereby avoided the meaningless power consumption under the situation that need not register gravity sensor.
Corresponding with above-mentioned method 100, the present invention also provides a kind of device 200 that the operating-system resources of electronic equipment is cleared up of being used for, and referring to Fig. 4, this device 200 comprises:
Judge module 210 is used to judge whether said electronic equipment is in predefined state, and this judge module 210 can be used for carrying out the step S101 of said method 100;
Sensing module 230; Be used for being under the situation of said predefined state at said electronic equipment; Utilize the mobile of the said electronic equipment of gravity sensor sensing of said electronic equipment whether to satisfy predefined condition, this sensing module 230 can be used for carrying out the step S103 of said method 100;
Cleaning module 250 is used for satisfying under the situation of said predefined condition said moving, and the operating-system resources of said electronic equipment is cleared up, and this cleaning module 250 can be used for carrying out the step S105 of said method 100; And
First information output module 260 is used on said electronic equipment the result's of the said cleaning of output reflection information, and this first information output module 260 can be used for carrying out the step S106 of said method 100.
In a preferred embodiment of the invention; Said device also comprises: Registering modules 220; Be used under said electronic equipment is in the situation of said predefined state, utilize before whether the displacement of the said electronic equipment of gravity sensor sensing of said electronic equipment satisfy predefined condition at said sensing module 230; Judge whether said gravity sensor is registered; If have not yet registered, then to register, this Registering modules 220 can be used for carrying out the step S102 of said method 100.
In a preferred embodiment of the invention; Said predefined state comprises: the screen of said electronic equipment opened and the situation of release under, the desktop state of the operating system of said electronic equipment, the application program that is used for said operating-system resources is cleared up state, the application list interfacial state of said operating system and the system's setup menu state in the said operating system when said operating system front stage operation.
In a preferred embodiment of the invention, said predefined condition is: said electronic equipment reciprocatingly moves, and in the unit interval, the initial acceleration that said electronic equipment one way moves surpasses predefined number of times greater than the number of times of threshold acceleration.
In a preferred embodiment of the invention, said moving back and forth is moving back and forth of carrying out in any direction at any angle of said electronic equipment.
In a preferred embodiment of the invention, said threshold acceleration is to confirm according to maximum initial acceleration and predefined coefficient that the present one way of said electronic equipment moves.
In a preferred embodiment of the invention; Said predefined condition is: said electronic equipment reciprocatingly moves along reciprocal first direction and second direction; And in the unit interval, the initial acceleration that said electronic equipment moves along the first direction one way surpasses predefined number of times greater than the number of times of first direction threshold acceleration and the initial acceleration that moves along the second direction one way greater than the number of times sum of second direction threshold acceleration; And/or the initial acceleration that moves greater than the number of times of first direction threshold acceleration with along the second direction one way of the initial acceleration that moves along the first direction one way greater than the number of times of second direction threshold acceleration respectively greater than predefined first number and predefined second number.
In a preferred embodiment of the invention, said predefined condition is:
(1) said electronic equipment reciprocatingly moves along reciprocal first direction and second direction; And
(2) suppose that initial acceleration that said electronic equipment moves along the first direction one way is situation a greater than the situation of first direction threshold acceleration; Suppose that initial acceleration that said electronic equipment moves along the second direction one way is situation b greater than the situation of second direction threshold acceleration; In the unit interval; The summation of the number of times of the number of times of situation a and situation b surpasses predefined number of times; Wherein occurring twice continuously or when more times situation a or twice or more times situation b, in said summation, only counting situation a or situation b for the first time for the first time; And/or
(3) number of times of the number of times of situation a and situation b is respectively greater than predefined first number and predefined second number; Wherein occurring twice continuously or when more times situation a or twice or more times situation b, in the number of times of the number of times of said situation a or situation b, only counting situation a or situation b for the first time for the first time.
In a preferred embodiment of the invention; Said first direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the first direction one way moves according to said electronic equipment, and said second direction threshold acceleration is to confirm along present maximum initial acceleration and said predefined coefficient that the second direction one way moves according to said electronic equipment.
In a preferred embodiment of the invention; Under said threshold acceleration, said first direction threshold acceleration or the situation of said second direction threshold acceleration less than predefined minimum acceleration, with said predefined minimum acceleration as said threshold acceleration, said first direction threshold acceleration or said second direction threshold acceleration.
In a preferred embodiment of the invention, satisfy under the situation of said predefined condition said moving, said cleaning module 250 cleanings are at the process of said operating system running background and the garbage files in the said operating system.
In a preferred embodiment of the invention; Said device also comprises: representation module 251; Be used for when saidly moving under the situation satisfy said predefined condition, the operating-system resources of 250 pairs of said electronic equipments of said cleaning module clears up; The expression cleaning is carried out on said electronic equipment, and this representation module 251 can be used for carrying out the step S105 ' of said method 100.
In a preferred embodiment of the invention; Said device also comprises: second message output module 261; Be used for said first information output module 260 is exported the result's who reflects said cleaning information on said electronic equipment when; The information of the situation that the said electronic equipment of output reflection moves on said electronic equipment, this second message output module 261 can be used for carrying out the step S106 ' of said method 100.
In a preferred embodiment of the invention; The information that reflects the result of said cleaning is first exponential quantity that the size according to the quantity of the process of being cleared up and garbage files calculates, and the information that reflects the situation that said electronic equipment moves is second exponential quantity that number of times that the maximum initial acceleration that moves according to said electronic equipment one way and said electronic equipment move back and forth calculates.
In a preferred embodiment of the invention; Said device also comprises: nullify module 221; Be used for not being under the situation of said predefined state, judge whether said gravity sensor is registered, if register at said electronic equipment; Then said gravity sensor is nullified, this cancellation module 221 can be used for carrying out the step S102 ' of said method 100.
Because above-mentioned respectively to install embodiment corresponding with aforementioned approaches method embodiment, therefore no longer each installed embodiment and be described in detail.
The present invention can realize with any suitable form, comprises hardware, software, firmware or their combination in any.Alternatively, the present invention can be embodied as the computer software that operates on one or more processors and/or the digital signal processor at least in part.The device of embodiments of the invention and module can be physically, on the function and realize in any suitable manner in logic.Can be in individual unit, in a plurality of unit or realize according to each function of the present invention as the part of other functional units.Likewise, the present invention can realize in individual unit, perhaps can be physically and be distributed on the function between different units and the processor.
Although combined some embodiment to describe the present invention, the present invention also is not intended to the particular form that is limited to this paper elaboration.On the contrary, scope of the present invention is only limited appended claims.In addition, combine specific embodiment to be described although characteristic possibly look like, those of ordinary skills will be appreciated that, can make up the various characteristics of described embodiment according to the present invention.In claims, word " comprises " existence of not getting rid of other modules or step.
In addition, although be listed separately, a plurality of modules or method step can be realized by for example individual unit or processor.In addition, although single feature possibly be included in the different claims, these characteristics can advantageously make up possibly, and are included in the different claims and do not mean that combination of features is infeasible.In addition, characteristic is contained in a kind of claim classification (for example claim to a method) and does not mean that and is limited to this classification, but representes that this characteristic can suitably be applied to other claim classifications (for example installing claim) equally.In addition, the order of characteristic and do not mean that necessary any particular order in the claim.And, the order of each step and do not mean that these steps must carry out according to this in proper order in the claim to a method.On the contrary, these steps can be carried out with any suitable order.In addition, plural number is not got rid of in the statement of singulative.Therefore, do not get rid of plural number for quoting of " ", " ", " first ", " second " or the like.Reference numeral in the claim only is a label, and should it be regarded as the restriction to the scope of claim.