CN111818109B - Progress display method and device, computer readable storage medium and computer equipment - Google Patents

Progress display method and device, computer readable storage medium and computer equipment Download PDF

Info

Publication number
CN111818109B
CN111818109B CN201910285947.4A CN201910285947A CN111818109B CN 111818109 B CN111818109 B CN 111818109B CN 201910285947 A CN201910285947 A CN 201910285947A CN 111818109 B CN111818109 B CN 111818109B
Authority
CN
China
Prior art keywords
value
download
downloading
virtual
progress
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910285947.4A
Other languages
Chinese (zh)
Other versions
CN111818109A (en
Inventor
何林江
梁伟盛
刘恒兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910285947.4A priority Critical patent/CN111818109B/en
Publication of CN111818109A publication Critical patent/CN111818109A/en
Application granted granted Critical
Publication of CN111818109B publication Critical patent/CN111818109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/75Indicating network or usage conditions on the user display

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a progress display method, a progress display device, a computer readable storage medium and computer equipment, wherein the method comprises the following steps: sending a file downloading request; acquiring an actual downloading progress value and a virtual downloading progress value of the file according to the file downloading request, and comparing the actual downloading progress value with the virtual downloading progress value; when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value; and when the actual downloading progress value is larger than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed. The probability of successful download of the file can be improved.

Description

Progress display method and device, computer readable storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a progress display method and apparatus, a computer-readable storage medium, and a computer device.
Background
With the development of computer technology, more and more people like browsing web pages and downloading various files from the web pages. Downloading a file refers to copying the file from a server to its own computer. In the downloading process of the file, the downloading progress of the file is often embodied on the progress bar, and the progress bar is displayed.
However, in the conventional progress presentation method, the progress bar is displayed according to the downloading progress, so that the probability that the file is successfully downloaded is low.
Disclosure of Invention
Based on this, it is necessary to provide a progress showing method, apparatus, computer-readable storage medium and computer device for the technical problem that the probability of successful downloading of a file is low.
A progress display method comprises the following steps:
sending a file downloading request;
acquiring an actual download progress value and a virtual download progress value of the file according to the file download request, and comparing the actual download progress value with the virtual download progress value;
when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value;
and when the actual downloading progress value is larger than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed.
A progress-showing device, the device comprising:
the request sending module is used for sending a file downloading request;
the comparison module is used for acquiring an actual downloading progress value and a virtual downloading progress value of the file according to the file downloading request and comparing the actual downloading progress value and the virtual downloading progress value;
the virtual downloading progress value display module is used for displaying the virtual downloading progress value when the actual downloading progress value is smaller than the virtual downloading progress value;
and the actual downloading progress value display module is used for displaying the actual downloading progress value until the file downloading is finished when the actual downloading progress value is greater than or equal to the virtual downloading progress value.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the above-described progress presentation method.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the above-mentioned progress-showing method.
According to the progress display method, the progress display device, the computer readable storage medium and the computer equipment, when a file is downloaded, a file downloading request is sent, and the actual downloading progress value and the virtual downloading progress value of the file are obtained according to the file downloading request. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. When the actual download progress value is smaller than the virtual download progress value, the virtual download progress value with the larger download progress value is displayed, and when the actual download progress value is larger than or equal to the virtual download progress value, the actual download progress value is displayed, the download progress values are displayed in a balanced manner, the retention rate of a user can be improved, and therefore the probability that the file is downloaded successfully can be improved.
Drawings
FIG. 1 is a diagram of an application environment of a progress presentation method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for progress presentation in one embodiment;
FIG. 3 is a flowchart illustrating a step of obtaining a virtual download parameter value according to an embodiment;
FIG. 4 is a flowchart illustrating a step of obtaining a first download parameter value according to an embodiment;
FIG. 5 is a flowchart illustrating steps of obtaining a virtual download progress value according to another embodiment;
FIG. 6 is a flowchart illustrating the step of obtaining a base progress value according to one embodiment;
FIG. 7 is a flowchart illustrating the step of updating the virtual download progress value according to one embodiment;
FIG. 8 is a flowchart illustrating the step of determining a virtual download progress value according to another embodiment;
FIG. 9 is a diagram illustrating three different virtual download progress values and actual download progress values, in accordance with one embodiment;
FIG. 10a is a graphical illustration of an interface of the progress values shown at time 1s in one embodiment;
FIG. 10b is a graphical illustration of an interface of the progress values shown at time 3s in one embodiment;
FIG. 10c is a graphical illustration of an interface of the progress values shown at time 6s in one embodiment;
FIG. 11 is a block diagram of the structure of a progress showing apparatus in one embodiment;
FIG. 12 is a block diagram showing the construction of a progress showing means in another embodiment;
FIG. 13 is a block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 is a diagram of an application environment of the progress presentation method in one embodiment. Referring to fig. 1, the progress display method is applied to a progress display system. The progress presentation system includes a first computer device 110 and a second computer device 120. The first computer device 110 and the second computer device 120 are connected via a network. The first computer device 110 and the second computer device 120 may be desktop terminals, or mobile terminals or servers, where the mobile terminals may be at least one of mobile phones, tablet computers, notebook computers, and the like, and the servers may be implemented by independent servers or a server cluster formed by a plurality of servers.
In one embodiment, as shown in FIG. 2, a progress presentation method is provided. The embodiment is mainly illustrated by applying the method to the first computer device 110 in fig. 1. Referring to fig. 2, the progress display method specifically includes the following steps:
s202, sending a file downloading request.
In general, a file refers to an electronic file, which is generated in a digital device or environment, stored in a carrier such as a magnetic tape, a magnetic disk, or an optical disk in a digital form, read and processed by a computer, and can be transmitted over a communication network. The file may be, without limitation, an application, a document, audio, video, mail, etc. The file download request represents a request to download a particular file from the second computer device to the first computer device. The first computer device is a file requester, and the second computer device is a file sender.
The first computer device 110 obtains a file trigger operation selected by a user through an input mode such as mouse click or gesture operation on an application market or a browser, and generates a file download request according to the file trigger operation. In other embodiments, the first computer device 110 may obtain a copy operation generated by a user selecting a file on the second computer device 120, and generate a download request for the file according to the copy operation.
In one embodiment, sending the file download request comprises: the file download request is sent to the second computer device via the intermediate computer device. The intermediary computer device refers to a computer device connecting the first computer device and the second computer device, and may be, for example, an intermediary agent computer device or the like. For example, the intermediary computer device may be a proxy server through which the first computer device connects with the second computer device. The first computer device sends the file downloading request to the proxy server, and then sends the file downloading request to the second computer device through the proxy server.
S204, the actual downloading progress value and the virtual downloading progress value of the file are obtained according to the file downloading request, and the actual downloading progress value and the virtual downloading progress value are compared.
The actual download progress value refers to a progress value in the actual download process of the file. Generally, a downloaded file contains a plurality of subfiles, such as a file icon subfile, a function list subfile, an interface information subfile, and the like. In the process of downloading the file, downloading each subfile to the first computer device step by step until the downloading of the file is completed. Therefore, the actual download progress value may be represented by a ratio of the downloaded file to the entire file, or may be represented by a size and a total data amount of the downloaded file, such as an actual download progress value of 3GB (actual downloaded data amount)/10 GB (total data amount), or may be represented in another manner, which is not limited to this.
The virtual download progress value refers to a virtual progress value obtained by simulating a file download process, and is not exactly the same as an actual download progress value. It will be appreciated that the virtual download progress value is generally represented in the same manner as the actual download progress value. For example, the virtual download progress value may be represented by a ratio of the downloaded file to the entire file, or may be represented by a size and a total data amount of the file that is already downloaded, such as a virtual download progress value of 4GB (virtual downloaded data amount)/10 GB (total data amount), or may be represented in another way, which is not limited to this.
In one embodiment, the first computer device 110 may detect a ratio of the file data amount that has been received to the total data amount of the entire file according to the file download request, and may obtain the actual download progress value. And acquiring a virtual download progress value according to the historical data of the file download, the network parameters and other information.
The historical data of the file refers to the relevant historical data of the file, and may be historical average downloading time length, historical downloading speed, downloading times, historical version and the like of the file. The network parameter refers to a parameter of the first computer device network, and may be a data transmission speed of the network, a signal strength and stability of the network, a configuration parameter of the network, and the like.
And S206, when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value.
It can be understood that, when a File is just downloaded, due to a delay of data preparation of the File or FTP (File Transfer Protocol, a standard Protocol for File Transfer over a network), a time period from sending a File download request to receiving data of the File for the first time is long, and a long waiting time is needed, so that a probability that the File is downloaded successfully is low.
And the virtual download progress value is a simulated progress value, and the virtual download progress value can be controlled to be increased after the file download request is sent. Therefore, the virtual download progress value is shown after the file download request is sent and before the file actually starts to be downloaded. Further, in order to show the consistency and harmony of the progress values, when the actual download progress value is smaller than the virtual download progress value, the virtual download progress value is shown.
In one embodiment, when the actual download progress value is smaller than the virtual download progress value, displaying the virtual download progress value, further comprising: and displaying the virtual download progress value on a progress bar. The Progress Bar (Progress Bar) indicates that the speed, the completion degree, the size of the remaining unfinished task amount, the processing time possibly required and the like of the processing task are displayed in a picture form in real time when the computer device processes the task. The virtual downloading progress value is displayed on the progress bar, so that the user can see the detailed downloading process, the viscosity of the user is increased, and the probability of successful downloading of the file is improved.
And S208, when the actual downloading progress value is greater than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed.
In one embodiment, after the file actually starts to be downloaded, the virtual download progress value may be controlled to decrease at an increased speed, so that the actual download progress value catches up with the virtual download progress value. And when the actual downloading progress value is greater than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed.
In one embodiment, when the actual download progress value is greater than or equal to the virtual download progress value, displaying the actual download progress value until the file download is completed, further comprising: and displaying the actual downloading progress value on a progress bar. The Progress Bar (Progress Bar) indicates that the speed, the completion degree, the size of the remaining unfinished task amount, the processing time possibly required and the like of the processing task are displayed in a picture form in real time when the computer device processes the task. The actual downloading progress value is displayed on the progress bar, so that a user can see the detailed downloading process, and the probability of successful downloading of the file is improved.
According to the progress display method, when a file is downloaded, a file downloading request is sent, and the actual downloading progress value and the virtual downloading progress value of the file are obtained according to the file downloading request. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. When the actual download progress value is smaller than the virtual download progress value, the virtual download progress value with the larger download progress value is displayed, and when the actual download progress value is larger than or equal to the virtual download progress value, the actual download progress value is displayed, the download progress values are displayed in a balanced manner, the retention rate of a user can be improved, and therefore the probability that the file is downloaded successfully can be improved.
In one embodiment, obtaining the actual download progress value and the virtual download progress value of the file according to the file download request includes: acquiring an actual downloading progress value according to the file downloading request; acquiring a virtual download parameter value according to the actual download progress value; and determining a virtual download progress value according to the virtual download parameter value.
The virtual download parameter value refers to a numerical value of a virtual download parameter, which can be used to determine the size of the virtual download progress value. Specifically, the virtual download parameter value may be used to determine an incremental value added each time the virtual download progress value is updated, and the virtual download progress value after each update may be obtained according to the incremental value added each time the virtual download progress value is updated and the superposition of the virtual download progress values before each update. The virtual download parameter value can be adjusted in real time according to the size or speed of the actual download progress value. Wherein the virtual download parameter value is inversely related to the actual download progress value. Negative correlation refers to the fact that the value of the factor decreases (increases) with increasing (decreasing) value of the argument, i.e. the value of the virtual download parameter decreases (increases) with increasing (decreasing) value of the actual download progress.
It can be understood that, when the file is downloaded, the virtual download progress value is increased at a higher speed, and the displayed virtual download progress value shows that the download is completed, but the actual download progress value is not completed, so that the displayed progress value is not real. In order to improve the authenticity of the displayed progress value, a virtual download parameter value is obtained according to the actual download progress value, and the virtual download progress value is determined according to the virtual download parameter value.
The first computer device 110 may detect the data amount received by the file according to the file downloading request, and may obtain the actual downloading progress value according to the data amount received by the file.
In an embodiment, a corresponding relationship between the actual download progress value and the virtual download parameter value may be preset, and the virtual download parameter value may be obtained according to the actual download progress value and the corresponding relationship between the actual download progress value and the virtual download parameter value.
After the virtual download parameter value is obtained, the virtual download progress value can be determined according to the linear function relationship between the virtual download parameter value and the virtual download progress value.
According to the progress display method, the actual download progress value is obtained according to the file download request, the virtual download parameter value is obtained according to the actual download progress value, the virtual download progress value is determined according to the virtual download parameter value, the actual download progress value and the virtual download progress value are associated through the virtual download parameter value, and the reality of the displayed progress value can be improved.
In one embodiment, obtaining the virtual download parameter value according to the actual download progress value includes:
s302, when the actual download progress value is smaller than or equal to the first threshold value, a first download parameter value is obtained.
The first threshold is a threshold corresponding to the actual download progress value. The first download parameter value refers to a virtual download parameter value when the actual download progress value is less than or equal to a first threshold value. The first download parameter value may be used to determine a size of the virtual download progress value when the actual download progress value is less than or equal to the first threshold value.
In one embodiment, the first threshold may be 0, and the first download parameter value is obtained when the actual download progress value is less than or equal to the first threshold, that is, when the file is not actually downloaded. Correspondingly, in order to improve the probability of successful downloading of the file, when the file is not actually downloaded, the first downloading parameter value is larger, that is, the displayed virtual downloading progress value is increased faster. In other embodiments, the first threshold may be other than 0, but is not limited thereto.
In one embodiment, obtaining the first download parameter value comprises: and acquiring a first download parameter value according to the linear function relationship between the actual download progress value and the first download parameter value. The linear functional relationship refers to a proportional and linear relationship between variables, and the linear function can be understood as a function with a constant first derivative in mathematics.
For example, S is 6k, where S refers to the actual download progress value and k refers to the first download parameter value. When S is 1, k is 6; when S is 3, k is 2.
S304, when the actual downloading progress value is larger than the first threshold value, a second downloading parameter value is obtained, wherein the second downloading parameter value is smaller than the first downloading parameter value.
The second download parameter value refers to a virtual download parameter value when the actual download progress value is greater than the first threshold value. The second download parameter value may be used to determine a size of the virtual download progress value when the actual download progress value is greater than the first threshold value.
It will be appreciated that the first threshold may be 0, indicating that the file has actually started to be downloaded when the actual download progress value is greater than the first threshold. In order to improve the accuracy of the displayed progress value, the actual download progress value is made to catch up with the virtual download progress value, and the second download parameter value is smaller than the first download parameter value, that is, the speed of increasing the virtual download progress value when the actual download progress value is greater than the first threshold value is smaller than the speed of increasing the virtual download progress value when the actual download progress value is less than or equal to the first threshold value.
In one embodiment, obtaining the second download parameter value comprises: and acquiring a second download parameter value according to the linear function relationship between the actual download progress value and the second download parameter value. The linear functional relationship refers to a proportional and linear relationship between variables, and the linear function can be mathematically understood as a function in which the first derivative is constant.
For example, S is 5j, where S refers to the actual download progress value and j refers to the second download parameter value. When S is 1, j is 5; when S is 5, j is 1.
Determining a virtual download progress value according to the virtual download parameters, comprising:
s306, determining a virtual download progress value according to the first download parameter value or the second download parameter value.
When the actual download progress value is smaller than or equal to a first threshold value, determining a virtual download progress value according to the first download parameter value; and when the actual download progress value is larger than the first threshold value, determining the virtual download progress value according to the second download parameter value.
Specifically, when the virtual download progress value is updated each time, the progress value added by the update and the progress value before the update are overlapped, so that the updated virtual download progress value can be obtained. The incremental progress value of each update can be determined according to the functional relationship between the first download parameter value or the second download parameter value and the incremental progress value of each update, and the incremental progress value of each update and the progress value before updating are superposed to obtain the updated virtual download progress value.
According to the progress display method, when the actual download progress value is smaller than or equal to the first threshold value, the first download parameter value is obtained, when the actual download progress value is larger than the first threshold value, the second download parameter value is obtained, the first download parameter value or the second download parameter value is obtained at different stages according to the actual download progress value, the virtual download progress value is determined according to the first download parameter value or the second download parameter value, and a more real progress value is displayed.
In one embodiment, when the actual download progress value is less than or equal to the first threshold, obtaining a first download parameter value includes:
s402, when the actual download progress value is smaller than or equal to the first threshold, counting a first time length of the actual download progress value smaller than or equal to the first threshold in real time.
The first time duration refers to a time duration that the actual download progress value of the real-time statistics is less than or equal to the first threshold value. For example, after sending the file download request, if it is detected that the actual download progress value is less than or equal to the first threshold value in 1 st s, the counted first duration is 1 s. And when the actual download progress value is detected to be less than or equal to the first threshold value in the 2.4s, the counted first time length is 2.4 s.
S404, acquiring a first download parameter value according to the inverse function of the first duration.
The inverse ratio refers to two associated variables, wherein the variation of one variable varies with the variation of the other variable, that is, the value of the first download parameter decreases with the increase of the first time length, or the value of the first download parameter increases with the decrease of the first time length, and the product of the corresponding values of the two variables is fixed, so that the two variables have an inverse ratio relationship. The inverse function refers to the inverse relationship between the first duration and the first download parameter value. Namely, the larger the first time length is, the smaller the first download parameter value is, and the slower the speed of increasing the virtual download progress value is; the smaller the first time length is, the larger the first download parameter value is, and the faster the virtual download progress value increases.
It can be understood that the virtual download progress value is continuously increased while the first time length of the real-time statistical actual download progress value being smaller than or equal to the first threshold value is increased. In order to make the actual download progress value catch up with the virtual download progress value, the speed of increasing the virtual download progress value needs to be reduced.
The first computer device 110 obtains a first duration of which the counted actual download progress value is less than or equal to a first threshold, and calculates according to an inverse function of the first duration to obtain a first download parameter value.
In one embodiment, the first threshold may be 0, when the actual download progress value is less than or equal to 0, indicating that the file does not actually start downloading. The first computer device 110 obtains a first time length of which the counted actual download progress value is less than or equal to 0, and calculates according to an inverse function of the first time length to obtain a first download parameter value. In another embodiment, the first threshold may be a value other than 0, but is not limited thereto.
In this embodiment, when the actual download progress value is less than or equal to the first threshold, a first duration that the actual download progress value is less than or equal to the first threshold is counted in real time, and a first download parameter value is obtained according to an inverse function of the first duration, where the first download parameter value and the first duration are in an inverse relationship, so that the first download parameter value can be obtained more accurately, and the actual download progress value is displayed more realistically.
In one embodiment, obtaining the virtual download progress value according to the first download parameter value or the second download parameter value includes:
s502, a random function is obtained.
The random function refers to a function that generates a random number. The random function may be rand (), srad (), random (), etc., without being limited thereto.
It can be understood that, during the downloading of the file, the downloading speed of the file is not always constant, and the downloading speed of the file is affected by various factors, such as hardware of the computer device, processing capability of the CPU, and quality of a network environment. Therefore, in order to improve the authenticity of the displayed virtual download progress value, the progress value newly added each time of the virtual download progress value can be randomized through a random function.
Further, after obtaining the random function, the method further includes: a defined range of random functions is obtained. If the random function is defined to be in the range of 0-0.9, then the random numbers generated by the random function are in the range of 0-0.9.
S504, determining a virtual download progress value according to the first download parameter value or the second download parameter value and the random function.
When the actual download progress value is less than or equal to the first threshold value, the first computer device 110 determines a virtual download progress value according to the first download parameter value and the random function. When the actual download progress value is greater than the first threshold value, the first computer device 110 determines a virtual download progress value according to the second download parameter value and the random function.
For example, M ═ random () (j | | | k), where M refers to the newly added virtual progress value, random () refers to a random function, k refers to the first download parameter value, j refers to the second download parameter value, and the symbol "| |" refers to or, i.e., j or k is selected.
When the actual download progress value is smaller than or equal to the first threshold, the first computer device 110 determines a newly added virtual download progress value M ═ random (), according to the first download parameter value k and the random function random (), and further determines a virtual download progress value. When the actual download progress value is greater than the first threshold, the first computer device 110 determines, according to the second download parameter value j and the random function random (), a newly added virtual download progress value M ═ random () × j, and further determines a virtual download progress value.
According to the progress display method, the random function is obtained, the real virtual download progress value can be determined according to the first download parameter value or the second download parameter value and the random function, and the reality of the displayed virtual download progress value is improved.
In one embodiment, the progress display method further includes: acquiring a basic progress value; and determining a virtual download progress value according to the first download parameter value or the second download parameter value, the basic progress value and the random function.
The basic progress value refers to a basic value corresponding to the newly added virtual progress value. In general, the basic progress value may be a value close to the size of the virtual progress value predicted to be newly added in advance.
It can be understood that, when the virtual download progress value is determined by the first download parameter value or the second download parameter value and the random function, the virtual download progress value added each time has greater randomness, sometimes large, sometimes small, and further the virtual download progress value sometimes increases rapidly, sometimes remains unchanged, and is very different from the actual file download process and has lower authenticity.
Therefore, the basic progress value can be obtained, and the virtual download progress value is determined according to the first download parameter value or the second download parameter value, the basic progress value and the random function.
For example, M + random () (j | | | k), where M refers to the newly added virtual progress value, M refers to the base progress value, random () refers to a random function, which can generate a random number, k denotes the first download parameter value, j denotes the second download parameter value, and the symbol "|" denotes or, i.e., selects j or k.
And when the actual download progress value is smaller than or equal to the first threshold value, determining a newly added virtual download progress value M ═ M + random () k according to the first download parameter value k, the basic download value and the random function random (), and further determining the virtual download progress value. And when the actual download progress value is larger than the first threshold value, determining a newly added virtual progress value M ═ M + random () j according to the second download parameter value j, the basic progress value and the random function random (), and further determining the virtual download progress value.
According to the progress display method, the basic progress value is obtained, and the virtual progress value which is newly added each time can be determined to be close to the basic progress value according to the first downloading parameter value or the second downloading parameter value, the basic progress value and the random function, so that the randomness of the virtual downloading progress value is ensured, and the progress display method conforms to the process of actually downloading files.
In one embodiment, obtaining a base progress value comprises:
s602, determining a second time length according to the historical data and the network parameters of the file, wherein the second time length is the predicted time length of the completion of the file downloading.
The historical data of the file refers to the relevant historical data of the file, and can be historical average downloading time length, historical downloading speed, downloading times, historical versions and the like of the file. The network parameter refers to a parameter of the first computer device network, and may be a data transmission speed of the network, a signal strength and stability of the network, a configuration parameter of the network, and the like. The second time length is the predicted time length of the completion of the file downloading, namely the predicted time length required from the transmission of the file downloading request to the actual completion of the file downloading.
The second duration may be determined based on historical data of the file and network parameters. For example, under the network parameters of a fast data transmission speed of the network, a strong and stable signal strength of the network, a good configuration parameter of the network, and the like, the historical average download duration of the acquired file is 10s, and then 10s is taken as the second duration.
For another example, the historical average download duration of the file is 20s, and when it is detected that the data transmission speed of the network parameter is slow and the signal strength of the network is weak and unstable, the weighting factors of the data transmission speed, the signal strength of the network and the stability of the network may be set, respectively, and the second duration of the file is obtained according to the data transmission speed, the signal strength of the network, the stability of the network, the corresponding weighting factor and the historical average download duration. It can be understood that when the data transmission speed is slow, the signal strength of the network is weak and unstable, the second time period is longer than the historical average download time period.
In another embodiment, the history data of the file comprises a history data transmission speed of each time the file is downloaded and a history downloading time length corresponding to the history data transmission speed; determining a second time length according to the historical data of the file and the network parameters, wherein the second time length comprises the following steps: acquiring a target data transmission speed in network parameters; transmitting the target data and the historical data; and acquiring the historical download time length corresponding to the historical transmission speed matched with the target data transmission speed as a second time length.
The historical data transmission speed is an average data transmission speed in the process of downloading the file, such as 350KB/s (KB). The historical download duration refers to the duration of time required to download the complete file. And when the file is downloaded each time, generating historical data transmission speed and historical download duration, and establishing a corresponding relation between the historical data transmission speed and the historical download duration.
The target data transmission speed may be a real-time data transmission speed, and accordingly, the second duration obtained according to the method is also a real-time second duration, so that a more accurate second duration can be obtained.
For example, in the history data of a file, the history data transmission speed at which the file is downloaded 100 times and the history download time length corresponding to the history data transmission speed each time it is downloaded are included. If the transmission speed of the historical data downloaded for the first time of the file is 350KB/s, the corresponding historical downloading time length is 10 s; the transmission speed of the historical data downloaded for the second time of the file is 500KB/s, and the corresponding historical download time length is 7 s; and so on.
When the transmission speed of the target data in the acquired network parameters is 500KB/s, matching the 500KB/s with the transmission speeds of the historical data one by one, acquiring the historical download time length corresponding to the historical transmission speed matched with the 500KB/s as 7s, and acquiring the second time length as 7 s. When the transmission speed of the target data in the acquired network parameters is 350KB/s, matching the 350KB/s with the transmission speeds of the historical data one by one, acquiring the historical download time length corresponding to the historical transmission speed matched with the 350KB/s as 10s, and acquiring the second time length as 10 s.
S604, obtaining the basic progress value according to the inverse function of the second duration and the basic progress value.
It can be understood that the longer the second duration is, the longer the time required for finishing downloading the file is, the smaller the virtual progress value added each time is, and the smaller the basic progress value is. Correspondingly, the shorter the second duration is, the less time is required for finishing downloading the file, the larger the newly added virtual progress value at each time is, and the larger the basic progress value is.
For example, the inverse function of the second duration and the base progress value is m ═ 100/B, where m refers to the base progress value, B refers to the second duration, and 100 denotes a scaling factor for completion of downloading. When the second time length is 10s, the basic progress value m is 10; when the second period of time is 20s, the base progress value m is 5.
In another embodiment, the second duration includes a third duration and a fourth duration, where the third duration represents a predicted duration from sending the file download request to the beginning of downloading the file, the fourth duration represents a predicted duration from the beginning of downloading the file to the completion of downloading the file, and the second duration is the sum of the third duration and the fourth duration; and obtaining a basic progress value according to an inverse function of the sum of the third time length and the fourth time length and the basic progress value.
For example, m is 100/(a + Q), where m denotes a base progress value, a denotes a third time period, and Q denotes a fourth time period. For example, if the third time period a of the file is 5s and the fourth time period Q is 20s, the sum of the third time period and the fourth time period, i.e., if the second time period (Q + a) is 25s, the base progress value m is 4.
According to the progress display method, the second time length is determined according to the historical data and the network parameters of the file, the basic progress value is obtained according to the inverse ratio function of the second time length and the basic progress value, and the more accurate basic progress value can be obtained by analyzing the historical data and the network parameters of the file.
In one embodiment, before comparing the actual download progress value with the virtual download progress value, the method further includes:
s702, a time function is obtained.
The time function refers to a function for acquiring time. For example, the TIME function may be HOUR (), MINUTE (), SECOND (), TIME (), TIMEVLUE (), and the like. Where HOUR () returns the number of HOURs of the time value. I.e., an integer between 0(12:00A.M.) and 23(11:00 P.M.). MINUTE () returns the MINUTE in time value. I.e. an integer between 0 and 59. SECOND () returns the time value in SECONDs. The number of seconds returned is an integer between 0 and 59. The TIME () returns a fractional value for a particular TIME, and the function TIME returns a fractional value between 0 and 0.99999999, representing the TIME between 0:00:00(12:00:00A.M) and 23:59:59(11:59:59 P.M). TIMEVALUE () returns a decimal value for the time represented by the text string. The decimal value is a value from 0 to 0.999999999 representing the time from 0:00:00(12:00:00AM) to 23:59:59(11:59:59 PM).
Generally, a TIME function TIME () or SECOND () or TIME () may be obtained when a file with a small data size is downloaded, and a TIME function MINUTE () or even a house () may be obtained when a file with a large data size is downloaded.
In another embodiment, obtaining a function of time includes: acquiring a random function; and determining the time function according to the random function and the time function.
The random function refers to a function that generates a random number. The random function may be rand (), srad (), random (), etc., without being limited thereto.
It will be appreciated that during the downloading of a file, the download progress of the file is typically updated at random times. Therefore, in order to improve the accuracy of the presented virtual download progress value, the time function may be determined by a random function.
In another embodiment, obtaining the random function further comprises: acquiring a basic interval duration; and determining a time function according to the basic interval duration and the random function.
The basic interval duration refers to a basic value of the duration of the virtual download progress value between two adjacent update times. In general, the basic interval duration may be set to 1s-2s according to reference experience.
It can be understood that the time function is determined by the random function, and the time generated by the time function has a relatively large randomness, so that sometimes the virtual download progress value is updated quickly, sometimes the virtual download progress value is updated slowly, and the process of actually downloading the file is not met. Thus, a base interval duration may be obtained and a time function determined from the base interval duration and the random function.
For example, the time function is T + random (), where T refers to the time generated by the time function, T refers to the basic interval duration, random () refers to a random function, a random number may be generated, i represents a coefficient over time, and in general, the coefficient i is smaller than the basic interval duration T.
S704, obtaining the updating time according to the time function, and updating the virtual downloading progress value at the updating time.
The update time is a time at which the virtual download progress value is updated.
The first computer device 110 may generate the next update time by a time function each time the update of the virtual download progress value is completed, and update the virtual download progress value at the update time.
In another embodiment, each time the update of the virtual download progress value is completed, the first computer device 110 may also generate a time length for the next update through a time function, and determine the next update time through the time length for the next update.
According to the progress display method, the time function is obtained, the specific updating time can be obtained through the time function, the virtual downloading progress value is updated at the updating time, and the accuracy of the updating time of the virtual downloading progress value is improved.
In one embodiment, when the actual download progress value is smaller than the virtual download progress value, after displaying the virtual download progress value, the method further includes: and when the virtual download progress value is larger than or equal to the second threshold value, stopping updating the virtual download progress value.
The second threshold is a threshold corresponding to the virtual download progress value. Generally, the second threshold may be set to a larger value, such as 90%, 95%, etc. In other embodiments, other values may be set, without limitation.
It will be appreciated that after sending the file download request, a virtual download progress value is presented. When the displayed virtual download progress value is about to be completed but the actual download progress value is still smaller than the virtual download progress value, if the virtual download progress value is continuously updated at this time, the displayed virtual download progress value may be displayed completely, the actual download progress value of the file is not completed, and the displayed progress value is not true.
Therefore, when the virtual download progress value is greater than or equal to the second threshold, the updating of the virtual download progress value is stopped, so that the actual download progress value can wait to catch up with the virtual download progress value. When the actual downloading progress value is larger than or equal to the virtual downloading progress value, the actual downloading progress value is displayed until the file downloading is completed, and the problem that the displayed progress value is not true can be solved.
In one embodiment, the progress display method further includes:
s802, a first downloading parameter value and a second downloading parameter value are obtained according to a linear function relation between a second threshold value and the first downloading parameter value and the second downloading parameter value, wherein the second downloading parameter value is smaller than the first downloading parameter value.
A linear functional relationship refers to a proportional, linear relationship between variables, and a linear function is mathematically understood to be a function in which the first derivative is constant.
The first download parameter value refers to a virtual download parameter when the actual download progress value is less than or equal to a first threshold value. The first download parameter value may be used to determine a size of the virtual download progress value when the actual download progress value is less than or equal to the first threshold value. The second download parameter value refers to a virtual download parameter value when the actual download progress value is greater than the first threshold value. The second download parameter value may be used to determine a size of the virtual download progress value when the actual download progress value is greater than the first threshold value.
When the actual download progress value is larger than the first threshold value, in order to make the actual download progress value catch up with the virtual download progress value, the second download parameter value is set to be smaller than the first download parameter value.
For example, the linear function of the second threshold with the first download parameter and the second download parameter may be: z is a x k + b x j, where Z refers to a second threshold, k refers to a first download parameter value, j refers to a second download parameter value, a is a coefficient of the first download parameter value k, and b is a coefficient of the second download parameter value j. The preset second threshold Z is 90, a is 5, and b is 6, the linear function relationship between the second threshold and the first and second download parameters may be: 90 ═ 5 × k +6 × j. When k is determined to be 12, j is determined to be 5.
In another embodiment, obtaining the first download parameter value and the second download parameter value according to a linear function relationship between the second threshold and the first download parameter value and the second download parameter value includes: and obtaining the first downloading parameter value and the second downloading parameter value according to the functional relation between the second threshold value and the first downloading parameter value, the second downloading parameter value, the basic progress value, the time length of the real-time obtained actual downloading progress value smaller than or equal to the first threshold value and the time length of the real-time obtained actual downloading progress value from the time length larger than the first threshold value to the time length of the completion of the file downloading.
The duration that the actual download progress value obtained by the first computer device 110 in real time is less than or equal to the first threshold, and the sum of the duration from the actual download progress value obtained in real time being greater than the first threshold to the completion of the file download is equal to the second duration, that is, the predicted duration of the completion of the file download. The base progress value may be derived from an inverse function of the second duration and the base progress value.
For example, the functional relationship between the second threshold and the first download parameter value, the second download parameter value, the basic progress value, the time length from the real-time actual download progress value being less than or equal to the first threshold, the time length from the real-time actual download progress value being greater than the first threshold to the time length from the time length of the completion of the file download: z is m + a k + Z/(100/Q) j. Wherein, Z refers to a second threshold, m refers to a basic progress value, a refers to a time length that an actual download progress value obtained in real time is less than or equal to a first threshold, k refers to a first download parameter value, Q refers to a time length from the actual download progress value obtained in real time to the completion of file download from being greater than the first threshold, j refers to a second download parameter value, and the second time length is the sum of a + Q.
The preset second threshold value Z is 90, the time length from the time when the actual download progress value obtained by the first computer device 110 in real time is less than or equal to the first threshold value is 5s, the time length from the time when the actual download progress value obtained in real time is greater than the first threshold value to the time when the file download is completed is 20s, and then the basic progress value m is 100/(a + Q) is 4. The function relationship is as follows: 90-4 +5k +18 j. When k is determined to be 13.6, j is determined to be 1; when k is determined to be 10, j is determined to be 2.
Determining a virtual download progress value according to the virtual download parameters, comprising:
s804, the virtual download progress value is determined according to the first download parameter value or the second download parameter value.
When the actual download progress value is less than or equal to the first threshold, the first computer device 110 obtains the first download parameter value, and determines the virtual download progress value according to the first download parameter value. And when the actual download progress value is larger than the first threshold value, acquiring a second download parameter value, and determining the virtual download progress value according to the second download parameter value.
According to the progress display method, the first download parameter value and the second download parameter value are obtained according to the linear function relation between the second threshold value and the first download parameter value and the second download parameter value, and the virtual download progress value is determined according to the first download parameter value or the second download parameter value, so that the reality of the displayed virtual download progress value can be improved.
In one embodiment, after obtaining the first download parameter value and the second download parameter value according to the linear function relationship between the second threshold and the first download parameter value and the second download parameter value, the method further includes: when the difference value between the first downloading parameter value and the second downloading parameter value is larger than a first difference threshold value, generating first prompt information; when the difference value between the first downloading parameter value and the second downloading parameter value is smaller than a second difference threshold value, generating second prompt information, wherein the first difference threshold value is larger than the second difference threshold value; and when the difference value between the first downloading parameter value and the second downloading parameter value is smaller than or equal to the first difference threshold value and larger than or equal to the second difference threshold value, executing the step of determining the virtual downloading progress value according to the first downloading parameter value or the second downloading parameter value.
The first prompt message refers to a prompt message generated when the difference value between the first download parameter value and the second download parameter value is greater than a first difference threshold value. The second prompt message refers to a prompt message generated when the difference between the first download parameter value and the second download parameter value is smaller than a second difference threshold.
It is to be understood that the first download parameter value may be used to determine the magnitude of the virtual download progress value when the actual download progress value is less than or equal to the first threshold value, and the difference value of the second download parameter value may be used to determine the magnitude of the virtual download progress value when the actual download progress value is greater than the first threshold value. The larger the first download parameter value or the second download parameter value is, the larger the increment of the virtual download progress value increased each time is updated, that is, the larger the speed of increasing the virtual download progress value is. Accordingly, the smaller the first download parameter value or the second download parameter value is, the smaller the amount of increase in the virtual download progress value per update is, i.e., the smaller the speed at which the virtual download progress value increases.
Presetting a second threshold value, and when the first download parameter value is increased, reducing the second download parameter value; when the first download parameter value decreases, the second download parameter value increases. When the difference value between the first download parameter value and the second download parameter value is greater than the first difference threshold value, it means that when the actual download progress value is less than or equal to the first threshold value, the virtual download progress value corresponding to the first download parameter value increases too fast, and when the actual download progress value is greater than the first threshold value, the virtual download progress value corresponding to the second download parameter value increases too slowly.
Therefore, when the difference value between the first download parameter value and the second download parameter value is larger than the first difference threshold value, the first prompt message is generated. The first prompt message may be a message indicating that the first download parameter value is too large and the second download parameter value is too small, such as "the first download parameter value is too large 13.6 and the second download parameter value is too small 1.0".
When the difference between the first download parameter value and the second download parameter value is smaller than the second difference threshold, it means that when the actual download progress value is smaller than or equal to the first threshold, the virtual download progress value corresponding to the first download parameter value (the first download parameter value is larger than the second download parameter value) is increased more slowly, and when the actual download progress value is larger than the first threshold, the virtual download progress value corresponding to the second download parameter value is increased more quickly.
Therefore, when the difference value between the first download parameter value and the second download parameter value is smaller than the second difference threshold value, the second prompt message is generated. The second prompt message may be a message that the first download parameter value is too small (the first download parameter value is larger than the second download parameter value) and the second download parameter value is too large, such as "the first download parameter value is too small 6.4 and the second download parameter value is too large 3.0".
In one embodiment, as shown in FIG. 9, the abscissa is time (seconds), the ordinate is the progress value percentage, 902 is the virtual download progress value for scenario 1, 904 is the virtual download progress value for scenario 2, 906 is the virtual download progress value for scenario 3, and 908 is the actual download progress value. The linear function relationship between the second threshold and the first and second download parameter values is as follows: and Z is 4+5k +18 j. Wherein Z is a second threshold, k is a first download parameter value, j is a second download parameter value, 4 is a constant, 5 is a coefficient of the first download parameter value k, and 18 is a coefficient of the second download parameter value.
First computer device 110 may preset the first threshold value corresponding to actual download progress value 908 to be 0%, and before time 6s, actual download progress value 908 is less than or equal to first threshold value 0%, and then virtual download progress values 902, 904, and 906 obtain the first download parameter value. At and after 6s, actual download progress value 908 is greater than the first threshold of 0%, then virtual download progress values 902, 904, and 906 obtain a second download parameter value.
The first computer device 110 may preset the second threshold value to be 90%, and the linear function relationship between the second threshold value and the first download parameter value and the second download parameter value is as follows: when Z is 4+5k +18j, it can be obtained that the first download parameter value k1 corresponding to the virtual download progress value of scheme 1 is 13.6, and the second download parameter value j1 is 1.0. The first download parameter value k2 corresponding to the virtual download progress value of scenario 2 is 10.0, and the second download parameter value j2 is 2.0. The virtual download progress value of scenario 3 corresponds to a first download parameter value k3 of 6.4 and a second download parameter value j3 of 3.0.
The first computer device 110 may preset the first difference threshold to be 10, and the second difference threshold to be 5, then the virtual download progress value 902 of the scheme 1 is updated too fast before 6s and too slow after 6s, that is, the difference between the first download parameter value 13.6 and the second download parameter value 1 is 12.6, and if the difference is greater than the first difference threshold 10, a first prompt message is generated, such as "the first download parameter value 13.6 is too large, and the second download parameter value 1.0 is too small".
In case of the virtual download progress value 904 of the scheme 2, the corresponding first download parameter value is 10.0, the corresponding second download parameter value is 2.0, the difference between the first download parameter value and the second download parameter value is 8, the difference is smaller than or equal to the first difference threshold value 10 and larger than or equal to the second difference threshold value 5, and the step of determining the virtual download progress value according to the first download parameter value or the second download parameter value is executed.
In the scheme 3, the virtual download progress value 906 is updated too slowly before 6s and too quickly after 6s, that is, the difference between the first download parameter value 6.4 and the second download parameter value 3.0 is 3.4, and is smaller than the first difference threshold value 5, a second prompt message is generated, such as "the first download parameter value 6.4 is too small and the second download parameter value 3.0 is too large".
In one embodiment, the progress display method further includes: and when the actual downloading progress value is greater than or equal to the virtual downloading progress value, stopping updating the virtual downloading progress value.
And when the actual downloading progress value is greater than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed. Therefore, when the actual downloading progress value is displayed, the virtual downloading progress value can be stopped from being updated, and computer resources are saved.
In one embodiment, a file download request is sent; acquiring an actual downloading progress value according to the file downloading request; when the actual downloading progress value is smaller than or equal to a first threshold value, acquiring a first downloading parameter value; when the actual downloading progress value is larger than a first threshold value, acquiring a second downloading parameter value, wherein the second downloading parameter value is smaller than the first downloading parameter value; acquiring a random function; determining a second time length according to the historical data and the network parameters of the file, wherein the second time length is the predicted time length for completing the downloading of the file; obtaining a basic progress value according to an inverse function of the second duration and the basic progress value; determining a virtual download progress value according to the first download parameter value or the second download parameter value, the basic progress value and the random function; comparing the actual download progress value with the virtual download progress value; when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value; and when the actual downloading progress value is greater than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed.
According to the progress display method, when a file is downloaded, a file downloading request is sent, an actual downloading progress value of the file is obtained according to the file downloading request, a first downloading parameter value is obtained when the actual downloading progress value is smaller than or equal to a first threshold value, a second downloading parameter value is obtained when the actual downloading progress value is larger than the first threshold value, the first downloading parameter value or the second downloading parameter value is obtained at different stages according to the actual downloading progress value, a virtual downloading progress value is determined according to the first downloading parameter value or the second downloading parameter value, and more accurate progress is displayed.
And acquiring a random function, determining a second time length according to the historical data and the network parameters of the file, obtaining a basic progress value according to an inverse ratio function of the second time length and the basic progress value, and analyzing the historical data and the network parameters of the file to obtain a more accurate basic progress value.
According to the first download parameter value or the second download parameter value, the basic progress value and the random function, the virtual progress value which is newly added each time can be determined to be close to the basic progress value, so that the randomness of the virtual download progress value is ensured, and the process of actually downloading the file is met.
And after the virtual download progress value and the actual download progress value are obtained, comparing the actual download progress value with the virtual download progress value. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. When the actual download progress value is smaller than the virtual download progress value, the virtual download progress value with the larger download progress value is displayed, and the retention rate of the user can be improved.
When the actual download progress value is greater than or equal to the virtual download progress value, the update of the virtual download progress value can be stopped, and computer resources are saved. And the actual downloading progress value is displayed, the downloading progress value is displayed in a balanced manner, and the probability of successful downloading of the file can be improved.
In another embodiment, the progress display method may further include the following steps:
(1) and sending a file downloading request.
(2) And acquiring an actual downloading progress value according to the file downloading request.
(3) And when the actual download progress value is smaller than or equal to the first threshold value, counting a first time length of which the actual download progress value is smaller than or equal to the first threshold value in real time.
(4) And acquiring a first download parameter value according to the inverse function of the first duration.
(5) And when the actual downloading progress value is larger than the first threshold value, acquiring a second downloading parameter value, wherein the second downloading parameter value is smaller than the first downloading parameter value.
(6) A random function is obtained.
(7) And determining a second time length according to the historical data and the network parameters of the file, wherein the second time length is the predicted time length of the completion of the file downloading.
(8) And obtaining a basic progress value according to an inverse function of the second time length and the basic progress value.
(9) And determining a virtual download progress value according to the first download parameter value or the second download parameter value, the basic progress value and the random function.
(10) A time function is obtained.
(11) And acquiring the updating time according to the time function, and updating the virtual downloading progress value at the updating time.
(12) And comparing the actual download progress value with the virtual download progress value.
(13) And when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value.
(14) And when the virtual download progress value is larger than or equal to the second threshold value, stopping updating the virtual download progress value.
(15) In another embodiment, the first download parameter value and the second download parameter value may also be obtained according to a linear function relationship between the second threshold and the first download parameter value and the second download parameter value, where the second download parameter value is smaller than the first download parameter value.
(16) And when the actual downloading progress value is greater than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed.
(17) And when the actual download progress value is greater than or equal to the virtual download progress value, stopping updating the virtual download progress value.
According to the progress display method, when a file is downloaded, the file downloading request is sent, the actual downloading progress value of the file is obtained according to the file downloading request, when the actual downloading progress value is smaller than or equal to the first threshold value, the first duration that the actual downloading progress value is smaller than or equal to the first threshold value is counted in real time, the first downloading parameter value is obtained according to the inverse proportion function of the first duration, the first downloading parameter value and the first duration are in inverse proportion relation, the first downloading parameter value can be obtained more accurately, and the progress value is displayed more truly.
And when the actual download progress value is larger than the first threshold value, acquiring a second download parameter value, acquiring a first download parameter value or a second download parameter value according to the actual download progress value in different stages, determining a virtual download progress value according to the first download parameter value or the second download parameter value, and displaying a more real progress value.
And acquiring a random function, determining a second time length according to the historical data and the network parameters of the file, obtaining a basic progress value according to an inverse ratio function of the second time length and the basic progress value, and analyzing the historical data and the network parameters of the file to obtain a more accurate basic progress value.
According to the first download parameter value or the second download parameter value, the basic progress value and the random function, the virtual progress value which is newly added each time can be determined to be close to the basic progress value, so that the randomness of the virtual download progress value is ensured, and the process of actually downloading the file is met.
The time function is obtained, the specific updating time can be obtained through the time function, the virtual downloading progress value is updated at the updating time, and the accuracy of the updating time of the virtual downloading progress value is improved.
And after the virtual download progress value and the actual download progress value are obtained, comparing the actual download progress value with the virtual download progress value. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. When the actual download progress value is smaller than the virtual download progress value, the virtual download progress value with the larger download progress value is displayed, and the retention rate of the user can be improved.
In another embodiment, the second threshold may be obtained, the first download parameter value and the second download parameter value may be obtained according to a linear function relationship between the second threshold and the first download parameter value and the second download parameter value, and the virtual download progress value may be determined according to the first download parameter value or the second download parameter value, so as to improve the reality of the displayed virtual download progress value.
When the virtual download progress value is greater than or equal to the second threshold value, the update of the virtual download progress value is stopped, so that the actual download progress value can wait to catch up with the virtual download progress value. The situation that the displayed virtual download progress value is displayed completely and the actual download progress value of the file is not completed when the virtual download progress value is updated continuously is avoided, and the authenticity of the displayed progress value is improved.
When the actual download progress value is greater than or equal to the virtual download progress value, the update of the virtual download progress value can be stopped, and computer resources are saved. And the actual downloading progress value is displayed, the downloading progress value is displayed in a balanced manner, and the probability of successful downloading of the file can be improved.
Fig. 2-8 are flow diagrams illustrating a progress presentation method according to an embodiment. It should be understood that although the various steps in the flow charts of fig. 2-8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order unless explicitly stated herein, and may be performed in other orders. Moreover, at least some of the steps in fig. 2-8 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 10a, 10b and 10c, 1002 each represents an actual download progress value, 1004 each represents a virtual download progress value, and 1006 each represents a displayed download progress value. In fig. 10a, actual download progress value 1002, virtual download progress value 1004, and presented download progress value 1006 all represent progress values at time 1 s. In fig. 10b, the actual download progress value 1002, the virtual download progress value 1004, and the presented download progress value 1006 each represent a progress value at time 3 s. In fig. 10c, actual download progress value 1002, virtual download progress value 1004, and presented download progress value 1006 all represent progress values at time 6 s.
In fig. 10a, at 0s, a file download request is sent, and the actual download progress value 1002, the virtual download progress value, and the displayed download progress value all show 0%. After the time length of 1s, the actual download progress value is 0% and the virtual download progress value is 10% at the moment of 1s, and the actual download progress value and the virtual download progress value are compared. The actual download progress value 0% is less than the virtual download progress value 10%, and the virtual download progress value 10% is used as the displayed download progress value 1006.
In fig. 10b, after the elapsed time period of 1s at the time 1s is 1s, the actual download progress value is 1% and the virtual download progress value is 20% are acquired at the time 2s, and the actual download progress value and the virtual download progress value are compared. The actual download progress value of 1% is less than the virtual download progress value of 20%, and the virtual download progress value of 20% is used as the displayed download progress value 1006. After the elapsed time period at the time 2s is 1s, the actual download progress value is 20% and the virtual download progress value is 30% at the time 3s, and the actual download progress value and the virtual download progress value are compared. The actual download progress value of 20% is less than the virtual download progress value of 30%, and the virtual download progress value of 20% is used as the displayed download progress value 1006.
In fig. 10c, after the lapse of time length of 1s at the time of 3s, the actual download progress value is 50% and the virtual download progress value is 40% are acquired at the time of 4s, and the actual download progress value and the virtual download progress value are compared. The actual download progress value 50% is greater than or equal to the virtual download progress value 40%, the actual download progress value 50% is taken as the presented download progress value 1006, and the actual download progress value is presented until the file download is complete. After the actual download progress value is greater than or equal to the virtual download progress value, updating of the virtual download progress value can be stopped, and computer resources are saved.
According to the progress display method, the actual downloading progress value and the virtual downloading progress value of the file are obtained according to the file downloading request. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. When the actual download progress value is smaller than the virtual download progress value, the virtual download progress value with the larger download progress value is displayed, and when the actual download progress value is larger than or equal to the virtual download progress value, the actual download progress value is displayed, the download progress values are displayed in a balanced manner, the retention rate of a user can be improved, and therefore the probability that the file is downloaded successfully can be improved.
In one embodiment, as shown in fig. 11, there is provided a progress exhibiting apparatus 1100, including: a request sending module 1102, a comparing module 1104, a virtual download progress value display module 1106 and an actual download progress value display module 1108, wherein:
a request sending module 1102, configured to send a file downloading request.
The comparing module 1104 is configured to obtain an actual download progress value and a virtual download progress value of the file according to the file download request, and compare the actual download progress value and the virtual download progress value.
A virtual download progress value display module 1106, configured to display the virtual download progress value when the actual download progress value is smaller than the virtual download progress value.
An actual download progress value display module 1108, configured to display the actual download progress value until the file download is completed when the actual download progress value is greater than or equal to the virtual download progress value.
When downloading a file, the progress display device sends a file downloading request, and acquires an actual downloading progress value and a virtual downloading progress value of the file according to the file downloading request. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. When the actual downloading progress value is smaller than the virtual downloading progress value, the virtual downloading progress value with a larger downloading progress value is displayed, and when the actual downloading progress value is larger than or equal to the virtual downloading progress value, the actual downloading progress value is displayed, the downloading progress values are displayed in a balanced manner, the retention rate of a user can be improved, and the probability that the file is downloaded successfully can be improved.
In one embodiment, as shown in fig. 12, there is provided a progress exhibiting apparatus 1200, including: a request sending module 1202, a virtual download progress value determining module 1204, an updating module 1206, a comparing module 1208, a virtual download progress value displaying module 1210, a stop updating module 1212, and an actual download progress value displaying module 1214, wherein:
a request sending module 1202, configured to send a file downloading request.
A virtual download progress value determining module 1204, configured to obtain a basic progress value; and determining a virtual download progress value according to the first download parameter value or the second download parameter value, the basic progress value and the random function.
An update module 1206 for obtaining a time function; and acquiring the updating time according to the time function, and updating the virtual downloading progress value at the updating time.
The comparing module 1208 is configured to obtain an actual download progress value and a virtual download progress value of the file according to the file download request, and compare the actual download progress value and the virtual download progress value.
The virtual download progress value display module 1210 is configured to display the virtual download progress value when the actual download progress value is smaller than the virtual download progress value.
And a stop updating module 1212, configured to stop updating the virtual download progress value when the virtual download progress value is greater than or equal to the second threshold.
An actual download progress value display module 1214, configured to display the actual download progress value when the actual download progress value is greater than or equal to the virtual download progress value until the file download is completed.
According to the progress display device, when a file is downloaded, the file downloading request is sent, the virtual downloading progress value is determined according to the random function, the updating time is obtained according to the time function, the virtual downloading progress value is updated at the updating time, the randomness of the virtual downloading progress value is guaranteed, and the reality of the displayed virtual downloading progress value is improved. And acquiring an actual download progress value and a virtual download progress value of the file according to the file download request. When a file is just downloaded, network delay exists, and the actual downloading progress is slow. And when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value with a larger downloading progress value. When the virtual download progress value is larger than or equal to the second threshold value, the updating of the virtual download progress value is stopped, the actual download progress value is waited to catch up with the virtual download progress value, the condition that the displayed virtual download progress value displays that the download is completed but the actual download progress value is not completed is avoided, and the reality of the displayed progress value is improved. When the actual downloading progress value is larger than or equal to the virtual downloading progress value, the actual downloading progress value is displayed, the downloading progress values are displayed in a balanced mode, the retention rate of a user can be improved, and therefore the probability that the file is downloaded successfully can be improved.
In an embodiment, the virtual download progress value determining module 1204 is further configured to determine a second duration according to the historical data of the file and the network parameter, where the second duration is a predicted duration of completion of downloading the file; and obtaining the basic progress value according to the inverse function of the second duration and the basic progress value.
In an embodiment, the comparing module 1208 is further configured to obtain an actual download progress value according to the file download request; acquiring a virtual download parameter value according to the actual download progress value; and determining a virtual download progress value according to the virtual download parameter value.
In an embodiment, the comparing module 1208 is further configured to obtain a first download parameter value when the actual download progress value is smaller than or equal to a first threshold; and when the actual downloading progress value is larger than the first threshold value, acquiring a second downloading parameter value, wherein the second downloading parameter value is smaller than the first downloading parameter value. Determining a virtual download progress value according to the virtual download parameters, comprising: and determining a virtual download progress value according to the first download parameter value or the second download parameter value.
In an embodiment, the comparing module 1208 is further configured to count a first duration that the actual download progress value is smaller than or equal to the first threshold in real time when the actual download progress value is smaller than or equal to the first threshold; and acquiring a first download parameter value according to the inverse function of the first duration.
In an embodiment, the comparing module 1208 is further configured to obtain a random function; and determining a virtual download progress value according to the first download parameter value or the second download parameter value and the random function.
In an embodiment, the update stopping module 1212 is further configured to obtain the first download parameter value and the second download parameter value according to a linear function relationship between the second threshold and the first download parameter value and the second download parameter value, where the second download parameter value is smaller than the first download parameter value. Determining a virtual download progress value according to the virtual download parameters, comprising: and determining a virtual download progress value according to the first download parameter value or the second download parameter value.
In an embodiment, the update stopping module 1212 is further configured to stop updating the virtual download progress value when the actual download progress value is greater than or equal to the virtual download progress value.
FIG. 13 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the first computer device 110 (or the second computer device 120) in fig. 1. As shown in fig. 13, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, causes the processor to implement the progress showing method. The internal memory may also store a computer program, and the computer program, when executed by the processor, may cause the processor to perform the schedule display method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the progress showing device provided by the application can be realized in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 13. The memory of the computer device may store various program modules constituting the progress presentation means, such as a request sending module 1102, a comparison module 1104, a virtual download progress value presentation module 1106, and an actual download progress value presentation module 1108 shown in fig. 11. The computer program formed by the program modules enables the processor to execute the steps of the progress showing method of the embodiment of the application described in the specification.
For example, the computer device shown in fig. 13 may perform the transmission of the file download request through the request transmission module 1102 in the schedule presentation apparatus shown in fig. 11. The computer device may execute, by the comparison module 1104, obtaining an actual download progress value and a virtual download progress value of the file according to the file download request, and compare the actual download progress value and the virtual download progress value. The computer device can perform displaying the virtual download progress value when the actual download progress value is smaller than the virtual download progress value through the virtual download progress value displaying module 1106. The computer device may display the actual download progress value through the actual download progress value display module 1108 when the actual download progress value is greater than or equal to the virtual download progress value until the file download is completed.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the above-described progress-showing method. Here, the steps of the progress showing method may be steps in the progress showing methods of the above embodiments.
In one embodiment, a computer-readable storage medium is provided, in which a computer program is stored, which, when executed by a processor, causes the processor to perform the steps of the above-described progress presentation method. Here, the steps of the progress showing method may be steps in the progress showing methods of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims (20)

1. A progress display method comprises the following steps:
sending a file downloading request;
acquiring an actual downloading progress value and a virtual downloading parameter value of the file according to the file downloading request;
determining a second time length according to the historical data and the network parameters of the file, wherein the second time length is the predicted time length of the completion of the downloading of the file;
obtaining a basic progress value according to an inverse function of the second duration and the basic progress value;
determining a virtual download progress value according to the virtual download parameter value, the basic progress value and a random function;
comparing the actual download progress value with the virtual download progress value;
when the actual downloading progress value is smaller than the virtual downloading progress value, displaying the virtual downloading progress value;
and when the actual downloading progress value is larger than or equal to the virtual downloading progress value, displaying the actual downloading progress value until the file downloading is completed.
2. The method of claim 1, wherein obtaining the actual download progress value and the virtual download parameter value of the file according to the file download request comprises:
acquiring an actual downloading progress value according to the file downloading request;
and acquiring a virtual download parameter value according to the actual download progress value.
3. The method of claim 2, wherein the virtual download parameter values comprise a first download parameter value and a second download parameter value, and wherein obtaining the virtual download parameter values according to the actual download progress values comprises:
when the actual downloading progress value is smaller than or equal to a first threshold value, acquiring a first downloading parameter value;
and when the actual downloading progress value is larger than a first threshold value, acquiring a second downloading parameter value, wherein the second downloading parameter value is smaller than the first downloading parameter value.
4. The method of claim 3, wherein obtaining a first download parameter value when the actual download progress value is less than or equal to a first threshold value comprises:
when the actual download progress value is smaller than or equal to a first threshold value, counting a first time length of the actual download progress value smaller than or equal to the first threshold value in real time;
and acquiring a first download parameter value according to the inverse function of the first duration.
5. The method of claim 3, wherein determining a virtual download progress value based on the virtual download parameter value, the base progress value, and a random function comprises:
acquiring a random function;
and determining a virtual download progress value according to the first download parameter value or the second download parameter value, the basic progress value and the random function.
6. The method of claim 1, wherein prior to comparing the actual download progress value to the virtual download progress value, further comprising:
acquiring a time function;
and acquiring an updating time according to the time function, and updating the virtual downloading progress value at the updating time.
7. The method of claim 1, wherein after presenting the virtual download progress value when the actual download progress value is less than the virtual download progress value, further comprising:
and when the virtual download progress value is larger than or equal to a second threshold value, stopping updating the virtual download progress value.
8. The method of claim 1, wherein the virtual download parameter values comprise a first download parameter value and a second download parameter value, and the determining of the virtual download parameter values further comprises:
and obtaining a first downloading parameter value and a second downloading parameter value according to a linear function relation between a second threshold and a first downloading parameter variable and a second downloading parameter variable, wherein the second downloading parameter value is smaller than the first downloading parameter value.
9. The method of claim 1, further comprising:
and when the actual download progress value is greater than or equal to the virtual download progress value, stopping updating the virtual download progress value.
10. A progress display device, the device comprising:
the request sending module is used for sending a file downloading request;
the comparison module is used for acquiring an actual downloading progress value and a virtual downloading parameter value of the file according to the file downloading request; determining a second time length according to the historical data and the network parameters of the file, wherein the second time length is the predicted time length of the completion of the file downloading; obtaining a basic progress value according to an inverse function of the second duration and the basic progress value; determining a virtual download progress value according to the virtual download parameter value, the basic progress value and a random function; comparing the actual download progress value with the virtual download progress value;
the virtual downloading progress value display module is used for displaying the virtual downloading progress value when the actual downloading progress value is smaller than the virtual downloading progress value;
and the actual downloading progress value display module is used for displaying the actual downloading progress value when the actual downloading progress value is greater than or equal to the virtual downloading progress value until the file downloading is completed.
11. The apparatus according to claim 10, wherein the comparing module is further configured to obtain an actual download progress value according to the file download request; and acquiring a virtual download parameter value according to the actual download progress value.
12. The apparatus of claim 11, wherein the virtual download parameter value comprises a first download parameter value and a second download parameter value, and the comparing module is further configured to obtain the first download parameter value when the actual download progress value is smaller than or equal to a first threshold value; and when the actual downloading progress value is larger than a first threshold value, acquiring a second downloading parameter value, wherein the second downloading parameter value is smaller than the first downloading parameter value.
13. The apparatus of claim 12, wherein the comparing module is further configured to count a first duration of time that the actual download progress value is less than or equal to a first threshold in real time when the actual download progress value is less than or equal to the first threshold; and acquiring a first download parameter value according to the inverse function of the first duration.
14. The apparatus of claim 12, wherein the comparing module is further configured to obtain a random function; and determining a virtual download progress value according to the first download parameter value or the second download parameter value, the basic progress value and the random function.
15. The apparatus of claim 10, further comprising an update module; the updating module is used for acquiring a time function; and acquiring an updating time according to the time function, and updating the virtual downloading progress value at the updating time.
16. The apparatus of claim 10, further comprising a stop update module; and the update stopping module is used for stopping updating the virtual download progress value when the virtual download progress value is greater than or equal to a second threshold value.
17. The apparatus of claim 10, wherein the virtual download parameter value comprises a first download parameter value and a second download parameter value, and the comparison module is further configured to obtain the first download parameter value and the second download parameter value according to a linear function relationship between a second threshold and a first download parameter variable and a second download parameter variable, wherein the second download parameter value is smaller than the first download parameter value.
18. The apparatus of claim 10, further comprising a stop update module; and the updating stopping module is used for stopping updating the virtual downloading progress value when the actual downloading progress value is greater than or equal to the virtual downloading progress value.
19. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 9.
20. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 9.
CN201910285947.4A 2019-04-10 2019-04-10 Progress display method and device, computer readable storage medium and computer equipment Active CN111818109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910285947.4A CN111818109B (en) 2019-04-10 2019-04-10 Progress display method and device, computer readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910285947.4A CN111818109B (en) 2019-04-10 2019-04-10 Progress display method and device, computer readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN111818109A CN111818109A (en) 2020-10-23
CN111818109B true CN111818109B (en) 2022-09-23

Family

ID=72843800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910285947.4A Active CN111818109B (en) 2019-04-10 2019-04-10 Progress display method and device, computer readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN111818109B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107045546A (en) * 2017-03-31 2017-08-15 北京猎豹移动科技有限公司 A kind of web page processing method, device and intelligent terminal
CN107239386A (en) * 2017-06-06 2017-10-10 网易(杭州)网络有限公司 A kind of progress display methods and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110238506A1 (en) * 2000-01-14 2011-09-29 Perkowski Thomas J Internet-based brand marketing communication network for enabling commission-based e-commerce transactions along the fabric of the world wide web (www) using server-side driven multi-mode virtual kiosks (mmvks)
CN104572408B (en) * 2014-12-29 2017-06-09 广东欧珀移动通信有限公司 Progress bar display processing method and device
CN105892981A (en) * 2016-03-25 2016-08-24 乐视控股(北京)有限公司 Display method and device and mobile equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107045546A (en) * 2017-03-31 2017-08-15 北京猎豹移动科技有限公司 A kind of web page processing method, device and intelligent terminal
CN107239386A (en) * 2017-06-06 2017-10-10 网易(杭州)网络有限公司 A kind of progress display methods and device

Also Published As

Publication number Publication date
CN111818109A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN108833458B (en) Application recommendation method, device, medium and equipment
US9699247B2 (en) User experience monitoring for application remoting
CN111915383A (en) Window-based article cold start recommendation method and device
CN114265657A (en) Method and device for displaying page of applet
CN111818109B (en) Progress display method and device, computer readable storage medium and computer equipment
CN106817296B (en) Information recommendation test method and device and electronic equipment
CN112988311A (en) On-line experimental method based on WEB server
US11836510B2 (en) Snapshot capture of computing device user interfaces
CN111324310A (en) Data reading method and device and computer system
CN114553786B (en) Network request fusing method and device, computer equipment and storage medium
US20210144195A1 (en) Information processing apparatus, information processing method, and program
WO2022166811A1 (en) Information processing method and apparatus, electronic device, and storage medium
CN112214704B (en) Page processing method and device
CN115357787A (en) Application recommendation method, application recommendation device and computer-readable storage medium
US20060064632A1 (en) Method and system to inverse graphs
CN114048137A (en) Application testing method and device and electronic equipment
CN110046384B (en) Model instantiation method and device, electronic equipment and computer-readable storage medium
CN108960433B (en) Method and system for running machine learning modeling process
CN113312554A (en) Method and device for evaluating recommendation system, electronic equipment and medium
AU2015298135A1 (en) Method and system for performing online advertisement monitoring
CN112861041B (en) Media content display method and device, electronic equipment and storage medium
CN113065066B (en) Prediction method, prediction device, server and storage medium
CN111639032B (en) Method and apparatus for testing applications
CN111756590B (en) Small flow test method and device for information display flow control
US11475510B2 (en) Method and server for generating modifiable portion of digital document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40031337

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant