CN114500483B - 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
CN114500483B
CN114500483B CN202210067879.6A CN202210067879A CN114500483B CN 114500483 B CN114500483 B CN 114500483B CN 202210067879 A CN202210067879 A CN 202210067879A CN 114500483 B CN114500483 B CN 114500483B
Authority
CN
China
Prior art keywords
download
speed
task
downloading
prior
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
CN202210067879.6A
Other languages
Chinese (zh)
Other versions
CN114500483A (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

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 the new download task is added, calculating the change rate of the download speed of the prior download 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 exists, determining the limiting 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 limiting speed. According to the task downloading method, after the fact that the downloading speed of the previous downloading task is influenced by the newly-added downloading task is detected, speed limiting processing is conducted on the newly-added downloading task, so that the fact that the previous downloading task is finished preferentially is guaranteed, 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 the year 2021, the month 09 and the day 23, and the application number of the original application is: 2021111116073, name of invention: a task downloading method, device, computing equipment and storage medium.
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a task downloading method, a task downloading device, a computing device, and a storage medium.
Background
At present, when a task is downloaded, a downloading task is used for occupying bandwidth by itself, and after a newly added downloading task is added into a downloading list, the downloading bandwidth of some prior downloading tasks is preempted, so that the prior downloading task cannot complete downloading in time. And, when the previous download task cannot complete the download for a long time, the download link may be disabled, resulting in failure of the previous download task.
Disclosure of Invention
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a task downloading method, apparatus, computing device and storage medium that overcomes or at least partially solves the above problems.
According to one aspect of the present invention, there is provided a task downloading method, for execution in a computing device, the method comprising: after the new download task is added, calculating the change rate of the download speed of the prior download 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 exists, determining the limiting 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 limiting speed.
Optionally, in the task downloading method according to the present invention, wherein the step of calculating the rate of change of the download speed of the previous download task after the new download task includes: if only one prior download task exists, selecting the prior download task to calculate the change rate of the download speed; if more than one prior download task exists, the download task which starts to be downloaded first in the prior download tasks is selected to calculate the change rate of the download speed.
Optionally, in the task downloading method according to the present invention, the method further includes the steps of: every preset time, recording the downloading speed of each downloading task at present and taking the downloading speed as a record; the most recent record is saved, wherein the number of saved records is the first number.
Optionally, in the task downloading method according to the present invention, wherein the step of calculating the rate of change of the download speed of the previous download task after the new download task includes: after the new download task is added, extracting a first number of download speeds of the selected prior download task from the stored first number 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 between 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 download speed and the second average download speed based on the selected first number of download speeds includes: equally dividing the first number of download speeds into a first partial download speed and a second partial download speed; calculating a first average download speed according to the first partial download speed; and calculating a second average downloading speed according to the second partial downloading speed, wherein the record corresponding to the first partial downloading speed does not contain the downloading speed of the newly added downloading task, and the record corresponding to the second partial downloading speed contains the downloading speed of the newly added downloading task.
Optionally, in the task downloading method according to the present invention, the step of determining whether the newly added download task affects the download speed of the previous download task based on the rate of change includes: judging whether the change rate is larger than a preset change rate threshold value or not; if the download speed is greater than the download speed of the previous download task, the new download task is considered to influence the download speed of the previous download task; otherwise, the newly added download task is determined not to influence the download speed of the prior download task.
Optionally, in the task downloading method according to the present invention, if there is an influence, the step of determining the limiting speed of the newly added download task based on the download speed of the current previous download task and the download speed of the newly added 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 prior downloading task; and taking the difference value between the downloading speed of the newly added downloading task and the influencing speed as the limiting speed.
Optionally, in the task downloading method according to the present invention, after the step of downloading the newly added download task using the defined speed, the method further includes the step of: monitoring whether the downloading speed of the prior downloading task is increased relative to the downloading speed of the prior downloading task before the downloading of the newly added downloading task by using the limiting speed; if the number of the download tasks is increased, maintaining the limiting speed, and downloading the newly increased download tasks; otherwise, updating the limiting speed, and downloading the newly added downloading task by using the updated limiting speed, wherein the updated limiting speed is smaller than the limiting speed before updating.
Optionally, in the task downloading method according to the present invention, when the limiting speed is updated, and the newly added downloading task is downloaded with the updated limiting speed, the step of updating the limiting speed to be smaller than the limiting speed before updating further includes the steps of: monitoring whether the downloading speed of the prior downloading task is increased; if the number of the download tasks is increased, maintaining the updated limiting speed, and downloading the newly increased download tasks; otherwise, the step of iteratively monitoring whether the downloading speed of the previous downloading task is increased and updating the limiting speed relative to the downloading speed of the previous downloading task before the new downloading task is downloaded by using the limiting speed is repeated until the downloading speed of the previous downloading task is increased, and the new downloading task is downloaded at the current limiting speed.
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 limiting speed is repeated until the downloading speed of the previous downloading task increases, and the step of maintaining the current limiting speed to download the newly added downloading task further includes: if the number of steps of repeatedly iterating to monitor whether the downloading speed of the previous downloading task is increased or not and updating the limiting speed before downloading the new downloading task reaches the preset number of times threshold value relative to the limiting speed, and the speed of the previous downloading task is not increased, the downloading speed corresponding to the new downloading task before downloading the new downloading task is increased by utilizing the limiting speed, and the new downloading task is downloaded.
According to still another aspect of the present invention, there is provided a task downloading device including: the calculating module is suitable for calculating the change rate of the downloading speed of the prior downloading task after the downloading task is newly added; the judging module is suitable for judging whether the newly added downloading task influences the downloading speed of the prior downloading task or not based on the change rate; the determining module is suitable for determining the limiting speed of the newly added downloading task based on the downloading speed of the current previously downloaded task and the downloading speed of the newly added downloading task when the newly added downloading task affects the previously downloaded task; and the downloading module is suitable for downloading the newly added downloading task by utilizing the limited speed.
According to yet another aspect of the present 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 adapted 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 that, 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, after detecting that the downloading speed of the prior downloading task is influenced by the newly-added downloading task, the newly-added downloading task is subjected to speed limiting processing so as to ensure that the prior downloading task is finished preferentially and improve the successful completion probability of the task.
According to the scheme of the invention, the downloading task is guaranteed to be completed at the fastest speed, the newly added task is guaranteed not to affect the bandwidth occupying the original task, and the original task can be guaranteed to be completed preferentially to the maximum extent.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
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 designate like parts throughout the figures. 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 chart of a task download method 200 according to one embodiment of the invention;
fig. 3 shows a block diagram of a task downloading device 300 according to one embodiment of the 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 performs multi-task downloading, the downloading task automatically preempts the bandwidth, and as the downloading task increases, the downloading bandwidth of the prior downloading task is preempted by other tasks, so that the speed of the prior downloading task is slow, and the downloading time becomes long.
This may occur: for example, for downloading task a, the server address is overseas, resulting in poor bandwidth preemption for task a, slow download speed, and difficult 98% completion for a long period of time. At this time, the user newly creates several new download tasks, the download speed of which is fast, full of bandwidth, and the download speed of task a is compressed to almost an interruption. Similar situation happens continuously until the download link of the task a fails, and the completion progress of the task a is always remained on 99%, and the completion of the task a is impossible. Resulting in a failure of the download of download task a.
The proposal of the invention is provided for solving the problems in the prior art. One embodiment of the present invention provides a task downloading method that may be performed in a computing device. FIG. 1 illustrates 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. The 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 information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of caches, such as a first level cache 110 and a second level cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), 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. Physical memory in a computing device is often referred to as volatile memory, RAM, and data in disk needs to be loaded into physical memory in order to be read by processor 104. The 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 for instructing the processor 104 to perform a corresponding operation. In some implementations, the application 122 may be arranged to execute instructions on an operating system by the one or more processors 104 using the program data 124 in some implementations. The operating system 120 may be, for example, linux, windows or the like, which includes program instructions for handling basic system services and performing hardware-dependent tasks. The application 122 includes program instructions for implementing various functions desired by the user, and the application 122 may be, for example, a browser, instant messaging software, a software development tool (e.g., integrated development environment IDE, compiler, etc.), or the like, but is not limited thereto. When an application 122 is installed into computing device 100, a driver module may be added to operating system 120.
When the computing device 100 starts up running, the processor 104 reads the program instructions of the operating system 120 from the memory 106 and executes them. Applications 122 run on top of operating system 120, utilizing interfaces provided by operating system 120 and underlying hardware to implement various user-desired functions. When a user launches the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads and executes the program instructions of the application 122 from the memory 106.
Computing device 100 also includes storage device 132, storage device 132 including removable storage 136 and non-removable storage 138, both removable storage 136 and non-removable storage 138 being connected to 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 basic configuration 102 via 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 communication with one or more other computing devices 162 via one or more communication ports 164 over a network communication link.
The 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 in a modulated data signal, such as a carrier wave or other transport mechanism. A "modulated data signal" may be a signal that has one or more of its data set or changed 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 special purpose network, and 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.
Computing device 100 also includes a storage interface bus 134 that is coupled to 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, U disk, removable hard disk, etc.) and non-removable storage 138 (e.g., hard disk drive HDD, etc.).
In computing device 100 according to the present invention, application 122 includes a plurality of program instructions to perform method 200.
FIG. 2 illustrates a flow chart of a task download method 200 according to one embodiment of the invention. The task downloading method 200 is suitable for execution in a computing device, such as the aforementioned computing device 100.
As shown in fig. 2, the method 200 is for implementing a task downloading method, and starts in step S202, in which, after a new download task is added, the rate of change of the download speed of the previous download task is calculated. Specifically, if there is only one previous download task, the previous download task is selected to calculate the rate of change of its download speed. If more than one prior download task exists, the download task which starts to be downloaded first in the prior download tasks is selected to calculate the change rate of the download speed. When each download task joins the download queue, the computing device records the joining time of the download task, and determines the download task that was first joined to the download queue in each previous download by comparing the joining time of each download task.
In a specific example, the previous download tasks include a download task a, a download task b, and a download task c, wherein the download task a is first added to the computing device, and then the rate of change of the download speed of the download task a is calculated.
The change rate of the download speed of the previous download task is calculated according to the download speed corresponding to the newly added download task before and after the new download task is added to the download list. Specifically, the downloading speed of the previous downloading task before the new downloading task is added into the downloading list is obtained, then the downloading speed of the previous downloading task after the new downloading task is added into the downloading list is obtained, and the calculating rate is obtained according to the downloading speed and the downloading speed.
In the method 200 of the present embodiment, the download speed of each download task is recorded at regular intervals, so as to observe the download speed variation of each download task. In order to better observe the download speed change of each download task, a period may be set, the average download speed of each download task in the period may be calculated, and the download speed change of each download task may be observed by comparing the average download speeds of each download task. Specifically, in the method 200, the method further includes the steps of:
every preset time, the downloading speed of each downloading task is recorded and used as a record. Wherein, each current download task is all download tasks in the current download list. In addition, it should be noted that, in this embodiment, before the new download task arrives, each current download task includes each previous download task. After the new download task arrives, the current download task includes the 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 newly added download task arrives, each download task currently comprises a download task a, a download task b and a download task c. One record of the download speed of each download task at present is shown in table 1:
TABLE 1
Download task Download task a Download task b Download task c
For a predetermined period of time V a V b V c
As shown in Table 1, a record of the download speed of each download task currently includes V a 、V b And V c
When the download task d is newly added, each current download task includes a download task a, a download task b, a download task c and a download task d. A record of the download speed of the current download task is shown in table 2:
TABLE 2
Download task Download task a Download task b Download task c Download task d
For a predetermined period of time V a V b V c V d
As shown in Table 2, one record of the download speed of each download task currently includes V a 、V b 、V c And V d
The most recent record is 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 records are set once every 5s (predetermined length of time). In this example, the 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 Table 3
In this table 3, at 0 to 20s, the current download tasks include a download task a, a download task b, and a download task c. At 20s, a new download task d is added to the computing device, that is, after 20s, each download task currently includes a download task a, a download task b, a download task c and a download task d.
It should be noted that, when one record value is added, the earliest record of the 10 records is covered. For example, when after 5s has elapsed, a record is added after the record corresponding to 40s of the configuration file, and the first record is deleted, that is, when 0s is deleted, a record of one download speed of each current download task is corresponding.
In some embodiments, after the new download task is added, the method for calculating the rate of change of the download speed of the previous download task includes the following steps:
first, after the download task is newly added, a first number of download speeds of the selected prior download task are 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 the saved records, for example, 10, 8, 6, 4, etc. Or may be set by the person skilled in the art, and this application is not limited thereto.
Then, based on the first number of download speeds selected, a first average download speed and a second average download speed are calculated. Specifically, the first number of download speeds is divided equally into a first partial download speed and a second partial download speed. And calculating a first average downloading speed according to the first partial downloading speed. And calculating a second average downloading speed according to the second partial downloading speed, wherein the record corresponding to the first partial downloading speed does not contain the downloading speed of the newly added downloading task, and the record corresponding to the second partial downloading speed contains the downloading speed of the newly added downloading task.
And finally, taking the ratio of the difference value between the first average downloading speed and the second average downloading speed to the first average downloading speed as the change rate.
Continuing the previous example, when detecting that the newly added download task d arrives, obtaining 10 (i.e., the first number) download speeds V corresponding to the download task a that starts downloading first in the previous download tasks from the configuration file a0 、V a5 、V a10 、V a15 、V a20 、V a25 、V a30 、V a35 、V a40 And V a45 . Dividing 10 download tasks into two parts, the first part comprising V a0 、V a5 、V a10 、V a15 And V a20 . Second part V a25 、V a30 、V a35 、V a40 And V a45 . The record corresponding to each download speed of the first part 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 speed of the recorded download task a is the download speed before the arrival of the download task d. Similarly, each download speed of the second partial download task a corresponds to Is recorded as the download speed after the arrival of download task d.
The first average download speed V of the previous download task a a plane 1 =(V a0 +V a5 +V a10 +V a15 +V a20 )/5. Second average download speed V of prior download task a a plane 2 =(V a25 +V a30 +V a35 +V a40 +V a45 )/5。
Then, the first average download task V according to the prior download task a a plane 1 And a second average download task V a plane 2 Calculating the influence speed V of the newly added download task d on the prior download task a Shadow image =V a plane 1 -V a plane 2 . The download speed of the previous download task a is changed by the change rate V of the download speed after the new download task d arrives a becomes =(V a plane 1 -V a plane 2 )/V a1
In step S204, it is determined whether the newly added 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 greater than the download speed of the previous download task, the new download task is considered to influence the download speed of the previous download task. Otherwise, the newly added download task is determined not to influence the download speed of the prior download task.
Continuing with the previous example, if the rate of change V of the download speed of the previous download task a a becomes If the download speed is greater than 10% (change rate threshold), the newly added download task d is considered to have an influence on the download speed of the download task a. Rate of change V of download speed if the previous download task a a becomes If the download speed is not greater than 10%, the newly added download task d is determined to have no influence on the download speed of the prior download task a.
After the download task is newly added, the download speed of the previous download task is affected by the principle that the newly added download task preemptively 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 size of the change rate threshold may be set according to the number of existing download tasks and the ability of the existing download tasks to preempt bandwidth. Or may be set by the person skilled in the art according to his working experience. This embodiment is not limited thereto.
In step S206, if the newly added download task has an influence on the download speed of the previous download task, the limiting speed of the newly added download task is determined based on the download speed of the current previous download task and the download speed of the newly added 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 impact speed = first average download speed-second average download speed.
Based on the foregoing, when it is determined that the newly added download task d has an influence on the download speed of the preceding download task a, the influence of the newly added download task d on the preceding download task a is determined to be of the magnitude V Shadow image =V a plane 1 -V a plane 2 . In other words, the newly added download task d reduces the download speed of the previous download task a by V Shadow image
Then, the difference between the download speed of the newly added download task and the influencing speed is taken as a limiting speed. The average download speed V of the newly added download task d is calculated, illustratively, based on the recorded values of 5 download speeds for the newly added download task d recorded in the configuration file d plane . The limit speed of the newly added download task d is V Limiting the limit =V d plane -V Shadow image
It should be noted that any one of the ongoing download tasks is performed through the download channel. The download channel is based on TCP (Transmission Control Protocol transmission control protocol, a connection-oriented, reliable, byte-stream-based transport layer communication protocol) or UDP (User Datagram Protocol user datagram protocol, a method of transmitting encapsulated packets without establishing a connection). But both TCP and UDP based include the following five elements, five tuples for short: source IP address, source port, network transport protocol, destination IP address, destination port. The unique download channel of the download task can be determined through the five-tuple. By loading and modifying the downloading rule, the flow control can be performed on the designated five-tuple, such as modifying the maximum downloading speed per second of the downloading task, so as to achieve the purpose of limiting the downloading speed. In the linux system, for example, speed limit of the downloading task can be achieved by modifying iptables rules (application software running in the user space, and by controlling the kernel module to manage processing and forwarding of network packets).
In step S208, the newly added download task is downloaded using the limited speed.
According to the task downloading method 200 provided by the invention, when the fact that the downloading speed of the prior downloading task is influenced by the newly-added downloading task is detected, the newly-added downloading task is subjected to speed limiting processing, so that the prior downloading task is guaranteed to be finished preferentially, and the probability of successful completion of the task is improved.
In addition, after the newly-added download task is downloaded by using the limited speed, the download speeds of the prior download task and the newly-added download task are continuously recorded, and whether the download speed of the newly-added download task is increased or not is monitored so as to judge whether the speed limit of the newly-added download task is successful or not. Thus, in some embodiments, after step S208, further comprising: and monitoring whether the downloading speed of the prior downloading task is increased relative to the corresponding downloading speed before the downloading of the newly added downloading task by using the limiting speed. If the number of the download tasks is increased, the limiting speed is kept, and the newly increased download tasks are downloaded. Otherwise, updating the limiting speed, and downloading the newly added downloading task by using the updated limiting speed, wherein the updated limiting speed is smaller than the limiting speed before updating.
For the former download task a, the corresponding average download speed after the new download task d is V a plane 3 At a limited speed V Limiting the limit After downloading the newly added downloading task d, the downloading speed corresponding to the previous downloading task a is V a plane 4 If V a plane 4 Greater than V a plane 3 At this time, before the current download speed of the previous download task a is greater than the speed limit of the newly added download task d, the speed limit of the newly added download task d is successfully indicated, and the limit is continuously maintainedVelocity V Limiting the limit Downloading task d. If V a plane 4 Not greater than V a plane 3 Indicating that the speed limit for the newly added download task d is failed, the speed V will be limited Limiting the limit The reduction of 20% downloads task d as an updated defined speed.
When the limiting speed is reduced, the downloading speed of the prior downloading task is found to be not increased, and the steps of iteratively monitoring whether the downloading speed of the prior downloading task is increased and updating the limiting speed relative to the downloading speed of the prior downloading task before the new downloading task is downloaded by using the limiting speed are repeated until the downloading speed of the prior downloading task is increased, and the new downloading task is downloaded by keeping the current limiting speed.
If the number of steps of repeatedly iterating to monitor whether the downloading speed of the previous downloading task is increased or not and updating the limiting speed before downloading the new downloading task reaches the preset number threshold relative to the limiting speed, and if the speed of the previous downloading task is not increased, downloading the new downloading task by using the downloading speed of the new downloading task, which corresponds to the downloading speed before downloading the new downloading task by using the limiting speed.
Continuing with the previous example, when the speed V is to be defined Limiting the limit After 20% reduction, the current download speed V of download task a a plane 5 Still not greater than V a plane 3 Continuously reducing the limiting speed, and continuously combining the downloading speed of the downloading task a with V a plane 3 Comparing, if still not greater than V a plane 3 And continuously reducing the limiting speed, wherein after the limiting speed is continuously reduced for 3 times, the downloading speed of the downloading task a is not increased, and the fact that the downloading speed of the downloading task a is reduced because the downloading speed of the downloading task d is not influenced is indicated, and at the moment, the speed limit of the downloading task d is canceled, namely, the downloading speed of the downloading task d is restored to the downloading speed when the downloading task d starts to be added into a downloading queue.
Fig. 3 shows a flow chart of a task downloading device 300 according to one embodiment of the invention. The task downloading device 300 includes 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 rate of change of the download speed of the previous download task after the new download task is added.
The determining module 320 is adapted to determine whether the newly added download task affects the download speed of the prior download task based on the rate of change.
The determining module 330 is adapted to determine the limiting speed of the new download task based on the current download speed of the 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 newly added 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 the description of the task downloading task 200 is referred to for relevant points, and will not be repeated here.
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 of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U-drives, floppy diskettes, 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 in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, readable media comprise readable storage media and communication media. The readable storage medium stores 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 the invention. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It should be appreciated that the teachings of the present invention as described herein may be implemented in a variety of programming languages and that the foregoing description of specific languages is provided for disclosure of preferred embodiments of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood 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 construed as reflecting the intention that: i.e., the claimed invention 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 a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. 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. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units 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 but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, 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 the above description, will appreciate that other embodiments are contemplated within 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 disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is defined by the appended claims.

