File downloading control method and device, electronic equipment and storage medium
By obtaining the download service threshold and status information, dynamically adjusting the number of download services, and combining extremely large file collections and priority allocation, the problem of insufficient resources and low efficiency in large-scale file downloads is solved, and efficient utilization of resources and important files are achieved. Download immediately.
Patent Information
- Application Number
- CN202311663984.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2024-10-18
AI Technical Summary
During large-scale file downloads, fixed download-side resources may be insufficient or wasted, and existing timing scheduling strategies cannot adjust resources in a timely manner, resulting in low download efficiency.
By obtaining download service threshold information and status information, dynamically adjust the number of download services, adopt expansion or reduction strategies, and combine extremely large file collections and priority allocation mechanisms to automatically adjust resource configuration to adapt to the download needs of different files.
It effectively avoids resource shortage or waste, improves download efficiency, ensures timely download of important files, and optimizes the overall operating performance of the system.
Smart Images

Figure CN118802894A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data technology, and in particular to a file download control method and device, an electronic device, and a storage medium. Background Art
[0002] When processing large-scale file downloads, the existing technology regards the download side resources as fixed values. When downloading files, a splitting strategy is often adopted. After splitting the files, multiple files are downloaded according to a certain allocation strategy, and resources are scheduled regularly to adapt to the download of different files. However, when the number of split files is large and the size is large, the fixed download side resources may be insufficient or wasted, and the timing strategy cannot adjust the download side resources in time. Summary of the invention
[0003] The present disclosure is proposed in view of the above problems. The present disclosure provides a file download control method and device, an electronic device and a storage medium.
[0004] According to one aspect of the present disclosure, a file download control method is provided, including: obtaining download service threshold information, the download service threshold information is used to indicate one or more thresholds related to expanding or reducing the download service, obtaining download service status information, the download service status information is used to indicate the current status of one or more download services, and increasing or decreasing the number of download services based at least on the download service threshold information and / or the download service status information.
[0005] In addition, according to a file download control method according to one aspect of the present disclosure, the download service threshold information includes at least one of a download service quantity threshold, a capacity expansion and contraction download task threshold, a file download task threshold, and a file size threshold.
[0006] In addition, according to the file download control method in one aspect of the present disclosure, the download service status information includes at least one of the identity information of the download service, the number of current download tasks, and the size of current download tasks.
[0007] In addition, according to a file download control method according to one aspect of the present disclosure, expansion or reduction of the download service is performed at least based on download service threshold information and / or download service status information, including: generating download service identification information based on the download service quantity threshold and the file download task threshold in the download service threshold information, wherein the download service identification information includes expandable identification information and shrinkable identification information, and when the number of expandable identification information is greater than or equal to a first threshold, the download service is expanded, and when the number of shrinkable identification information is greater than or equal to a second threshold, the download service is reduced.
[0008] In addition, according to a file download control method according to one aspect of the present disclosure, expansion or reduction of the download service is performed, including: determining the number of download services, generating a preset number of download services based on the execution of expansion or reduction of the download service, comparing the preset number of download services with the download service number threshold in the download service threshold information, and in the case of executing expansion of the download service, taking the minimum value between the preset number of download services and the download service number threshold as the target number of download services, and in the case of executing reduction of the download service, taking the maximum value between the preset number of download services and the download service number threshold as the target number of download services.
[0009] In addition, according to another file download control method disclosed in the present invention, multiple task sequences to be downloaded with different priorities are allocated according to a predetermined ratio, the size of a download task in the task sequence to be downloaded is obtained, and it is determined whether it is an extra-large file. When the download task is an extra-large file, the download task is moved to an extra-large file collection; when the download task is not an extra-large file, the download task is distributed to the download service.
[0010] In addition, according to another file download control method disclosed in the present invention, moving the download task to an ultra-large file collection also includes: based on the number of download tasks in the ultra-large file collection being greater than or equal to a collection threshold, and / or the status information of the download service being scalable identification information, pausing the download process of the download service and giving priority to downloading the download tasks in the ultra-large file collection.
[0011] In addition, according to the file download control method disclosed in the present invention, allocating multiple download task sequences of different priorities according to a predetermined ratio includes: obtaining the path and size of a download task in the download task sequence, and determining the priority of the download task based on the path, size and current download task quantity information in the download service status information of the download task.
[0012] In addition, according to a file download control device disclosed in the present invention, a threshold information acquisition module is provided for acquiring download service threshold information, where the download service threshold information is used to indicate one or more thresholds related to expanding or reducing the capacity of the download service; a status information acquisition module is provided for acquiring download service status information, where the download service status information is used to indicate the current status of one or more download services; and the number of download services is increased or decreased at least based on the download service threshold information and / or the download service status information.
[0013] According to another aspect of the present disclosure, an electronic device is provided, including: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions so that the electronic device executes the above file download control method.
[0014] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium is used to store computer-readable instructions, which, when executed by a processor, causes the processor to execute a file download control method in a virtual space.
[0015] As will be described in detail below, according to the file download control method and device, electronic device and storage medium of the embodiments of the present disclosure, by obtaining download service threshold information and download service status information, a scaling plan is generated to automatically adjust the download side resources to avoid resource waste or resource shortage in the download service; the present disclosure also takes into account that the size of individual files is too large, and the importance of files from different paths is different. Allocation based solely on quantity may result in uneven sizes of download tasks within the download service and failure to download important files in a timely manner, affecting the operating efficiency of the entire system. The present disclosure also provides an ultra-large file collection, which comprehensively considers the download service load and the size of the ultra-large files to allocate files, thereby improving the overall download efficiency.
[0016] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0018] Figure 1 is a schematic diagram illustrating a scenario in which the file download control method according to an embodiment of the present disclosure is applied;
[0019] Figure 2 is a flowchart illustrating a file download control method according to an embodiment of the present disclosure;
[0020] Figure 3 is a flowchart further illustrating a file download control method according to an embodiment of the present disclosure;
[0021] Figure 4 is a flowchart illustrating the application of a very large file downloading method according to an embodiment of the present disclosure;
[0022] Figure 5 is a block diagram illustrating a file download control device according to an embodiment of the present disclosure;
[0023] Figure 6 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure; and
[0024] Figure 7 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. For example, the first threshold and the second threshold are only used to distinguish two different thresholds.
[0028] Figure 1 is a schematic diagram illustrating a scenario in which the file download control method according to an embodiment of the present disclosure is applied. Figure 1As shown, the above-mentioned file download control method can be applied to large-scale data download. The data on the device can be collected and uploaded to the data sharing center, and the download service can distribute the files for download, and then the data in the file can be parsed and classified and stored in the database. Among them, the device can be a desktop computer, a portable computer, a tablet computer, a mobile phone, a network cloud, etc., and the transmission method can be wired transmission or wireless transmission. The specific category is not limited here, and the user can choose according to the actual situation. In the process of large-scale file download, the downloaded data will be divided into multiple download tasks and distributed to different download services of multiple hosts. In the process of downloading tasks, the download resources required by the download service to execute the download task are not fixed due to the different sizes and quantities of download tasks. However, the manual expansion and contraction speed is too slow. When multiple download services execute download tasks at the same time, it is impossible for humans to adjust the resources of the download service in time. Therefore, a container orchestration platform can be used to assist in resource management, such as Kubernetes. Among them, Kubernetes can be used to manage containerized applications on multiple hosts in a cloud platform, and to deploy, plan and update containers. Pod is a virtual machine provided by the Kubernetes platform and is the basic scheduling unit of Kubernetes. It can download files. The Kubernetes platform can manage the download tasks and related data of the pod through the pod controller.
[0029] Figure 2 is a flowchart illustrating a file download control method according to an embodiment of the present disclosure. Figure 2 As shown, the file download control method includes:
[0030] Obtain download service threshold information, where the download service threshold information is used to indicate one or more thresholds related to expanding or reducing the capacity of the download service, obtain download service status information, where the download service status information is used to indicate the current status of one or more download services, and increase or decrease the number of download services based at least on the download service threshold information and / or the download service status information.
[0031] In some embodiments of the present disclosure, in order to effectively and fully utilize download resources, as shown in step S201 and step S202, the present disclosure can obtain download service threshold information and download service status information, and judge the load status of the download service through the download service threshold information and the download service status information, so as to judge whether the download service needs to be expanded or reduced in capacity. The download service threshold information is information associated with the download service, such as the upper limit of the number of download tasks that the download service can accommodate, the size of the total amount of download tasks, etc. The download service status information is the real-time status of the current download service, for example, judging whether the current download service needs to be expanded or reduced in capacity based on the real-time load of the download service. When there are multiple download services, the Kubernetes platform can be used to adjust the resources of a separate download service, or the resources can be adjusted based on the overall download service status information.
[0032] Furthermore, the download service threshold information includes at least one of a download service quantity threshold, a capacity expansion and contraction download task threshold, a file download task threshold, and a file size threshold.
[0033] The download service threshold may include a download service quantity threshold, a scalable download task threshold, and a file download task threshold, wherein the download service quantity threshold may include a minimum download service quantity and a maximum download service quantity, and the download service quantity threshold may be used to determine the range of the download service quantity of the entire system. The scalable download task threshold may include the number of scalable download tasks, the maximum scalable file value, the number of scalable download tasks, and the maximum scalable file value, the number of scalable download tasks and the number of scalable file downloads may be used to identify whether the current download service load is too low, and the number of scalable download tasks and the number of scalable file downloads may be used to identify whether the current download service is too high. The file download task threshold may include the maximum total number of downloaded files and the maximum number of download tasks, and the file size threshold is the upper limit of the size of a single file.
[0034] Furthermore, the download service status information includes at least one of identity information of the download service, current download task quantity information, and current download task size information.
[0035] The download service status information may indicate the real-time load status of each download service. The download service status information may include at least one of the identity information of the download service, the current download task quantity information, and the current download task size information. The identity information is a unique code of the download service, which is used to distinguish different download services. The current download task quantity information may include the number of download tasks being executed in the current download service. When the download service receives or completes a file download task, the download service status information may be updated.
[0036] Figure 3is a flowchart further illustrating a method for controlling file downloading according to an embodiment of the present disclosure. Figure 3 As shown, the method also includes: further, at least based on the download service threshold information and / or the download service status information, executing expansion or reduction of the download service, including: generating download service identification information based on the download service quantity threshold and the file download task threshold in the download service threshold information, wherein the download service identification information includes expandable identification information and shrinkable identification information, and executing expansion of the download service when the number of expandable identification information is greater than or equal to a first threshold, and executing reduction of the download service when the number of shrinkable identification information is greater than or equal to a second threshold.
[0037] As shown in step S301 and step S302, when the download service receives or completes a file download task, the download service status information can be updated. After the update is completed, the number of scalable download tasks, the maximum value of scalable files, the number of scalable download tasks and the maximum value of scalable files, the maximum total number of downloaded files and the maximum number of download tasks can be compared with the current number of download tasks and the current download task size information in the download service status information to determine the load of the download service. For example, if the number of tasks and the size of download tasks in the current download service are both less than the number of scalable download tasks and the maximum value of scalable files, the download service can be scalable. On the contrary, if the number of tasks and the size of download tasks in the current download service are both greater than the number of scalable download tasks and the maximum value of scalable files, the download service is considered to be scalable. Otherwise, the download service does not need to be operated. Further, according to the load of each download service, download service identification information can be generated. When the download service is scalable, scalable identification information is generated, and when the download service is scalable, scalable identification information is generated.
[0038] As shown in step S303 and step S304, when the number of expandable identification information is greater than or equal to the first threshold, the system as a whole is expanded, and when the number of shrinkable identification information is greater than or equal to the second threshold, the download service is shrunk. The first threshold and the second threshold can be set to fixed values, or a proportional value related to the current download service quantity information can be preset. No limitation is made here, and the user can choose according to the actual situation. Considering that the total amount of download tasks at different times is not the same, setting the first threshold and the second threshold as fixed values may not be able to flexibly cope with the corresponding situation of different download task amounts. Therefore, it is preferred to set the first threshold and the second threshold to a proportional value related to the current download service quantity information. Further, when the first threshold is less than 2 / 3 of the current number of download services, considering that the number of expandable identification information is too small, expanding the system may cause a waste of resources, and when the number of expandable identification information is much greater than 2 / 3 of the current number of download services, most download services have already experienced insufficient resources, and the slow expansion speed may reduce the overall file download speed. After the expansion is completed, the system will continue to allocate the files to be allocated according to the current allocated download task quantity information and the current download task size information. When the number of identification information based on scalability exceeds the second threshold, the entire system is scaled down. Furthermore, when the second threshold is less than 1 / 2 of the current number of download services, the entire system can handle file download tasks. Scaling down at this time may lead to a decrease in overall file download efficiency. When the second threshold is much larger than 1 / 2 of the current number of download services, most download services have insufficient download resources and the download speed is slowed down. Therefore, the preferred second threshold is 1 / 2 of the current number of download service information. When the system receives a scaling down instruction, it will no longer allocate tasks to be downloaded. The allocated download tasks and their information will be reported to the system and reallocated when the scaling down is completed.
[0039] Furthermore, executing expansion or reduction of the download service includes: determining the number of download services; generating a preset number of download services based on executing expansion or reduction of the download service; comparing the preset number of download services with the download service number threshold in the download service threshold information, and in the case of executing expansion of the download service, taking the minimum value between the preset number of download services and the download service number threshold as the target download service number; in the case of executing reduction of the download service, taking the maximum value between the preset number of download services and the download service number threshold as the target download service number, updating the download service number to the target download service number, and updating the download service status information.
[0040] When executing the expansion or reduction of the download service, as shown in step S305, the total amount of the download service needs to be determined first, as shown in step S306, based on the decision of expansion or reduction, a preset number of download services is generated. The preset number of download services can be a fixed value or a certain proportion to the number of download services. The specific type is not limited here, and the user can choose it according to the actual situation. Considering that the size and number of download tasks of different download service numbers are different, the fixed value may not meet the flexible resource change requirements. Therefore, it is preferred to set the preset number of download services as a multiple of the total amount of the current download service. Taking the expansion of the download service as an example, in order to reduce the number of expansions and reduce the waste of resources, it is preferred to set the preset number of download services to twice the total amount of the current download service. At the same time, as shown in step S307, in order to prevent the preset number of download services from exceeding the download service number threshold, resulting in expansion errors, it is necessary to compare the preset number of download services with the download service number threshold, take the smaller value between the two as the target number of download services, and update the target number of download services to the current number of download services, and expand the download service. After the expansion is completed, the information of the download tasks to be allocated will be re-acquired to allocate the download tasks. The specific expansion method can be implemented using the Kubernetes platform. There is no specific restriction on the specific implementation platform, and users can choose according to actual conditions.
[0041] When the download service is scaled down, that is, when more than 1 / 2 of the download services have reported the scalable flag, stop allocating tasks to be downloaded, report the download tasks being downloaded in the download service and their information, and reallocate the download tasks being downloaded to the queue of tasks to be downloaded. Unlike when expanding, the download service can still receive tasks to be downloaded when it is scaled down. At this time, according to the scaling down instruction, the scaling down parameters are sent and the scaling down is performed, as shown in step S308, and the number of download services after scaling down is updated to the current number of download services. The scaling down parameters can include the identity information of the download service that needs to be deleted, and the above scaling down steps can be implemented through the Kubernetes platform.
[0042] Further, Figure 4 is a flowchart illustrating the application of the method for downloading a very large file according to an embodiment of the present disclosure. Figure 4 As shown, multiple download task sequences of different priorities are allocated according to a predetermined ratio, the size of a download task in the download task sequence is obtained, and it is determined whether it is an extra-large file. When the download task is an extra-large file, the download task is moved to an extra-large file collection. When the download task is not an extra-large file, the download task is distributed to the download service.
[0043] When the file is too large, there may be a situation where the download service has insufficient resources to process these oversized files, and the download of oversized files may affect the download of other files, resulting in reduced download efficiency. Therefore, the present disclosure sets an oversized file collection, and when allocating files, files with a file size exceeding a threshold can be allocated to the oversized file collection, and when there are sufficient download service resources, the download allocation is performed according to the priority of the files.
[0044] Furthermore, allocating multiple download task sequences of different priorities according to a predetermined ratio includes: obtaining the path and size of a download task in the download task sequence, and determining the priority of the download task based on the path, size and current download task quantity information in the download service status information of the download task.
[0045] Considering the different importance of different files, the priority of files can be set according to the path, size and download status of the files. For example, three priorities can be set, from high to low, namely, the first priority, the files involved in the file download instructions sent by the external system, the highest priority, the second priority, the files to be allocated reported by the replicas that can be shrunk during dynamic shrinkage; the third priority, the files to be downloaded obtained by the conventional pull file server, the three levels of file information can be stored in the corresponding queues respectively, and the user can also set the priority according to the size of the file, upload time, etc., which can be set according to the actual situation. Further, considering that there are too many files with the highest priority, resulting in the inability to download files of other priorities in time, in order to avoid this situation, files of different priorities can be allocated according to a preset ratio when allocating files, and the ratio can be 3:2:1. For example, when the comparison of the three priorities is not empty, three files can be taken as download tasks in the file queue of the first priority, two files can be taken as download tasks in the file queue of the second priority, and one file can be taken as download tasks in the file queue of the third priority. This can ensure that the files of the first priority are downloaded first, and can also avoid affecting the download of files of other priorities, thereby causing data delay problems.
[0046] Furthermore, moving the download task to the super large file collection also includes: based on the number of download tasks in the super large file collection being greater than or equal to the collection threshold, and / or the status information of the download service being scalable identification information, pausing the download process of the download service and giving priority to downloading the download tasks in the super large file collection.
[0047] When the download service is executing a download task, the size or number of files in the super-large file collection may be greater than or equal to the collection threshold. In order not to affect the download of super-large files and the subsequent allocation of super-large files, consider suspending regular file allocation and giving priority to the files in the super-large file collection until the number of elements in the collection is lower than a certain value. In addition, we can force the allocation of super-large files in the collection through the API to achieve timely download of super-large files.
[0048] The above describes the file download control method according to the embodiment of the present disclosure. The following will further describe the file download control device 500 for implementing the above.
[0049] Figure 5 is a block diagram illustrating a file download control device 500 according to an embodiment of the present disclosure, Figure 5 As shown, the above-mentioned device includes: a threshold information acquisition module 501, which acquires download service threshold information, where the download service threshold information is used to indicate one or more thresholds related to expanding or reducing the download service, a status information acquisition module 502, which acquires download service status information, where the download service status information is used to indicate the current status of one or more download services, and increases or decreases the number of download services based at least on the download service threshold information and / or the download service status information.
[0050] The above-mentioned file download control device 500 can be applied to large-scale data download. It can collect data on the device and upload it to the data sharing center, and the download service will distribute the files for download, and then parse and classify the data in the file and store it in the database. Among them, the device can be a desktop computer, a portable computer, a tablet computer, a mobile phone, a network cloud, etc., and the transmission method can be wired transmission or wireless transmission. The specific category is not limited here, and the user can choose according to the actual situation. In the process of large-scale file download, the downloaded data will be divided into multiple download tasks and distributed to different download services of multiple hosts. In the process of downloading tasks, the download service is not fixed because the size and number of download tasks are different. However, the manual expansion and contraction speed is too slow. When multiple download services execute download tasks at the same time, it is impossible for humans to adjust the resources of the download service in time. Therefore, a container orchestration platform can be used to assist in resource management, such as Kubernetes. Among them, Kubernetes can be used to manage containerized applications on multiple hosts in a cloud platform, and to deploy, plan and update containers. Pod is a virtual machine provided by the Kubernetes platform and is the basic scheduling unit of Kubernetes. It can download files. The Kubernetes platform can manage the download tasks and related data of the pod through the pod controller.
[0051] In order to effectively and fully utilize the download resources, as shown in step S201 and step S202, the present disclosure can obtain download service threshold information and download service status information, and judge the load status of the download service through the download service threshold information and the download service status information, so as to judge whether the download service needs to be expanded or reduced in capacity. The download service threshold information is the information associated with the download service, such as the upper limit of the number of download tasks that the download service can accommodate, the size of the total amount of download tasks, etc. The download service status information is the real-time status of the current download service, for example, judging whether the current download service needs to be expanded or reduced in capacity based on the real-time load of the download service. When there are multiple download services, the Kubernetes platform can be used to adjust the resources of a separate download service, or the resources can be adjusted based on the overall download service status information.
[0052] Figure 6 1 is a hardware block diagram of an electronic device 600 according to an embodiment of the present disclosure. The electronic device according to an embodiment of the present disclosure includes at least a processor and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor executes the mapping method of the three-dimensional image in the virtual space 101 as described above.
[0053] Figure 6 The electronic device 600 shown specifically includes: a central processing unit (CPU) 601, a graphics processing unit (GPU) 602 and a main memory 603. These units are connected to each other via a bus 604. The central processing unit (CPU) 601 and / or the graphics processing unit (GPU) 602 can be used as the above-mentioned processor, and the main memory 603 can be used as the above-mentioned memory for storing computer-readable instructions. In addition, the electronic device 600 may also include a communication unit 605, a storage unit 606, an output unit 607, an input unit 608 and an external device 609, which are also connected to the bus 604.
[0054] Figure 7 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. Figure 7 As shown, a computer-readable storage medium 700 according to an embodiment of the present disclosure has computer-readable instructions 701 stored thereon. When the computer-readable instructions 701 are executed by a processor, the generation method in the virtual space 101 according to an embodiment of the present disclosure described with reference to the above figures is executed. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0055] The above describes the file download control method and device, storage medium and electronic device according to the embodiments of the present disclosure with reference to the accompanying drawings. By obtaining the download service threshold information and the download service status information, a scaling plan is generated to automatically adjust the download side resources to avoid resource waste or resource shortage in the download service. The present disclosure also takes into account that the size of individual files is too large, and the importance of files from different paths is different. Allocation based solely on quantity may lead to uneven sizes of download tasks within the download service and failure to download important files in time, affecting the operating efficiency of the entire system. The present disclosure also provides an ultra-large file collection, which comprehensively considers the download service load and the size of the ultra-large files to allocate files, thereby improving the overall download efficiency.
[0056] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0057] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0058] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present disclosure are only illustrative examples and the schematic diagrams require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", and the like are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or", and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0059] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0060] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0061] Various changes, substitutions, and modifications of the technology herein may be made without departing from the technology of the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the above processes, machines, manufactures, compositions of events, means, methods, and actions. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0062] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure schematics are limited to the aspects shown herein, but in accordance with the widest scope consistent with the principles and novel features disclosed herein.
[0063] The above description has been given for the purpose of illustration and description. In addition, this description schematic limits the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A file download control method, characterized in that: include: Acquire download service threshold information, where the download service threshold information is used to indicate one or more thresholds related to expansion or reduction of the download service; Obtaining download service status information, where the download service status information is used to indicate the current status of one or more download services; as well as The number of download services is increased or decreased based at least on the download service threshold information and / or the download service status information.
2. The file download control method according to claim 1, characterized in that: The download service threshold information includes at least one of a download service quantity threshold, a capacity expansion and contraction download task threshold, a file download task threshold, and a file size threshold.
3. The file download control method according to claim 1, characterized in that: The download service status information includes at least one of the identity information of the download service, the number of current download tasks, and the size of current download tasks.
4. The file download control method according to claim 1, characterized in that: The performing expansion or reduction of the download service based at least on the download service threshold information and / or the download service status information includes: Generate download service identification information based on the download service quantity threshold and the file download task threshold in the download service threshold information; wherein the download service identification information includes expandable identification information and shrinkable identification information; When the amount of the expandable identification information is greater than or equal to a first threshold, performing expansion of the download service; When the amount of the scalable identification information is greater than or equal to a second threshold, scaling down the download service is performed.
5. The file download control method according to claim 1, characterized in that: The execution of expanding or reducing the capacity of the download service includes: Determine the number of download services; Based on executing the expansion or reduction of the download service, generating a preset number of download services; Comparing the preset download service quantity with the download service quantity threshold in the download service threshold information; In the case of executing the expansion of the download service, taking the minimum value between the preset download service quantity and the download service quantity threshold as the target download service quantity; In the case of performing the downscaling of the download service, taking the maximum value of the preset download service quantity and the download service quantity threshold as the target download service quantity; The download service quantity is updated to the target download service quantity, and the download service status information is updated.
6. The file download control method according to claim 1, characterized in that: The method further comprises: Allocate multiple task sequences to be downloaded with different priorities according to a predetermined ratio; Get the size of a download task in the task sequence to be downloaded, and determine whether it is an oversized file; When the download task is an oversized file, the download task is moved to an oversized file collection; When the download task is not an oversized file, the download task is distributed to the download service.
7. The file download control method according to claim 6, characterized in that: The step of moving the download task to the super large file collection further comprises: Based on the fact that the number of download tasks in the super large file collection is greater than or equal to the collection threshold, and / or the status information of the download service is scalable identification information, the download process of the download service is suspended, and the download tasks in the super large file collection are downloaded preferentially.
8. The file download control method according to claim 6, characterized in that: The task sequences to be downloaded with multiple priorities allocated according to a predetermined ratio include: Obtain the path and size of a download task in the sequence of tasks to be downloaded; The priority of the download task is determined based on the path and size of the download task and the current download task quantity information in the download service status information.
9. A file download control device, characterized in that: A threshold information acquisition module, which acquires download service threshold information, wherein the download service threshold information is used to indicate one or more thresholds related to expansion or reduction of the download service; A status information acquisition module, which acquires download service status information, wherein the download service status information is used to indicate the current status of one or more download services; as well as The number of download services is increased or decreased based at least on the download service threshold information and / or the download service status information.
10. An electronic device, characterized in that: include: a memory for storing computer readable instructions; as well as A processor is used to run the computer-readable instructions so that the electronic device executes the file download control method according to any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium for storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the processor is caused to execute the file download control method according to any one of claims 1 to 8.
