Progress bar smoothing method, apparatus and computer device
By calculating smooth progress values using formulas in computer devices, the problem of abrupt and lag-like progress bar updates was solved, improving the user experience, especially when the total task volume is difficult to determine.
Patent Information
- Application Number
- CN202511593508.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-03
AI Technical Summary
Existing progress bar technology cannot effectively solve problems such as abrupt updates and lag, resulting in a poor user experience, especially when the total task volume is difficult to determine accurately.
The first and second smooth progress values are calculated using a design formula. The weighted calculation is performed using data such as task processing time, and the currently displayed progress value is updated to ensure smooth updates of the progress bar.
It achieves smooth updates to the progress bar, alleviating users' waiting anxiety, improving the user experience, and accurately reflecting changes in task processing progress.
Smart Images

Figure CN121029039B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer data processing technology, and in particular to a method, apparatus and computer equipment for smoothing a progress bar. Background Technology
[0002] This section is intended to provide background or context for the embodiments disclosed herein. The description herein is not intended to imply that it is prior art simply because it is included in this section.
[0003] With the development of computer technology, progress bar technology emerged. A progress bar is used to display, in real-time, image-based information about a computer's task processing speed, completion status, remaining unfinished tasks, or estimated processing time. It is typically displayed as a rectangular bar. The content displayed on the progress bar affects the user experience. If the progress bar shows no progress for an extended period, users may perceive it as a freeze, leading to anxiety and potentially causing them to abandon the product. In practical applications, there are situations where accurately calculating actual progress is difficult. For example, some overall tasks contain numerous subtasks, and the data processing volume of these subtasks can vary depending on the actual situation. In such cases, it's difficult to accurately assess the total task volume, making it impossible to accurately calculate the overall progress based on the completed tasks. The so-called progress indicator is actually an estimate. To reduce the estimation bias of the progress indicator, the progress bar is typically divided into multiple segments, each corresponding to a subtask in the overall task. The progress of each segment displays the completion status of its respective subtask, thus providing a relatively accurate representation of the overall task's completion status. For example, patent text CN105183322B discloses that "the progress bar to be displayed includes at least one progress bar segment" and "the at least one progress bar segment is divided into progress bar units that correspond one-to-one with each task sub-unit, and the length of the progress bar unit in the same progress bar segment is proportional to the amount of work of the corresponding task sub-unit".
[0004] However, existing progress bar technology cannot fully cater to user experience and cannot solve problems such as abrupt progress updates and stuttering. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, and computer equipment for smoothing progress bars that can solve the problems of abrupt updates and stuttering in progress bar updates, in order to address the aforementioned technical issues.
[0006] Firstly, this disclosure provides a method for smoothing a progress bar. The method includes:
[0007] Get the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the time t1 of the current stage, the estimated time t0 of the current stage, and the total detection progress value D2;
[0008] When t1≤t0 and D0≤D2<(D0+m1), the first smoothing progress value d1 is calculated using the following formula:
[0009] d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 ≤ t1 ≤ t0, 0 ≤ f(t1 / t0) ≤ 1;
[0010] Calculate the second smoothing progress value d2 using the following formula:
[0011] d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1;
[0012] When D1 < d2 < (D0 + m1), update the current displayed progress value according to the second smooth progress value.
[0013] In one embodiment, updating the currently displayed progress value based on the second smoothing progress value includes:
[0014] Calculate the third smoothing progress value d3 using the following formula:
[0015] d3 = D1 × p + d2 × q, where p is the displayed progress coefficient and q is the estimated progress coefficient, and p and q satisfy p + q = 1;
[0016] When D1 < d3 < (D0 + m1), update the current displayed progress value according to the third smooth progress value.
[0017] In one embodiment, 0.5 ≤ a < 1, 0.5 ≤ p ≤ 0.9; when t1 = 0, f(t1 / t0) = 0; when t1 = t0, f(t1 / t0) = 1.
[0018] In one embodiment, updating the currently displayed progress value based on the third smoothing progress value includes:
[0019] When d3≤99%, the third smooth progress value is rounded down by a percentage to obtain the rounded smooth progress value, and the current displayed progress value is updated using the rounded smooth progress value.
[0020] When 99% < d3 < 100%, keep the current progress value unchanged.
[0021] In one embodiment, f(t1 / t0) = [1 - (1 - t1 / t0)]3 ], 0.6≤a≤0.8;
[0022] And / or, when t1 > t0, issue a progress statistics fault reminder.
[0023] In one embodiment, the method further includes:
[0024] The update frequency h of the total detection progress value is obtained;
[0025] Based on the update frequency of the total detection progress value, the detection progress coefficient and the time progress coefficient are dynamically adjusted using preset coefficient rules.
[0026] The preset coefficient rules include: when the update frequency h of the total detection progress value is lower than the first preset frequency H1, the time progress coefficient is increased by an increase of not less than 0.01; when the update frequency h of the total detection progress value exceeds the second preset frequency H2, the detection progress coefficient is increased by an increase of not less than 0.01; when H1≤h≤H2, the time progress coefficient remains unchanged.
[0027] In one embodiment, 2 times / min ≤ H1 ≤ 4 times / min, and 12 times / min ≤ H2 ≤ 60 times / min.
[0028] In one embodiment, when H1≤h≤H2, a=0.7, b=0.3, p=0.8, q=0.2;
[0029] And / or, when d2≤D1 or d3≤D1, keep the current displayed progress value unchanged.
[0030] Secondly, this disclosure also provides a progress bar smoothing device. The device includes:
[0031] The data acquisition module is used to acquire the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the time t1 used in the current stage, the estimated time t0 of the current stage, and the total detection progress value D2.
[0032] The first calculation module is used to calculate the first smoothing progress value d1 using the following formula when t1≤t0 and D0≤D2<(D0+m1):
[0033] d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 ≤ t1 ≤ t0, 0 ≤ f(t1 / t0) ≤ 1;
[0034] The second calculation module is used to calculate the second smoothing progress value d2 using the following formula:
[0035] d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1;
[0036] The progress update module is used to update the currently displayed progress value according to the second smooth progress value when D1 < d2 < (D0 + m1).
[0037] Thirdly, this disclosure also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0038] Get the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the time t1 of the current stage, the estimated time t0 of the current stage, and the total detection progress value D2;
[0039] When t1≤t0 and D0≤D2<(D0+m1), the first smoothing progress value d1 is calculated using the following formula:
[0040] d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 ≤ t1 ≤ t0, 0 ≤ f(t1 / t0) ≤ 1;
[0041] Calculate the second smoothing progress value d2 using the following formula:
[0042] d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1;
[0043] When D1 < d2 < (D0 + m1), update the current displayed progress value according to the second smooth progress value.
[0044] The aforementioned progress bar smoothing method, apparatus, and computer equipment, based on the formula designed in this disclosure, first calculate a first smoothed progress value using data such as task processing time. Then, based on the first smoothed progress value and the total detected progress value, a second smoothed progress value is calculated using a weighted average. The second smoothed progress value is then used to update the currently displayed progress value. Because the second smoothed progress value can change with task processing time, compared to directly using the total detected progress value to update the currently displayed progress value, the progress bar can continuously update with changes in task processing time, making the update smoother. This solves the problems of abrupt and stuttering progress bar updates, helping to alleviate user anxiety and improve the user experience. Simultaneously, since both the first smoothed progress value and the total detected progress value can realistically reflect the actual processing progress, the obtained second smoothed progress value can also realistically reflect changes in the actual processing progress. Therefore, the above solution can solve the problem of discontinuous progress bar updates while reflecting the actual progress changes to the user as much as possible. The above solution is particularly suitable for situations where the total task volume corresponding to the progress bar is difficult to determine accurately. Attached Figure Description
[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0046] Figure 1 This is a flowchart illustrating a progress bar smoothing method in one embodiment;
[0047] Figure 2 This is a structural block diagram of a progress bar smoothing device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this disclosure.
[0049] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0050] The progress bar smoothing method provided in this disclosure can be applied to various application environments. For example, in one application environment, a terminal communicates with a server via a network. A data storage system can store the data that the server needs to process. The data storage system can be integrated on the server or placed on the cloud or other network servers. The server can obtain data such as the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the elapsed time t1 of the current stage, the estimated time t0 of the current stage, and the total detected progress value D2. The data storage system can store the data obtained by the server and can also store preset formulas for calculation. The server can perform calculations on the obtained data, including: when t1≤t0 and D0≤D2<(D0+m1), calculating a first smoothed progress value d1 using the set formula; calculating a second smoothed progress value d2 using the set formula; when D1<d2<(D0+m1), updating the currently displayed progress value according to the second smoothed progress value. The progress bar is displayed on a terminal, which can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server can be a standalone server or a server cluster consisting of multiple servers.
[0051] In one embodiment, such as Figure 1 As shown, a progress bar smoothing method is provided. Taking the application of this method in the aforementioned scenario as an example, the method includes the following steps:
[0052] Step 102: Obtain the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the time t1 used in the current stage, the estimated time t0 of the current stage, and the total detection progress value D2.
[0053] Specifically, referring to the background section of this disclosure, in practical applications, some progress bars exist as a single unit without internal segments, while others have internal segments to correspond to different sub-task stages. For progress bars without internal segments, D0=0 and m1=100%. For progress bars with internal segments, D0 represents the total progress value of the completed sub-task stages, and the progress range corresponding to each sub-task stage is generally preset. For example, if there are a total of 5 sub-task stages, the corresponding preset progress ranges could be 10%, 15%, 20%, 25%, and 30%, respectively. If the first 3 sub-tasks have been completed in sequence at a certain moment, and the system is currently processing the 4th sub-task, then D0 represents the sum of the progress values of the 3 completed sub-tasks, D0=45%; m1 represents the progress range of the current stage, m1=25%. t1 represents the time taken by the system to process the task of the current stage; in the aforementioned example, it represents the time taken by the system to process the 4th sub-task. t0 represents the estimated time required for the system to complete the current stage of the task. In the example above, it represents the estimated time required for the system to process the 4th subtask. D1 represents the currently displayed progress value, or the progress value to be updated. D1 generally satisfies D0 ≤ D1 ≤ (D0 + m1); otherwise, it indicates a display error. D2 represents the latest detected total progress value. In the context of the aforementioned situation where the total task volume is difficult to determine, D2 is generally a progress value calculated by the system based on the completed task volume and the estimated total task volume; it is essentially an estimate.
[0054] Step 104: When t1≤t0 and D0≤D2<(D0+m1), calculate the first smoothing progress value d1 using the following formula:
[0055] d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 ≤ t1 ≤ t0, 0 ≤ f(t1 / t0) ≤ 1.
[0056] In this context, an increasing easing function can refer to a monotonically increasing easing function. An easing function can also refer to an existing mathematical function, known in English as an easing function.
[0057] Specifically, when t1≤t0 and D0≤D2<(D0+m1), that is, when the system has not yet exceeded the preset time for processing the current stage task, and the system detects that the current stage task has not been completed, the first smooth progress value d1 can be calculated using the above formula. d1 is obtained by adding the progress value D0 of the completed stage to an estimated progress value based on a time parameter. Therefore, d1 is actually also an estimated progress value based on task processing time. In the prior art, there are many types of easing functions, such as linear easing functions, quadratic easing functions, exponential easing functions, cubic easing functions, quartic easing functions, etc. Technicians can choose a suitable easing function according to actual needs. In this embodiment, there is no limitation on the specific easing function, as long as it meets the requirements of this embodiment. f(t1 / t0) is an increasing easing function, and the function value increases as the value of "t1 / t0" increases. When 0≤t1≤t0, 0≤f(t1 / t0)≤1. Therefore, when the system's processing time for the current stage task has not exceeded the preset time, the value of "m1×f(t1 / t0)" is within the range (0, m1), meaning d1 always satisfies D0≤d1≤(D0+m1). When D2=D0+m1, it is generally not necessary to calculate the first smoothed progress value for the current stage, indicating that the task for the current stage has been completed. If there are other stages to process, the value of D0 can be updated. For example, if there are a total of 5 stages, before completing the subtask of the fourth stage, D0 represents the total progress value of the first 3 subtasks, and after completing the subtask of the fourth stage, D0 is updated to represent the total progress value of the first 4 subtasks. For the case of D2=D0+m1, the total detected progress value can be directly used to update the currently displayed progress value.
[0058] Step 106, calculate the second smoothing progress value d2 using the following formula:
[0059] d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1.
[0060] Here, a and b are both user-defined coefficients, and both are positive values.
[0061] Specifically, the second smoothed progress value can be calculated by comprehensively considering the first smoothed progress value and the total detected progress value. Since a+b=1, the above formula indicates that the second smoothed progress value is obtained by weighting the first smoothed progress value and the total detected progress value. The total detected progress value generally reflects the progress of the system in processing the current stage of the task relatively accurately, but it does not have the characteristic that its value necessarily changes with processing time, and it is difficult to contribute to the smoothing of the progress bar. On the other hand, under normal circumstances, especially when the system is processing routine tasks normally, the system's processing progress can also be estimated relatively accurately based on the time already taken to process the task and the estimated time required. Therefore, the first smoothed progress value can be used to estimate the system's task processing progress, and the calculation formula determines that its value necessarily changes with processing time. Of course, in terms of accurately reflecting the progress of the system in processing the current stage of the task, the first smoothed progress value is generally not as good as the total detected progress value. The second smoothed progress value, obtained by weighting the two, can remain unchanged with the task processing time, while also being able to reflect the changes in the progress of the system in processing the current stage of the task relatively accurately.
[0062] Step 108: When D1 < d2 < (D0 + m1), update the current displayed progress value according to the second smooth progress value.
[0063] Specifically, for the calculated second smoothed progress value, if it is greater than the currently displayed progress value but has not reached the maximum progress range for this stage, the current displayed progress value can be updated using the second smoothed progress value. The current displayed progress value can be directly adjusted to be equal to the second smoothed progress value, or the second smoothed progress value can be further processed to obtain a processed value, which is then used to update the current displayed progress value. If d2 does not satisfy D1 < d2 < (D0 + m1), the value of d2 is generally discarded; otherwise, it may mislead the user or affect the user experience.
[0064] In this embodiment, based on the formula designed in this disclosure, a first smoothed progress value is first calculated using data such as task processing time. Then, a second smoothed progress value is calculated by weighting the first smoothed progress value and the total detected progress value. The current displayed progress value is then updated using the second smoothed progress value. Compared to directly using the total detected progress value to update the current displayed progress value, this allows the progress bar to continuously update with changes in task processing time, resulting in smoother updates. This solves the problems of abrupt and stuttering progress bar updates, helping to alleviate user anxiety and improve the user experience. Furthermore, since both the first smoothed progress value and the total detected progress value can realistically reflect the actual processing progress, the obtained second smoothed progress value can also realistically reflect changes in the actual processing progress. Therefore, the solution in this embodiment can solve the problem of discontinuous progress bar updates while reflecting the actual progress changes to the user as accurately as possible. The solution in this embodiment is particularly suitable for situations where the total task volume corresponding to the progress bar is difficult to determine accurately.
[0065] In one embodiment, the progress value of the completed stage is D0=80%, the progress range of the current stage is m1=10%, the currently displayed progress value is D1=85%, the elapsed time of the current stage is t1=8s, the estimated time of the current stage is t0=10s, the total detected progress value is D2=85%, and the incremental easing function used in the calculation of the first smooth progress value is f(t1 / t0)=[1-(1-t1 / t0)]. 3 The progress coefficient a = 0.7 and the time progress coefficient b = 0.3 are used to calculate the first smoothed progress value d1 = 89.92% and the second smoothed progress value d2 = 86.476%. The current displayed progress value is updated using the second smoothed progress value.
[0066] In one embodiment, in conjunction with the foregoing embodiments, updating the currently displayed progress value based on the second smoothing progress value includes:
[0067] Calculate the third smoothing progress value d3 using the following formula:
[0068] d3 = D1 × p + d2 × q, where p is the displayed progress coefficient and q is the estimated progress coefficient, and p and q satisfy p + q = 1;
[0069] When D1 < d3 < (D0 + m1), update the current displayed progress value according to the third smooth progress value.
[0070] Where p and q are both user-defined coefficients, and both are positive values.
[0071] Specifically, the third smoothing progress value can be calculated using the formula described above. This third smoothing progress value is obtained by weighting the current display progress value and the second smoothing progress value. When D1 < d3 < (D0 + m1), the current display progress value can be updated to be equal to the third smoothing progress value. Because the current display progress value is incorporated into the calculation of the third smoothing progress value, updating the current display progress value using the third smoothing progress value helps reduce the magnitude of changes in the current display progress value, resulting in a more pronounced smoothing effect compared to directly using the second smoothing progress value.
[0072] It should be noted that the mathematical formulas in this disclosure are expressed in a way that is easy to understand. Those skilled in the art can, based on their mathematical abilities, break down, combine, or transform the mathematical formulas to obtain mathematical formulas in different forms. For example, two or three of the formulas for calculating the first smoothing progress value, the second smoothing progress value, and the third smoothing progress value can be combined. These transformations, which do not change the essential meaning and function of the formulas, are all within the scope of protection claimed in this disclosure.
[0073] In one embodiment, the progress value of the completed stage D0 = 60%, the progress range of the current stage m1 = 20%, the currently displayed progress value D1 = 60%, the elapsed time of the current stage t1 = 4s, the estimated time of the current stage t0 = 20s, the total detected progress value D2 = 61%, and the incremental easing function used in the calculation of the first smooth progress value is f(t1 / t0) = [1 - (1 - t1 / t0)]. 3 The progress coefficients are: detection progress coefficient a = 0.6, time progress coefficient b = 0.4, display progress coefficient p = 0.7, and estimated progress coefficient q = 0.3. The calculated smoothed progress values are: first smoothed progress value d1 = 69.76%, second smoothed progress value d2 = 64.504%, and third smoothed progress value d3 = 62.0512%. The current displayed progress value is updated using the third smoothed progress value.
[0074] In one embodiment, in conjunction with the foregoing embodiments, 0.5≤a<1, 0.5≤p≤0.9; when t1=0, f(t1 / t0)=0; when t1=t0, f(t1 / t0)=1.
[0075] Specifically, the detection progress coefficient 'a' can take values of 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, or other values satisfying "0.5 ≤ a < 1". Since a + b = 1, the value of b can correspond to 0.5, 0.4, 0.3, 0.2, 0.1, or 0.05, etc. The display progress coefficient 'p' can take values of 0.5, 0.6, 0.7, 0.8, 0.9, or other values within the range of 0.5 to 0.9. Since p + q = 1, the value of q can correspond to 0.5, 0.4, 0.4, 0.2, 0.1, etc. To ensure that the value of f(t1 / t0) varies significantly as t1 / t0 changes from 0 to 1, a suitable function f(t1 / t0) can be chosen that satisfies the condition: "when t1=0, f(t1 / t0)=0; when t1=t0, f(t1 / t0)=1". Using the weighting coefficients defined in the formula of this embodiment helps to better reflect the changes in the total detection progress value while improving the smoothness of the progress bar.
[0076] In one embodiment, in conjunction with the foregoing embodiments, updating the currently displayed progress value based on the third smoothing progress value includes:
[0077] When d3 ≤ 99%, the third smoothing progress value is rounded down by a percentage to obtain a rounded smoothing progress value, and the current displayed progress value is updated using the rounded smoothing progress value; and / or, when 99% < d3 < 100%, the current displayed progress value remains unchanged.
[0078] In this context, percentage rounding refers to converting the value before the percent sign of a percentage into an integer without retaining any decimal places.
[0079] Specifically, percentage rounding can either directly discard the decimal places before the percent sign, or it can round the decimal places before the percent sign using rounding rules. When updating the current display progress value using the third smoothed progress value, the third smoothed progress value can first be rounded by a percentage to obtain the rounded smoothed progress value. Using this rounded smoothed progress value to update the current display progress value makes the content of the current display progress value more concise, improves the visual effect of the display, and can also reduce the display resolution requirements of the corresponding hardware. When 99% < d3 < 100%, it indicates that the task is about to be completed but has not yet been completed. In this case, keeping the current display progress value unchanged, for example, keeping the display progress at 99%, can provide accurate information to the user and avoid misleading them.
[0080] In one embodiment, in conjunction with the foregoing embodiments, f(t1 / t0) = [1 - (1 - t1 / t0)] 3 ], 0.6≤a≤0.8.
[0081] Specifically, the incremental easing function can be f(t1 / t0) = [1 - (1 - t1 / t0)]. 3 As t1 increases from 0, the value of the incremental easing function changes rapidly at the beginning. When the value of t1 approaches t0, the value of the incremental easing function changes more slowly. This characteristic of the function allows it to be used in the present invention to calculate a first smooth progress value that increases relatively quickly in the early stage of t1 increasing from 0, thereby helping to provide users with more positive feedback on the processing progress. Using the incremental easing function and weighting coefficients in the formula defined in this embodiment helps to improve the smoothness of the progress bar while ensuring that the change in the value of the second smooth progress value reflects the change in the value of the total detection progress value as much as possible, thereby better solving the problem of discontinuous progress bar updates and improving the user experience.
[0082] In one embodiment, in conjunction with the foregoing embodiments, when t1 > t0, a progress statistics fault reminder is issued.
[0083] Among them, progress statistics fault reminder can refer to a reminder that includes the meaning of "progress statistics fault".
[0084] Specifically, when t1 > t0, it indicates that the system has failed to complete the task processing of the current stage within the estimated time. At this time, a progress statistics fault can be issued to provide the user with timely and accurate progress feedback so that the user can carry out further processing.
[0085] In one embodiment, in conjunction with the foregoing embodiments, the method further includes:
[0086] The update frequency h of the total detection progress value is obtained;
[0087] Based on the update frequency of the total detection progress value, the detection progress coefficient and the time progress coefficient are dynamically adjusted using preset coefficient rules.
[0088] The preset coefficient rules include: when the update frequency h of the total detection progress value is lower than the first preset frequency H1, the time progress coefficient is increased by an increase of not less than 0.01; when the update frequency h of the total detection progress value exceeds the second preset frequency H2, the detection progress coefficient is increased by an increase of not less than 0.01; when H1≤h≤H2, the time progress coefficient remains unchanged.
[0089] The update frequency of the total inspection progress value refers to the frequency at which the total inspection progress value changes. If the total inspection progress value remains unchanged after an update, it is considered that it has not been updated. The preset coefficient rule refers to the preset rule that adjusts the inspection progress coefficient and the time progress coefficient based on the update frequency of the total inspection progress value.
[0090] Specifically, the weighting coefficients included in the formulas of this disclosure can be adjustable. For example, the detection progress coefficient and time progress coefficient in the formula for calculating the second smooth progress value can be adjusted according to the update frequency of the total detection progress value. When the system processes the task of the current stage, the total detection progress value will be continuously updated. The system can statistically analyze its update frequency and then dynamically adjust the detection progress coefficient and time progress coefficient according to the update frequency of the total detection progress value and preset coefficient rules. Since the sum of the detection progress coefficient and the time progress coefficient is 1, a change in either one will cause a simultaneous change in the other. The preset coefficient rules may include: when the update frequency h of the total detection progress value is too low, for example, lower than the first preset frequency H1, it indicates that the change in the total detection progress value is unlikely to have a significant impact on the change in the second smooth progress value. In this case, the time progress coefficient can be increased to increase the impact of the change in the first smooth progress value on the change in the second smooth progress value, thereby moderately accelerating the change speed of the progress bar. The increase in the time progress coefficient is not less than 0.01, for example, it can be 0.01, 0.02, 0.05, 0.1, or 0.2, etc., and the specific increase can be set according to actual needs. When the update frequency h of the total detection progress value is sufficiently high, for example, exceeding the second preset frequency H2, it indicates that the change in the total detection progress value has a sufficient impact on the change in the second smooth progress value. In this case, the detection progress coefficient can be increased so that the second smooth progress value can more accurately reflect the change in the total detection progress value. The increase in the detection progress coefficient is not less than 0.01, for example, it can be 0.01, 0.02, 0.05, 0.1, or 0.2, etc., and the specific increase can be set according to actual needs. Since both the time progress coefficient and the detection progress coefficient are positive values and their sum is 1, the specific maximum increase is necessarily limited by the initial value, and the increased coefficient value will always be less than 1. When H1≤h≤H2, the time progress coefficient can remain unchanged, and correspondingly, the detection progress coefficient also remains unchanged. The specific values of H1 and H2 can be set by those skilled in the art according to actual usage needs; this disclosure does not impose any restrictions.
[0091] In this embodiment, by dynamically adjusting the detection progress coefficient and the time progress coefficient based on the update frequency of the total detection progress value, the weights of the total detection progress value and the first smoothed progress value in calculating the second smoothed progress value can be adjusted. This allows the second smoothed progress value to both change over time and reflect the changes in the total detection progress value as much as possible, achieving a good balance between the two. Therefore, the progress bar can remain dynamic while reflecting the task processing progress as realistically as possible.
[0092] In one embodiment, in conjunction with the foregoing embodiments, 2 times / min ≤ H1 ≤ 4 times / min, and 12 times / min ≤ H2 ≤ 60 times / min.
[0093] Specifically, the first preset frequency can be 2, 3, or 4 times / min. The second preset frequency can be 12, 15, 20, 30, 40, 50, 60, or other frequencies within the range of 12 to 60 times / min. The range of values for the first and second preset frequencies provided in this embodiment can meet the setting requirements of preset coefficient rules in general application scenarios. Technicians can preferentially use the range of values set in this embodiment; if it does not meet the requirements, adjustments can be made.
[0094] In one embodiment, in conjunction with the foregoing embodiments, when H1≤h≤H2, a=0.7, b=0.3, p=0.8, q=0.2;
[0095] Specifically, when H1≤h≤H2, the detection progress coefficient and time progress coefficient remain unchanged. In this case, the detection progress coefficient a=0.7, the time progress coefficient b=0.3, the display progress coefficient p=0.8, and the estimated progress coefficient q=0.2. Testing shows that for general scenarios, this effectively solves problems such as abrupt and stuttering progress bar updates. For example, in a trial test of a software's intelligent PPT dubbing function, the first group directly updated the display progress value using the total detection progress value, while the second group used the settings in this embodiment, with the incrementing easing function using f(t1 / t0)=[1-(1-t1 / t0)]. 3 The progress bar is updated using a third smoothed progress value. Testing revealed that the average progress pause time for the first group was 45 seconds, with a user satisfaction score of 6.2 out of 10; while the average progress pause time for the second group was 8 seconds, with a user satisfaction score of 8.7 out of 10. It can be seen that compared to the first group using the traditional method, the second group using the method in this embodiment effectively solves the problem of discontinuous progress bar updates, significantly improving the user experience.
[0096] In one embodiment, in conjunction with the foregoing embodiments, when d2≤D1 or d3≤D1, the current displayed progress value remains unchanged.
[0097] Specifically, when d2≤D1 or d3≤D1, it means that updating the current displayed progress value using the second or third smoothed progress value cannot increase the current displayed progress value, thus failing to provide the user with positive feedback that "task processing is progressing," and may even cause the progress bar to regress. Therefore, it is necessary to keep the current displayed progress value unchanged until the second or third smoothed progress value is greater than the current displayed progress value before updating the current displayed progress value.
[0098] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein or there is a necessary logical relationship between the steps, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps.
[0099] Based on the same inventive concept, this disclosure also provides a progress bar smoothing device for implementing the progress bar smoothing method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more progress bar smoothing device embodiments provided below can be found in the limitations of the progress bar smoothing method described above, and will not be repeated here.
[0100] In one embodiment, such as Figure 2 As shown, a progress bar smoothing device 01 is provided, including: a data acquisition module 10, a first calculation module 20, a second calculation module 30, and a progress update module 40, wherein:
[0101] The data acquisition module 10 is used to acquire the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the time t1 used in the current stage, the estimated time t0 of the current stage, and the total detection progress value D2.
[0102] The first calculation module 20 is used to calculate the first smoothing progress value d1 using the following formula when t1≤t0 and D0≤D2<(D0+m1):
[0103] d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 < t1 ≤ t0, 0 < f(t1 / t0) ≤ 1.
[0104] The second calculation module 30 is used to calculate the second smoothing progress value d2 using the following formula:
[0105] d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1.
[0106] The progress update module 40 is used to update the currently displayed progress value according to the second smooth progress value when D1 < d2 < (D0 + m1).
[0107] In one embodiment, the progress update module includes a third calculation module and a progress modification module.
[0108] The third calculation module is used to calculate the third smoothing progress value d3 using the following formula:
[0109] d3 = D1 × p + d2 × q
[0110] Where p is the displayed progress coefficient and q is the estimated progress coefficient, and p and q satisfy p+q=1.
[0111] The progress modification module is used to update the currently displayed progress value according to the third smooth progress value when D1 < d3 < (D0 + m1).
[0112] In one embodiment, the progress modification module includes:
[0113] The progress rounding module is used to round the third smooth progress value by a percentage when d3≤99% to obtain the rounded smooth progress value; the progress replacement module is used to update the currently displayed progress value using the rounded smooth progress value.
[0114] In one embodiment, the progress modification module is further configured to keep the currently displayed progress value unchanged when 99% < d3 < 100%.
[0115] In one embodiment, the function f(t1 / t0) used by the first calculation module satisfies f(t1 / t0)=[1-(1-t1 / t0)] 3 In the formula used by the second calculation module, 0.6 ≤ a ≤ 0.8.
[0116] In one embodiment, the device further includes a fault alert module for issuing a progress statistics fault alert when t1 > t0.
[0117] In one embodiment, the device further includes a frequency acquisition module and a coefficient adjustment module.
[0118] The frequency acquisition module is used to acquire the update frequency h of the total detection progress value.
[0119] The coefficient adjustment module is used to dynamically adjust the detection progress coefficient and the time progress coefficient according to the update frequency of the total detection progress value using preset coefficient rules. The coefficient adjustment module can store preset coefficient rules, which include: increasing the time progress coefficient when the update frequency h of the total detection progress value is lower than a first preset frequency H1; increasing the detection progress coefficient when the update frequency h of the total detection progress value exceeds a second preset frequency H2; and keeping the time progress coefficient unchanged when H1≤h≤H2.
[0120] In one embodiment, the progress update module is further configured to keep the currently displayed progress value unchanged when d2≤D1 or d3≤D1.
[0121] Each module in the aforementioned progress bar smoothing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0122] The computer device can be a terminal, including a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a progress bar smoothing method. The display screen can be an LCD screen or an e-ink display. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse. Those skilled in the art will understand that the aforementioned computer structure is only a part of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. The specific computer device may include more or fewer components, or combine certain components, or have different component arrangements.
[0123] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent disclosure. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the appended claims.
Claims
1. A method for smoothing a progress bar, characterized in that, The method includes: Obtain the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the elapsed time t1 of the current stage, the estimated time t0 of the current stage, and the total detected progress value D2; the total detected progress value represents the latest detected total progress value. When t1≤t0 and D0≤D2<(D0+m1), the first smoothing progress value d1 is calculated using the following formula: d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 ≤ t1 ≤ t0, 0 ≤ f(t1 / t0) ≤ 1; Calculate the second smoothing progress value d2 using the following formula: d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1; When D1 < d2 < (D0 + m1), update the current displayed progress value according to the second smoothed progress value; when d2 ≤ D1, keep the current displayed progress value unchanged.
2. The method according to claim 1, characterized in that, The step of updating the currently displayed progress value according to the second smoothing progress value includes: Calculate the third smoothing progress value d3 using the following formula: d3 = D1 × p + d2 × q, where p is the displayed progress coefficient and q is the estimated progress coefficient, and p and q satisfy p + q = 1; When D1 < d3 < (D0 + m1), update the current displayed progress value according to the third smoothed progress value; when d3 ≤ D1, keep the current displayed progress value unchanged.
3. The method according to claim 2, characterized in that, 0.5≤a<1, 0.5≤p≤0.9; when t1=0, f(t1 / t0)=0; when t1=t0, f(t1 / t0)=1.
4. The method according to claim 2, characterized in that, The step of updating the currently displayed progress value based on the third smoothing progress value includes: When d3≤99%, the third smooth progress value is rounded down by a percentage to obtain the rounded smooth progress value, and the current displayed progress value is updated using the rounded smooth progress value. When 99% < d3 < 100%, keep the current progress value unchanged.
5. The method according to claim 3, characterized in that, f(t1 / t0)=[1-(1-t1 / t0) 3 ]; And / or, when t1 > t0, issue a progress statistics fault reminder.
6. The method according to claim 2, characterized in that, The method further includes: The update frequency h of the total detection progress value is obtained; Based on the update frequency of the total detection progress value, the detection progress coefficient and the time progress coefficient are dynamically adjusted using preset coefficient rules. The preset coefficient rules include: when the update frequency h of the total detection progress value is lower than the first preset frequency H1, the time progress coefficient is increased by an increase of not less than 0.01; when the update frequency h of the total detection progress value exceeds the second preset frequency H2, the detection progress coefficient is increased by an increase of not less than 0.01; when H1≤h≤H2, the time progress coefficient remains unchanged.
7. The method according to claim 6, characterized in that, 2 times / min ≤ H1 ≤ 4 times / min, 12 times / min ≤ H2 ≤ 60 times / min.
8. The method according to claim 6, characterized in that, When H1≤h≤H2, a=0.7, b=0.3, p=0.8, q=0.
2.
9. A progress bar smoothing device, characterized in that, The device includes: The data acquisition module is used to acquire the progress value D0 of the completed stage, the progress range m1 of the current stage, the currently displayed progress value D1, the time t1 used in the current stage, the estimated time t0 of the current stage, and the total detection progress value D2; the total detection progress value represents the latest detected total progress value. The first calculation module is used to calculate the first smoothing progress value d1 using the following formula when t1≤t0 and D0≤D2<(D0+m1): d1 = D0 + m1 × f(t1 / t0), where f(t1 / t0) represents an increasing easing function, and when 0 ≤ t1 ≤ t0, 0 ≤ f(t1 / t0) ≤ 1; The second calculation module is used to calculate the second smoothing progress value d2 using the following formula: d2 = D2 × a + d1 × b, where a is the detection progress coefficient and b is the time progress coefficient, and a and b satisfy a + b = 1; The progress update module is used to update the current displayed progress value according to the second smoothed progress value when D1 < d2 < (D0 + m1); and to keep the current displayed progress value unchanged when d2 ≤ D1.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Progress bar display method and device
CN105183322B
Method and device for synchronizing playing rate of progress and display rate of progress of multimedia file
CN103716706A
Progress bar control method and device
CN104244100A