Claims (9)

1. A task downloading method, comprising:
after a download task is newly added in a download queue, calculating the change rate of the download speed of a previous download task in the download queue, wherein the change rate of the download speed of the previous download task is calculated according to the download speeds corresponding to the download tasks before and after the new download task is added in the download list, and specifically comprises the following steps: if only one prior download task exists, selecting the prior download task to calculate the change rate of the download speed, and if more than one prior download task exists, selecting the download task which starts to be downloaded first in the prior download tasks to calculate the change rate of the download speed, wherein any download task executes the download through a download channel, and the download channel is uniquely determined through five-tuple formed by a source IP address, a source port, a network transmission protocol, a destination IP address and a destination port;
Judging whether the newly added download task affects the download speed of the prior download task or not based on the change rate, specifically judging whether the change rate is larger than a preset change rate threshold value or not; if the download speed is greater than the download speed of the previous download task, the new download task is considered to influence the download speed of the previous download task; otherwise, the newly added download task is determined not to influence the download speed of the prior download task;
if the influence exists, determining a limiting speed of a new download task based on the download speed of the current previous download task and the download speed of the new download task;
downloading the newly added downloading task by utilizing the limiting speed;
monitoring whether the downloading speed of the previous downloading task is increased relative to the corresponding downloading speed before the downloading of the newly added downloading task by using the limiting speed;
if the limiting speed is not increased, updating the limiting speed, and downloading the new downloading task by using the updated limiting speed, wherein the updated limiting speed is smaller than the limiting speed before updating;
if after updating the limiting speed, the downloading speed of the prior downloading task is not increased relative to the corresponding downloading speed before downloading the new downloading task by using the limiting speed, repeating the steps of iteratively updating the limiting speed and monitoring the downloading speed of the prior downloading task until the downloading speed of the prior downloading task is increased, and maintaining the current limiting speed to download the new downloading task.
2. The method of claim 1, further comprising the step of:
every preset time, recording the downloading speed of each downloading task at present and taking the downloading speed as a record;
the most recent record is saved, wherein the number of saved records is the first number.
3. The method of claim 2, wherein the step of calculating the rate of change of the download speed of the previous download task after the new download task further comprises:
after the new download task is added, extracting a first number of download speeds of the selected prior download task from the stored first number of records;
calculating a first average download speed and a second average download speed based on the first number of download speeds selected;
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.
4. The method of claim 3, wherein the step of calculating a first average download speed and a second average download speed based on the selected first number of download speeds comprises:
equally dividing the first number of download speeds into a first partial download speed and a second partial download speed;
Calculating the first average download speed according to the first partial download speed;
calculating said second average download speed based on said second partial download speed,
the record corresponding to the first part downloading speed does not contain the downloading speed of the new downloading task, and the record corresponding to the second part downloading speed contains the downloading speed of the new downloading task.
5. The method of claim 3, wherein the determining the defined speed for the newly added download task based on the download speed for the current prior download task and the download speed for the newly added download task if there is an impact 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 influencing speed as the limiting speed.
6. A method as claimed in claim 3, further comprising the step of:
and if the download speed of the previous download task is monitored to be increased relative to the download speed corresponding to the download speed before the new download task is downloaded by utilizing the limit speed, maintaining the limit speed and downloading the new download task.
7. A task downloading device, comprising:
the calculation module is suitable for calculating the change rate of the downloading speed of the previous downloading task in the downloading queue after the downloading task is newly added in the downloading queue, wherein the change rate of the downloading speed of the previous downloading task is calculated according to the corresponding downloading speeds before and after the new downloading task is added into the downloading list, and specifically comprises the following steps: if only one prior download task exists, selecting the prior download task to calculate the change rate of the download speed; if more than one prior download task exists, selecting the download task which starts to be downloaded first in the prior download tasks to calculate the change rate of the download speed, wherein any download task executes the download through a download channel, and the download channel is uniquely determined through a five-tuple formed by a source IP address, a source port, a network transmission protocol, a destination IP address and a destination port;
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 particularly judging whether the change rate is larger than a preset change rate threshold value or not; if the download speed is greater than the download speed of the previous download task, the new download task is considered to influence the download speed of the previous download task; otherwise, the newly added download task is determined not to influence the download speed of the prior download task;
The determining module is suitable for determining limiting speed of the new downloading task based on the current downloading speed of the prior downloading task and the downloading speed of the new downloading task when the new downloading task affects the prior downloading task;
the downloading module is suitable for downloading the new downloading task by utilizing the limiting speed and monitoring whether the downloading speed of the prior downloading task is increased relative to the corresponding downloading speed before the new downloading task is downloaded by utilizing the limiting speed; if the limiting speed is not increased, updating the limiting speed, and downloading the new downloading task by using the updated limiting speed, wherein the updated limiting speed is smaller than the limiting speed before updating; if after updating the limiting speed, the downloading speed of the prior downloading task is not increased relative to the corresponding downloading speed before downloading the new downloading task by using the limiting speed, repeating the steps of iteratively updating the limiting speed and monitoring the downloading speed of the prior downloading task until the downloading speed of the prior downloading task is increased, and maintaining the current limiting speed to download the new downloading task.
8. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-6.
9. A readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-6.
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 CN114500483A (en) 2022-05-13
CN114500483B true 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 (7)

