CN114500483A - Task downloading method and device, computing equipment and storage medium - Google Patents

Task downloading method and device, computing equipment and storage medium Download PDF

Info

Publication number
CN114500483A
CN114500483A CN202210067879.6A CN202210067879A CN114500483A CN 114500483 A CN114500483 A CN 114500483A CN 202210067879 A CN202210067879 A CN 202210067879A CN 114500483 A CN114500483 A CN 114500483A
Authority
CN
China
Prior art keywords
downloading
task
speed
download
added
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.)
Granted
Application number
CN202210067879.6A
Other languages
Chinese (zh)
Other versions
CN114500483B (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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210067879.6A priority Critical patent/CN114500483B/en
Publication of CN114500483A publication Critical patent/CN114500483A/en
Application granted granted Critical
Publication of CN114500483B publication Critical patent/CN114500483B/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/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The invention discloses a task downloading method, a device, a computing device and a storage medium, wherein the task downloading method is executed in the computing device and comprises the following steps: after a new downloading task is added, calculating the change rate of the downloading speed of the previous downloading task; judging whether the newly added downloading task affects the downloading speed of the prior downloading task or not based on the change rate; if the influence is caused, determining the limited speed of the newly-added downloading task based on the downloading speed of the current previous downloading task and the downloading speed of the newly-added downloading task; and downloading the newly added downloading task by using the limited speed. According to the task downloading method, after the fact that the downloading speed of the prior downloading task is influenced by the newly-added downloading task is detected, the speed limit processing is carried out on the newly-added downloading task, so that the prior downloading task is guaranteed to be completed preferentially, and the probability of successful completion of the task is improved.

Description

Task downloading method and device, computing equipment and storage medium
The application is a divisional application of an invention patent application filed on 09/23/2021, and the application number of the original application is as follows: 2021111116073, title of the invention: a task downloading method, a task downloading device, a computing device and a storage medium are provided.
Technical Field
The invention relates to the technical field of computers, in particular to a task downloading method, a task downloading device, a computing device and a storage medium.
Background
At present, no matter a downloading tool based on a windows platform or a linux platform, when downloading tasks, the downloading tasks mostly seize bandwidths by themselves, and after adding a new downloading task into a downloading list, the downloading tasks seize the downloading bandwidths of some previous downloading tasks, so that the previous downloading tasks cannot finish downloading in time. Moreover, when the previous download task cannot complete the download for a long time, the download link may fail, resulting in a failure of the download of the previous download task.
Disclosure of Invention
In view of the above, the present invention has been made to provide a task downloading method, apparatus, computing device and storage medium that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the present invention, there is provided a task downloading method, executed in a computing device, the method comprising: after a new downloading task is added, calculating the change rate of the downloading speed of the previous downloading task; judging whether the newly added downloading task affects the downloading speed of the prior downloading task or not based on the change rate; if the influence is caused, determining the limited speed of the newly-added downloading task based on the downloading speed of the current previous downloading task and the downloading speed of the newly-added downloading task; and downloading the newly added downloading task by using the limited speed.
Optionally, in the task downloading method according to the present invention, the step of calculating a change rate of the downloading speed of a previous downloading task after a new downloading task is added includes: if only one prior downloading task exists, selecting the prior downloading task to calculate the change rate of the downloading speed; if more than one prior downloading task exists, selecting the downloading task which starts to be downloaded first in the prior downloading tasks to calculate the change rate of the downloading speed.
Optionally, in the task downloading method according to the present invention, the method further includes: recording the downloading speed of each current downloading task at intervals of preset time, and taking the speed as a record; the most recent records are saved, wherein the number of saved records is the first number.
Optionally, in the task downloading method according to the present invention, the step of calculating a change rate of the downloading speed of a previous downloading task after a new downloading task is added includes: after a new download task is added, extracting a first quantity of download speeds of the selected previous download task from the stored first quantity of records; calculating a first average download speed and a second average download speed based on the selected first number of download speeds; and taking the ratio of the difference value of the second average downloading speed and the first average downloading speed to the first average downloading speed as the change rate.
Optionally, in the task downloading method according to the present invention, the step of calculating the first average downloading speed and the second average downloading speed based on the selected first number of downloading speeds includes: averagely dividing the first number of downloading speeds into a first part of downloading speed and a second part of downloading speed; calculating a first average download speed according to the first part download speed; and calculating a second average download speed according to the second part download speed, wherein the record corresponding to the first part download speed does not contain the download speed of the newly added download task, and the record corresponding to the second part download speed contains the download speed of the newly added download task.
Optionally, in the task downloading method according to the present invention, the step of determining whether the new downloading task affects the downloading speed of the previous downloading task based on the change rate includes: judging whether the change rate is greater than a preset change rate threshold value or not; if so, determining that the new download task influences the download speed of the previous download task; otherwise, the newly-added downloading task is determined not to influence the downloading speed of the prior downloading task.
Optionally, in the task downloading method according to the present invention, if there is an influence, the step of determining the limited speed for the new download task based on the download speed of the current previous download task and the download speed of the new download task includes: taking the difference value between the second average downloading speed and the first average downloading speed as the influence speed of the newly-added downloading task on the downloading speed of the previous downloading task; and taking the difference value between the downloading speed of the newly-added downloading task and the influence speed as the limited speed.
Optionally, in the method for downloading a task according to the present invention, after the step of downloading the new download task using the limited speed, the method further includes the steps of: monitoring whether the downloading speed of the prior downloading task is increased relative to the limited utilization speed of the prior downloading task and the corresponding downloading speed before the newly-added downloading task is downloaded; if the download speed is increased, maintaining the limited speed, and downloading a newly-increased download task; and otherwise, updating the limiting speed, and downloading the new downloading task by using the updated limiting speed, wherein the updated limiting speed is less than the limiting speed before updating.
Optionally, in the method for downloading a task according to the present invention, after the step of updating the limit speed and downloading the new download task using the updated limit speed, the step of downloading the new download task using the updated limit speed may further include: monitoring whether the downloading speed of a previous downloading task is increased; if the number of the download tasks is increased, maintaining the updated limited speed, and downloading the newly-increased download tasks; otherwise, repeating the steps of iteratively monitoring whether the downloading speed of the previous downloading task is increased relative to the limited speed of the previous downloading task before downloading the new downloading task and updating the limited speed until the downloading speed of the previous downloading task is increased and keeping the current limited speed to download the new downloading task.
Optionally, in the task downloading method according to the present invention, otherwise, the step of iteratively monitoring whether the downloading speed of the previous downloading task increases and updating the limit speed is repeated until the downloading speed of the previous downloading task increases, and the step of maintaining the current limit speed to download the newly-added downloading task further includes: if the repeated iteration monitoring is carried out on whether the downloading speed of the previous downloading task is increased relative to the utilization limit speed of the previous downloading task and the corresponding downloading speed before the new downloading task is downloaded and the frequency of the step of updating the limit speed reaches the preset frequency threshold, and the speed of the previous downloading task is not increased, the new downloading task is downloaded at the corresponding downloading speed before the new downloading task by utilizing the limit speed of the new downloading task.
According to still another aspect of the present invention, there is provided a task downloading apparatus including: the calculation module is suitable for calculating the change rate of the downloading speed of the previous downloading task after the new downloading task is added; the judging module is suitable for judging whether the newly added downloading task affects the downloading speed of the prior downloading task or not based on the change rate; the determining module is suitable for determining the limited speed of the newly-added downloading task based on the downloading speed of the current prior downloading task and the downloading speed of the newly-added downloading task when the newly-added downloading task affects the prior downloading task; and the downloading module is suitable for downloading the newly-added downloading task by using the limited speed.
According to yet another aspect of the invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the above-described method.
According to yet another aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the above-described method.
According to the scheme of the invention, when the situation that the download speed of the prior download task is influenced by the newly-added download task is detected, the speed limit processing is carried out on the newly-added download task so as to ensure that the prior download task is completed preferentially and improve the probability of successful completion of the task.
According to the scheme of the invention, the downloading task is ensured to be completed at the highest speed, the newly added task is ensured not to influence the bandwidth occupying the original task, and the original task can be completed preferentially to the maximum extent.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a task download method 200 according to one embodiment of the invention;
fig. 3 illustrates a block diagram of a task downloading device 300 according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
When the existing downloader carries out multitask downloading, the downloading task preempts the bandwidth by itself, and along with the increase of the downloading task, the downloading bandwidth of the prior downloading task is preempted by other tasks, so that the speed of the prior downloading task is very slow, and the downloading time becomes very long.
This may happen: for example, for the downloading task a, the server address is out of bound, which results in that the task a has poor bandwidth preemption capability, the downloading speed is slow all the time, and the task a is difficult to complete by 98% after a long time. At this time, the user creates several new downloading tasks, the downloading speed of the tasks is fast, the bandwidth is occupied, and the downloading speed of the task a is compressed to be almost interrupted. A similar situation occurs until the download link of task a is disabled and the completion progress of task a stays at 99% forever and is impossible to complete. Resulting in a download failure of the download task a.
In order to solve the problems in the prior art, the invention provides a scheme. One embodiment of the invention provides a task downloading method, which can be executed in a computing device. FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention. As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. Example processor cores 114 may include Arithmetic Logic Units (ALUs), Floating Point Units (FPUs), digital signal processing cores (DSP cores), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The physical memory in the computing device is usually referred to as a volatile memory RAM, and data in the disk needs to be loaded into the physical memory to be read by the processor 104. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. The application 122 is actually a plurality of program instructions that direct the processor 104 to perform corresponding operations. In some embodiments, the application 122 may be arranged to execute instructions on an operating system with the program data 124 by the one or more processors 104 in some embodiments. Operating system 120 may be, for example, Linux, Windows, etc., which includes program instructions for handling basic system services and performing hardware dependent tasks. The application 122 includes program instructions for implementing various user-desired functions, and the application 122 may be, for example, but not limited to, a browser, instant messenger, a software development tool (e.g., an integrated development environment IDE, a compiler, etc.), and the like. When the application 122 is installed into the computing device 100, a driver module may be added to the operating system 120.
When the computing device 100 is started, the processor 104 reads program instructions of the operating system 120 from the memory 106 and executes them. The application 122 runs on top of the operating system 120, utilizing the operating system 120 and interfaces provided by the underlying hardware to implement various user-desired functions. When the user starts the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads the program instructions of the application 122 from the memory 106 and executes the program instructions.
The computing device 100 also includes a storage device 132, the storage device 132 including removable storage 136 and non-removable storage 138, the removable storage 136 and the non-removable storage 138 each connected to the storage interface bus 134.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
The computing device 100 also includes a storage interface bus 134 coupled to the bus/interface controller 130. The storage interface bus 134 is coupled to the storage device 132, and the storage device 132 is adapted to store data. An example storage device 132 may include removable storage 136 (e.g., CD, DVD, usb disk, removable hard disk, etc.) and non-removable storage 138 (e.g., hard disk drive HDD, etc.).
In the computing device 100 according to the invention, the application 122 comprises a plurality of program instructions that perform the method 200.
FIG. 2 shows a flow diagram of a task download method 200 according to one embodiment of the invention. The task download method 200 is suitable for execution in a computing device, such as the computing device 100 described above.
As shown in fig. 2, the method 200 is intended to implement a task downloading method, starting with step S202, and in step S202, after a new downloading task is added, calculating a change rate of the downloading speed of a previous downloading task. Specifically, if there is only one previous download task, the previous download task is selected to calculate the change rate of the download speed. If more than one prior downloading task exists, selecting the downloading task which starts to be downloaded first in the prior downloading tasks to calculate the change rate of the downloading speed. It should be noted that, when each download task joins the download queue, the computing device records the joining time of the download task, and the download task that is first joined to the download queue in each previous download can be determined by comparing the joining times of the download tasks.
In one specific example, the prior downloading task comprises a downloading task a, a downloading task b and a downloading task c, wherein the downloading task a is firstly added into the computing device, and then the change rate of the downloading speed of the downloading task a is calculated.
It should be noted that the change rate of the download speed of the previous download task is calculated according to the corresponding download speed before and after the new download task is added into the download list. Specifically, the downloading speed of the previous downloading task before the newly-added downloading task is added into the downloading list is obtained, the downloading speed of the previous downloading task after the newly-added downloading task is added into the downloading list is obtained, and the calculation rate is obtained through calculation according to the downloading speed and the downloading speed.
It should be noted that, in the method 200 of the present embodiment, the downloading speed of each downloading task is recorded at regular intervals, so as to observe the downloading speed variation of each downloading task. In order to better observe the download speed variation of each download task, a period may be set, the average download speed of each download task in the period is calculated, and the download speed variation of each download task is observed by comparing the average download speeds of each download task. Specifically, the method 200 further includes the steps of:
and recording the downloading speed of each current downloading task at intervals of preset time, and taking the speed as a record. And the current downloading tasks are all the downloading tasks in the current downloading list. In addition, it should be noted that, in this embodiment, before the new download task comes, each current download task includes each previous download task. After the new download task arrives, the current download task comprises each previous download task and the new download task.
In one specific example, download task a, download task b, and download task c, which are being downloaded, are collectively referred to as prior download tasks.
Before the new download task comes, the current download tasks comprise a download task a, a download task b and a download task c. Then a record of the download speed of each current download task is shown in table 1:
TABLE 1
Downloading tasks Download task a Download task b Download task c
A predetermined period of time Va Vb Vc
As shown in Table 1, one record value of the download speed of each current download task includes Va、VbAnd Vc
And when a download task d is newly added, the current download tasks comprise a download task a, a download task b, a download task c and a download task d. Then a record of the download speed of the current download task is shown in table 2:
TABLE 2
Downloading tasks Downloading tasksa Download task b Download task c Download task d
A predetermined period of time Va Vb Vc Vd
As shown in Table 2, one record of the download speed of each current download task includes Va、Vb、VcAnd Vd
The most recent records are saved, wherein the number of saved records is the first number.
Continuing with the previous example, the first number is set to 10, i.e. the last 10 records are saved, and every 5s (predetermined length of time) is set to be recorded. In this example, the recorded download speed record of each download task is saved in a configuration file, and the download speed of each download task saved in the configuration file is shown in table 3:
TABLE 3
Figure BDA0003480908680000091
Figure BDA0003480908680000101
In table 3, the current download tasks include a download task a, a download task b, and a download task c from 0 to 20 s. At 20s, adding a new download task d into the computing device, that is, after 20s, each current download task includes a download task a, a download task b, a download task c, and a download task d.
It should be noted that when adding one record value, the oldest one of the 10 records is overwritten. For example, when the time reaches 50s after 5s, a record is added after the record corresponding to 40s of the configuration file, and the initial record is deleted, that is, when 0s is deleted, a record of the download speed of each current download task is corresponding.
In some embodiments, after a new download task is added, the method for calculating the change rate of the download speed of the previous download task comprises the following steps:
first, after a new download task is added, a first number of download speeds of a selected previous download task is extracted from the saved first number of records.
It should be noted that the first number may be selected according to the total number of records, for example, 10, 8, 6, 4, etc. And can be set by the person skilled in the art, and the application is not limited to this.
Then, based on the first number of selected download speeds, a first average download speed and a second average download speed are calculated. Specifically, the first number of download speeds are divided into a first partial download speed and a second partial download speed on average. A first average download speed is calculated based on the first partial download speed. And calculating a second average download speed according to the second part download speed, wherein the record corresponding to the first part download speed does not contain the download speed of the newly added download task, and the record corresponding to the second part download speed contains the download speed of the newly added download task.
And finally, taking the ratio of the difference value of the first average downloading speed and the second average downloading speed to the first average downloading speed as the change rate.
Continuing with the foregoing example, when it is detected that a new download task d arrives, 10 (i.e., a first number) download speeds V corresponding to the download task a that was first downloaded among the previous download tasks are acquired from the configuration filea0、Va5、Va10、Va15、Va20、Va25、Va30、Va35、Va40And Va45. Dividing 10 download tasks into two parts, the first part comprises Va0、Va5、Va10、Va15And Va20. Second part Va25、Va30、Va35、Va40And Va45. The record corresponding to each download speed of the first part of the download task a does not include the download speed of the newly added download task, that is, each download speed of the first part is the download speed recorded in 0-20s, and in the configuration file corresponding to 0-20s, the download speeds of the recorded download task a are the download speeds before the download task d arrives. Similarly, the record corresponding to each download speed of the second partial download task a is the download speed after the download task d arrives.
The first average download speed V of the previous download task aaPing 1=(Va0+Va5+Va10+Va15+Va20)/5. Second average download speed V of previous download task aaFlat 2=(Va25+Va30+Va35+Va40+Va45)/5。
Then, a first average download task V based on the previous download task aaPing 1And a second average download task VaFlat 2Calculating the influence speed V of the newly added downloading task d on the prior downloading task aShadow=VaPing 1-VaFlat 2. The download speed change rate V of the first download task a is higher than that of the second download task da is changed into=(VaPing 1-VaFlat 2)/Va1
In step S204, it is determined whether the new download task affects the download speed of the previous download task based on the change rate. Specifically, it is determined whether the rate of change is greater than a preset rate of change threshold. If the download speed is larger than the preset download speed, the newly added download task is determined to influence the download speed of the previous download task. Otherwise, the newly-added downloading task is determined not to influence the downloading speed of the prior downloading task.
Continuing with the foregoing example, the rate of change V of the download speed if the previous download task aa is changed intoGreater than 10% (rate of change threshold), then the determination is madeThe new download task d has an influence on the download speed of the download task a. If the rate of change V of the download speed of the previous download task aa is changed intoAnd if the download speed is not more than 10%, determining that the new download task d has no influence on the download speed of the previous download task a.
It should be noted that, after a new download task is added, the principle affecting the download speed of the previous download task is that the new download task occupies the download bandwidth of the previous download task, so that the bandwidth of the previous download task is reduced, and the download speed of the previous download task is reduced. Based on this, the setting of the change rate threshold can be performed according to the number of the existing download tasks and the bandwidth preemption capability of the existing download tasks. And can be set according to the working experience of the skilled in the art. This embodiment is not limited to this.
In step S206, if the new download task has an influence on the download speed of the previous download task, the limited speed for the new download task is determined based on the download speed of the current previous download task and the download speed of the new download task.
Specifically, first, the difference between the second average download speed and the first average download speed of the previous download task is used as the influence speed of the new download task on the download speed of the previous download task. The magnitude of the influence speed is first average download speed-second average download speed.
Based on the above, when it is determined that the new download task d has an influence on the download speed of the previous download task a, the magnitude V of the influence of the new download task d on the previous download task a is determinedShadow=VaPing 1-VaFlat 2. In other words, the newly added download task d reduces the download speed of the previous download task a by VShadow
Then, the difference between the download speed of the newly added download task and the influence speed is used as the limit speed. Illustratively, the average download speed V of the newly added download task d is calculated according to the recorded values of the 5 download speeds for the newly added download task d recorded in the configuration filed is flat. The limited speed size V for the newly added download task dLimit of=Vd is flat-VShadow
It should be noted that any ongoing download task is downloaded via the download channel. The download channel is established based on a TCP (Transmission Control Protocol, which is a connection-oriented, reliable, byte stream-based transport layer communication Protocol) or based on a UDP (User Datagram Protocol, which is a method for transmitting an encapsulated packet without establishing a connection). However, whether based on TCP or UDP, the following five elements are included, abbreviated as quintuple: source IP address, source port, network transport protocol, destination IP address, destination port. Through the quintuple, a download channel unique to the download task can be determined. By loading and modifying the download rules, the flow control can be performed on the specified quintuple, for example, the maximum download speed per second of the download task is modified, so as to achieve the purpose of limiting the download speed. For example, in the linux system, the speed limit of the download task can be realized by modifying the iptables rule (the application software running in the user space manages the processing and forwarding of the network data packet through the control kernel module).
In step S208, the new download job is downloaded using the limited speed.
According to the task downloading method 200 provided by the invention, when the situation that the downloading speed of the prior downloading task is influenced by the newly-added downloading task is detected, the speed limit processing is carried out on the newly-added downloading task so as to ensure that the prior downloading task is completed preferentially and improve the probability of successful completion of the task.
In addition, after the limited speed is used for downloading the new downloading task, the downloading speeds of the prior downloading task and the new downloading task are continuously recorded, and whether the downloading speed of the new downloading task is increased or not is monitored, so that whether the speed limit of the new downloading task is successful or not is judged. Therefore, in some embodiments, after step S208, the method further includes: and monitoring whether the downloading speed of the prior downloading task is increased relative to the corresponding downloading speed before the prior downloading task is downloaded to the newly-added downloading task by utilizing the limited speed. And if the download speed is increased, maintaining the limited speed and downloading the newly-increased download task. And otherwise, updating the limiting speed, and downloading the new downloading task by using the updated limiting speed, wherein the updated limiting speed is less than the limiting speed before updating.
Illustratively, for the previous download task a, after the new download task d, the corresponding average download speed is VaFlat 3At a defined speed VLimit ofAfter the new download task d is downloaded, the corresponding download speed of the prior download task a is VaPing 4If V isaPing 4Greater than VaFlat 3At this time, before the current downloading speed of the first downloading task a is larger than the speed limit of the newly-added downloading task d, the speed limit of the newly-added downloading task d is proved to be successful, and the limited speed V is continuously keptLimit ofAnd downloading the task d. If VaPing 4Not more than VaFlat 3If the speed limit for the newly added downloading task d fails, the speed V is limitedLimit ofThe reduction of 20% is made as an updated limit speed to download the task d.
When the limited speed is reduced, the downloading speed of the previous downloading task is found not to be increased, the steps of iteratively monitoring whether the downloading speed of the previous downloading task is increased relative to the utilization limited speed of the previous downloading task, and the corresponding downloading speed before the new downloading task is downloaded is increased and the limited speed is updated are repeated until the downloading speed of the previous downloading task is increased, and the current limited speed is maintained to download the new downloading task.
If the number of times of the steps of repeatedly and iteratively monitoring whether the downloading speed of the previous downloading task is increased relative to the utilization limit speed of the previous downloading task and downloading the corresponding downloading speed before the new downloading task and updating the limit speed reaches a preset number threshold, and the speed of the previous downloading task is not increased, downloading the new downloading task at the corresponding downloading speed before the new downloading task by using the limit speed of the new downloading task.
Continuing with the foregoing example, when the speed V is to be definedLimit ofAfter reducing by 20%, downloading the current downloading speed V of the task aaPing 5Is still not greater than VaFlat 3Continuously reducing the limiting speed and combining the downloading speed of the downloading task a with the continuous speed VaFlat 3Making comparison if V is still not greater thanaFlat 3If the download speed of the download task a is not increased after the download speed is continuously decreased for 3 times, the download speed of the download task a is not affected by the download task d, and another reason is caused as the result of the decrease of the download speed of the download task a.
Fig. 3 shows a flowchart of a task downloading device 300 according to an embodiment of the present invention. The task downloading device 300 comprises a calculating module 310, a judging module 320, a determining module 330 and a downloading module 340 which are coupled in sequence.
Wherein, the calculating module 310 is adapted to calculate the change rate of the downloading speed of the previous downloading task after the new downloading task is added.
The determining module 320 is adapted to determine whether the new downloading task affects the downloading speed of the previous downloading task based on the change rate.
The determining module 330 is adapted to determine the limited speed for the new download task based on the download speed of the current previous download task and the download speed of the new download task when the new download task affects the previous download task.
The download module 340 is adapted to download the new download task using a defined speed.
It should be noted that the working principle of the task downloading device 300 is similar to that of the task downloading task 200, and reference may be made to the description of the task downloading task 200 for relevant points, which is not described herein again.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the method of the invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein, and any descriptions of specific languages are provided above to disclose a preferred embodiment of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense with respect to the scope of the invention, as defined in the appended claims.

Claims (10)

1. A task downloading method, comprising:
after the new download task is added, calculating the change rate of the download speed of the previous download task, wherein the change rate of the download speed of the previous download task is calculated according to the corresponding download speed before and after the new download task is added into the download list;
judging whether the new downloading task affects the downloading speed of the previous downloading task or not based on the change rate, and specifically judging whether the change rate is greater than a preset change rate threshold value or not; if so, determining that the new download task influences the download speed of the previous download task; otherwise, determining that the downloading speed of the prior downloading task is not influenced by the newly-added downloading task;
if the influence is caused, determining the limited speed of the newly-added downloading task based on the downloading speed of the current prior downloading task and the downloading speed of the newly-added downloading task;
and downloading the newly-added downloading task by using the limited speed.
2. The method of claim 1, wherein the step of calculating a change rate of the download speed of the previous download task after the new download task comprises:
if only one prior downloading task exists, selecting the prior downloading task to calculate the change rate of the downloading speed;
if more than one prior downloading task exists, selecting the downloading task which starts to be downloaded first in the prior downloading tasks to calculate the change rate of the downloading speed.
3. The method of claim 2, further comprising the steps of:
recording the downloading speed of each current downloading task at intervals of preset time, and taking the speed as a record;
the most recent records are saved, wherein the number of saved records is the first number.
4. The method of claim 3, wherein the step of calculating a rate of change of the download speed of the previous download task after the new download task further comprises:
after a new download task is added, extracting a first quantity of download speeds of the selected previous download task from the stored first quantity of records;
calculating a first average download speed and a second average download speed based on the selected first number of download speeds;
and taking the ratio of the difference value of the first average downloading speed and the second average downloading speed to the first average downloading speed as the change rate.
5. The method of claim 4, wherein the step of calculating a first average download speed and a second average download speed based on the first number of selected download speeds comprises:
averagely dividing the first number of downloading speeds into a first part of downloading speed and a second part of downloading speed;
calculating the first average download speed according to the first part download speed;
calculating the second average download speed according to the second partial download speed,
the record corresponding to the first part of download speed does not contain the download speed of the newly added download task, and the record corresponding to the second part of download speed contains the download speed of the newly added download task.
6. The method according to claim 4, wherein the step of determining the limited speed for the new download task based on the download speed of the current previous download task and the download speed of the new download task if there is an influence comprises:
taking the difference value between the second average downloading speed and the first average downloading speed as the influence speed of the newly-added downloading task on the downloading speed of the prior downloading task;
and taking the difference value between the downloading speed of the newly-added downloading task and the influence speed as the limited speed.
7. The method of claim 4, wherein after said step of downloading said new download job using said defined speed, further comprising the step of:
monitoring whether the downloading speed of the prior downloading task is increased relative to the corresponding downloading speed before the prior downloading task downloads the new downloading task by utilizing the limited speed;
if the download task is increased, maintaining the limited speed, and downloading the newly-increased download task;
otherwise, updating the limited speed, and downloading the newly added downloading task by using the updated limited speed, wherein the updated limited speed is less than the limited speed before updating.
8. A task downloading apparatus comprising:
the calculation module is suitable for calculating the change rate of the downloading speed of the prior downloading task after the new downloading task is added, wherein the change rate of the downloading speed of the prior downloading task is calculated according to the corresponding downloading speed before and after the new downloading task is added into the downloading list;
the judging module is suitable for judging whether the newly-added downloading task affects the downloading speed of the prior downloading task or not based on the change rate, and specifically, judging whether the change rate is greater than a preset change rate threshold value or not; if so, determining that the new download task influences the download speed of the previous download task; otherwise, determining that the downloading speed of the prior downloading task is not influenced by the newly-added downloading task;
the determining module is suitable for determining the limited speed of the newly-added downloading task based on the downloading speed of the current prior downloading task and the downloading speed of the newly-added downloading task when the newly-added downloading task affects the prior downloading task;
and the downloading module is suitable for downloading the newly-added downloading task by utilizing the limited speed.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions configured for execution by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
10. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-7.
CN202210067879.6A 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium Active CN114500483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210067879.6A CN114500483B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210067879.6A CN114500483B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium
CN202111111607.3A CN113556408B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202111111607.3A Division CN113556408B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114500483A true CN114500483A (en) 2022-05-13
CN114500483B CN114500483B (en) 2024-02-27

Family

ID=78106547

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210067879.6A Active CN114500483B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium
CN202111111607.3A Active CN113556408B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202111111607.3A Active CN113556408B (en) 2021-09-23 2021-09-23 Task downloading method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (2) CN114500483B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500483B (en) * 2021-09-23 2024-02-27 统信软件技术有限公司 Task downloading method and device, computing equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847442A (en) * 2016-05-27 2016-08-10 腾讯科技(深圳)有限公司 Download speed adjustment method, background server, terminal and system
CN106790549A (en) * 2016-12-23 2017-05-31 北京奇虎科技有限公司 A kind of data-updating method and device
CN106998349A (en) * 2016-10-18 2017-08-01 深圳大宇无限科技有限公司 Multithreading method for down loading and device
CN107104906A (en) * 2017-04-24 2017-08-29 腾讯科技(深圳)有限公司 The method and server of a kind of bandwidth control
CN109040230A (en) * 2018-07-31 2018-12-18 优视科技新加坡有限公司 Method for down loading, device, equipment/terminal/server and the storage medium of file
US20200296006A1 (en) * 2019-03-13 2020-09-17 Facebook, Inc. Measuring the Impact of Network Deployments
CN112055036A (en) * 2019-06-05 2020-12-08 阿里巴巴集团控股有限公司 Data downloading method, device, equipment, system and readable storage medium
CN113556408B (en) * 2021-09-23 2022-02-22 统信软件技术有限公司 Task downloading method and device, computing equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9218630B2 (en) * 2012-03-22 2015-12-22 Microsoft Technology Licensing, Llc Identifying influential users of a social networking service
US9245053B2 (en) * 2013-03-12 2016-01-26 International Business Machines Corporation Efficiently searching and modifying a variable length queue
CN103312824A (en) * 2013-07-10 2013-09-18 亿览在线网络技术(北京)有限公司 Peer-to-peer (P2P) network intelligent speed governing method, device and system
CN103533032B (en) * 2013-09-26 2019-03-05 北京奇虎科技有限公司 Bandwidth adjustment device and method
CN106911656A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of data download method and device
US10402253B2 (en) * 2017-05-30 2019-09-03 Vmware, Inc. Methods and systems to detect and classify changes in a distributed computing system
US10863526B2 (en) * 2019-04-30 2020-12-08 Citrix Systems, Inc. System and method for prioritizing data traffic

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847442A (en) * 2016-05-27 2016-08-10 腾讯科技(深圳)有限公司 Download speed adjustment method, background server, terminal and system
CN106998349A (en) * 2016-10-18 2017-08-01 深圳大宇无限科技有限公司 Multithreading method for down loading and device
CN106790549A (en) * 2016-12-23 2017-05-31 北京奇虎科技有限公司 A kind of data-updating method and device
CN107104906A (en) * 2017-04-24 2017-08-29 腾讯科技(深圳)有限公司 The method and server of a kind of bandwidth control
CN109040230A (en) * 2018-07-31 2018-12-18 优视科技新加坡有限公司 Method for down loading, device, equipment/terminal/server and the storage medium of file
US20200296006A1 (en) * 2019-03-13 2020-09-17 Facebook, Inc. Measuring the Impact of Network Deployments
CN112055036A (en) * 2019-06-05 2020-12-08 阿里巴巴集团控股有限公司 Data downloading method, device, equipment, system and readable storage medium
CN113556408B (en) * 2021-09-23 2022-02-22 统信软件技术有限公司 Task downloading method and device, computing equipment and storage medium

Also Published As

Publication number Publication date
CN114500483B (en) 2024-02-27
CN113556408A (en) 2021-10-26
CN113556408B (en) 2022-02-22

Similar Documents

Publication Publication Date Title
JP6997315B2 (en) Network-accessible machine learning model training or hosting system
JP6434994B2 (en) In-vehicle control device, program writing device, program generation device, and program
US8527467B2 (en) Compression-aware data storage tiering
US9740493B2 (en) System and method of loop vectorization by compressing indexes and data elements from iterations based on a control mask
US8434073B1 (en) Systems and methods for preventing exploitation of byte sequences that violate compiler-generated alignment
WO2017016479A1 (en) Method and apparatus for downloading file
US20100325083A1 (en) Skip list generation
CN113556408B (en) Task downloading method and device, computing equipment and storage medium
US10713359B2 (en) System and method of identifying a malicious intermediate language file
US10067763B2 (en) Handling unaligned load operations in a multi-slice computer processor
CN113259485B (en) Network proxy method, computing device and readable storage medium
CN115391026A (en) Process migration method, computing device and readable storage medium
CN110069217A (en) A kind of date storage method and device
US8171256B1 (en) Systems and methods for preventing subversion of address space layout randomization (ASLR)
US8959309B2 (en) Skip list generation
CN111930392B (en) Application service deployment method, computing device and readable storage medium
JP6812826B2 (en) Storage method, storage device and storage program
CN113238760A (en) Software migration method and device, computing equipment and readable storage medium
WO2017107835A1 (en) Browser starting method and apparatus
CN115951845A (en) Disk management method, device, equipment and storage medium
JP7367365B2 (en) Task execution management device, task execution management method, and task execution management program
CN113766022A (en) Task downloading method and device, computing equipment and storage medium
CN114006947B (en) File downloading method and device, computing equipment and storage medium
CN114138285B (en) Application deployment method, computing device and readable storage medium
JP2001005678A (en) Device and method for network type information processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant