File downloading method and device
By splitting and downloading files on the cloud storage platform, and using the allocation and merging of shared accounts and sub-file packages, the problem of slow file download speed on the cloud storage platform is solved, improving user experience and efficiency.
Patent Information
- Application Number
- CN202411160952.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-06
AI Technical Summary
Cloud storage platforms are slow during file downloading, resulting in poor user experience, especially when downloading files with large amounts of information.
File downloads are downloaded through a shared account. The server divides the target file, generates a sub-file package, and distributes it to multiple shared users for download. The client downloads the sub-file package from the server and merges it to obtain the complete file.
Improve file download efficiency, reduce the time for each user to download the complete file, and improve the user experience.
Smart Images

Figure CN119094469A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing technology, and in particular to a file downloading method and device. Background Art
[0002] With the continuous development of Internet technology, cloud storage platform, as a professional Internet storage tool, provides information storage, reading, downloading and other services for enterprises and individuals through the Internet. It has the characteristics of security, stability and massive storage.
[0003] At present, when users download information through cloud storage platforms, the speed of information downloading depends largely on the user's membership rights and network factors. In general, when the amount of information to be downloaded is large, users often have to spend a huge amount of time to download information. How to improve the information download speed of cloud storage platforms has become a focus of increasing attention for cloud storage platform providers and users who download information. Summary of the invention
[0004] The purpose of one embodiment of this specification is to provide a file downloading method and device to solve the technical problem of how to improve the efficiency of file downloading.
[0005] To solve the above technical problems, an embodiment of this specification is implemented as follows:
[0006] In a first aspect, an embodiment of the present specification provides a file downloading method, which is applied to a server, and the method includes:
[0007] Obtain a file download request sent by a client based on a shared account, and perform a sharing verification according to the file download request;
[0008] If the verification is passed, the target file for shared download and multiple shared users are read;
[0009] Segmenting the multiple sub-files contained in the target file to obtain at least one sub-file package;
[0010] The at least one sub-file package is distributed to the multiple sharing users, and the download process of each sub-file package is started based on the download link of each sharing user.
[0011] The file download method provided in the present embodiment, after obtaining the file download request submitted by the client based on the shared account, first performs a sharing verification according to the file download request, and if the verification passes, reads the target file for shared download and multiple shared users, then splits the multiple sub-files contained in the target file to obtain at least one sub-file package, and then distributes the at least one sub-file package to the shared user, and starts the download processing of each sub-file based on the download link of each user, thereby splitting the target file for shared download based on the shared account into at least one sub-file package, and distributing the sub-file package to the shared users for shared download based on the shared account, so that in the process of shared download based on the shared account, each shared user only downloads a part of the target file, avoiding that each shared user downloads the complete target file and affects the download speed, resulting in a longer time for file download and affecting the user experience.
[0012] In a second aspect, an embodiment of this specification provides another file downloading method, which is applied to a client, and the method includes:
[0013] A file download request submitted based on a shared account is obtained and sent to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes;
[0014] Downloading a file from the server based on the download link to obtain a target sub-file package, and receiving at least one associated sub-file package sent by at least one associated client;
[0015] The target sub-file package and the at least one associated sub-file package are merged to obtain a target file.
[0016] The file download method provided in this embodiment is that after the client obtains the file download request submitted based on the shared account, it sends it to the server, so that the server distributes at least one sub-file package obtained by splitting the target file to multiple shared users according to the file download request when the sharing verification passes. Then the client downloads the file from the server based on the download link to obtain the target sub-file package. In addition, it also receives at least one associated sub-file package sent by at least one associated client, merges the target sub-file package and at least one associated sub-file package to obtain the target file. In this way, when one client only downloads a part of the target file, each client can obtain the target file, thereby improving the file download efficiency.
[0017] In a third aspect, another embodiment of the present specification provides a file downloading device, which runs on a server, and the device includes:
[0018] A sharing verification module is configured to obtain a file download request sent by a client based on a shared account, and perform sharing verification according to the file download request;
[0019] If the verification is passed, a reading module is run, wherein the reading module is configured to read a target file for shared downloading and a plurality of shared users;
[0020] A segmentation processing module is configured to segment a plurality of sub-files contained in the target file to obtain at least one sub-file package;
[0021] The sub-file package distribution module is configured to distribute the at least one sub-file package to the multiple sharing users, and start download processing of each sub-file package based on the download link of each sharing user.
[0022] In a fourth aspect, another embodiment of the present specification provides another file downloading device, which runs on a client, and the device includes:
[0023] A request sending module is configured to obtain a file download request submitted based on a shared account and send it to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes;
[0024] A file download module, configured to download a file from the server based on a download link, obtain a target sub-file package, and receive at least one associated sub-file package sent by at least one associated client;
[0025] The merging processing module is configured to merge the target sub-file package and the at least one associated sub-file package to obtain a target file.
[0026] In a fifth aspect, another embodiment of the present specification provides a file downloading device, the device comprising: a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, wherein the computer executable instructions, when executed by the processor, implement the steps of the file downloading method as described in the first aspect above.
[0027] In the sixth aspect, another embodiment of the present specification provides another file downloading device, the device comprising: a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, the computer executable instructions when executed by the processor implement the steps of the file downloading method as described in the second aspect above.
[0028] In a seventh aspect, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the file downloading method described in the first aspect above are implemented.
[0029] In an eighth aspect, another embodiment of the present specification provides another computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the file downloading method described in the second aspect above are implemented.
[0030] In a ninth aspect, another embodiment of the present specification provides a computer program product, wherein the computer program product includes a file downloading program, and the file downloading program is executed by a processor to implement the steps of the file downloading method as described in the first aspect above.
[0031] In the tenth aspect, another embodiment of the present specification provides another computer program product, wherein the computer program product includes a file downloading program, and the file downloading program is executed by a processor to implement the steps of the file downloading method as described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 A flowchart of a file downloading method provided in one embodiment of this specification;
[0034] Figure 2 A schematic diagram of a download link provided for one embodiment of this specification;
[0035] Figure 3 A schematic diagram of a sub-file package provided for one embodiment of this specification;
[0036] Figure 4 A processing sequence diagram of a file download method applied to the same network file download scenario provided by an embodiment of this specification;
[0037] Figure 5 A flowchart of a file downloading method for different network file downloading scenarios provided by an embodiment of this specification;
[0038] Figure 6Another file downloading method processing flow chart provided in one embodiment of this specification;
[0039] Figure 7 A schematic diagram of a file downloading device provided in one embodiment of this specification;
[0040] Figure 8 A schematic diagram of another file downloading device provided in one embodiment of this specification;
[0041] Fig. 9 A schematic diagram of the structure of a file downloading device provided in one embodiment of this specification;
[0042] Fig.10 A schematic diagram of the structure of another file downloading device provided in one embodiment of this specification. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0044] An embodiment of a file download method provided in this specification is as follows:
[0045] The file download method provided in this embodiment is cooperated by a client and a server. The server first obtains a file download request sent by the client based on a shared account, and performs a sharing verification when the file download request is obtained. When the verification passes, the target file for shared download and multiple shared users are first read, and then at least one sub-file package obtained by segmenting the target file is distributed to multiple shared users. Finally, the download process of each sub-file package is started based on the download link of each shared user. In this way, in the process of shared downloading based on a shared account, the target file is segmented and at least one sub-file package is distributed to multiple shared users participating in the shared download, so that each shared user can download the complete target file while downloading only one sub-file package, thereby improving the file download efficiency.
[0046] Reference Figure 1 The file downloading method provided in this embodiment can be applied to the server, and specifically includes the following steps S102 to S108.
[0047] Step S102: obtaining a file download request sent by the client and submitted based on a shared account, and performing a sharing verification according to the file download request.
[0048] The shared account in this embodiment includes an account created in the cloud storage service that allows multiple users to access and manage together, such as a corporate account. The file download request includes a request to download a target file.
[0049] The sharing verification includes verification of whether the target file corresponding to the file download request can be shared for download; optionally, the sharing verification is performed according to the file download request, and the sharing verification can be performed based on the access user of the shared account. The accessing user can be a user who submits a file download request for the target file based on the shared account. Optionally, the sharing verification based on the accessing user includes access user number detection and download co-line detection; the specific verification method, that is, whether to perform user number detection or download co-line detection, is determined based on the access network of the accessing user. Optionally, the verification method of the sharing verification is determined based on the access network of the access user of the shared account. Among them, the verification method may include access user data detection and / or download co-line detection. The specific process of sharing verification is described below.
[0050] In specific implementation, after obtaining the file download request sent by the client, the corresponding sharing verification method is different depending on the network where the user is located; that is, whether the accessing user is in the same access network determines the verification method of sharing verification. In order to perform effective and accurate sharing verification, an optional implementation method provided in this embodiment adopts the following method to perform sharing verification:
[0051] Reading the access network of each access user of the shared account, and detecting whether the access network of each access user is consistent;
[0052] If yes, detect the number of users accessing the shared account, and determine the verification result of the shared verification based on the detection result;
[0053] If not, perform download co-linear detection, and determine the verification result of the shared verification based on the detection result.
[0054] Specifically, firstly, it is detected whether the access users of the shared account are in the same access network; if so, the sharing verification is performed by using the access user number detection method; if not, the sharing verification is performed by using the download co-line detection method.
[0055] The following specifically describes the process of sharing verification based on the access number detection method and the process of sharing verification based on the download co-line detection method.
[0056] (1) Detection of the number of access users
[0057] In the specific execution process, if the access network of the accessing user is consistent, the number of accessing users is detected, and the detection result is obtained or the verification result of the shared verification is determined based on the detection result. In an optional implementation manner provided by this embodiment, in the process of detecting the number of accessing users of the shared account and determining the verification result of the shared verification based on the detection result, the following operations are performed:
[0058] Check whether the number of access users is greater than the number of download admissions;
[0059] If so, determine that the verification result of the shared verification is verification passed;
[0060] If not, the verification result of the shared verification is determined to be verification failed.
[0061] Optionally, the download access number includes an upper limit on the number of download tasks of the cloud storage platform.
[0062] Specifically, when the access networks of the access users are consistent, if the number of access users is greater than the number of download admissions, it is determined that the verification has passed; if the number of access users is less than or equal to the number of download admissions, it is determined that the verification has failed. If the verification has failed, the download process of the target file can be started based on the download links of each access user.
[0063] In addition, when the access networks of the access users are consistent, it is possible to not detect the number of access users, and determine multiple access users of the shared account as shared users for shared downloading of the target file, and form a new implementation method with steps S106 and S108.
[0064] It should also be noted that step S102 can also be replaced by obtaining a file download request submitted by a client based on a shared account, and detecting the number of users accessing the shared account according to the file download request, and forming a new implementation method with other processing steps provided in this embodiment. Correspondingly, step S104 can also be replaced by reading the target file for shared download and multiple shared users if the detection is passed; or, correspondingly, steps S104 to S108 can also be replaced by segmenting the multiple sub-files contained in the target file for shared download to obtain at least one sub-file package if the detection is passed, and distributing the at least one sub-file package to multiple shared users for shared download, and starting the download processing of each sub-file package based on the download link of each shared user.
[0065] (2) Download the collinear detection
[0066] In the specific execution process, if the access network of the access user is inconsistent, a download co-line detection is performed to obtain a detection result or determine a verification result of the shared verification based on the detection result. In an optional implementation manner provided by this embodiment, in the process of performing the download co-line detection and determining the verification result of the shared verification based on the detection result, the following operations are performed:
[0067] Reading the user access address of each access user, and determining the network parameters of each access user based on the user access address;
[0068] If it is determined based on the network parameters that the network operators of the visiting users are the same, performing download link co-line detection based on the download links of the visiting users;
[0069] The verification result of the sharing verification is determined according to the detection result of the download link co-linear detection.
[0070] Optionally, the user access address may be a user IP (Internet Protocol) address.
[0071] Specifically, in the case that the access networks of the access users are inconsistent, the network operator of each access user is first determined based on the user access address of each access user. If the network operators of all access users are different, the download processing of the target file can be started based on the download link of each access user. If there is at least one target access user with the same network operator, the download link co-line detection is performed on the target access users with the same network operator to obtain the download co-line link, determine that the sharing check has passed, and determine the target access user corresponding to the download co-line link as a shared user, so as to reduce the number of direct downloads of the target file as much as possible.
[0072] In an optional implementation manner provided by this embodiment, the download link co-linear detection includes:
[0073] Determine a link segment in the download link of each visiting user, and compare the download links of each visiting user based on the link segment;
[0074] Determine the download links with at least one same link segment as download co-linear links;
[0075] If the download collinear link is not empty, determining that the verification result of the shared verification is verification passed;
[0076] If the download co-linear link is empty, it is determined that the verification result of the sharing verification is verification failure.
[0077] In the specific process of download co-line detection, download link co-line detection is performed based on the download links of the same access user of the network operator, and download links with the same at least one link section in the download links are determined as download co-line links.
[0078] Optionally, the link segment is determined by adjacent link nodes. For example, the original network node (the operating service provider of the cloud storage platform) and the first passing network node form a link segment, two adjacent passing network nodes form a link segment, and the last passing network node and the user network node (the server currently logged in by the access user) form a link segment.
[0079] like Figure 2 The download link schematic diagram shown includes download link 1 (composed of network node 1-1, network node 1-2, network node 1-3, network node 1-4 and network node 1-5), download link 2 (composed of network node 2-1, network node 1-2, network node 1-3, network node 1-4 and network node 2-5) and download link 3 (composed of network node 3-1, network node 3-2, network node 3-3, network node 3-4 and network node 3-5), wherein the link section composed of network node 1-2 and network node 1-3 and the link section composed of network node 1-3 and network node 1-4 in download link 1 are the same as the link section composed of network node 1-2 and network node 1-3 and the link section composed of network node 1-3 and network node 1-4 in download link 2, therefore, download link 1 and download link 2 are determined to be download co-linear links, and in the download link schematic diagram, the connection relationship between network nodes is represented by dotted lines.
[0080] It should also be noted that step S102 can also be replaced by obtaining a file download request sent by the client based on a shared account, and performing a download co-line detection based on the file download request, and forming a new implementation method with other processing steps provided in this embodiment; correspondingly, step S104 can be modified to, if the detection passes, read the target user and multiple shared users performing the shared download.
[0081] Step S104: if the verification is passed, read the target file for shared download and multiple sharing users.
[0082] In the above steps, after obtaining the file download request submitted by the client based on the shared account, a sharing verification is performed. In this step, if the verification passes, the target file for shared download and multiple shared users are read.
[0083] In this embodiment, the target file is the file corresponding to the file identifier carried in the file download request;
[0084] Corresponding to the above-mentioned detection of the number of visiting users, when the visiting users are in the same network, the visiting users are determined as shared users; corresponding to the above-mentioned download co-line detection, when the visiting users are not in the same network, the visiting users corresponding to the download co-line link are determined as shared users.
[0085] Step S106: split the multiple sub-files contained in the target file to obtain at least one sub-file package.
[0086] In the above steps, a sharing verification is performed according to the file download request submitted by the client based on the shared account. If the verification passes, the target file for shared download and multiple shared users are read. In this step, in order to realize the shared download of the target file, the multiple sub-files contained in the target file are split and processed to obtain at least one sub-file package.
[0087] In this embodiment, even if the shared download of the target file is achieved through segmentation, for the user, what is accessed is the target file. Therefore, after segmentation and shared downloading, each sub-file package needs to be merged to obtain the target file; based on this, in order to merge the sub-file packages and ensure that each shared user can obtain a complete and valid target file, in this embodiment, adjacent sub-file packages in the at least one sub-file package have an association relationship; the association relationship is established based on the segmentation line number of the previous sub-file package and the connection line number of the next sub-file package. Furthermore, a sub-file package has a connection line or a start line as the first line and a segmentation line or an end line as the last line.
[0088] In specific implementation, in order to improve the efficiency of shared downloading, in an optional implementation mode provided in this embodiment, the process of segmenting multiple sub-files contained in the target file to obtain at least one sub-file package can be implemented in the following manner:
[0089] Read the number of sub-file lines of the target file, and calculate the number of split lines based on the number of sub-file lines and the number of download admissions;
[0090] Determine the split lines and the connection lines of the target file according to the number of split lines;
[0091] The target file is segmented according to the segmentation lines and the connection lines to obtain the at least one sub-file package.
[0092] In the specific process of segmentation, the number of segmentation lines is first calculated based on the number of sub-file lines and the number of download accesses in the target file, and then the segmentation lines and connection lines in the target file are determined according to the number of segmentation lines. Finally, the target file is segmented according to the segmentation lines and connection lines to obtain at least one sub-file package.
[0093] For example, if the number of sub-files in the target file is 5, and the number of download accesses, i.e., the upper limit of the download task, is 2, the number of split lines is calculated to be 3 according to the formula: number of split lines = ceil (number of sub-file lines / upper limit of download tasks). Figure 3 The file is segmented according to the starting line, segmentation line, connection line and end line shown in FIG. Figure 3 The sub-file package 1 and sub-file package 2 are shown. In order to improve the perception of the splitting lines and the connecting lines, and also to improve the perception of the sub-file packages, the splitting lines and the connecting lines are numbered. Specifically, for adjacent splitting lines and connecting lines, the same number can be used to represent the association relationship between the corresponding adjacent sub-file packages.
[0094] Optionally, in order to ensure that each shared user can perform download processing of the sub-file packages of the target file, the download admission number may also be replaced by the number of shared users.
[0095] Step S108: distribute the at least one sub-file package to the multiple sharing users, and start downloading processing of each sub-file package based on the download link of each sharing user.
[0096] Based on the above-mentioned segmentation of the target file to obtain at least one sub-file package, in this step, at least one sub-file package is distributed to multiple shared users, and the download process of each sub-file package is started based on the download link of each shared user.
[0097] In order to ensure the download speed of each sub-file package and avoid allocating sub-file packages that occupy a large storage space or sub-file packages that are in the front position to users who start downloading later, thereby affecting the download efficiency, in an optional implementation provided by this embodiment, at least one sub-file package can be allocated to multiple shared users in the following manner:
[0098] Sorting multiple sharing users according to the start time of the download task of each sharing user and / or the storage space capacity to obtain a user queue;
[0099] Sorting the at least one sub-file package to obtain a sub-file package queue;
[0100] The sub-files in the sub-file package queue are allocated to the shared users in the user queue in a manner corresponding to the position matching.
[0101] For example, according to the start time of the download task of each shared user (that is, the time when each shared user submits a file download request), multiple shared users are arranged in descending order (that is, the shared user who started the download task first is in front, and the shared user who started the download task later is in the back), and a user queue is obtained. According to the order of each sub-file package of the target file, at least one sub-file package is sorted to obtain a sub-file package queue, and then the users and sub-file packages with the same position in the user queue and the sub-file package queue are matched, so as to realize the allocation of at least one sub-file package to multiple shared users. Optionally, if there are at least two shared users with the same start time, the shared users with the same start time can be arranged in descending order according to the storage space capacity.
[0102] For another example, multiple shared users are sorted in descending order according to the storage space capacity of each shared user to obtain a user queue, at least one sub-file package is sorted according to the order of each sub-file package of the target file to obtain a sub-file package queue, and then users and sub-file packages with the same position in the user queue and the sub-file package queue are matched, thereby achieving the allocation of at least one sub-file package to multiple shared users. Optionally, if there are at least two shared users with the same storage space capacity, the at least two shared users can be sorted in descending order according to the start time.
[0103] In the specific execution process, after the server starts the download processing of each sub-file package based on the download link of each shared user, the client downloads the file from the server based on the download link to obtain the target sub-file package. In addition to obtaining the target sub-file package, the client also receives the associated sub-file package sent by each associated client in at least one associated client in order to obtain the complete target file. Optionally, the client is a client corresponding to any shared user among multiple shared users, and the at least one associated client refers to a client corresponding to other shared users besides any of the above-mentioned shared users. This embodiment takes a client as an example to illustrate the processing process of each client.
[0104] In addition to downloading the file using the server based on the download link to obtain the target sub-file package, the client also receives at least one associated sub-file package sent by each associated client, merges the target sub-file package and the at least one associated sub-file package to obtain the target file; in order to obtain an accurate target file, in an optional implementation provided in this embodiment, the target sub-file package and the at least one associated sub-file package are merged to obtain the target file in the following manner:
[0105] Sort the target sub-file package and the associated sub-file packages according to the split row numbers and the connection row numbers of the target sub-file package and the associated sub-file packages to obtain a merging order of the sub-file packages;
[0106] The target sub-file package and the at least one associated sub-file package are merged according to the merging order.
[0107] Specifically, the target sub-file package and each associated sub-file package are sorted according to their segmentation row numbers and connection row numbers to obtain a merging order of each sub-file, and the target sub-file package and the associated sub-file package are merged according to the merging order to obtain the target file.
[0108] For example, if there is no split line number that is the same as the connection line number of the sub-file package, the sub-file package is determined to be the first order; if there is a split line number that is the same as the connection line number of the sub-file package, the sub-file package corresponding to the split line number is determined to be the previous sub-file package of the sub-file package, thereby obtaining the merging order of each sub-file package;
[0109] And / or, if there is no connecting row number that is the same as the segmentation row number of the sub-file package, the sub-file package is determined to be the last one; if there is a connecting row number that is the same as the segmentation row number of the sub-file package, the sub-file package corresponding to the connecting row number is determined to be the next sub-file package of the sub-file package.
[0110] In addition, in addition to merging the target sub-file package and at least one associated sub-file package to obtain the target file, in order to ensure that each associated client can also obtain the target file, in an optional implementation provided by this embodiment, the client also sends the target sub-file package to each associated client, so that each associated client merges the target sub-file package and at least one associated sub-file package to obtain the target file.
[0111] It should be noted that, in order to further enhance the perception of the shared account by the users who access the shared account, rights and interests can be recommended based on the shared account. In the process of making rights and interests recommendations, the recommended rights and interests can be determined based on the historical usage data of the shared account and recommended to the management user or the access user of the shared account. Optionally, the recommended rights and interests can be one recommended right and interests or a combination of recommended rights and interests, which is not limited in this embodiment.
[0112] For example, the download frequency, upload frequency, file size, file download duration and / or file upload duration are determined based on the historical usage data of the shared account to generate a corresponding rights package, such as a rights package including large-capacity space and high-speed transmission rights, and recommended to the access user or management user of the shared account; if a confirmation instruction (or payment instruction) from the access user and / or management user for the rights package is detected, the rights are issued to the access user of the shared account, or the rights are issued to the access user if the payment is successful, so that the sub-file package or the target file or other files can be downloaded based on the issued rights, which is not limited in this embodiment.
[0113] The above specifically describes the process of downloading the target file based on a shared account. In addition, the target file can also be downloaded based on a personal account. In the process of downloading the target file based on a personal account, the user corresponding to the personal account in the same network can be determined as a shared user and shared download can be performed in the above manner. Multiple users corresponding to the shared account in the same network as the personal account can also be determined as shared users together with the user corresponding to the personal account and shared download can be performed in the above manner. Alternatively, the user corresponding to the personal account or the user corresponding to the shared account who has a download link on the same line as the user corresponding to the personal account can be determined as a shared user and shared download can be performed in the above manner. This embodiment is not limited here.
[0114] In summary, in the file download method provided by the present embodiment, the client obtains a file download request submitted based on a shared account and sends it to the server. After the server obtains the file download request submitted based on the shared account sent by the client, it first performs a detection of the number of access users and / or a detection of the co-line of downloads according to the file download request. If the detection passes, the target file for shared download is segmented to obtain at least one sub-file package, and then the at least one sub-file package is allocated to multiple shared users for shared download. The download processing of each sub-file package is started based on the download link of each shared user. The client downloads the file from the server based on the download link to obtain the target sub-file package, and receives the associated sub-file package sent by each associated client in at least one associated client. Then, the target sub-file package and the at least one associated sub-file package are merged to obtain the target file. In this way, by segmenting the target file into sub-file packages and downloading each sub-file package through multiple shared users, the target file is downloaded on the client. In this way, while ensuring that each shared user can effectively access the target file, the download efficiency of the target file is improved, and “the target file can be obtained by downloading a part of the target file” is achieved, thereby improving the user's perception of the shared account.
[0115] The file download method provided in this embodiment can be applied to the server, and the server can be a cloud storage platform; for example, a mobile cloud storage platform. The file download method provided in the following embodiments can be applied to the client. The file download method provided in this embodiment that can be applied to the server cooperates with the file download method provided in the following embodiments that can be applied to the client during execution. Therefore, when reading this embodiment, you can refer to the relevant content of the following embodiments, and when reading the following embodiments, you can also refer to the relevant content of this embodiment.
[0116] The following combination Figure 4 , taking the application of the file download method provided by this embodiment in the same network file download scenario as an example, the file download method provided by this embodiment is further explained. Figure 4 , the file download method applied to the same network file download scenario specifically includes the following steps.
[0117] Step S404, obtaining the file download request sent by the client, and detecting whether the number of shared users of the shared account is greater than the upper limit of the download task number;
[0118] If yes, execute step S406 to step S410;
[0119] If not, the download process of the target file is started according to the download link of each sharing user.
[0120] Step S406: segment the target file according to the number of sub-file lines and the number of shared users of the target file to obtain at least one sub-file package.
[0121] Step S408: distribute at least one sub-file package to a shared user.
[0122] Step S410: Start downloading each sub-file package based on the download link of each sharing user.
[0123] The above-mentioned steps S404 to S410 provided in this embodiment are executed by the server. It should be noted that the above-mentioned steps S404 to S410 executed by the server and the steps S402 and S412 to S416 executed by the client in the following embodiment can cooperate with each other during the execution process. Therefore, when reading this embodiment, please refer to the corresponding contents of steps S402 and S412 to S416 provided in the following method embodiment, and when reading the following method embodiment, please refer to the corresponding contents of steps S404 to S410 provided in this embodiment.
[0124] It should be noted that any one of steps S404 to S410 or any combination of multiple steps can be replaced by the corresponding technical means provided by the above steps S102 to S108 according to the needs of implementation and deployment, and any one of steps S404 to S410 or any combination of multiple steps can be combined into a new implementation method according to the needs of implementation and deployment; and any one of steps S404 to S410 or any combination of multiple steps can also form a new implementation method with one or more steps provided by the above steps S102 to S108 according to the needs of actual deployment, or form a new implementation method with one or more optional implementation methods provided by steps S102 to S108, which will not be repeated here.
[0125] The following combination Figure 5 , taking the application of the file download method provided by this embodiment in different network file downloading scenarios as an example, the file download method provided by this embodiment is further explained. Figure 5 ,The file downloading method applied to different network file downloading scenarios specifically includes the following steps.
[0126] Step S504: obtaining a file download request sent by the client, and screening out intermediate users with the same network operator from the multiple access users according to the user access addresses of the multiple access users.
[0127] Step S506: Perform download co-linear detection based on the download links of the intermediate users, and determine the intermediate users with download co-linear links as shared users.
[0128] Step S508: segment the target file according to the number of sub-file lines and the number of shared users of the target file to obtain at least one sub-file package.
[0129] Step S510: distribute at least one sub-file package to a shared user.
[0130] Step S512: Start downloading each sub-file package based on the download link of each sharing user.
[0131] The above-mentioned steps S504 to S512 provided in this embodiment are executed by the server. It should be noted that the above-mentioned steps S504 to S512 executed by the server and the steps S502 and S514 to S518 executed by the client in the following embodiment can cooperate with each other during the execution process. Therefore, when reading this embodiment, please refer to the corresponding contents of steps S502 and S514 to S518 provided in the following method embodiment, and when reading the following method embodiment, please refer to the corresponding contents of steps S504 to S512 provided in this embodiment.
[0132] It should be noted that any one of steps S504 to S512 or any combination of multiple steps can be replaced by the corresponding technical means provided by the above steps S102 to S108 according to the needs of implementation and deployment, and any one of steps S504 to S512 or any combination of multiple steps can be combined into a new implementation method according to the needs of implementation and deployment; and any one of steps S504 to S512 or any combination of multiple steps can also form a new implementation method with one or more steps provided by the above steps S102 to S108 according to the needs of actual deployment, or form a new implementation method with one or more optional implementation methods provided by steps S504 to S512, which will not be repeated here one by one.
[0133] It should be supplemented that the relevant contents of the file download method provided in the above embodiment can be executed in conjunction with the relevant contents of the file download method provided in the following embodiment. When reading the above embodiment, you can refer to the relevant contents of the following embodiment. Correspondingly, when reading the following embodiment, you can also refer to the relevant contents provided in the above embodiment.
[0134] Another file download method embodiment provided in this specification is as follows:
[0135] Reference Figure 6 The file downloading method provided in this embodiment can be applied to the client, and specifically includes the following steps S602 to S606.
[0136] Step S602: Obtain a file download request submitted based on a shared account and send it to a server.
[0137] Optionally, the server distributes at least one sub-file package obtained by segmenting the target file to multiple sharing users according to the file download request if the sharing verification passes.
[0138] The shared account in this embodiment includes an account created in the cloud storage service that allows multiple users to access and manage together, such as a corporate account. The file download request includes a request to download a target file.
[0139] During the specific implementation, the server performs the following operations:
[0140] (1) Obtaining a file download request sent by a client based on a shared account, and performing a sharing verification according to the file download request;
[0141] (2) If the verification is passed, read the target file for shared download and multiple shared users;
[0142] The target file is the file corresponding to the file identifier carried in the file download request;
[0143] Corresponding to the above-mentioned detection of the number of visiting users, when the visiting users are in the same network, the visiting users are determined as shared users; corresponding to the above-mentioned download co-line detection, when the visiting users are not in the same network, the visiting users corresponding to the download co-line link are determined as shared users.
[0144] (3) splitting the multiple sub-files contained in the target file to obtain at least one sub-file package;
[0145] (4) allocating the at least one sub-file package to the multiple sharing users, and starting download processing of each sub-file package based on the download link of each sharing user;
[0146] At least one sub-file package is distributed to a plurality of sharing users, and a download process of each sub-file package is started based on a download link of each sharing user.
[0147] In order to ensure the download speed of each sub-file package and avoid allocating sub-file packages that occupy a large storage space or sub-file packages that are in the front position to users who start downloading later, thereby affecting the download efficiency, in an optional implementation provided by this embodiment, at least one sub-file package can be allocated to multiple shared users in the following manner:
[0148] Sorting multiple sharing users according to the start time of the download task of each sharing user and / or the storage space capacity to obtain a user queue;
[0149] Sorting the at least one sub-file package to obtain a sub-file package queue;
[0150] The sub-files in the sub-file package queue are allocated to the shared users in the user queue in a manner corresponding to the position matching.
[0151] For example, according to the start time of the download task of each shared user (that is, the time when each shared user submits a file download request), multiple shared users are arranged in descending order (that is, the shared user who started the download task first is in front, and the shared user who started the download task later is in the back), and a user queue is obtained. According to the order of each sub-file package of the target file, at least one sub-file package is sorted to obtain a sub-file package queue, and then the users and sub-file packages with the same position in the user queue and the sub-file package queue are matched, so as to realize the allocation of at least one sub-file package to multiple shared users. Optionally, if there are at least two shared users with the same start time, the shared users with the same start time can be arranged in descending order according to the storage space capacity.
[0152] For another example, multiple shared users are sorted in descending order according to the storage space capacity of each shared user to obtain a user queue, at least one sub-file package is sorted according to the order of each sub-file package of the target file to obtain a sub-file package queue, and then users and sub-file packages with the same position in the user queue and the sub-file package queue are matched, thereby achieving the allocation of at least one sub-file package to multiple shared users. Optionally, if there are at least two shared users with the same storage space capacity, the at least two shared users can be sorted in descending order according to the start time.
[0153] The above specifically describes the execution process of the server after receiving the file download request.
[0154] Step S604: Download the file from the server based on the download link, obtain the target sub-file package, and receive at least one associated sub-file package sent by at least one associated client.
[0155] In the specific execution process, after the server starts the download processing of each sub-file package based on the download link of each shared user, the client downloads the file from the server based on the download link to obtain the target sub-file package. In addition to obtaining the target sub-file package, the client also receives the associated sub-file package sent by each associated client in at least one associated client in order to obtain the complete target file. Optionally, the client is a client corresponding to any shared user among multiple shared users, and the at least one associated client refers to a client corresponding to other shared users besides any of the above-mentioned shared users. This embodiment takes a client as an example to illustrate the processing process of each client.
[0156] Step S606: merge the target sub-file package and the at least one associated sub-file package to obtain a target file.
[0157] In addition to downloading the file using the server based on the download link to obtain the target sub-file package, the client also receives at least one associated sub-file package sent by each associated client, merges the target sub-file package and the at least one associated sub-file package to obtain the target file; in order to obtain an accurate target file, in an optional implementation provided in this embodiment, the target sub-file package and the at least one associated sub-file package are merged to obtain the target file in the following manner:
[0158] Sort the target sub-file package and the associated sub-file packages according to the split row numbers and the connection row numbers of the target sub-file package and the associated sub-file packages to obtain a merging order of the sub-file packages;
[0159] The target sub-file package and the at least one associated sub-file package are merged according to the merging order.
[0160] Specifically, the target sub-file package and each associated sub-file package are sorted according to their segmentation row numbers and connection row numbers to obtain a merging order of each sub-file, and the target sub-file package and the associated sub-file package are merged according to the merging order to obtain the target file.
[0161] For example, if there is no split line number that is the same as the connection line number of the sub-file package, the sub-file package is determined to be the first order; if there is a split line number that is the same as the connection line number of the sub-file package, the sub-file package corresponding to the split line number is determined to be the previous sub-file package of the sub-file package, thereby obtaining the merging order of each sub-file package;
[0162] And / or, if there is no connecting row number that is the same as the segmentation row number of the sub-file package, the sub-file package is determined to be the last one; if there is a connecting row number that is the same as the segmentation row number of the sub-file package, the sub-file package corresponding to the connecting row number is determined to be the next sub-file package of the sub-file package.
[0163] In addition, in addition to merging the target sub-file package and at least one associated sub-file package to obtain the target file, in order to ensure that each associated client can also obtain the target file, in an optional implementation provided by this embodiment, the client also sends the target sub-file package to each associated client, so that each associated client merges the target sub-file package and at least one associated sub-file package to obtain the target file.
[0164] The following combination Figure 4 , taking the application of the file download method provided by this embodiment in the same network file download scenario as an example, the file download method provided by this embodiment is further explained. Figure 4 , the file download method applied to the same network file download scenario specifically includes the following steps.
[0165] Step S402: Obtain a file download request submitted based on a shared account and send it to a server.
[0166] Step S412: Download the file from the server based on the download link to obtain the target sub-file package.
[0167] Step S414: receiving associated sub-file packages sent by each associated client in at least one associated client.
[0168] Step S416: merge the target sub-file package and at least one associated sub-file package to obtain a target file.
[0169] It should be noted that any one of step S402, step S412 to step S416, or any combination of multiple steps can be replaced by the corresponding technical means provided by the above steps S602 to step S606 according to the needs of implementation and deployment, and any one of step S402, step S412 to step S416, or any combination of multiple steps can be combined into a new implementation method according to the needs of implementation and deployment; and any one of step S402, step S412 to step S416, or any combination of multiple steps can also form a new implementation method with one or more steps provided by the above steps S602 to step S606 according to the needs of actual deployment, or form a new implementation method with one or more optional implementation methods provided by steps S602 to step S606, which will not be described one by one here.
[0170] The following combination Figure 5 , taking the application of the file download method provided by this embodiment in different network file downloading scenarios as an example, the file download method provided by this embodiment is further explained. Figure 5 ,The file downloading method applied to different network file downloading scenarios specifically includes the following steps.
[0171] Step S502: Obtain a file download request submitted based on a shared account and send it to a server.
[0172] Step S514: Download the file from the server based on the download link to obtain the target sub-file package.
[0173] Step S516: receiving an associated sub-file package sent by each associated client in at least one associated client.
[0174] Step S518: merge the target sub-file package and at least one associated sub-file package to obtain a target file.
[0175] It should be noted that any one of step S502, step S514 to step S518, or any combination of multiple steps can be replaced by the corresponding technical means provided by the above steps S602 to step S606 according to the needs of implementation and deployment, and any one of step S502, step S514 to step S518, or any combination of multiple steps can be combined into a new implementation method according to the needs of implementation and deployment; and any one of step S502, step S514 to step S518, or any combination of multiple steps can also form a new implementation method with one or more steps provided by the above steps S602 to step S606 according to the needs of actual deployment, or form a new implementation method with one or more optional implementation methods provided by steps S602 to step S606, which will not be described one by one here.
[0176] Figure 7A schematic diagram of a file downloading device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the device comprises:
[0177] The sharing verification module 702 is configured to obtain a file download request sent by a client and submitted based on a sharing account, and perform sharing verification according to the file download request;
[0178] If the verification is passed, the reading module 704 is executed, and the reading module 704 is configured to read the target file for shared downloading and multiple shared users;
[0179] The segmentation processing module 706 is configured to segment the multiple sub-files contained in the target file to obtain at least one sub-file package;
[0180] The sub-file package allocating module 708 is configured to allocate the at least one sub-file package to the multiple sharing users, and start downloading processing of each sub-file package based on the download link of each sharing user.
[0181] The file downloading device provided in this embodiment first obtains the file download request submitted by the client based on the shared account by running the sharing verification module 702, and performs sharing verification according to the file downloading request. When the verification passes, the target file for shared downloading and multiple shared users are read by running the reading module 704, and then the multiple sub-files contained in the target file are segmented by running the segmentation processing module 706 to obtain at least one sub-file package, and then the at least one sub-file package is allocated to the shared user by running the sub-file package allocation module 708, and the download processing of each sub-file is started based on the download link of each user, so that the target file for shared downloading based on the shared account is segmented into at least one sub-file package, and the sub-file package is allocated to the shared users for shared downloading based on the shared account, so that in the process of shared downloading based on the shared account, each shared user only downloads a part of the target file, so as to avoid each shared user downloading the complete target file to affect the download speed, resulting in a longer time for file downloading and affecting the user experience.
[0182] A file downloading device provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.
[0183] Figure 8 A schematic diagram of another file downloading device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the device comprises:
[0184] The request sending module 802 is configured to obtain a file download request submitted based on a shared account and send it to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes;
[0185] The file download module 804 is configured to download the file from the server based on the download link, obtain the target sub-file package, and receive at least one associated sub-file package sent by at least one associated client;
[0186] The merging processing module 806 is configured to merge the target sub-file package and the at least one associated sub-file package to obtain a target file.
[0187] The file downloading device provided in this embodiment first obtains a file download request submitted based on a shared account and sends it to a server by running a request sending module 802, so that the server can distribute at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request when the sharing verification passes, and then downloads the file from the server based on the download link by running a file downloading module 804, obtains a target sub-file package, and receives at least one associated sub-file package sent by at least one associated client. Finally, by running a merging processing module 806, the target sub-file package and at least one associated sub-file package are merged to obtain the target file. In this way, when one client only downloads a part of the target file, each client can obtain the target file, thereby improving the file download efficiency.
[0188] Another file downloading device provided in an embodiment of this specification can implement each process in the aforementioned another method embodiment and achieve the same functions and effects, which will not be repeated here.
[0189] Furthermore, an embodiment of the present specification also provides a file downloading device, Fig. 9 A schematic diagram of a file download device provided in an embodiment of this specification is shown in FIG. Fig. 9 As shown, the device includes: a memory 901, a processor 902, a bus 903 and a communication interface 904. The memory 901, the processor 902 and the communication interface 904 communicate through the bus 903, and the communication interface 904 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.
[0190] Fig. 9 In the embodiment, the memory 901 stores computer executable instructions that can be run on the processor 902. When the computer executable instructions are executed by the processor 902, the following process is implemented:
[0191] Obtain a file download request sent by a client based on a shared account, and perform a sharing verification according to the file download request;
[0192] If the verification is passed, the target file for shared download and multiple shared users are read;
[0193] Segmenting the multiple sub-files contained in the target file to obtain at least one sub-file package;
[0194] The at least one sub-file package is distributed to the multiple sharing users, and the download process of each sub-file package is started based on the download link of each sharing user.
[0195] The file download device provided in this embodiment, through the cooperation of the memory 901, the processor 902, the bus 903 and the communication interface 904, first obtains the file download request submitted by the client based on the shared account, and performs a sharing verification according to the file download request. If the verification passes, the target file for shared download and multiple shared users are read, and then the multiple sub-files contained in the target file are segmented to obtain at least one sub-file package, and then the at least one sub-file package is allocated to the shared user, and the download processing of each sub-file is started based on the download link of each user, so that the target file for shared download based on the shared account is segmented into at least one sub-file package, and the sub-file package is allocated to the shared users for shared download based on the shared account, so that in the process of shared download based on the shared account, each shared user only downloads a part of the target file, so as to avoid each shared user downloading the complete target file to affect the download speed, resulting in a longer time for file download and affecting the user experience.
[0196] A file downloading device provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.
[0197] An embodiment of this specification also provides another file downloading device, Fig.10 A schematic diagram of a file download device provided in an embodiment of this specification is shown in FIG. Fig.10 As shown, the device includes: a memory 1001, a processor 1002, a bus 1003 and a communication interface 1004. The memory 1001, the processor 1002 and the communication interface 1004 communicate via the bus 1003, and the communication interface 1004 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.
[0198] Fig.10In the embodiment, the memory 1001 stores computer executable instructions that can be run on the processor 1002, and when the computer executable instructions are executed by the processor 1002, the following process is implemented:
[0199] A file download request submitted based on a shared account is obtained and sent to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes;
[0200] Downloading a file from the server based on the download link to obtain a target sub-file package, and receiving at least one associated sub-file package sent by at least one associated client;
[0201] The target sub-file package and the at least one associated sub-file package are merged to obtain a target file.
[0202] The file download device provided in this embodiment, through the cooperation of the memory 1001, the processor 1002, the bus 1003 and the communication interface 1004, first obtains the file download request submitted based on the shared account and sends it to the server, so that the server will distribute at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request when the sharing verification passes, and then downloads the file from the server based on the download link to obtain the target sub-file package, and receives at least one associated sub-file package sent by at least one associated client, and finally merges the target sub-file package and at least one associated sub-file package to obtain the target file. In this way, when one client only downloads a part of the target file, each client can obtain the target file, thereby improving the file download efficiency.
[0203] Another file downloading device provided in an embodiment of this specification can implement each process in the aforementioned another method embodiment and achieve the same functions and effects, which will not be repeated here.
[0204] Furthermore, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:
[0205] Obtain a file download request sent by a client based on a shared account, and perform a sharing verification according to the file download request;
[0206] If the verification is passed, the target file for shared download and multiple shared users are read;
[0207] Segmenting the multiple sub-files contained in the target file to obtain at least one sub-file package;
[0208] The at least one sub-file package is distributed to the multiple sharing users, and the download process of each sub-file package is started based on the download link of each sharing user.
[0209] The computer-readable storage medium provided in this embodiment first obtains a file download request submitted by a client based on a shared account, and performs a sharing verification according to the file download request. If the verification passes, the target file for shared download and multiple shared users are read, and then the multiple sub-files contained in the target file are segmented to obtain at least one sub-file package, and then the at least one sub-file package is allocated to the shared user, and the download processing of each sub-file is started based on the download link of each user, so that the target file for shared download based on the shared account is segmented into at least one sub-file package, and the sub-file package is allocated to the shared users for shared download based on the shared account, so that in the process of shared download based on the shared account, each shared user only downloads a part of the target file, so as to avoid each shared user downloading the complete target file and affecting the download speed, resulting in a longer time for file download and affecting the user experience.
[0210] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0211] The computer-readable storage medium provided in an embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.
[0212] Another embodiment of the present specification also provides another computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:
[0213] A file download request submitted based on a shared account is obtained and sent to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes;
[0214] Downloading a file from the server based on the download link to obtain a target sub-file package, and receiving at least one associated sub-file package sent by at least one associated client;
[0215] The target sub-file package and the at least one associated sub-file package are merged to obtain a target file.
[0216] The computer-readable storage medium provided in this embodiment first obtains a file download request submitted based on a shared account and sends it to a server, so that the server distributes at least one sub-file package obtained by splitting the target file to multiple shared users according to the file download request when the sharing verification passes, then downloads the file from the server based on the download link to obtain the target sub-file package, and receives at least one associated sub-file package sent by at least one associated client, and finally merges the target sub-file package and at least one associated sub-file package to obtain the target file. In this way, when one client only downloads a part of the target file, each client can obtain the target file, thereby improving the file download efficiency.
[0217] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0218] Another computer-readable storage medium provided in an embodiment of this specification can implement each process in the aforementioned another method embodiment and achieve the same functions and effects, which will not be repeated here.
[0219] Furthermore, another embodiment of the present specification also provides a computer program product, which implements the following process when executed by a processor:
[0220] Obtain a file download request sent by a client based on a shared account, and perform a sharing verification according to the file download request;
[0221] If the verification is passed, the target file for shared download and multiple shared users are read;
[0222] Segmenting the multiple sub-files contained in the target file to obtain at least one sub-file package;
[0223] The at least one sub-file package is distributed to the multiple sharing users, and the download process of each sub-file package is started based on the download link of each sharing user.
[0224] The computer program product provided in this embodiment first obtains a file download request submitted by a client based on a shared account, and performs a sharing verification according to the file download request. If the verification passes, the target file for shared download and multiple shared users are read, and then the multiple sub-files contained in the target file are segmented to obtain at least one sub-file package, and then the at least one sub-file package is allocated to the shared user, and the download processing of each sub-file is started based on the download link of each user, so that the target file for shared download based on the shared account is segmented into at least one sub-file package, and the sub-file package is allocated to the shared users for shared download based on the shared account, so that in the process of shared download based on the shared account, each shared user only downloads a part of the target file, so as to avoid each shared user downloading the complete target file, which affects the download speed, resulting in a longer time for file download and affects the user experience.
[0225] A computer program product provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.
[0226] Another embodiment of the present specification also provides another computer program product, which implements the following process when executed by a processor:
[0227] A file download request submitted based on a shared account is obtained and sent to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes;
[0228] Downloading a file from the server based on the download link to obtain a target sub-file package, and receiving at least one associated sub-file package sent by at least one associated client;
[0229] The target sub-file package and the at least one associated sub-file package are merged to obtain a target file.
[0230] The computer program product provided in this embodiment first obtains a file download request submitted based on a shared account and sends it to a server, so that the server distributes at least one sub-file package obtained by splitting the target file to multiple shared users according to the file download request when the sharing verification passes, then downloads the file from the server based on the download link to obtain the target sub-file package, and receives at least one associated sub-file package sent by at least one associated client, and finally merges the target sub-file package and at least one associated sub-file package to obtain the target file. In this way, when one client only downloads a part of the target file, each client can obtain the target file, thereby improving the file download efficiency.
[0231] Another computer program product provided in one embodiment of this specification can implement each process in the aforementioned another method embodiment and achieve the same functions and effects, which will not be repeated here.
[0232] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0233] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0234] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0235] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0236] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0237] Memory may include non-permanent storage in a computer-readable storage medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable storage medium.
[0238] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0239] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0240] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0241] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A file downloading method, characterized in that: Applied to the server, the method includes: Obtain a file download request sent by a client based on a shared account, and perform a sharing verification according to the file download request; If the verification is passed, the target file for shared download and multiple shared users are read; Segmenting the multiple sub-files contained in the target file to obtain at least one sub-file package; The at least one sub-file package is distributed to the multiple sharing users, and the download process of each sub-file package is started based on the download link of each sharing user.
2. The file downloading method according to claim 1, characterized in that: The performing sharing verification according to the file download request includes: Reading the access network of each access user of the shared account, and detecting whether the access network of each access user is consistent; If yes, detect the number of users accessing the shared account, and determine the verification result of the shared verification based on the detection result; If not, perform download co-linear detection, and determine the verification result of the shared verification based on the detection result.
3. The file downloading method according to claim 2, characterized in that: The detecting the number of users accessing the shared account and determining the verification result of the shared verification based on the detection result includes: Check whether the number of access users is greater than the number of download admissions; If so, determine that the verification result of the shared verification is verification passed; If not, the verification result of the shared verification is determined to be verification failed.
4. The file downloading method according to claim 2, characterized in that: The download co-line detection is performed, and the verification result of the shared verification is determined based on the detection result, including: Reading the user access address of each access user, and determining the network parameters of each access user based on the user access address; If it is determined based on the network parameters that the network operators of the visiting users are the same, performing download link co-line detection based on the download links of the visiting users; The verification result of the sharing verification is determined according to the detection result of the download link co-linear detection.
5. The file downloading method according to claim 4, characterized in that: The download link co-linear detection includes: Determine a link segment in the download link of each visiting user, and compare the download links of each visiting user based on the link segment; Determine the download links with at least one same link segment as download co-linear links; If the download co-linear link is not empty, it is determined that the verification result of the sharing verification is verification passed.
6. The file downloading method according to claim 1, characterized in that: The step of segmenting the plurality of sub-files contained in the target file to obtain at least one sub-file package includes: Read the number of sub-file lines of the target file, and calculate the number of split lines based on the number of sub-file lines and the number of download admissions; Determine the split lines and the connection lines of the target file according to the number of split lines; The target file is segmented according to the segmentation lines and the connection lines to obtain the at least one sub-file package.
7. The file downloading method according to claim 1, characterized in that: Adjacent sub-file packages in the at least one sub-file package have an association relationship; The association relationship is established based on the segmentation line number of the previous sub-file package and the connection line number of the next sub-file package.
8. A file downloading method, characterized in that: Applied to a client, the method comprises: A file download request submitted based on a shared account is obtained and sent to a server; the server distributes at least one sub-file package obtained by segmenting the target file to multiple shared users according to the file download request if the shared verification passes; Downloading a file from the server based on the download link to obtain a target sub-file package, and receiving at least one associated sub-file package sent by at least one associated client; The target sub-file package and the at least one associated sub-file package are merged to obtain a target file.
9. The file downloading method according to claim 8, characterized in that: The method further comprises: The target sub-file package is sent to each associated client, so that each associated client performs a merging process based on the target sub-file package and the at least one associated sub-file package to obtain a target file.
10. The file downloading method according to claim 8, characterized in that: The step of merging the target sub-file package and the at least one associated sub-file package to obtain a target file includes: Sort the target sub-file package and the associated sub-file packages according to the split row numbers and the connection row numbers of the target sub-file package and the associated sub-file packages to obtain a merging order of the sub-file packages; The target sub-file package and the at least one associated sub-file package are merged in the merging order to obtain the target file.