* 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
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 (8)

* 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
US11212186B2 (en) * 2019-03-13 2021-12-28 Facebook, Inc. Measuring the impact of network deployments
US10863526B2 (en) * 2019-04-30 2020-12-08 Citrix Systems, Inc. System and method for prioritizing data traffic

Patent Citations (7)

* 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
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
CN113556408A (en) 2021-10-26
CN113556408B (en) 2022-02-22
CN114500483A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
US8826068B2 (en) Automated testing of applications in cloud computer systems
CN111782414B (en) Delay message processing method and system
US8949654B2 (en) Parameterized dynamic model for cloud migration
US9621575B1 (en) Context aware threat protection
JP5652220B2 (en) File management apparatus and program
US10496406B2 (en) Handling unaligned load operations in a multi-slice computer processor
CN114500483B (en) Task downloading method and device, computing equipment and storage medium
US10020993B2 (en) Dynamically launching inter-dependent applications based on user behavior
JP2006244487A (en) Method and computer-readable medium for preserving formula-based document
CN108694078B (en) Computing resource and system and method for processing interrupt
US9450839B2 (en) Efficient network bandwidth utilization in a distributed processing system
CN110874298B (en) Request data storage method and terminal equipment
CN113259485B (en) Network proxy method, computing device and readable storage medium
CN111930392B (en) Application service deployment method, computing device and readable storage medium
US10241905B2 (en) Managing an effective address table in a multi-slice processor
JP2011172126A (en) Packet filtering system, packet filtering apparatus, and program
US20150142709A1 (en) Automatic learning of bayesian networks
CN113766022A (en) Task downloading method and device, computing equipment and storage medium
CN114500439B (en) Mail downloading method, device, computing equipment and storage medium
US9519738B2 (en) Selectively tuning frequency modes of a structure
CN110750503A (en) File deletion speed control method, device, equipment and readable storage medium
CN114006947B (en) File downloading method and device, computing equipment and storage medium
JP2019179486A (en) Information processing device, control method, and program
JP2001005678A (en) Device and method for network type information processing
JP2006172065A (en) Checkpoint collection method, system and program

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