Summary of the invention
Technical matters to be solved by this invention provides a kind of exhibiting method of progress bar, in order to allow progress bar at the uniform velocity, advance smoothly, solve progress bar in the process of advancing, occur suspending the problem of advancing when finish the subtask because of waiting, and in most cases, the progress bar sometimes fast and sometimes slow problem of advancing.
The present invention also provides a kind of demonstration device of progress bar, in order to guarantee said method application and realization in practice.
In order to address the above problem, the embodiment of the invention discloses a kind of exhibiting method of progress bar, comprising:
The deadline of calculation task;
At the uniform velocity interval is set, described at the uniform velocity interval the over half of progress bar total length that account in the progress bar of task correspondence;
In described at the uniform velocity interval, at the uniform velocity advance according to described task deadline control progress bar.
Preferably, described method also comprises:
If described task was finished in the at the uniform velocity interval pairing time, then progress bar directly advances to completion status.
Preferably, described method also comprises:
In the progress bar of task correspondence, be provided with between buffer zone, between described buffer zone and at the uniform velocity intervally constitute complete progress bar;
If described task can not finish in the at the uniform velocity interval pairing time, then control progress bar between buffer zone in Easy abeadl, when task is finished, advance to completion status.
Preferably, the deadline of described task was determined according to the time that loaded this task last time;
Perhaps, the deadline of described task was determined according to the corresponding task deadline of writing down in the webserver.
Preferably, described at the uniform velocity interval time corresponding is more than or equal to the described task deadline, and described progress bar comprises N sub-range, and institute at the uniform velocity interval comprises more than or equal to x%*N sub-range, described x is more than or equal to 50, is less than or equal to arbitrary value of 100.
Preferably, if the deadline of current task is t, progress bar comprises N impartial sub-range, and described at the uniform velocity interval comprises x%*N sub-range, and the described at the uniform velocity interval pairing time is t*z, and described z is default time coefficient;
Described progress bar at the uniform velocity advances in described at the uniform velocity interval according to the speed of (x%*N)/(t*z).
Preferably, described at the uniform velocity interval account for represent interval more than 70%, correspondingly, account between described buffer zone represent interval below 30%.
Preferably, the described at the uniform velocity interval ratio that accounts for the progress bar total length is set according to the task deadline and the actual error of described calculating.
Preferably, the described at the uniform velocity interval pairing time is the described task deadline that calculates.
Preferably, described at the uniform velocity interval end position is provided with call tag, is used to the task deadline of pointing out the user to calculate.
The embodiment of the invention also discloses a kind of demonstration device of progress bar, comprising:
The Time Calculation module is used for deadline of calculation task;
At the uniform velocity the interval is provided with module, is used at the progress bar of task correspondence at the uniform velocity interval described at the uniform velocity interval the over half of progress bar total length that account for being set;
The control module of at the uniform velocity advancing is used at the uniform velocity advancing according to described task deadline control progress bar in described at the uniform velocity interval.
Preferably, described device also comprises:
The completion status control module is used for when described task was finished in the at the uniform velocity interval pairing time, and progress bar directly advances to completion status.
Preferably, described device also comprises:
Module is set between buffer zone, is used for being provided with between buffer zone, between described buffer zone and at the uniform velocity intervally constitute complete progress bar at the progress bar of task correspondence;
The Easy abeadl control module is used for when described task can not be finished in the at the uniform velocity interval pairing time, control progress bar between buffer zone in Easy abeadl, when task is finished, advance to completion status.
Preferably, the deadline of described task was determined according to the time that loaded this task last time; Perhaps, the deadline of described task was determined according to the corresponding task deadline of writing down in the webserver.
Preferably, described at the uniform velocity interval time corresponding is more than or equal to the described task deadline, and described progress bar comprises N sub-range, and institute at the uniform velocity interval comprises more than or equal to x%*N sub-range, described x is more than or equal to 50, is less than or equal to arbitrary value of 100.
Preferably, if the deadline of current task is t, progress bar comprises N impartial sub-range, and described at the uniform velocity interval comprises x%*N sub-range, and the described at the uniform velocity interval pairing time is t*z, and described z is default time coefficient;
Described progress bar at the uniform velocity advances in described at the uniform velocity interval according to the speed of (x%*N)/(t*z).
Preferably, described at the uniform velocity interval account for represent interval more than 70%, correspondingly, account between described buffer zone represent interval below 30%.
Preferably, the described at the uniform velocity interval ratio that accounts for the progress bar total length is set according to the task deadline and the actual error of described calculating.
Preferably, the described at the uniform velocity interval pairing time is the described task deadline that calculates.
Preferably, described at the uniform velocity interval end position is provided with call tag, is used to the task deadline of pointing out the user to calculate.
Compared with prior art, the present invention has the following advantages:
1, the embodiment of the invention is at the uniform velocity interval by being provided with in progress bar, by the speed that adopts precalculated task deadline and at the uniform velocity interval distance calculation to go out, control progress bar in interval at the uniform velocity at the uniform velocity, advance smoothly, rather than advancing according to the performance control progress bar of subtask.Thereby can solve progress bar in the process of advancing, occur suspending the problem of advancing when finish the subtask, allow user's sensation task carry out very wellly because of waiting; Can also solve in most cases, the progress bar sometimes fast and sometimes slow problem of advancing brings the user extraordinary experience.
2, the embodiment of the invention can also in progress bar, be provided with at the uniform velocity interval and buffering interval, by the task deadline determined and the speed that goes out of the distance calculation in interval at the uniform velocity, control progress bar in interval at the uniform velocity at the uniform velocity, advance smoothly.If task was finished in the at the uniform velocity interval pairing time, then progress bar directly advances to completion status, if task can not finish in the at the uniform velocity interval pairing time, then control progress bar between buffer zone in Easy abeadl, when task is finished, advance to completion status.Thereby not only can allow progress bar at the uniform velocity, advance smoothly, can also solve, make the user obtain experience better because of the inaccurate abnormal problem that causes of current task Time Calculation.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
One of core idea of the embodiment of the invention is, in progress bar, be provided with at the uniform velocity interval, by the task deadline determined and the speed that goes out of the distance calculation in interval at the uniform velocity, control progress bar in interval at the uniform velocity at the uniform velocity, advance smoothly.
With reference to figure 1, show the process flow diagram of the exhibiting method embodiment 1 of a kind of progress bar of the present invention, specifically can may further comprise the steps:
The deadline of step 101, calculation task;
In a preferred embodiment of the present invention, the described task deadline can calculate according to the time that loaded this required by task last time; In practice, can write down the time that each task is finished, be kept at this locality behind the record, to calculate the reference of this task deadline as next time.Because the performance of PC equipment can be along with factors vary such as hardware longevity, installed software, along with travelling speed is more and more slower, if the time that this task of the last loading of employing is finished as the calculating reference value of current task deadline, can make the more accurate progress that reflects that task is carried out of progress bar.
As another kind of example, the described task deadline can obtain from the webserver, it is the deadline that the webserver is collected this task of loading of a plurality of clients, when certain client needs, then offered client the corresponding task deadline as the reference of calculating the current task deadline.
As a kind of more preferred example, the task of can preserve a plurality of clients in the webserver loads the parameter configuration of finishing time information and corresponding client, described parameter configuration can be the integral body evaluation and test information of device hardware performance, also can be concrete device hardware configuration information, can also be the integral body evaluation and test information of system performance in the equipment etc., it all is feasible that those skilled in the art select for use arbitrarily according to actual conditions, and the present invention need not this to be limited.
For example, the information that writes down in the webserver is as shown in the table:
In this case, when executing the task, the task load information that the webserver can be submitted to according to client, and the configuration parameter information of active client is obtained the corresponding task deadline.Such as the last table of reference, the task load information that client is submitted to is a wooden horse killing task, the configuration parameter information of client is that the hardware performance scoring is 85 minutes, so the webserver extracts corresponding task loading and finished required time 40 minutes, returns to active client as the reference value of calculating the current task deadline.
As a kind of example of concrete application, the deadline of described task can also be carried out the time that this task spends by current device in statistics a period of time, calculates acquisition then; Can also calculate the time that current device is finished this task according to certain computation rule according to the hardware environment and/or the system environments of current device; Those skilled in the art according to actual conditions adopt any account form all can, as adopting empirical value etc., the present invention need not this to be limited.
Step 102, in the progress bar of task correspondence, be provided with at the uniform velocity interval, described at the uniform velocity interval the over half of progress bar total length that account for;
In a preferred embodiment of the present invention, describedly at the uniform velocity intervally can be provided with to such an extent that account for more than 70% of progress bar, according to actual conditions, described at the uniform velocity interval can also be according to the total length setting of progress bar, be about at the uniform velocity intervally be provided with to such an extent that to account for 100% of progress bar also be feasible.A kind of example as concrete application, the described at the uniform velocity interval ratio that accounts for the progress bar total length can be set according to described task deadline and actual error, wherein, described actual error can be determined according to the last task deadline of record, also the error log of a plurality of client process tasks that can collect according to server determines that the present invention does not limit this.Certainly, described at the uniform velocity interval setting also can be adjusted arbitrarily according to actual conditions, and the present invention does not also limit this.
Step 103, in described at the uniform velocity interval, at the uniform velocity advance according to described task deadline control progress bar.
For example, the deadline of supposing current task is t, and progress bar comprises N impartial sub-range, and described at the uniform velocity interval comprises x%*N sub-range, and the described at the uniform velocity interval pairing time is t*z, and described z is default time coefficient;
In this case, then can calculate the pace v1 of progress bar by following formula:
v1=(x%*N)/(t*z)
In this example, described progress bar then can at the uniform velocity advance in described at the uniform velocity interval according to v1.
As another kind of example of the present invention, the deadline of supposing current task is t, and progress bar comprises N impartial sub-range, and described at the uniform velocity interval comprises x%*N sub-range; In this case, described progress bar can also at the uniform velocity advance in described at the uniform velocity interval according to the speed of (x%*N)/t.
Certainly, above-mentioned control progress bar at the uniform velocity advances and method only is used as example, and it all is feasible that those skilled in the art adopt any method according to actual conditions, and the present invention need not this to be limited.
In specific implementation, the embodiment of the invention can also may further comprise the steps:
Step 104, if described task can in the at the uniform velocity interval pairing time, finish, then progress bar directly advances to completion status.In specific implementation, described at the uniform velocity interval time corresponding can be set more than or equal to the described task deadline, described progress bar comprises N sub-range, and institute at the uniform velocity interval comprises more than or equal to x%*N sub-range, described x is more than or equal to 50, is less than or equal to arbitrary value of 100.
Use present embodiment, progress bar can be in interval at the uniform velocity at the uniform velocity, advance smoothly, thereby can solve progress bar of the prior art in the process of advancing, occur suspending the problem of advancing when finish the subtask, can allow user's sensation task carry out very wellly because of waiting; Can also solve in most cases, the progress bar sometimes fast and sometimes slow problem of advancing brings the user extraordinary experience.
In specific implementation, can also call tag be set at described at the uniform velocity interval end position, be used to task deadline of pointing out the user to calculate, described call tag can be the call tag that generates, the i.e. resident information that is provided with at the uniform velocity interval end position in progress bar generation and displaying; The information that described call tag can also eject when advancing to interval end position at the uniform velocity at progress bar.Described call tag can allow the user know the implementation progress of current task more intuitively.
One of core idea of the embodiment of the invention is, in progress bar, be provided with at the uniform velocity interval and buffering interval, by task deadline of calculating and the speed that goes out of the distance calculation in interval at the uniform velocity, control progress bar in interval at the uniform velocity at the uniform velocity, advance smoothly.If task was finished in the at the uniform velocity interval pairing time, then progress bar directly advances to completion status, if task can not finish in the at the uniform velocity interval pairing time, then control progress bar between buffer zone in Easy abeadl, when task is finished, advance to completion status.
With reference to figure 2, show the process flow diagram of the exhibiting method embodiment 2 of a kind of progress bar of the present invention, specifically can may further comprise the steps:
The deadline t of step 201, calculation task;
Step 202, the progress bar of task correspondence is set, comprises N sub-range in the described progress bar;
Step 203, at the uniform velocity interval x%*N and interval (1-x%) * N of buffering are set in described progress bar;
In the reality, described x can be preferably more than 70, the arbitrary value less than 100 for greater than arbitrary value of 50.
Step 204, the task deadline control progress bar that foundation is calculated in described at the uniform velocity interval at the uniform velocity advance;
Step 205a, if task in the at the uniform velocity interval pairing time, finish, then progress bar directly advances to completion status.
For example, suppose that current at the uniform velocity interval comprises 75% sub-range, the at the uniform velocity interval pairing time is t*z, and described z is for default time coefficient, as 1.2; If task finishes in this at the uniform velocity interval time corresponding, then progress bar passes between 25% buffer zone, directly advances to completion status, and promptly the prospect of progress bar is the same with background long.
Step 205b, if described task can not in the at the uniform velocity interval pairing time, finish, then control progress bar between buffer zone in Easy abeadl, when task is finished, advance to completion status.
The speed that progress bar is adopted between buffer zone can be according to slowing down in proportion in the at the uniform velocity interval speed that is adopted, for example, suppose that v1 is that progress bar is at the uniform velocity interval pace, v2 is the pace of progress bar between buffer zone, v2=1/2*v1, and this speed can also be upgraded according to actual conditions, upgrade once as per second, then in this example, the progress bar pace of each second between buffer zone is half of last one second.Completion status readvances when task is finished.
Certainly, the method that above-mentioned progress bar slows down between buffer zone can be provided with arbitrarily by those skilled in the art, and the present invention does not limit this.
Use present embodiment, not only can allow progress bar at the uniform velocity, advance smoothly, can also solve, make the user obtain experience better because of the inaccurate abnormal problem that causes of current task Time Calculation.
For making those skilled in the art understand the present invention better, below by a concrete example explanation the present invention.
A1, video code conversion task of the current execution of user, according to the current hardware environment of user, system environments, the time of user's video code conversion last time task and the size of video file, calculating when time time of the video code conversion required by task of execution is 8 minutes;
A2, the progress bar of task correspondence is set, comprises 10000 sub-ranges in the described progress bar;
A3, preceding 75% be set at the uniform velocity intervally in described progress bar, back 25% is set between buffer zone;
A4, according to needed deadline of current task and default time coefficient 1.25, it is 8*1.25=10 minute (600 seconds) that the at the uniform velocity interval pairing time is set;
A5, task begin to carry out, progress bar according to 7500/600 speed v 1 at the uniform velocity, advance smoothly in interval at the uniform velocity, i.e. per second 12.5 sub-ranges of advancing;
If the A6 task executed in 10 minutes, then progress bar directly advances to completion status when task is finished;
If the A7 task did not execute in 10 minutes, then calculate the speed v 2 of between buffer zone, advancing according to speed v 1, establish v2=1/2*v1, and the per second renewal is once, in this example, promptly the 601st second pace is v1/2,6.25 sub-ranges of promptly advancing; Speed was v1/2/2 in the 601st second, 3.125 sub-ranges of promptly advancing, and the like, when task was finished, progress bar directly advanced to completion status.
Need to prove, for method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
With reference to figure 3, show the structured flowchart of the demonstration device embodiment 1 of a kind of progress bar of the present invention, specifically can comprise with lower module:
Time Calculation module 301 is used for deadline of calculation task;
At the uniform velocity the interval is provided with module 302, is used at the progress bar of task correspondence at the uniform velocity interval being set described at the uniform velocity interval the over half of progress bar total length that account for;
The control module 303 of at the uniform velocity advancing is used at the uniform velocity advancing according to described task deadline control progress bar in described at the uniform velocity interval.
In a preferred embodiment of the present invention, the demonstration device of described progress bar can also comprise with lower module:
Completion status control module 304 is used for when described task was finished in the at the uniform velocity interval pairing time, and progress bar directly advances to completion status.
In specific implementation, be t if the deadline of current task is set, progress bar represents the interval and comprises N impartial sub-range, and described at the uniform velocity interval comprises x%*N sub-range, and the described at the uniform velocity interval pairing time is t*z, and described z is default time coefficient; In this case, described progress bar then can at the uniform velocity advance in described at the uniform velocity interval according to the speed of (x%*N)/(t*z).
As a kind of preferred application example, described at the uniform velocity interval can account for more than 70% of progress bar, correspondingly, can account for below 30% of progress bar between described buffer zone.
In specific implementation, the described at the uniform velocity interval ratio that accounts for the progress bar total length can also be set according to described task deadline and actual error.
As a kind of example, the described at the uniform velocity interval pairing time can be the described task deadline that calculates.
In practice, can also call tag be set, be used to the task deadline of pointing out the user to calculate at described at the uniform velocity interval end position.
Because present embodiment is substantially corresponding to aforementioned method embodiment shown in Figure 1, so not detailed part in the description of present embodiment can just not given unnecessary details at this referring to the related description in the previous embodiment.
With reference to figure 4, show the structured flowchart of the demonstration device embodiment 2 of a kind of progress bar of the present invention, specifically can comprise with lower module:
Time Calculation module 401 is used for deadline of calculation task;
At the uniform velocity the interval is provided with module 402, is used at the progress bar of task correspondence at the uniform velocity interval being set described at the uniform velocity interval the over half of progress bar total length that account for;
Module 403 is set between buffer zone, is used for being provided with between buffer zone, between described buffer zone and at the uniform velocity intervally constitute complete progress bar at the progress bar of task correspondence;
The control module 404 of at the uniform velocity advancing is used at the uniform velocity advancing according to the task deadline control progress bar that is calculated in described at the uniform velocity interval;
Completion status control module 405a is used for when described task was finished in the at the uniform velocity interval pairing time, and progress bar directly advances to completion status.
Easy abeadl control module 405b is used for when described task can not be finished in the at the uniform velocity interval pairing time, control progress bar between buffer zone in Easy abeadl, when task is finished, advance to completion status.
In specific implementation, the deadline of described task was determined according to the time that loaded this task last time; Perhaps, the deadline of described task was determined according to the corresponding task deadline of writing down in the webserver.
Because present embodiment is substantially corresponding to aforementioned method embodiment shown in Figure 2, so not detailed part in the description of present embodiment can just not given unnecessary details at this referring to the related description in the previous embodiment.
Need to prove that module, submodule and unit related in apparatus of the present invention embodiment and the system embodiment can be software, can be hardware, also can be the combination of software and hardware.
The present invention can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise distributed computing environment of above any system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by by communication network connected teleprocessing equipment execute the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
More than the exhibiting method of a kind of progress bar provided by the present invention and a kind of demonstration device of progress bar are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.