CN104199693B - Method, device and terminal for obtaining boot time - Google Patents
Method, device and terminal for obtaining boot time Download PDFInfo
- Publication number
- CN104199693B CN104199693B CN201410422440.6A CN201410422440A CN104199693B CN 104199693 B CN104199693 B CN 104199693B CN 201410422440 A CN201410422440 A CN 201410422440A CN 104199693 B CN104199693 B CN 104199693B
- Authority
- CN
- China
- Prior art keywords
- moment
- duration
- time
- starting
- startup
- 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
Links
Abstract
The embodiment of the invention discloses a method for acquiring boot-up time, which comprises the following steps: acquiring a first time length according to a starting time and a first time for starting a first preset process, wherein the starting of the first preset process represents the starting of a user login program; acquiring a second time length according to the first time and a second time for starting a second preset process, wherein the starting of the second preset process represents that the user successfully logs in; acquiring a third time length according to a third time for starting a third preset process and a fourth time for finishing starting, wherein the starting of the third preset process represents the starting of a desktop display program; and determining the starting-up time as the sum of the first time length, the second time length and the third time length. The embodiment of the invention also discloses a device and a terminal for acquiring the boot-up time. By adopting the embodiment of the invention, the accuracy of obtaining the starting-up time can be improved.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method, apparatus and terminal for obtaining the available machine time.
Background technology
The available machine time of computer has turned into the most direct indicator for weighing computer configuration and health status, even built in measurement
One of whether standard compliant index of software.Upon power-up of the system, if there is many service startup items, it will cause to start shooting
Time is long, and user must not be not to wait for ability normal operating computer after longer period of time, so as to the length of available machine time
Directly affect Consumer's Experience.At present, numerous system optimization softwares can provide the function of starting guide, disk arrangement etc for carrying
Starting up speed is risen, most directly performance is exactly to shorten the available machine time for it.
In the prior art, it is generally recognized that the available machine time be computer from starting up's moment to user's desktop presentation out when
Time interval between quarter, however, this method is not a kind of technical scheme for reasonably calculating the available machine time, it is calculated
The available machine time degree of accuracy come is low.
The content of the invention
The embodiment of the present invention provides a kind of method, apparatus and terminal for obtaining the available machine time, when can improve acquisition start
Between the degree of accuracy.
The embodiment of the present invention provides a kind of method for obtaining the available machine time, including:
According to first moment at start shooting moment and the default process of startup first, the first duration is obtained, the startup first is pre-
If process represents to start user's logging program;
According to first moment and start the second moment of the second default process, obtain the second duration, it is described to start the
Two default processes represent user's Successful login;
At the 4th moment that the 3rd moment and starting up according to the 3rd default process is started finish, the 3rd duration is obtained,
The 3rd default process that starts represents that starting desktop shows program;
It is first duration, second duration and the 3rd duration sum to determine the available machine time.
Correspondingly, the embodiment of the present invention also provides a kind of device for obtaining the available machine time, including:
First acquisition module, for presetting the first moment of process according to start moment and startup first, when obtaining first
Long, the first default process that starts represents to start user's logging program;
Second acquisition module, for according to first moment and starting the second moment of the second default process, obtain the
Two durations, the second default process that starts represent user's Successful login;
3rd acquisition module, for finished according to the 3rd moment and starting up that start the 3rd default process the 4th when
Carve, obtain the 3rd duration, the 3rd default process that starts represents that starting desktop shows program;
First determining module, for determine the available machine time for first duration, second duration and it is described 3rd when
Long sum.
Correspondingly, the embodiment of the present invention also provides a kind of terminal, including the device as described above for obtaining the available machine time.
Implement the embodiment of the present invention, by the way that starting up of terminal start-up course to be divided into the different stages, the start moment is to opening
First moment of dynamic first default process is the first stage, and the second moment of the first moment to the second default process that starts is second
In the stage, the 3rd moment to the 4th moment that starting up finishes for starting the 3rd default process is the phase III, is calculated respectively each
The effective time of available machine time should be included in stage, the available machine time is obtained further according to the effective time in each stage.Using this
Inventive embodiments can improve the degree of accuracy for obtaining the available machine time.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability
For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached
Figure.
Fig. 1 is a kind of schematic flow sheet of method for obtaining the available machine time provided in an embodiment of the present invention;
Fig. 2 is a kind of another schematic flow sheet of method for obtaining the available machine time provided in an embodiment of the present invention;
Fig. 3 is a kind of another schematic flow sheet of method for obtaining the available machine time provided in an embodiment of the present invention;
Fig. 4 is a kind of another schematic flow sheet of method for obtaining the available machine time provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of device for obtaining the available machine time provided in an embodiment of the present invention;
Fig. 6 is a kind of another structural representation of device for obtaining the available machine time provided in an embodiment of the present invention;
Fig. 6 a are the structural representations for the acquisition module of one of which second that Fig. 6 is provided;
Fig. 6 b are the structural representations for the acquisition module of one of which the 3rd that Fig. 6 is provided;
Fig. 6 c are another structural representations for the acquisition module of one of which the 3rd that Fig. 6 is provided;
Fig. 7 is a kind of structural representation of terminal provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram that the one of which that Fig. 7 is provided shows the available machine time;
Fig. 9 is a kind of another structural representation of device for obtaining the available machine time provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only the part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
The embodiments of the invention provide a kind of method, apparatus and terminal for obtaining the available machine time, by by starting up of terminal
Start-up course is divided into the different stages, the effective time that the available machine time should be included in each stage is calculated respectively, further according to each
Effective time in stage obtains the available machine time, and the degree of accuracy for obtaining the available machine time can be improved using the embodiment of the present invention.Under
The method, apparatus and terminal of the acquisition available machine time are described in detail respectively with reference to accompanying drawing 1- accompanying drawings 9 for face.
Fig. 1 is referred to, Fig. 1 is a kind of schematic flow sheet of method for obtaining the available machine time provided in an embodiment of the present invention,
In embodiments of the present invention, this method may comprise steps of.
S101:According to the start moment and start the first moment of the first default process, obtain the first duration, it is described to start the
One default process represents to start user's logging program.
In embodiments of the present invention, starting up's process is divided into three phases, this step is the first stage, i.e., from opening
The period at machine moment to the first moment for starting the first default process, wherein, start the first default process and represent to start user
Logging program.Such as:Assuming that user is provided with username and password, during starting up, operating system can eject one and step on
Interface is recorded, the login interface is used to prompt user to input effective username and password into operating system, to be worth explanation
It is that, even if user is not previously set username and password, can also start user's logging program in start process, now, adopt
Logged in the user name of system default.Generally, the premise for ejecting the login interface is operation user's logging program, and the user logs in
The corresponding process of program, in other words, for convenience of description, the process is referred to as the first default process in the embodiment of the present invention,
Start the first default process to represent to start user's logging program, obtain the first moment for starting the first default process.Specifically, should
Process can be preset according to the function of each process, and the embodiment of the present invention is not restricted.In this stage, it is substantially carried out hard
Part drives and/or the loading or startup of service, is the necessary condition of starting up's process, and the time in the stage all should calculate
In available machine time.Specifically, obtain the time difference at a length of the first moment and start moment for starting the first default process when first.
It should be understood that start the duration of hardware when first during a length of starting up.What deserves to be explained is the embodiment of the present invention
Method can be applied in windows operating systems, such as windows xp, windows 7, Vista, but is worth explanation
It is that the embodiment of the present invention is not limited to the windows operating systems, specifically, the embodiment of the present invention is not restricted.
S102:According to first moment and started for the second the second moment for presetting process, obtain the second duration, it is described to open
Dynamic second default process represents user's Successful login.
In embodiments of the present invention, this step is the second stage of starting up's process, i.e., from the first moment to starting the
The period at the second moment of two default processes, wherein, start the second default process and represent user's Successful login, in the stage,
The mainly startup project of loading or activation system program.However, the process of input username and password is appeared to be in user, and
In fact, terminal, during waiting user to be received to input username and password, meeting is simultaneously successively continuous according to preset rules
Start other processes, these processes are typically the process needed for activation system program.Generally, during starting up, can open
The process for those system programs that dynamic system must load, these processes should be included in the available machine time;With starting up's
Carry out or complete, after system is gradually stablized, the process of part other systems program also can accordingly start, and start this part
The shared duration of process is in the range of should not including the available machine time.Such as:If user does not input effectively for a long time
Username and password, after process corresponding to the system program that must start up during starting up completes startup, if one
Not receiving effective username and password in the time of fixed length also, then system may proceed to the other processes of actuating section, and these
The other processes in part should not be included in the available machine time.Therefore, if the duration in the stage directly to be included to the category of available machine time,
Available machine time for getting will be caused inaccurate.
In the embodiment of the present invention, opened in the period at the first moment of monitoring to the second moment for starting the second default process
Dynamic process;According to the Startup time of each process started in the period, each Startup time is calculated respectively in chronological sequence
The time interval of order two Startup times adjacent when arranging;When obtaining second according to each time interval calculated
It is long.Such as:If each time interval is respectively less than the first preset duration, a length of second moment and described first when second is determined
The time difference at moment;If at least one time interval be present is not less than first preset duration, obtains time interval and be not less than
The Startup time of each process of first preset duration;According to the Startup time of each process, it is determined that during earliest startup
Target process corresponding to quarter;Determine the Startup time of a length of target process and the time difference at first moment when second.
It should be understood that the second duration represents the duration of activation system program during starting up.
S103:At the 4th moment that the 3rd moment and starting up according to the 3rd default process is started finish, obtain the 3rd
Duration, the 3rd default process that starts represent that starting desktop shows program.
After recognizing user's Successful login by step S102, second stage terminates, and journey is shown followed by desktop is started
Sequence shows desktop, and the phase III starts.In real process, start desktop and show that program is completed by starting some process
The function, for convenience of describing, the process is referred to as the 3rd default process.When monitoring the 3rd default process initiation, obtain
Start the 3rd moment of the 3rd default process, and monitor the 4th moment that starting up finishes, the phase III refers to start
It is the period at the 4th moment that the 3rd moment of the 3rd default process finishes to starting up, main to start within the period
Process corresponding to the application program for the start self-starting that user pre-sets.
In the embodiment of the present invention, the method that monitoring starting up finishes can after starting the 3rd default process, pass through inspection
Whether survey has new process to be activated in preset time, and/or whether CPU usage is relatively low, and/or disk read-write number is
It is no it is less come recognition start-up start whether finish.Specifically, the embodiment of the present invention is not restricted, get what starting up finished
After 4th moment, the time difference at a length of 4th moment and the 3rd moment when the 3rd is determined.It should be understood that when the 3rd
Start the duration of software program during long expression starting up.
S104:It is first duration, second duration and the 3rd duration sum to determine the available machine time.
Such as:Assuming that a length of 16 seconds when first, a length of 10 seconds when second, a length of 28 seconds when the 3rd, then the available machine time is 54
Second.
In the method for the acquisition available machine time described by the embodiment of the present invention, starting up of terminal start-up course is divided into not
In the same stage, the first moment of start moment to the first default process that starts is the first stage, and the first moment is pre- to starting second
If the second moment of process is second stage, the 4th moment finished to starting up at the 3rd moment of process is preset in startup the 3rd
For the phase III, the effective time that the available machine time should be included in each stage is calculated respectively, during further according to effective in each stage
It is long to obtain the available machine time.The degree of accuracy for obtaining the available machine time can be improved using the embodiment of the present invention.
Fig. 2 is referred to, Fig. 2 is a kind of another flow signal of method for obtaining the available machine time provided in an embodiment of the present invention
Figure, in embodiments of the present invention, this method may comprise steps of.
S201:According to the start moment and started for the first the first moment for presetting process, obtain the first duration.
In embodiments of the present invention, starting up's process is divided into three phases, this step is the first stage, i.e., from opening
The period at machine moment to the first moment for starting the first default process, wherein, start the first default process and represent to start user
Logging program.Such as:Assuming that user is provided with username and password, during starting up, operating system can eject one and step on
Interface is recorded, the login interface is used to prompt user to input effective username and password into operating system, to be worth explanation
It is that, even if user is not previously set username and password, can also start user's logging program in start process, now, adopt
Logged in the user name of system default.Generally, the premise for ejecting the login interface is operation user's logging program, and the user logs in
The corresponding process of program, in other words, for convenience of description, the process is referred to as the first default process in the embodiment of the present invention,
Start the first default process to represent to start user's logging program, obtain the first moment for starting the first default process.Specifically, should
Process can be preset according to the function of each process, and the embodiment of the present invention is not restricted.In this stage, it is substantially carried out hard
Part drives and/or the loading or startup of service, is the necessary condition of starting up's process, and the time in the stage all should calculate
In available machine time.Specifically, obtain the time difference at a length of the first moment and start moment for starting the first default process when first.
S202:Monitor what is started within the period at first moment to the second moment for starting the second default process
Process.
In embodiments of the present invention, this step is the second stage of starting up's process, i.e., from the first moment to starting the
The period at the second moment of two default processes, wherein, start the second default process and represent user's Successful login, in the stage,
The mainly startup project of loading or activation system program.Generally, during starting up, meeting activation system must load
The process of those system programs, these processes should be included in the available machine time;With the progress or completion of starting up, system is gradually
After gradually tending towards stability, the process of part other systems program also can accordingly start, and start this Partial Process it is shared when
Length is in the range of should not including the available machine time.Such as:If user does not input effective username and password for a long time, open
After process corresponding to the system program that must start up in machine start-up course completes startup, if not connect also within the time of a fixed length
Effective username and password is received, then system may proceed to the other processes of actuating section, and the other processes in these parts should not
Include in the available machine time.Therefore, if the duration in the stage directly to be included to the category of available machine time, the start that gets will be caused
Time is inaccurate.
In the embodiment of the present invention, opened in the period at the first moment of monitoring to the second moment for starting the second default process
Dynamic process, and obtain the Startup time of each process.Such as:Assuming that starting n process within the period, retouch for convenience
State, n process is expressed as { P1;P2;P3,…,Pn, the Startup time of each process started in the period is obtained, is side
Just describe, the Startup time of the n process is expressed as { t (P1);t(P2);t(P3),…,t(Pn)}。
S203:According to the Startup time of each process started in the period, each Startup time is calculated respectively temporally
The time interval of sequencing two Startup times adjacent when arranging.
In the embodiment of the present invention, it will be opened within the period at the first moment to the second moment for starting the second default process
The Startup time of dynamic process is in chronological sequence sequentially arranged, and obtains two adjacent in position Startup times respectively
Time interval.Such as:Assuming that { t (P1);t(P2);t(P3),…,t(Pn) in chronological sequence tactic each process
Startup time, then the time interval of two adjacent Startup times, such as T are calculated respectively1=t (P2)-t(P1), T2=t (P3)-t
(P2), T3=t (P4)-t(P3) ..., Tn-1=t (Pn)-t(Pn-1), common n-1 time interval.
S204:Second duration is obtained according to each time interval calculated.
Specifically, if each time interval is respectively less than the first preset duration, can determine a length of described second when second
The time difference of Startup time and first Startup time.If exist at least one time interval it is default not less than described first when
It is long, then need further to obtain Startup time of the time interval not less than each process of first preset duration, such as:Assuming that
T3、T5Not less than the first preset duration, then T is got3Representative process is P4And P3;Get process P4With process P3Open
The dynamic moment is respectively t (P4) and t (P3);Get T5Representative process is P6And P5;Get process P6With process P5Open
The dynamic moment is respectively t (P6) and t (P5);According to each process (P3、P4、P5And P6) Startup time { t (P3);t(P4);t
(P5);t(P6), it is determined that target process corresponding to earliest Startup time, such as:Target process is P3;Determine a length of when second
The Startup time of the target process and the time difference at first moment, such as:A length of t (P when second3)-t(P1).It is worth saying
It is bright, if at least one time interval be present is not less than first preset duration, when obtaining the startup of above-mentioned target process
The other methods carved belong to the protection domain of the embodiment of the present invention.
S205:At the 4th moment that the 3rd moment and starting up according to the 3rd default process is started finish, obtain the 3rd
Duration.
After recognizing user's Successful login by above-mentioned steps, second stage terminates, and journey is shown followed by desktop is started
Sequence shows desktop, and the phase III starts.In real process, start desktop and show that program is completed by starting some process
The function, for convenience of describing, the process is referred to as the 3rd default process.When monitoring the 3rd default process initiation, obtain
Start the 3rd moment of the 3rd default process, and monitor the 4th moment that starting up finishes, the phase III refers to start
It is the period at the 4th moment that the 3rd moment of the 3rd default process finishes to starting up, main to start within the period
Process corresponding to the application program for the start self-starting that user pre-sets.
In the embodiment of the present invention, the method that monitoring starting up finishes can after starting the 3rd default process, pass through inspection
Whether survey has new process to be activated in preset time, and/or whether CPU usage is relatively low, and/or disk read-write number is
It is no it is less come recognition start-up start whether finish.Specifically, the embodiment of the present invention is not restricted, get what starting up finished
After 4th moment, the time difference at a length of 4th moment and the 3rd moment when the 3rd is determined.
S206:It is first duration, second duration and the 3rd duration sum to determine starting up's time.
In the method for the acquisition available machine time described by the embodiment of the present invention, starting up of terminal start-up course is divided into not
With stage, that is, moment to the first moment of the first default process that starts of starting shooting is the first stage, the first moment to startup second
Second moment of default process be second stage, started for the 3rd the 3rd moment for presetting process and starting up finishes the 4th when
Carve as the phase III, the effective time that the available machine time should be included in each stage is calculated respectively, further according to effective in each stage
Duration obtains the available machine time.The degree of accuracy for obtaining the available machine time can be improved using the embodiment of the present invention.
Fig. 3 is referred to, Fig. 3 is a kind of another flow signal of method for obtaining the available machine time provided in an embodiment of the present invention
Figure, in embodiments of the present invention, this method may comprise steps of.
S301:According to the start moment and started for the first the first moment for presetting process, obtain the first duration.
In embodiments of the present invention, starting up's process is divided into three phases, this step is the first stage, i.e., from opening
The period at machine moment to the first moment for starting the first default process, wherein, start the first default process and represent to start user
Logging program.Such as:Assuming that user is provided with username and password, during starting up, operating system can eject one and step on
Interface is recorded, the login interface is used to prompt user to input effective username and password into operating system, to be worth explanation
It is that, even if user is not previously set username and password, can also start user's logging program in start process, now, adopt
Logged in the user name of system default.Generally, the premise for ejecting the login interface is operation user's logging program, and the user logs in
The corresponding process of program, in other words, for convenience of description, the process is referred to as the first default process in the embodiment of the present invention,
Start the first default process to represent to start user's logging program, obtain the first moment for starting the first default process.Specifically, should
Process can be preset according to the function of each process, and the embodiment of the present invention is not restricted.In this stage, it is substantially carried out hard
Part drives and/or the loading or startup of service, is the necessary condition of starting up's process, and the time in the stage all should calculate
In available machine time.Specifically, obtain the time difference at a length of the first moment and start moment for starting the first default process when first.
S302:According to first moment and started for the second the second moment for presetting process, obtain the second duration.
In embodiments of the present invention, this step is the second stage of starting up's process, i.e., from the first moment to starting the
The period at the second moment of two default processes, wherein, start the second default process and represent user's Successful login, in the stage,
The mainly startup project of loading or activation system program.Specifically, it refer to the detailed description portion of second embodiment of the invention
Point, repeat no more here.
S303:The start-up operation of the 3rd default process is monitored, and obtains the 3rd moment for starting the described 3rd default process.
After recognizing user's Successful login by above-mentioned steps, second stage terminates, and journey is shown followed by desktop is started
Sequence shows desktop, and the phase III starts.In real process, start desktop and show that program is completed by starting some process
The function, for convenience of describing, the process is referred to as the 3rd default process, the 3rd default process that starts represents that starting desktop shows
Program.Monitor the start-up operation of the 3rd default process, when monitoring the 3rd default process initiation, obtain start the 3rd preset into
3rd moment of journey.
S304:Detect and new process whether is had been turned in the second preset duration.
After getting the 3rd moment for starting the 3rd default process, since the 3rd moment, detect in the second preset duration
Whether have been turned on new process, if starting new process in second preset duration, illustrate that starting up does not finish, then after
It is continuous to perform step S304, detect in next second preset duration whether have been turned on new process, until wherein some is second pre-
If new process is not started in duration;If detecting and not starting new process in the second preset duration, step S305 is performed,
Finished by CPU usage come whether recognition start-up starts.
S305:Detect whether the CPU usage in second preset duration is less than the first preset value.
If detecting, the CPU usage in second preset duration is less than the first preset value, and second preset duration
It is interior and without new process is started, it is therefore contemplated that starting up finishes, step S308 is then performed, is opened with obtaining start
Dynamic the 4th moment finished.If detecting, the CPU usage in second preset duration is not less than the first preset value, although should
Do not start new process in second preset duration, but CPU usage is still higher, then performs step S306, and process is longer
Preset duration after again recognition start-up start whether finish, improve obtain the available machine time the degree of accuracy.
S306:Detect in the 3rd preset duration and whether have been turned on new process.
If the CPU usage in the second preset duration is not less than first preset value, continue monitoring from current time
New process whether is had been turned in the 3rd preset duration started, if not starting new process in the 3rd preset duration, is held
Row step S307, started according to the further recognition start-up of CPU usage in the 3rd preset duration and whether finished, improved acquisition and open
The degree of accuracy of machine time.If starting new process in the 3rd preset duration, it is considered that starting up does not finish, continue to hold
Row step S306, identified whether out again using the above method after continuing waiting for next second preset duration or the 3rd preset duration
Machine, which starts, to be finished.
S307:Detect whether the CPU usage in the 3rd preset duration is less than the second preset value, described second is default
Value is more than first preset value.
If detecting, not start new process, the CPU usage in the second preset duration in the second preset duration not low
In the first preset value, and the CPU usage in the 3rd preset duration is detected also without new process is started in the 3rd preset duration
Whether it is less than the second preset value, if being less than the second preset value, illustrates that starting up finishes, performs step 308;If not less than second
Preset value, illustrates that starting up does not finish, then continues executing with step S307.What deserves to be explained is second preset value is more than
First preset value.Such as:First preset value is 20%, and the second preset value is 50%.
S308:It is the 4th moment for finishing of starting up to obtain current time, and when determining a length of described 4th when the 3rd
Carve the time difference with the 3rd moment.
If detect and do not start new process in the second preset duration, and the CPU usage in the second preset duration is low
In the first preset value;Or the second CPU usage in preset duration is not less than the first preset value, but do not have in the 3rd preset duration
Have and start new process, and the CPU usage in the 3rd preset duration is less than the second preset value, then illustrates that starting up finishes.
It is the 4th moment for finishing of starting up to obtain current time, and when determining that a length of 4th moment is with the described 3rd when the 3rd
The time difference at quarter.
S309:It is first duration, second duration and the 3rd duration sum to determine the available machine time.
In the method for the acquisition available machine time described by the embodiment of the present invention, starting up of terminal start-up course is divided into not
In the same stage, the first moment of start moment to the first default process that starts is the first stage, and the first moment is pre- to starting second
If the second moment of process is second stage, the 4th moment finished to starting up at the 3rd moment of process is preset in startup the 3rd
For the phase III, the effective time that the available machine time should be included in each stage is calculated respectively, during further according to effective in each stage
It is long to obtain the available machine time.The degree of accuracy for obtaining the available machine time can be improved using the embodiment of the present invention.
Fig. 4 is referred to, Fig. 4 is a kind of another flow signal of method for obtaining the available machine time provided in an embodiment of the present invention
Figure, in embodiments of the present invention, this method may comprise steps of.
S401:According to the start moment and start the first moment of the first default process, obtain the first duration, it is described to start the
One default process represents to start user's logging program.
In the embodiment of the present invention, when receiving start-up command, it will receive at the time of the start-up command corresponds to and determine
For the moment of starting shooting, start the first default process and represent to start user's logging program.Such as:Described first, which presets process, to be
Winlogon.exe processes, the process are used to manage user's login and exited.
S402:According to first moment and started for the second the second moment for presetting process, obtain the second duration, it is described to open
Dynamic second default process represents user's Successful login.
Described second default process can be wininit.exe processes, and the process is used to open some main background clothes
Business, such as central service manager (Service Central Manager, SCM), local security checking subsystem (Local
Security Authority Subsystem, LSASS) and local session manager (Local Session Manager,
LSM.EXE) etc., start the process and represent user's Successful login.
S403:The start-up operation of the 3rd default process is monitored, and obtains the 3rd moment for starting the described 3rd default process.
It is described start the 3rd default process and represent to start desktop show program, in the embodiment of the present invention, the described 3rd is default
Process can be explorer.exe processes, and explorer.exe is Windows Program Managers or Windows resource managements
Device, it is used to manage Windows figure shells, including start menu, taskbar, desktop and file management, and deleting the program can lead
Windows graphical interfaces is caused not use.
S404:Detect whether the CPU usage in the 4th preset duration is less than the 3rd preset value.
In the embodiment of the present invention, the 4th preset duration is only used for distinguishing the first to the 3rd preset duration, gets startup the
After 3rd moment of three default processes, since the 3rd moment, whether CPU usage in the 4th preset duration is detected less than the
Three preset values, if being less than the 3rd preset value, perform step S405;If being not less than the 3rd preset value, illustrate that starting up does not finish,
Step S404 is then continued executing with, whether the CPU usage detected in next 4th preset duration is less than the 3rd preset value, until
CPU usage wherein in some the 4th preset duration is less than the 3rd preset value.Generally, the 3rd preset value is less than in such scheme
The first described preset value, such as:Assuming that the first preset value is 20% in such scheme, the second preset value is 50%, then the
Three preset values can be 10%.
S405:If the CPU usage is less than the 3rd preset value, it is that starting up finishes to obtain current time
Four moment.
S406:Determine the time difference at a length of 4th moment and the 3rd moment when the 3rd.
S407:It is first duration, second duration and the 3rd duration sum to determine the available machine time.
In the method for the acquisition available machine time described by the embodiment of the present invention, starting up of terminal start-up course is divided into not
With stage, that is, moment to the first moment of the first default process that starts of starting shooting is the first stage, the first moment to startup second
Second moment of default process be second stage, started for the 3rd the 3rd moment for presetting process and starting up finishes the 4th when
Carve as the phase III, the effective time that the available machine time should be included in each stage is calculated respectively, further according to effective in each stage
Duration obtains the available machine time.Using the embodiment of the present invention, the degree of accuracy for obtaining the available machine time can be improved.
It is apparatus of the present invention embodiment below, apparatus of the present invention embodiment belongs to same structure with the inventive method embodiment
Think, for performing the method described in the inventive method embodiment.For convenience of description, apparatus of the present invention embodiment only show with
The related part of apparatus of the present invention embodiment, particular technique details do not disclose, refer to the description of the inventive method embodiment,
No longer repeat one by one herein.
Fig. 5 is referred to, Fig. 5 is a kind of structural representation of device for obtaining the available machine time provided in an embodiment of the present invention,
In embodiments of the present invention, the device can include:First acquisition module 101, the second acquisition module 102, the 3rd acquisition module
103 and first determining module 104.
First acquisition module 101, for the first moment according to start moment and the default process of startup first, obtain first
Duration, the first default process that starts represent to start user's logging program.
Second acquisition module 102, for the second moment according to first moment and the default process of startup second, obtain
Second duration, the second default process that starts represent user's Successful login.
3rd acquisition module 103, for finished according to the 3rd moment and starting up that start the 3rd default process the
At four moment, the 3rd duration is obtained, the 3rd default process that starts represents that starting desktop shows program.
First determining module 104, for determining the available machine time for first duration, second duration and the described 3rd
Duration sum.
In the device of the acquisition available machine time described by the embodiment of the present invention, starting up of terminal start-up course is divided into not
With stage, that is, moment to the first moment of the first default process that starts of starting shooting is the first stage, the first moment to startup second
Second moment of default process be second stage, started for the 3rd the 3rd moment for presetting process and starting up finishes the 4th when
Carve as the phase III, the effective time that the available machine time should be included in each stage is calculated respectively, further according to effective in each stage
Duration obtains the available machine time.Using the embodiment of the present invention, the degree of accuracy for obtaining the available machine time can be improved.
Fig. 6 is referred to, Fig. 6 is a kind of another structural representation of device for obtaining the available machine time provided in an embodiment of the present invention
Figure, in embodiments of the present invention, the device can include:First acquisition module 201, the second acquisition module the 202, the 3rd obtain mould
Block 203, the first determining module 204 and the second determining module 205.
First acquisition module 201, for the first moment according to start moment and the default process of startup first, obtain first
Duration, the first default process that starts represent to start user's logging program.
Second acquisition module 202, for the second moment according to first moment and the default process of startup second, obtain
Second duration, the second default process that starts represent user's Successful login.
3rd acquisition module 203, for finished according to the 3rd moment and starting up that start the 3rd default process the
At four moment, the 3rd duration is obtained, the 3rd default process that starts represents that starting desktop shows program.
First determining module 204, for determining the available machine time for first duration, second duration and the described 3rd
Duration sum.
Second determining module 205, at the time of correspondence for when receiving start-up command, the start-up command will to be received
It is defined as the moment of starting shooting.
Preferably, the second acquisition module 202 can as shown in Figure 6 a, and Fig. 6 a are that the one of which second that Fig. 6 is provided obtains
The structural representation of module, in embodiments of the present invention, the second acquisition module 202 include:Monitoring unit 2021, computing unit
2022 and first acquisition unit 2023.
Monitoring unit 2021, for monitoring the time at first moment to the second moment for starting the second default process
The process started in section.
Computing unit 2022, for the Startup time according to each process started in the period, calculate respectively open respectively
The time interval of adjacent two Startup times when the dynamic moment in chronological sequence sequentially arranges.
First acquisition unit 2023, for obtaining the second duration according to each time interval calculated.
Preferably, first acquisition unit 2023 is specifically used for:
If each time interval is respectively less than the first preset duration, a length of second moment and described first when second is determined
The time difference at moment.
Preferably, first acquisition unit 2023 also particularly useful for:
If at least one time interval be present is not less than first preset duration, time interval is obtained not less than described the
The Startup time of each process of one preset duration;
According to the Startup time of each process, it is determined that target process corresponding to earliest Startup time;
Determine the Startup time of a length of target process and the time difference at first moment when second.
Preferably, the 3rd acquisition module 203 can as shown in Figure 6 b, and Fig. 6 b are that the one of which the 3rd that Fig. 6 is provided obtains
The structural representation of module, in embodiments of the present invention, the 3rd acquisition module 203 include:Second acquisition unit 2031, first is examined
Survey unit 2032, the second detection unit 2033, the 3rd acquiring unit 2034, the first determining unit 2035, the 3rd detection unit
2036 and the 4th detection unit 2037.
Second acquisition unit 2031, for monitoring the start-up operation of the 3rd default process, and it is pre- to obtain startup the described 3rd
If the 3rd moment of process.
First detection unit 2032, for detecting in the second preset duration whether have been turned on new process.
Second detection unit 2033, if for not starting new process in the second preset duration, it is pre- to detect described second
If whether the CPU usage in duration is less than the first preset value.
3rd acquiring unit 2034, if for not starting new process, and the second preset duration in the second preset duration
Interior CPU usage is less than first preset value, and it is the 4th moment that starting up finishes to obtain current time.
First determining unit 2035, the time at a length of 4th moment and the 3rd moment during for determining the 3rd
Difference.
3rd detection unit 2036, if for not starting new process, and the second preset duration in the second preset duration
Interior CPU usage is not less than first preset value, detects in the 3rd preset duration whether have been turned on new process.
4th detection unit 2037, if for not starting new process in the 3rd preset duration, it is pre- to detect the described 3rd
If whether the CPU usage in duration is less than the second preset value, second preset value is more than first preset value;
3rd acquiring unit 2034, if the CPU usage being additionally operable in the 3rd preset duration is pre- less than described second
If value, it is the 4th moment that starting up finishes to obtain current time.
Preferably, the 3rd acquisition module 203 can also as fig. 6 c, and Fig. 6 c are that the one of which the 3rd that Fig. 6 is provided obtains
Another structural representation of modulus block, in embodiments of the present invention, the 3rd acquisition module 203 includes:4th acquiring unit 203a,
5th detection unit 203b, the 5th acquiring unit 203c and the second determining unit 203d.
4th acquiring unit 203a, for monitoring the start-up operation of the 3rd default process, and it is pre- to obtain startup the described 3rd
If the 3rd moment of process.
5th detection unit 203b, for detecting whether the CPU usage in the 4th preset duration is less than the 3rd preset value.
5th acquiring unit 203c, if being less than the 3rd preset value for the CPU usage, acquisition current time is
The 4th moment that starting up finishes.
Second determining unit 203d, the time at a length of 4th moment and the 3rd moment during for determining the 3rd
Difference.
Optionally, the first default process in the embodiment of the present invention includes winlogon.exe processes, and described second is default
Process includes wininit.exe processes, and the described 3rd default process includes explorer.exe processes.
In the device of the acquisition available machine time described by the embodiment of the present invention, starting up of terminal start-up course is divided into not
With stage, that is, moment to the first moment of the first default process that starts of starting shooting is the first stage, the first moment to startup second
Second moment of default process be second stage, started for the 3rd the 3rd moment for presetting process and starting up finishes the 4th when
Carve as the phase III, the effective time that the available machine time should be included in each stage is calculated respectively, further according to effective in each stage
Duration obtains the available machine time.Using the embodiment of the present invention, the degree of accuracy for obtaining the available machine time can be improved.
Fig. 7 is referred to, Fig. 7 is a kind of structural representation of terminal provided in an embodiment of the present invention, in the embodiment of the present invention
In, terminal 10 includes the device as described above for obtaining the available machine time.The terminal can be computer, but be not limited to calculate
Machine, specifically, the embodiment of the present invention is not restricted.
What deserves to be explained is terminal 10 includes any device for obtaining the available machine time as described above, for convenience of description,
The device that the available machine time is obtained with one of which illustrates.In starting up of terminal start-up course, according to the start moment and open
At first moment of dynamic first default process, the first duration is obtained, the first default process that starts represents that starting user logs in journey
Sequence;According to first moment and started for the second the second moment for presetting process, obtain the second duration, the startup second is default
Process represents user's Successful login;The 4th moment that the 3rd moment and starting up according to the 3rd default process is started finish,
The 3rd duration is obtained, the 3rd default process that starts represents that starting desktop shows program;It is described first to determine the available machine time
Duration, second duration and the 3rd duration sum.
Optionally, user's display interface is generated, it is further alternative for showing the accessed available machine time, in institute
State and mark first duration, the second duration and the 3rd duration on user's display interface respectively, can be managed by above-mentioned technical proposal
Solution, the first duration can be used for the duration of startup hardware during description starting up, and the second duration can be used for description and open
The duration of activation system program in machine start-up course, the 3rd duration can be used for describing starting software program during starting up
Duration.Such as:The automatic spring display interface shows the boundary after either receiving idsplay order after the completion of the starting up
Face, for another example the form of display interface can be with as shown in figure 8, the one of which that Fig. 8, which is Fig. 7, to be provided shows showing for available machine time
It is intended to, in fig. 8 it is shown that on interface in addition to available machine time information is shown, may also display some conventional operation buttons or other letters
Breath, other information can be news in brief or Weather information etc..So as to which user be able to can be directly acquainted with according to the display interface
The application program of start self-starting duration shared during starting up is had been set to, reminds user to start shooting certainly part
Startup project is modified corresponding to the application program of startup, accelerates starting up speed.
In the terminal described by the embodiment of the present invention, starting up of terminal start-up course is divided into the different stages, that is, opened
First moment of machine moment to the first default process that starts is the first stage, and the first moment preset the second of process to startup second
Moment is second stage, starts the 3rd moment of the 3rd default process and the 4th moment that starting up finishes is the phase III,
The effective time of available machine time should be included in by calculating respectively in each stage, when obtaining start further according to the effective time in each stage
Between.Using the embodiment of the present invention, the degree of accuracy for obtaining the available machine time can be improved.
Fig. 9 is referred to, Fig. 9 is a kind of another structural representation of device for obtaining the available machine time provided in an embodiment of the present invention
Figure, for performing the method that the available machine time is obtained disclosed in the embodiment of the present invention, the device can include:At least one processor
301, for example, CPU, at least one network interface 304 or other users interface 303, memory 305, at least one communication bus
302.Communication bus 302 is used to realize the connection communication between these components.Wherein, user interface 303 can optionally include
USB interface and other standards interface, wireline interface.Network interface 304 can optionally include Wi-Fi interface and other nothings
Line interface.Memory 305 may include high-speed RAM memory, it is also possible to also including non-labile memory (non-
Volatile memory), a for example, at least magnetic disk storage.Memory 305 can optionally include at least one positioned at remote
From the storage device of aforementioned processor 301.As shown in figure 9, as can be wrapped in a kind of memory 305 of computer-readable storage medium
Include operating system 3051 and application program 3052.
In some embodiments, memory 305 stores following element, can perform module or data structure, or
Their subset of person, or their superset:
Operating system 3051, comprising various system programs, for realizing that various basic businesses and processing are hardware based
Task;
Application program 3052, the setting program of the deblocking parameter comprising objective network data, stroke of target data block
The comparison program of data block in branch, target data block and database and the deletion program of target data block etc. are various should
With program, for realizing various applied business.
Specifically, processor 301 is used to call the program stored in memory 305, performs following operate:
According to first moment at start shooting moment and the default process of startup first, the first duration is obtained, the startup first is pre-
If process represents to start user's logging program;
According to first moment and start the second moment of the second default process, obtain the second duration, it is described to start the
Two default processes represent user's Successful login;
At the 4th moment that the 3rd moment and starting up according to the 3rd default process is started finish, the 3rd duration is obtained,
The 3rd default process that starts represents that starting desktop shows program;
It is first duration, second duration and the 3rd duration sum to determine the available machine time.
In another embodiment, processor 301 performs described according to first moment and the default process of startup second
The second moment, obtain the operation of the second duration, can include specific performing following operate:
Monitor the process started within first moment to the period for starting the second moment of the second default process;
According to the Startup time of each process started in the period, it is in chronological sequence suitable that each Startup time is calculated respectively
The time interval of sequence two Startup times adjacent when arranging;
Second duration is obtained according to each time interval calculated.
In another embodiment, processor 301 performs described according to each time interval calculated acquisition second
The operation of duration, can be operated below specific perform:
If each time interval is respectively less than the first preset duration, a length of second moment and described first when second is determined
The time difference at moment.
In another embodiment, processor 301 performs described according to each time interval calculated acquisition second
The operation of duration, it can also be specific and perform following operate:
If at least one time interval be present is not less than first preset duration, time interval is obtained not less than described the
The Startup time of each process of one preset duration;
According to the Startup time of each process, it is determined that target process corresponding to earliest Startup time;
Determine the Startup time of a length of target process and the time difference at first moment when second.
In another embodiment, processor 301 performs the 3rd moment according to the 3rd default process that starts and opened
Machine starts the 4th moment finished, obtains the operation of the 3rd duration, can include performing following operate:
The start-up operation of the 3rd default process is monitored, and obtains the 3rd moment for starting the described 3rd default process;
Detect and new process whether is had been turned in the second preset duration;
If it is not, whether the CPU usage in detection second preset duration is less than the first preset value;
If the CPU usage is less than first preset value, when acquisition current time is the 4 that starting up finishes
Carve;
Determine the time difference at a length of 4th moment and the 3rd moment when the 3rd.
In another embodiment, the CPU usage that processor 301 is performed in above-mentioned detection second preset duration is
It is no to be less than after the first preset value, it can also carry out following operation:
If the CPU usage is not less than first preset value, whether had been turned in the 3rd preset duration of detection new
Process;
If it is not, whether the CPU usage in detection the 3rd preset duration is less than the second preset value, described second is default
Value is more than first preset value;
If the CPU usage is less than second preset value, the execution acquisition current time finishes for starting up
Four moment the step of.
In another embodiment, processor 301 performs the 3rd moment according to the 3rd default process that starts and opened
Machine starts the 4th moment finished, obtains the operation of the 3rd duration, can also include performing following operate:
The start-up operation of the 3rd default process is monitored, and obtains the 3rd moment for starting the described 3rd default process;
Detect whether the CPU usage in the 4th preset duration is less than the 3rd preset value;
If the CPU usage is less than the 3rd preset value, when acquisition current time is the 4 that starting up finishes
Carve;
Determine the time difference at a length of 4th moment and the 3rd moment when the 3rd.
In another embodiment, processor 301 perform it is described acquisition the first duration operation before, can also carry out with
Lower operation:
When receiving start-up command, it will receive and be defined as the moment of starting shooting at the time of the start-up command corresponds to.
Optionally, the described first default process includes winlogon.exe processes, and the described second default process includes
Wininit.exe processes, the described 3rd default process include explorer.exe processes.
In the above-mentioned technical solutions, starting up of terminal start-up course is divided into the different stages, i.e. the start moment to startup
First moment of the first default process is the first stage, and the second moment of the first moment to the second default process that starts is second-order
The 4th moment that section, the 3rd moment of the default process of startup the 3rd and starting up finish is the phase III, calculates each rank respectively
The effective time of available machine time should be included in section, the available machine time is obtained further according to the effective time in each stage.Using this hair
Bright embodiment, the degree of accuracy for obtaining the available machine time can be improved.
Those skilled in the art can be by the different embodiments and the feature of different embodiments described in this specification
It is combined and combines.Module or unit in all embodiments of the invention, universal integrated circuit, such as CPU can be passed through
(Central Processing Unit, central processing unit), or pass through ASIC (Application Specific
Integrated Circuit, application specific integrated circuit) realize.Wherein, the step in all embodiments of the invention method is permissible
According to being actually needed the adjustment of carry out order, merge and delete;Module or unit in all embodiments of the invention device can roots
It is combined, divided and deleted according to being actually needed.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include
Module, fragment or the portion of the code of the executable instruction of one or more the step of being used to realize specific logical function or process
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction
The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass
Defeated program is for instruction execution system, device or equipment or the dress used with reference to these instruction execution systems, device or equipment
Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring
Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium, which can even is that, to print the paper of described program thereon or other are suitable
Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method carries
Suddenly it is that by program the hardware of correlation can be instructed to complete, described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, can also
That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized in the form of software function module and as independent production marketing or in use, can also be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although have been shown and retouch above
Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the present invention
System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention
Type.
The above disclosed right for being only presently preferred embodiments of the present invention, the present invention can not being limited with this certainly
Scope, one of ordinary skill in the art will appreciate that all or part of flow of above-described embodiment is realized, and according to right of the present invention
It is required that the equivalent variations made, still fall within and invent covered scope.
Claims (19)
- A kind of 1. method for obtaining the available machine time, it is characterised in that including:According to the start moment and start the first moment of the first default process, obtain the first duration, it is described start first preset into Journey represents to start user's logging program;According to first moment and started for the second the second moment for presetting process, obtain the second duration, the startup second is pre- If process represents user's Successful login, described second, which presets last in process of the process needed for activation system program, starts Process;At the 4th moment that the 3rd moment and starting up according to the 3rd default process is started finish, the 3rd duration is obtained, it is described Start the 3rd default process and represent that starting desktop shows program;It is first duration, second duration and the 3rd duration sum to determine the available machine time.
- 2. the method as described in claim 1, it is characterised in that described according to first moment and the default process of startup second The second moment, obtain the second duration, including:Monitor the process started within first moment to the period for starting the second moment of the second default process;According to the Startup time of each process started in the period, each Startup time is calculated respectively and is in chronological sequence sequentially arranged The time interval of two adjacent Startup times during row;Second duration is obtained according to each time interval calculated.
- 3. method as claimed in claim 2, it is characterised in that described to obtain second according to each time interval calculated Duration, including:If each time interval is respectively less than the first preset duration, a length of second moment and first moment when second are determined Time difference.
- 4. method as claimed in claim 3, it is characterised in that described to obtain second according to each time interval calculated Duration, in addition to:If at least one time interval be present is not less than first preset duration, it is pre- not less than described first to obtain time interval If the Startup time of each process of duration;According to the Startup time of each process, it is determined that target process corresponding to earliest Startup time;Determine the Startup time of a length of target process and the time difference at first moment when second.
- 5. the method as described in claim 1, it is characterised in that described that 3rd moment of process is preset according to startup the 3rd and opened Machine starts the 4th moment finished, obtains the 3rd duration, including:The start-up operation of the 3rd default process is monitored, and obtains the 3rd moment for starting the described 3rd default process;Detect and new process whether is had been turned in the second preset duration;If it is not, whether the CPU usage in detection second preset duration is less than the first preset value;If the CPU usage is less than first preset value, it is the 4th moment that starting up finishes to obtain current time;Determine the time difference at a length of 4th moment and the 3rd moment when the 3rd.
- 6. method as claimed in claim 5, it is characterised in that the CPU usage in detection second preset duration Whether it is less than after the first preset value, methods described also includes:If the CPU usage is not less than first preset value, detect in the 3rd preset duration whether have been turned on new process;If it is not, whether the CPU usage in detection the 3rd preset duration is less than the second preset value, second preset value is big In first preset value;If the CPU usage is less than second preset value, perform that described to obtain current time be that starting up finishes The step of four moment.
- 7. the method as described in claim 1, it is characterised in that described that 3rd moment of process is preset according to startup the 3rd and opened Machine starts the 4th moment finished, obtains the 3rd duration, including:The start-up operation of the 3rd default process is monitored, and obtains the 3rd moment for starting the described 3rd default process;Detect whether the CPU usage in the 4th preset duration is less than the 3rd preset value;If the CPU usage is less than the 3rd preset value, it is the 4th moment that starting up finishes to obtain current time;Determine the time difference at a length of 4th moment and the 3rd moment when the 3rd.
- 8. the method as described in claim 1, it is characterised in that before the first duration of the acquisition, methods described also includes:When receiving start-up command, it will receive and be defined as the moment of starting shooting at the time of the start-up command corresponds to.
- 9. the method as described in claim any one of 1-8, it is characterised in that the described first default process is winlogon.exe Process, the described second default process are wininit.exe processes, and the described 3rd default process is explorer.exe processes.
- A kind of 10. device for obtaining the available machine time, it is characterised in that including:First acquisition module, for the first moment according to start moment and the default process of startup first, obtain the first duration, institute The default process of startup first is stated to represent to start user's logging program;Second acquisition module, for presetting the second moment of process according to first moment and startup second, when obtaining second Long, the second default process that starts represents user's Successful login, and the described second default process is needed for activation system program The process that last in process starts;3rd acquisition module, the 4th moment finished for the 3rd moment according to the default process of startup the 3rd and starting up, The 3rd duration is obtained, the 3rd default process that starts represents that starting desktop shows program;First determining module, for determine the available machine time for first duration, second duration and the 3rd duration it With.
- 11. device as claimed in claim 10, it is characterised in that second acquisition module includes:Monitoring unit, opened for monitoring within the period at first moment to the second moment for starting the second default process Dynamic process;Computing unit, for the Startup time according to each process started in the period, each Startup time is calculated respectively and is pressed The time interval of time order and function order two Startup times adjacent when arranging;First acquisition unit, for obtaining the second duration according to each time interval calculated.
- 12. device as claimed in claim 11, it is characterised in that the first acquisition unit is specifically used for:If each time interval is respectively less than the first preset duration, a length of second moment and first moment when second are determined Time difference.
- 13. device as claimed in claim 12, it is characterised in that the first acquisition unit also particularly useful for:If at least one time interval be present is not less than first preset duration, it is pre- not less than described first to obtain time interval If the Startup time of each process of duration;According to the Startup time of each process, it is determined that target process corresponding to earliest Startup time;Determine the Startup time of a length of target process and the time difference at first moment when second.
- 14. device as claimed in claim 10, it is characterised in that the 3rd acquisition module includes:Second acquisition unit, for monitoring the start-up operation of the 3rd default process, and obtain and start the described 3rd default process 3rd moment;First detection unit, for detecting in the second preset duration whether have been turned on new process;Second detection unit, for if it is not, whether the CPU usage in detection second preset duration is default less than first Value;3rd acquiring unit, if being less than first preset value for the CPU usage, acquisition current time is starting up The 4th moment finished;First determining unit, the time difference at a length of 4th moment and the 3rd moment during for determining the 3rd.
- 15. device as claimed in claim 14, it is characterised in that the 3rd acquisition module also includes:3rd detection unit, if being not less than first preset value for the CPU usage, detecting in the 3rd preset duration is It is no to have been turned on new process;4th detection unit, for if it is not, whether the CPU usage in detection the 3rd preset duration is default less than second Value, second preset value are more than first preset value;3rd acquiring unit, if being additionally operable to the CPU usage is less than second preset value, current time is obtained to open Machine starts the 4th moment finished.
- 16. device as claimed in claim 10, it is characterised in that the 3rd acquisition module includes:4th acquiring unit, for monitoring the start-up operation of the 3rd default process, and obtain and start the described 3rd default process 3rd moment;5th detection unit, for detecting whether the CPU usage in the 4th preset duration is less than the 3rd preset value;5th acquiring unit, if being less than the 3rd preset value for the CPU usage, acquisition current time is starting up The 4th moment finished;Second determining unit, the time difference at a length of 4th moment and the 3rd moment during for determining the 3rd.
- 17. device as claimed in claim 10, it is characterised in that described device also includes:Second determining module, it is defined as that when receiving start-up command, will receive at the time of the start-up command corresponds to Start shooting the moment.
- 18. the device as described in claim any one of 10-17, it is characterised in that described first, which presets process, is Winlogon.exe processes, the described second default process are wininit.exe processes, and the described 3rd default process is Explorer.exe processes.
- 19. a kind of terminal, it is characterised in that including the device as described in claim any one of 10-18.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410422440.6A CN104199693B (en) | 2014-08-25 | 2014-08-25 | Method, device and terminal for obtaining boot time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410422440.6A CN104199693B (en) | 2014-08-25 | 2014-08-25 | Method, device and terminal for obtaining boot time |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104199693A CN104199693A (en) | 2014-12-10 |
CN104199693B true CN104199693B (en) | 2017-12-19 |
Family
ID=52084990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410422440.6A Active CN104199693B (en) | 2014-08-25 | 2014-08-25 | Method, device and terminal for obtaining boot time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104199693B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107046600B (en) * | 2017-03-09 | 2020-12-04 | 广东艾檬电子科技有限公司 | Method and device for determining standard time of Android system |
CN107168839B (en) * | 2017-05-18 | 2020-10-30 | 浙江红绿蓝纺织印染有限公司 | Method for detecting starting time length of mobile terminal |
CN107179992B (en) * | 2017-05-18 | 2021-12-14 | 浙江欣欣仪器股份有限公司 | Method for detecting shutdown time length of mobile terminal |
CN107193746B (en) * | 2017-05-26 | 2020-07-03 | 长乐智高生物科技有限公司 | Method for evaluating starting performance of mobile terminal |
CN107357615A (en) * | 2017-06-30 | 2017-11-17 | 广东欧珀移动通信有限公司 | Method for starting terminal, device, storage medium and electronic equipment |
CN107741910B (en) * | 2017-10-18 | 2021-06-29 | 北京奇虎科技有限公司 | Application program installation performance testing method and device, computing equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102646066A (en) * | 2012-02-22 | 2012-08-22 | 腾讯科技(深圳)有限公司 | Method and device for obtaining starting-up time |
CN103488557A (en) * | 2013-08-28 | 2014-01-01 | 北京奇虎科技有限公司 | Method and device for obtaining boot time of computer operating system |
CN103902326A (en) * | 2012-12-29 | 2014-07-02 | 鸿富锦精密工业(武汉)有限公司 | Electronic device and start-up time frame detecting method thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7516317B2 (en) * | 2005-12-29 | 2009-04-07 | Microsoft Corporation | Measuring an operating system's boot duration |
-
2014
- 2014-08-25 CN CN201410422440.6A patent/CN104199693B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102646066A (en) * | 2012-02-22 | 2012-08-22 | 腾讯科技(深圳)有限公司 | Method and device for obtaining starting-up time |
CN103902326A (en) * | 2012-12-29 | 2014-07-02 | 鸿富锦精密工业(武汉)有限公司 | Electronic device and start-up time frame detecting method thereof |
CN103488557A (en) * | 2013-08-28 | 2014-01-01 | 北京奇虎科技有限公司 | Method and device for obtaining boot time of computer operating system |
Also Published As
Publication number | Publication date |
---|---|
CN104199693A (en) | 2014-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104199693B (en) | Method, device and terminal for obtaining boot time | |
CN104424094B (en) | A kind of exception information acquisition methods, device and intelligent terminal | |
CN104199692B (en) | Method, device and terminal for acquiring starting time of application program | |
TWI450103B (en) | Remote management systems and methods for servers, and computer program products thereof | |
CN108959059B (en) | Test method and test platform | |
CN107145440B (en) | Application program testing method and device and computer equipment | |
CN106095866B (en) | The optimization method and device of application program recommended method, program starting speed | |
CN104135520B (en) | A kind of method and device for identifying android terminal | |
CN106126424B (en) | A kind of visual automated testing method of script, device and mobile terminal | |
CN106875980A (en) | Method for testing hard disk and device | |
CN105045714A (en) | Method and device for testing starting duration of application software and terminal | |
CN109189612A (en) | Log processing method and electronic equipment when a kind of linux kernel exception | |
CN115827111A (en) | Method and device for adjusting server startup items, storage medium and electronic device | |
CN109240928A (en) | A kind of test method, device, equipment and storage medium | |
CN109992511B (en) | Device and method for obtaining code test coverage rate | |
CN115297025A (en) | IA robot monitoring method and device based on RPA and AI | |
CN112306639B (en) | Virtual desktop testing method and device | |
US11681758B2 (en) | Bot program for monitoring | |
CN111190806B (en) | Log processing method and device of voice interaction equipment | |
CN109902004B (en) | Method and device for testing application program link channel | |
US20170374165A1 (en) | Computing environment modification based on an impact curve | |
CN111240990A (en) | ISMCLI command line testing method, system, terminal and storage medium | |
CN113127369A (en) | Processing method and device for execution script | |
CN111158829A (en) | Operation rollback processing method and device | |
CN112181853A (en) | Program debugging method, device and system |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20181204 Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province Patentee after: Zhuhai Leopard Technology Co.,Ltd. Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd. |