Folder downloading method and device
By displaying the downloader page in the browser and obtaining the hierarchical structure of the target folder and the seed file of the download information, the problem of low folder downloading efficiency is solved, and efficient downloading of multiple files is achieved and the operation is simplified.
Patent Information
- Application Number
- CN202211536863.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-12-02
AI Technical Summary
The existing technology is inefficient when downloading folders, and users need to download multiple times, resulting in a large amount of time consumption and a poor user experience.
The downloader page is displayed through the browser, the hierarchical structure of the target folder and the seed file of the download information are obtained, and the folder data is downloaded from the resource server based on the seed file.
It enables downloading multiple target files in one operation, improves the efficiency of folder downloading, simplifies the operation process and enhances the user's independent selection rights.
Smart Images

Figure CN116016485B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer processing, and in particular to a method and device for downloading a folder. Background Art
[0002] Currently, users often have downloading needs when browsing the Internet. However, in the existing technology, only one file specific to the user can be downloaded. When the user has multiple download needs, multiple downloads are required to meet the user's download needs. This leads to low download efficiency for downloading multiple files in a folder, which takes a lot of time for the user, and thus leads to a poor user experience.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] At least some embodiments of the present disclosure provide a method and apparatus for downloading a folder, so as to at least solve the technical problem of low download efficiency of downloading folders in the related art.
[0005] According to one embodiment of the present disclosure, a method for downloading a folder is provided, comprising: responding to a page opening instruction of a browser, displaying a downloader page in an interactive interface of the browser; responding to an import instruction of the downloader page, obtaining a target seed file corresponding to the import instruction, wherein the target seed file comprises: first description information and second description information of a target folder, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder; and downloading file data corresponding to the target folder from a resource server via a network based on the target seed file.
[0006] According to one embodiment of the present disclosure, a device for folder downloading is also provided, including: a page display module, used to respond to a page opening instruction to the browser, and display a downloader page in the browser's interactive interface; a file acquisition module, used to respond to an import instruction to the downloader page, and obtain a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information and second description information of the target folder, the first description information is the target folder hierarchical structure information, and the second description information is the download information of at least one target file contained in the target folder; a data download module, used to download file data corresponding to the target folder from a resource server through the network based on the target seed file.
[0007] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute any of the above-mentioned folder downloading methods when running.
[0008] According to one embodiment of the present disclosure, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned folder downloading methods.
[0009] In at least some embodiments of the present disclosure, a downloader page is displayed in the interactive interface of the browser in response to a page open instruction of the browser; a target seed file corresponding to the import instruction is obtained in response to an import instruction of the downloader page, wherein the target seed file includes: first description information and second description information of a target folder, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder; and a method of downloading file data corresponding to the target folder from a resource server via a network based on the target seed file. It is easy to notice that the present disclosure obtains a folder downloaded from a resource server via a network based on the target seed file, and the folder contains at least one target file, which allows the user to download the required target files in one operation, thereby achieving the purpose of being able to efficiently obtain multiple target files, thereby achieving the technical effect of improving the efficiency of file downloading, and thus solving the technical problem of low download efficiency of download folders in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of this application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0011] Figure 1 is a hardware structure block diagram of a mobile terminal according to a method for downloading a folder in an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of a method for downloading a folder according to an embodiment of the present disclosure;
[0013] Figure 3 is a schematic diagram of displaying an optional browser downloader page according to an embodiment of the present disclosure;
[0014] Figure 4 is an optional flow chart of displaying a downloader page in a browser's interactive interface according to an embodiment of the present disclosure;
[0015] Figure 5 is a schematic diagram of a first prompt information of an optional downloader page according to an embodiment of the present disclosure;
[0016] Figure 6 is a schematic diagram of displaying an optional preset seed file according to an embodiment of the present disclosure;
[0017] Figure 7a This is a schematic diagram of an optional first method of obtaining a preset seed file according to an embodiment of the present disclosure;
[0018] Figure 7b is a schematic diagram of an optional second method of obtaining a preset seed file according to an embodiment of the present disclosure;
[0019] Figure 7c is a schematic diagram of an optional third method of obtaining a preset seed file according to an embodiment of the present disclosure;
[0020] Figure 8 is a schematic diagram of a second prompt information of an optional downloader page according to an embodiment of the present disclosure;
[0021] Figure 9 is a flowchart of an optional method for downloading and sharing a folder according to an embodiment of the present disclosure;
[0022] Figure 10 is an optional unified modeling language flowchart according to an embodiment of the present disclosure;
[0023] Figure 11 This is a schematic diagram of an optional solution for obtaining a folder seed through a resource website according to an embodiment of the present disclosure;
[0024] Figure 12 This is a schematic diagram of an optional solution for obtaining a folder seed by accessing a program according to an embodiment of the present disclosure;
[0025] Figure 13 is a structural block diagram of a device for downloading a folder according to an embodiment of the present disclosure;
[0026] Figure 14 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] In order to make it easier for those skilled in the art to understand this embodiment, the technical terms in this disclosure are explained below:
[0030] Web page downloader: This disclosure proposes a front-end web page file that can act as a downloader with the help of a browser.
[0031] Folder seed file: This disclosure refers to a lightweight, text-based, human-readable file in JavaScript Object Notation (JSON). It contains directory information and file information for the folder to be downloaded. Directory information includes the directory ID, name, and subdirectory list. File information includes the Uniform Resource Locator (URL), name, and directory ID.
[0032] Github: It is an online software source code hosting service platform. It also provides free static website servers.
[0033] Vue: is an open source Model-View-ViewModel (MVVM) front-end scripting language (JavaScript) framework running on the client for creating user interfaces. It is also a web application framework for creating single-page applications.
[0034] ElementUI: A Vue-based desktop component library for developers, designers, and product managers.
[0035] In the prior art, there are three main ways to download a folder to users in the industry: 1. Write a download program. For example, before downloading many large games, you will first download a download program, and then start the download program to download the complete game folder to the local computer. 2. Compression and packaging principle. For example, when users play mobile games, they will generally get a compressed package after clicking download on the application / website, and they can install the game by opening the compressed package. 3. Through the File Transfer Protocol (FTP) service. The resource website opens the FTP protocol for open access, and users connect to the FTP server to download resources.
[0036] However, the shortcomings of existing technologies are also obvious: the first solution is complex and difficult to develop. Developing a downloader also involves developing a piece of software, which is expensive for small needs and can lead to maintenance difficulties and system environment issues. Users will also find the downloader a waste of hard drive space, with poor reusability, and adapting to different scenarios is not easy. The second solution is relatively inflexible, making multi-target distribution difficult and requiring significant additional space. The content downloaded by the sharer is determined by the recipient, and users cannot customize downloads based on their needs. Packaged servers can solve this problem, but they also consume server resources, making the cost outweighing the benefits. The third solution requires downloaders to have FTP software and professional operation. Furthermore, the resource server must have FTP service enabled, but many resources online only offer http / https services. This results in high requirements and limited application scenarios.
[0037] The purpose of this disclosure is to explore how to make the sharing and downloading of one or more folders simple, fast, efficient, fault-tolerant and reusable.
[0038] In a possible implementation, the inventors have conducted practice and careful research on the file download method commonly used in the context of file download in the field of computer processing, and found that there is still a technical problem of low download efficiency. Based on this, the download scenario applied in the embodiment of the present disclosure can be downloaded through a browser, and the file type targeted is generally a folder. A folder download method is proposed, which responds to a page open instruction of the browser and displays a downloader page in the interactive interface of the browser; responds to an import instruction of the downloader page and obtains a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information and second description information of the target folder, the first description information is the hierarchical structure information of the target folder, and the second description information is the download information of at least one target file contained in the target folder; based on the target seed file, the technical concept of downloading the file data corresponding to the target folder from the resource server through the network achieves the purpose of efficiently obtaining multiple target files, thereby realizing the technical effect of improving the file download efficiency, and thus solving the technical problem of low download efficiency of download folders in the related art.
[0039] The above method embodiments involved in the present disclosure can be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone, a tablet computer, a PDA, a mobile Internet device, a PAD, a game console, or other terminal device. Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal according to a method for downloading a folder in accordance with an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field-programmable logic device (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. In one embodiment of the present disclosure, it may also include: an input and output device 108 and a display device 110.
[0040] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0041] According to one embodiment of the present disclosure, an embodiment of a method for downloading a folder is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] In a possible implementation, an embodiment of the present disclosure provides a method for downloading a folder. Figure 2 is a flowchart of a method for downloading a folder according to an embodiment of the present disclosure. Figure 2 As shown, the method includes the following steps:
[0043] Step S202: responding to the page opening instruction of the browser, displaying the downloader page in the interactive interface of the browser.
[0044] The aforementioned browser may be any browser capable of displaying a downloader page, and is not specifically limited in this embodiment. The aforementioned browser's interactive interface may be an interface displayed on a display screen of an electronic device, facilitating user interaction with the browser, and is not specifically limited in this embodiment. The electronic device herein may include, but is not limited to, a mobile phone, a laptop computer, a tablet computer, and a personal computer.
[0045] The above-mentioned page opening instruction can be an instruction generated by the user entering the link address of the downloader page in the URL input box in the browser's interactive interface and pressing the Enter button, or it can be an instruction generated by the user clicking on the locally saved downloader page, but is not limited to this.
[0046] In an optional embodiment, in response to the user's instruction to open the downloader page of the browser, the mobile terminal may display the downloader page in the interactive interface of the browser.
[0047] In another optional embodiment, in response to the user entering the link address of the downloader page in the URL input box in the browser's interactive interface and pressing the Enter key, the browser can obtain the downloader page corresponding to the link address from the resource server through the network. After obtaining the downloader page, the browser can also display the downloader page in the browser's interactive interface for the user to view.
[0048] In yet another optional embodiment, in response to the user selecting a downloader page of the browser stored locally by clicking the mouse, the browser may open the downloader page and display it in the interactive interface of the browser.
[0049] Figure 3 is a schematic diagram of an optional downloader page according to an embodiment of the present disclosure, such as Figure 3As shown, the downloader page includes: a "Click to select seed" option, a "Select export directory" option, a "Build directory" option, a "Download file" option and an "End" option at the top of the page. By selecting different options, the browser downloader page will perform corresponding operations. At the same time, there is a display area for time, size, download content, and download progress at the bottom of the browser downloader page. When the target seed file is imported into the browser's downloader page, the progress of downloading the target file corresponding to the target seed file will be displayed in the display area, including the download time, size, downloaded content, and download progress of the target file.
[0050] Optionally, displaying a downloader page in the interactive interface of the browser includes one of the following: obtaining a first downloader page from a downloader server via the network, and displaying the first downloader page in the interactive interface, wherein the first downloader page is used to download file data in a first preset format; obtaining a second downloader page corresponding to a locally stored page opening instruction, and displaying a second downloader page in the interactive interface, wherein the second downloader page is used to download file data in the first preset format and the second preset format.
[0051] The downloader server may be a server that provides a downloader page, for example, a cloud server, which is not specifically limited in this embodiment. The first downloader page may be a downloader page obtained from the downloader server via a network, and is used to download file data in a first preset format. The file data in the first preset format may be file data transmitted via a secure Secure Socket Layer (SSL) encrypted transmission protocol (Hyper Text Transfer Protocol over Secure Socket Layer, i.e., https protocol).
[0052] The file data in the second preset format may be file data transmitted via the Hyper Text Transfer Protocol (http) or the https protocol. The second downloader page may be a downloader page stored locally, and the second downloader page may be opened and the download task may be performed without going through the network.
[0053] In an optional embodiment, in response to receiving a user's operation to open a browser, the mobile terminal can obtain a first downloader page from a downloader server through the network based on the page opening instruction, and display the obtained first downloader page in the interactive interface of the browser, wherein the first downloader page is used to download file data in https format.
[0054] In another optional embodiment, the first downloader page obtained through the network can only download file data in the https format. In order to be able to download file data in the http format at the same time, the first downloader page can be stored locally to obtain a second downloader page, and the second downloader page can be opened to download file data in both the http and https formats. It should be noted that when it is necessary to download file data, only one solution is actually required to open the downloader page. That is, the user can choose whether to obtain the first downloader page through the network or directly open the locally stored second downloader page to download the corresponding preset format file according to their own needs.
[0055] Figure 4 This is an optional flow chart of displaying a downloader page in a browser's interactive interface according to an embodiment of the present disclosure, such as Figure 4 As shown, the method includes two schemes. In scheme one, after the mobile terminal opens a browser, in response to the user entering the link address of the downloader page in the browser's input box, the mobile terminal obtains a first downloader page from the downloader server via the network and displays the first downloader page in the browser's interactive interface. The first downloader page can then download the target folder corresponding to the target seed file from the resource website via the network, wherein the first downloader page can download file data in the https format. It should be noted that in scheme one, the user can also save the first downloader page, and the first downloader page will become the second downloader page after being stored locally.
[0056] like Figure 4 As shown, the second solution is that after the mobile terminal opens the browser, in response to the user's opening operation on the locally stored second downloader page, the mobile terminal can display the second downloader page in the interactive interface of the browser, and then the second downloader page can download the target folder corresponding to the target seed file from the resource website based on the network, wherein the second downloader page can download file data in https and http formats.
[0057] Step S204, responding to the import instruction of the downloader page, obtaining the target seed file corresponding to the import instruction, wherein the target seed file includes: first description information and second description information of the target folder, the first description information is the hierarchical structure information of the target folder, and the second description information is the download information of at least one target file contained in the target folder.
[0058] The target seed file may be a seed file in a folder selected by the user for download. Since this is a single download, the number is 1. The first description information may be hierarchical structure information of the target folder, such as, but not limited to, tree information of the directory of the target folder. The second description information may be download information of at least one target file contained in the target folder, such as, but not limited to, the download address, download name, download path, etc. of the at least one target file.
[0059] In an optional embodiment, the user may obtain the target seed file in advance and store it locally.
[0060] In another optional embodiment, in response to the user's import instruction to the browser, the browser can obtain the corresponding target seed file based on the import instruction, wherein the target seed file includes: first description information and second description information of the target file, the first description information can be hierarchical information of the target folder, and the second description information can be download information of at least one target file contained in the target folder.
[0061] In another optional embodiment, as Figure 3 As shown, in response to the user selecting the option of "click to select seed", the browser can import the corresponding target seed file into the downloader page of the browser based on the option.
[0062] Optionally, obtaining the target seed file corresponding to the import instruction includes: displaying at least one preset seed file in the downloader page, wherein the composition format of the preset seed file matches the preset format of the downloader page; responding to a first selection instruction for the preset seed file, determining that the preset seed file corresponding to the first selection instruction is the target seed file.
[0063] Optionally, displaying at least one preset seed file in the downloader page includes: displaying a first prompt message in the downloader page, wherein the first prompt message is used to prompt whether the browser is allowed to perform a read operation on the file system, and the file system is used to store the preset seed file; in response to a first permission instruction to the first prompt message, displaying at least one preset seed file in the downloader page.
[0064] The above-mentioned preset seed file can be a seed file that is pre-stored locally and matches the preset format of the downloader page. It should be noted that the data format of the preset seed file is fixed, but the carrier for storing the content of the preset seed file can be a variety of file formats (i.e., preset formats), among which the preset formats can include but are not limited to text file format and Hyper Text Markup Language (HTML) format.
[0065] The first prompt information may be a prompt information displayed on the downloader page, prompting whether to allow the browser to perform a read operation on the file system. In response to the user selecting "yes", it indicates that the browser can perform the read operation on the file system. In response to the user selecting "no", it indicates that the browser cannot perform the read operation on the file system. The file system may be a local system used to store preset seed files. The first permission instruction may be a permission read instruction executed by the user in response to the first prompt information. In response to the user executing the first permission instruction in response to the first prompt information, the browser may perform the read operation on the file system and display the preset seed file on the downloader page.
[0066] In an optional embodiment, Figure 5 This is a schematic diagram of the first prompt information of an optional downloader page according to an embodiment of the present disclosure, such as Figure 5 As shown, in response to the user selecting the "click to select seed" option, the downloader page may display a first prompt message, such as Figure 5 In the downloader page, a prompt message "Do you allow the browser to perform a read operation on the file system" is displayed. In response to the user selecting the "Allow" option, the browser can perform a read operation on the file system and display the preset seed file on the downloader page, wherein the composition format of the preset seed file matches the preset format of the downloader page.
[0067] The first selection instruction may be a user selection instruction for a preset seed file. In response to the user executing the first selection instruction for the preset seed file, the preset seed file may be determined as the target seed file. The target seed file may be a file selected by the user to be downloaded.
[0068] In an optional embodiment, after at least one preset seed file is displayed on the downloader page of the browser, in response to the user's first selection instruction, the preset seed file selected by the user may be determined as the target seed file.
[0069] Figure 6 is a schematic diagram of an optional preset seed file display according to an embodiment of the present disclosure, such as Figure 6 As shown, after the user selects multiple preset seed files, the preset seed files in the slashed part can be determined as the target seed files.
[0070] Optionally, the method further includes at least one of the following: receiving a preset seed file sent by a resource server through a preset network interface; obtaining a preset seed file from a group server through a network, wherein the seed file stored in the group server comes from the resource server; obtaining a file from the resource server using an access program to obtain a preset seed file; obtaining download information of at least one preset file contained in a preset folder, and combining the download information of at least one preset file to obtain a preset seed file.
[0071] The aforementioned preset network interface may be a network interface capable of receiving a preset seed file sent by a resource server via a network. This interface is provided by the developer of the resource server. The preset seed file herein may be a seed file proactively provided by the resource server for downloading a specific folder. The aforementioned resource server may be a server that provides specific file data to individual users, such as a server of a resource website, but is not limited thereto and is not specifically limited in this embodiment.
[0072] The aforementioned group server can be a server that provides a variety of file data to group users, for example, a server for a community website, and is not specifically limited in this embodiment. The aforementioned access program can be one or more acquisition programs for acquiring web page information, for example, a program written in a programming language (Python), but is not limited thereto. The access program can acquire files from a resource server via the network to obtain a preset seed file. The aforementioned preset folder can be any folder that a user wishes to download.
[0073] In an optional embodiment, the user may obtain the preset seed file from the resource server via the network through a preset network interface of the mobile terminal. Figure 7a is a schematic diagram of an optional first method of obtaining a preset seed file according to an embodiment of the present disclosure, such as Figure 7a As shown, the website developer can provide a preset network interface, and the server of the resource website can actively send the preset seed file to the mobile terminal through the preset network interface, so that the mobile terminal can obtain the preset seed file.
[0074] In another optional embodiment, developers of the group server can develop a seed file for downloading a specific folder for a specific resource server and store it in the group server. Users who can access the group server can obtain the preset seed file from the group server. Figure 7b is a schematic diagram of an optional second method of obtaining a preset seed file according to an embodiment of the present disclosure, such as Figure 7b As shown, the community developer outputs the preset seed file to the server of the community website through the server of the resource website, and the user can obtain the preset seed file from the server of the community website through the network.
[0075] In another optional embodiment, as Figure 7b As shown, first, the community developer can output the specific access program to the server of the community website through the server of the resource website, and then the user can download the specific access program from the server of the community website through the network, and then the user can obtain the file from the server of the resource website through the access program, so as to obtain the preset seed file.
[0076] In another optional embodiment, the user may search for download information of at least one preset file in the preset files in the resource server through the network, and combine the download information of at least one preset file to obtain the preset seed file. Figure 7c is a schematic diagram of an optional third method of obtaining a preset seed file according to an embodiment of the present disclosure, such as Figure 7c As shown, the user searches the server of the resource website through the network to obtain the download information of at least one preset file, and then the user can obtain the preset seed file by acquiring and piecing together the download information of the at least one preset file found.
[0077] In another optional embodiment, as Figure 7c As shown, the user can obtain files from the server of the resource website by accessing the program, and then obtain the preset seed file.
[0078] Step S206: Based on the target seed file, download the file data corresponding to the target folder from the resource server via the network.
[0079] Optionally, based on the target seed file, file data corresponding to the target folder is downloaded from the resource server via the network, including: parsing the target seed file to obtain at least one target file; displaying at least one target file in the downloader page; responding to a filtering instruction for the at least one target file to obtain a filtering file corresponding to the filtering instruction; and downloading file data corresponding to the filtering file from the resource server via the network.
[0080] The target file mentioned above may be a file selected by the user to be downloaded in the target seed file. There may be one or more target files, and the specific number is not limited in this embodiment.
[0081] The above-mentioned filtering instruction may be a user's filtering operation on at least one target file. In response to the user selecting at least one target file, the browser may download file data corresponding to the selected filtering file from the resource server via the network based on the selected filtering file.
[0082] In an optional embodiment, after the browser imports the target seed file, it can first parse the target seed file to obtain at least one target file and display it on the downloader page. Secondly, in response to the user's filtering operation on at least one target file, it can be determined that the file selected by the user is the filtered file. Finally, the file data corresponding to the filtered file can be downloaded from the resource server through the network.
[0083] In another optional embodiment, after the browser imports the target seed file, the user can also select the imported target seed file and decide which directories and files to exclude or select, thereby improving the user's autonomy in choosing downloaded files and simplifying the retry mechanism from the compression package level to the file level. That is, when the user makes a wrong selection, he only needs to reselect the file without having to reselect the entire folder.
[0084] Optionally, in the process of downloading file data corresponding to the target folder from the resource server via the network, the method further includes: in response to a network failure, retaining the file data corresponding to the first file and pausing the download of the file data corresponding to the second file, wherein the file data corresponding to the first file is downloaded successfully and the second file is a file in the target folder other than the first file; in response to the network returning to normal, continuing to download the file data corresponding to the second file.
[0085] The first file mentioned above may be a file that is successfully downloaded, and the second file may be a file that is not successfully downloaded when a network failure occurs.
[0086] In an optional embodiment, during the process of downloading file data corresponding to a target folder from a resource server via a network, in response to a network failure, the browser can save the file data of the first file that has been successfully downloaded and pause the file data of the second file being downloaded to ensure that the file data is not lost. When the network returns to normal, the browser can continue to download the file data of the second file, thereby ensuring that the file data is not lost during the network interruption and that the user does not need to re-execute the file import operation, thereby simplifying the operation steps.
[0087] It should be noted that the fault tolerance mechanism of the present disclosure is file-level. Even if a network error occurs during the entire download process, the correctly downloaded file will be saved locally. Furthermore, during subsequent downloads, there is breakpoint-resume logic. Specifically, when a network failure occurs, the download of the file data corresponding to the second file is paused, and the download of the file data corresponding to the second file is resumed in response to network recovery.
[0088] Optionally, the method also includes: displaying at least one local file stored in the file system in the downloader page; responding to a second selection instruction for the local file, determining that the local file corresponding to the second selection instruction is the target local file; creating a storage folder in the target local file based on the first description information; and storing the file data corresponding to the target folder in the storage folder.
[0089] The second selection instruction may be an instruction executed by the browser to select a local file based on a user operation. The target local file may be a local file in a storage target folder selected by the user, which may be one or more, and the specific number is not specifically limited in this embodiment.
[0090] In an optional embodiment, after the target file is downloaded, the browser's downloader page can also display at least one local file stored in the file system. When the user selects at least one local file, the selected at least one local file can be determined as the target local file.
[0091] Optionally, based on the first description information, a storage folder is created in the target local file, including: displaying a second prompt message in the downloader page, wherein the second prompt message is used to prompt whether the browser is allowed to perform a write operation on the file system; and creating a storage folder in the target local file in response to a second permission instruction to the second prompt message.
[0092] The above-mentioned second prompt information can be a prompt information displayed on the downloader page by the browser in response to the user's selection operation, prompting the user whether to allow the browser to perform a write operation on the file system. In response to the user choosing to allow, the browser will create a storage folder in the target local file to store the downloaded target file.
[0093] In an optional embodiment, Figure 8 is a schematic diagram of a second prompt information of an optional downloader page according to an embodiment of the present disclosure, such as Figure 8 As shown, in response to the user selecting the "Select export directory" option, the browser's downloader page will display a prompt message "Do you allow the browser to perform read operations on the file system?" In response to the user selecting "allow", the browser will create a folder in the target local file based on the first description information to store the downloaded target file.
[0094] Optionally, storing the file data corresponding to the target folder in the storage folder includes: storing the file data corresponding to the target folder in the storage folder through a preset interface of the browser.
[0095] In an optional embodiment, the browser may store the file data corresponding to the target folder in a storage folder in the target local file through a preset interface.
[0096] This disclosure provides a technology for downloading folders using a webpage downloader and folder seed files. This technology requires that all files in a folder are accessible via a network connection with independent hashes. Users open a webpage in a browser and select a folder seed file in a specific format to retrieve the complete folder contents over the network. As long as the folder seed file conforms to the downloader's component format, the downloader can be reused. When storing files in a seed file, only the URL address of the file is saved, not the actual content.
[0097] The core of this invention is to use an online or local web page to implement a universal downloader solution. This web page downloader triggers the browser's file system interface to download each file in the folder to the local device via the network. The web page downloader is specifically implemented through the following technical solutions:
[0098] 1. Browser's File System
[0099] Utilizing the browser's file system, we gain control of the system, establish requests for each resource using the browser's native AJAX interface (fetch), obtain the network resource's input stream, and then use the browser's streaming interface to stream the requested input stream to the local device. This is a very important point, and it serves as an introduction to the principle and a summary of the process.
[0100] 2. Vue JavaScript framework
[0101] It manages all interactive logic for the web downloader, responding correctly to a series of events and handling data interactions. For example, it ensures that when a user clicks a page, there are corresponding events, handles user file filtering, ensures that the progress bar advances according to the development sequence, and prints relevant information when network anomalies occur. It is like a brain performing a scheduling and feedback process.
[0102] 3. ElementUI component usage
[0103] Responsible for all component styles of the web downloader, beautifying the page, progress display and logic display.
[0104] 4. Github hosted static website
[0105] By using Github's free static website service and deploying our downloader, everyone can open and obtain the web downloader in this article through a URL, thus achieving the purpose of using the web downloader online / locally.
[0106] Figure 9 is a flowchart of an optional downloading and sharing folder according to an embodiment of the present disclosure, such as Figure 9 As shown, the process includes the following steps:
[0107] 1. Get a folder seed file that complies with the standard format in advance. It contains the folder directory tree information, the file download address, name, download path, and directory number.
[0108] 2. Open the web downloader with a browser to display the downloader page.
[0109] 3. Import the folder seed file and allow the browser to read the file system permissions.
[0110] 4. Select the specific path to download to the local computer and allow the browser to write to the file system.
[0111] 5. Wait for the download to complete and check the final download results.
[0112] Figure 10 is an optional Unified Modeling Language (UML) flowchart according to an embodiment of the present disclosure, such as Figure 10 As shown, the local device obtains the seed file in advance through some means, and then opens the browser's web downloader to import the seed file. After the browser obtains the permission to operate the directory of the local device, it builds a directory to the local device and downloads resources from the resource server through the network. The resource server streams the data back to the browser's web downloader through a preset interface. The web downloader downloads the data and saves the file data locally through the directory after the download is complete.
[0113] Since the web page downloader disclosed in the present invention is reusable, the only problem is how to obtain the folder seed file.
[0114] There are three ways to obtain folder seed files, such as Figures 7a-7c As shown:
[0115] 1. Provided by website developers: The most recommended promotion method is for resource websites to actively provide seed files. Website developers provide a folder information access interface and output seed files that conform to the downloader format for specific folders.
[0116] 2. Community members access the website: This is a group-based approach where users passively search for seed files. Community professionals generate specific access programs or seed files for specific websites and publish them on the community website for general users to download.
[0117] 3. Ordinary users organize seed files themselves: This is an individual solution, where individual users passively search for seed files. They can manually piece together or use access programs to integrate seed files in corresponding folders.
[0118] At the same time, the web downloader can also be deployed on Github and opened through the link. Because Github also provides static website services, the problem of deploying the web downloader can also be solved without any financial expenditure. Because the web downloader opened through the link can only download resource files that support the https protocol, if you want to download resource files of both https and http protocols at the same time, please open the web downloader in the form of a local file. Figure 4 shown.
[0119] To summarize, we can propose the following solutions for the following two scenarios:
[0120] Option 1: Figure 11 This is a schematic diagram of an optional solution for obtaining folder seeds through a resource website according to an embodiment of the present disclosure. Figure 11 As shown, the mobile terminal obtains or forwards the folder seed file by accessing the resource website, and then puts the folder seed file into the web downloader of the browser. The web downloader downloads the target file from the resource website through the network, and then saves the downloaded target file to the mobile terminal.
[0121] Option 2: Figure 12 This is a schematic diagram of an optional solution for obtaining folder seeds by accessing a program according to an embodiment of the present disclosure. Figure 12 As shown, the user obtains a folder seed file from a resource website by accessing the program, and imports the folder seed file into the web downloader of the browser. After the web downloader downloads the obtained folder seed file, it stores the target file in the mobile terminal.
[0122] The beneficial effects of the present disclosure are as follows:
[0123] 1. This disclosure only requires writing a web page, which only relies on a browser. The web page is at the KB level in size, the code is simple and easy to understand, and can be customized and modified according to specific needs, such as encryption / decryption.
[0124] 2. After the web downloader proposed in this disclosure decompresses the seed file, the user can make a secondary selection on the front end of the web page to decide which directories and files to exclude / select, thereby improving the downloading user's independent choice and simplifying the retry mechanism from the compression package level to the file level.
[0125] 3. In the present disclosure, as long as the seed file meets the format requirements of the web page downloader, the web page downloader can download the directory. It is not targeted at the directory, but only at the composition format of the seed file, thus improving the universality and reusability of the solution.
[0126] 4. The webpage downloader disclosed in this disclosure generates a folder, not a compressed package, and does not require decompression or compression, nor does it take up extra space. Because the content originates from the Internet, is transferred to the browser, and written to the local device, there is no decompression step.
[0127] 5. The web page downloader disclosed in the present invention can be deployed on a website. Users can open the downloader through a link, and then import the folder seed file to start downloading. The operation is very simple and does not need to be saved to the local device.
[0128] 6. After deploying a web downloader on their website, website developers can also redirect seed file data to the downloader page via the network, eliminating the need for users to save and import seed files and enabling one-click downloads. When forwarding seed files over the network, the seed file's contents can be injected into the downloader page via network messages. Therefore, seed files are not a necessary means, but merely a means of transporting information.
[0129] 7. The fault tolerance mechanism disclosed in this disclosure is file-level. Even if a network error occurs during the entire download process, the correctly downloaded file will be saved locally. In the subsequent download process, there will be a breakpoint resume logic.
[0130] In summary, downloading folders through a web downloader has the advantages of fast speed, strong disaster recovery capability, low hard disk space consumption, strong customizability, simple operation, no need for additional hard disk space, easy deployment, and direct access to the source folder.
[0131] It should be noted that the key point of this solution is to write a web page that, when opened in a browser, can be used as a downloader to download folders, thereby solving the technical problem of downloading folders in related technologies. The web page downloader has the characteristics of high reuse, high efficiency, and high fault tolerance. In addition, the web page downloader can download discrete file resources from the resource server, where discrete means that each file has a corresponding URL, and each URL is stored in an information carrier (such as a seed file).
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0133] In this embodiment, a device is also provided for implementing the above-mentioned embodiments and preferred embodiments. Details already described are omitted for brevity. As used below, the terms "unit" and "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0134] Figure 13 is a structural block diagram of a device for downloading a folder according to an embodiment of the present disclosure, such as Figure 13 As shown, the device includes: a page display module 1302, which is used to respond to a page opening instruction of the browser and display a downloader page in the interactive interface of the browser; a file acquisition module 1304, which is used to respond to an import instruction of the downloader page and obtain a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information and second description information of the target folder, the first description information is the hierarchical structure information of the target folder, and the second description information is the download information of at least one target file contained in the target folder; a data download module 1306, which is used to download file data corresponding to the target folder from the resource server through the network based on the target seed file.
[0135] Optionally, the file acquisition module includes: a page display unit, used to display at least one preset seed file in the downloader page, wherein the composition format of the preset seed file matches the preset format of the downloader page; a determination unit, used to respond to a first selection instruction for the preset seed file, and determine that the preset seed file corresponding to the first selection instruction is the target seed file.
[0136] Optionally, the file acquisition module also includes: a sending unit, used to receive a preset seed file sent by a resource server through a preset network interface; a first acquisition unit, used to obtain a preset seed file from a group server through the network, wherein the seed file stored in the group server comes from the resource server; a file acquisition unit, used to use an access program to acquire files from the resource server to obtain a preset seed file; a second acquisition unit, used to obtain download information of at least one preset file contained in a preset folder, and combine the download information of at least one preset file to obtain a preset seed file.
[0137] Optionally, the page display unit includes: a first display subunit, used to display a first prompt message in the downloader page, wherein the first prompt message is used to prompt whether the browser is allowed to perform a read operation on the file system, and the file system is used to store preset seed files; a second display subunit, used to respond to a first permission instruction to the first prompt message and display at least one preset seed file in the downloader page.
[0138] Optionally, the device also includes: a file display module, used to display at least one local file stored in the file system in the downloader page; a file determination module, used to respond to a second selection instruction for the local file, and determine that the local file corresponding to the second selection instruction is the target local file; a folder creation module, used to create a storage folder in the target local file based on the first description information; and a file data storage module, used to store the file data corresponding to the target folder to the storage folder.
[0139] Optionally, the folder creation module includes: a prompt information display unit, used to display a second prompt information in the downloader page, wherein the second prompt information is used to prompt whether the browser is allowed to perform a write operation on the file system; a folder creation unit, used to respond to a second permission instruction to the second prompt information and create a storage folder in the target local file.
[0140] Optionally, the file data storage module includes: a file data storage unit, configured to store the file data corresponding to the target folder into a storage folder through a preset interface of the browser.
[0141] Optionally, the data download module includes: a seed file parsing unit, used to parse the target seed file to obtain at least one target file; a file display unit, used to display at least one target file in the downloader page; a third acquisition unit, used to respond to a filtering instruction for at least one target file and obtain a filtering file corresponding to the filtering instruction; a first downloading unit, used to download file data corresponding to the filtering file from a resource server via the network.
[0142] Optionally, the page display module includes at least one of the following: a fourth acquisition unit, used to obtain a first downloader page from a downloader server via the network, and display the first downloader page in the interactive interface, wherein the first downloader page is used to download file data in a first preset format; a fifth acquisition unit, used to obtain a second downloader page corresponding to a locally stored page opening instruction, and display the second downloader page in the interactive interface, wherein the second downloader page is used to download file data in the first preset format and the second preset format.
[0143] Optionally, the data download module also includes: a retention unit, used to retain the file data corresponding to the first file in response to a network failure, and suspend downloading the file data corresponding to the second file, wherein the file data corresponding to the first file is downloaded successfully, and the second file is a file other than the first file in the target folder; a second download unit, used to continue downloading the file data corresponding to the second file in response to the network returning to normal.
[0144] It should be noted that the above-mentioned units and modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units and modules are all located in the same processor; or the above-mentioned units and modules are located in different processors in any combination.
[0145] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0146] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0147] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0148] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0149] Step S1, responding to a page opening instruction of a browser, and displaying a downloader page in the interactive interface of the browser;
[0150] Step S2, in response to the import instruction on the downloader page, obtaining a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information and second description information of a target folder, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder;
[0151] Step S3: Based on the target seed file, download the file data corresponding to the target folder from the resource server via the network.
[0152] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: displaying at least one preset seed file in the downloader page, wherein the composition format of the preset seed file matches the preset format of the downloader page; in response to a first selection instruction for the preset seed file, determining that the preset seed file corresponding to the first selection instruction is the target seed file.
[0153] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: receiving a preset seed file sent by a resource server through a preset network interface; obtaining a preset seed file from a group server through a network, wherein the seed file stored in the group server comes from the resource server; obtaining a file from the resource server using an access program to obtain a preset seed file; obtaining download information of at least one preset file contained in a preset folder, and combining the download information of at least one preset file to obtain a preset seed file.
[0154] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: displaying a first prompt message in the downloader page, wherein the first prompt message is used to prompt whether the browser is allowed to perform a read operation on the file system, and the file system is used to store preset seed files; in response to a first permission instruction to the first prompt message, displaying at least one preset seed file in the downloader page.
[0155] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: displaying at least one local file stored in the file system in the downloader page; responding to a second selection instruction for the local file, determining that the local file corresponding to the second selection instruction is the target local file; creating a storage folder in the target local file based on the first description information; and storing the file data corresponding to the target folder in the storage folder.
[0156] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: displaying a second prompt message in the downloader page, wherein the second prompt message is used to prompt whether the browser is allowed to perform a write operation on the file system; and creating a storage folder in the target local file in response to a second permission instruction of the second prompt message.
[0157] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: storing file data corresponding to the target folder in a storage folder through a preset interface of the browser.
[0158] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: parsing the target seed file to obtain at least one target file; displaying at least one target file in the downloader page; responding to a filtering instruction for at least one target file, obtaining a filtering file corresponding to the filtering instruction; and downloading file data corresponding to the filtering file from a resource server via the network.
[0159] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing one of the following steps: obtaining a first downloader page from a downloader server via a network, and displaying the first downloader page in an interactive interface, wherein the first downloader page is used to download file data in a first preset format; obtaining a second downloader page corresponding to a locally stored page opening instruction, and displaying the second downloader page in the interactive interface, wherein the second downloader page is used to download file data in the first preset format and the second preset format.
[0160] Optionally, the computer-readable storage medium is further configured to store program code for executing one of the following steps: in response to a network failure, retaining the file data corresponding to the first file and pausing the download of the file data corresponding to the second file, wherein the file data corresponding to the first file is downloaded successfully and the second file is a file other than the first file in the target folder; in response to the network returning to normal, continuing to download the file data corresponding to the second file.
[0161] In the computer-readable storage medium of this embodiment, a technical solution for a method for downloading a folder is provided. In response to a page open instruction from a browser, a downloader page is displayed in the browser's interactive interface; in response to an import instruction from the downloader page, a target seed file corresponding to the import instruction is obtained, wherein the target seed file includes: first description information and second description information of a target folder, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder; and based on the target seed file, a method for downloading file data corresponding to the target folder from a resource server via a network. It is easy to note that the present disclosure, based on the target seed file, downloads a folder from a resource server via a network, and the folder contains at least one target file. This allows the user to download all the required target files in a single operation, achieving the purpose of efficiently obtaining multiple target files, thereby achieving the technical effect of improving file download efficiency and solving the technical problem of low download efficiency of folder downloading in the related art. Through the above description of the embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0162] In an exemplary embodiment of the present application, a computer-readable storage medium stores a program product capable of implementing the above-described method of this embodiment. In some possible implementations, various aspects of the embodiments of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps described in the "Exemplary Method" section of this embodiment according to various exemplary embodiments of the present disclosure.
[0163] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited thereto. In the embodiment of the present disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0164] The program product may be implemented in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0165] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any appropriate combination of the above.
[0166] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0167] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0168] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0169] Step S1, responding to a page opening instruction of a browser, and displaying a downloader page in the interactive interface of the browser;
[0170] Step S2, in response to the import instruction on the downloader page, obtaining a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information and second description information of a target folder, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder;
[0171] Step S3: Based on the target seed file, download the file data corresponding to the target folder from the resource server via the network.
[0172] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: displaying at least one preset seed file in the downloader page, wherein the composition format of the preset seed file matches the preset format of the downloader page; responding to a first selection instruction for the preset seed file, determining that the preset seed file corresponding to the first selection instruction is the target seed file.
[0173] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: receiving a preset seed file sent by a resource server through a preset network interface; obtaining the preset seed file from a group server through the network, wherein the seed file stored in the group server comes from the resource server; using an access program to obtain files from the resource server to obtain a preset seed file; obtaining download information of at least one preset file contained in a preset folder, and combining the download information of at least one preset file to obtain a preset seed file.
[0174] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: displaying a first prompt message in the downloader page, wherein the first prompt message is used to prompt whether the browser is allowed to perform a read operation on the file system, and the file system is used to store preset seed files; in response to a first permission instruction to the first prompt message, displaying at least one preset seed file in the downloader page.
[0175] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: displaying at least one local file stored in the file system in the downloader page; responding to a second selection instruction for the local file, determining that the local file corresponding to the second selection instruction is the target local file; creating a storage folder in the target local file based on the first description information; and storing the file data corresponding to the target folder in the storage folder.
[0176] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: displaying a second prompt message in the downloader page, wherein the second prompt message is used to prompt whether the browser is allowed to perform a write operation on the file system; and creating a storage folder in the target local file in response to a second permission instruction of the second prompt message.
[0177] Optionally, the processor may also be configured to execute the following steps through a computer program: storing the file data corresponding to the target folder into a storage folder through a preset interface of the browser.
[0178] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: parsing the target seed file to obtain at least one target file; displaying at least one target file in the downloader page; responding to a filtering instruction for at least one target file to obtain a filtering file corresponding to the filtering instruction; and downloading file data corresponding to the filtering file from a resource server via the network.
[0179] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtaining a first downloader page from a downloader server through the network, and displaying the first downloader page in an interactive interface, wherein the first downloader page is used to download file data in a first preset format; obtaining a second downloader page corresponding to a locally stored page opening instruction, and displaying the second downloader page in the interactive interface, wherein the second downloader page is used to download file data in the first preset format and the second preset format.
[0180] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: in response to a network failure, retain the file data corresponding to the first file, and suspend downloading the file data corresponding to the second file, wherein the file data corresponding to the first file is downloaded successfully, and the second file is a file other than the first file in the target folder; in response to the network returning to normal, continue downloading the file data corresponding to the second file.
[0181] In the electronic device of this embodiment, a technical solution for a method of downloading a folder is provided. In response to a page opening instruction of a browser, a downloader page is displayed in the interactive interface of the browser; in response to an import instruction of the downloader page, a target seed file corresponding to the import instruction is obtained, wherein the target seed file includes: first description information and second description information of the target folder, the first description information is the hierarchical structure information of the target folder, and the second description information is the download information of at least one target file contained in the target folder; based on the target seed file, a method of downloading the file data corresponding to the target folder from the resource server through the network. It is easy to notice that the present disclosure obtains a folder downloaded from the resource server through the network based on the target seed file, and the folder contains at least one target file, which allows the user to download the required target files in one operation, thereby achieving the purpose of being able to efficiently obtain multiple target files, thereby achieving the technical effect of improving the efficiency of file downloading, and further solving the technical problem of low download efficiency of download folders in the related art.
[0182] Figure 14 Schematic diagram of an electronic device according to an embodiment of the present disclosure. Figure 14 As shown, the electronic device 1400 is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0183] like Figure 14 As shown, electronic device 1400 is implemented as a general-purpose computing device. Components of electronic device 1400 may include, but are not limited to, at least one processor 1410, at least one memory 1420, a bus 1430 connecting various system components (including memory 1420 and processor 1410), and a display 1440.
[0184] The memory 1420 stores program code, which can be executed by the processor 1410, so that the processor 1410 executes the steps described in the method section of the embodiment of the present application according to various exemplary embodiments of the present disclosure.
[0185] The memory 1420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 14201 and / or a cache memory unit 14202, and may further include a read-only memory unit (ROM) 14203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0186] In some examples, memory 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205. Such program modules 14205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 1420 may further include memory remotely located relative to processor 1410. These remote memories may be connected to electronic device 1400 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0187] The bus 1430 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a local bus to the processor 1410, or any of a variety of bus architectures.
[0188] The display 1440 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1400 .
[0189] Optionally, the electronic device 1400 may also communicate with one or more external devices 1500 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1400, and / or any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 1450. Furthermore, the electronic device 1400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 1460. Figure 14As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via the bus 1430. Figure 14 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0190] The electronic device 1400 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.
[0191] It can be understood by those skilled in the art that Figure 14 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 14 More or fewer components than shown, or with Figure 1 The memory 1420 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the folder downloading method in the embodiments of the present disclosure. The processor 1410 executes the computer programs stored in the memory 1420 to perform various functional applications and data processing, thereby implementing the folder downloading method described above.
[0192] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.
[0193] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0194] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0195] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0196] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0197] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0198] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.
Claims
1. A method for downloading a folder, characterized in that: include: In response to a page opening instruction to a browser, displaying a downloader page in an interactive interface of the browser, wherein the downloader page includes at least one of the following: a first downloader page or a second downloader page, the first downloader page being used to download file data in a first preset format, the second downloader page being used to download file data in the first preset format and the second preset format, the second downloader page being obtained by storing the first downloader page locally; In response to an import instruction on the downloader page, obtaining a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information of a target folder and second description information, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder; Based on the target seed file, downloading file data corresponding to the target folder from a resource server via a network, wherein the target seed file is used to represent a preset seed file corresponding to the first selection instruction, the composition format of the preset seed file matches the preset format of the downloader page, and the preset seed file is obtained by accessing a file from the resource server through an access program, wherein the access program is an acquisition program for acquiring web page information; In the process of downloading the file data corresponding to the target folder from the resource server via the network, the method further includes: in response to a network failure, retaining the file data corresponding to the first file and pausing the download of the file data corresponding to the second file, wherein the file data corresponding to the first file is downloaded successfully, and the second file is a file in the target folder other than the first file; in response to the network returning to normal, continuing to download the file data corresponding to the second file.
2. The method according to claim 1, characterized in that Obtaining the target seed file corresponding to the import instruction includes: Displaying at least one of the preset seed files on the downloader page; In response to the first selection instruction for the preset seed file, the preset seed file corresponding to the first selection instruction is determined as the target seed file.
3. The method according to claim 2, characterized in that The method further comprises at least one of the following: Receiving the preset seed file sent by the resource server through a preset network interface; Obtaining the preset seed file from a group server via the network, wherein the seed file stored in the group server comes from the resource server; The download information of at least one preset file contained in the preset folder is obtained, and the download information of the at least one preset file is combined to obtain the preset seed file.
4. The method according to claim 2, characterized in that Displaying the at least one preset seed file on the downloader page includes: Displaying a first prompt message on the downloader page, wherein the first prompt message is used to prompt whether to allow the browser to perform a read operation on a file system, where the file system is used to store the preset seed file; In response to a first permission instruction for the first prompt information, the at least one preset seed file is displayed in the downloader page.
5. The method according to claim 1, wherein The method further comprises: Displaying at least one local file stored in the file system in the downloader page; In response to a second selection instruction for the local file, determining the local file corresponding to the second selection instruction as a target local file; Based on the first description information, create a storage folder in the target local file; The file data corresponding to the target folder is stored in the storage folder.
6. The method according to claim 5, characterized in that Creating the storage folder in the target local file based on the first description information includes: Displaying a second prompt message on the downloader page, wherein the second prompt message is used to prompt whether to allow the browser to perform a write operation on the file system; In response to a second permission instruction of the second prompt information, the storage folder is created in the target local file.
7. The method according to claim 5, characterized in that Storing the file data corresponding to the target folder in the storage folder includes: The file data corresponding to the target folder is stored in the storage folder through a preset interface of the browser.
8. The method according to claim 1, characterized in that Downloading file data corresponding to the target folder from the resource server via the network based on the target seed file includes: Parsing the target seed file to obtain the at least one target file; Displaying the at least one target file in the downloader page; In response to a filtering instruction for the at least one target file, obtaining a filtering file corresponding to the filtering instruction; The file data corresponding to the screening file is downloaded from the resource server via the network.
9. The method according to claim 1, characterized in that Displaying the downloader page in the interactive interface of the browser includes one of the following: Obtaining a first downloader page from a downloader server via the network, and displaying the first downloader page in the interactive interface, wherein the first downloader page is used to download file data in a first preset format; A second downloader page corresponding to the locally stored page opening instruction is obtained, and the second downloader page is displayed in the interactive interface, wherein the second downloader page is used to download file data in the first preset format and the second preset format.
10. A device for downloading a folder, characterized in that: include: a page display module, configured to respond to a page opening instruction to a browser and display a downloader page in an interactive interface of the browser, wherein the downloader page includes at least one of the following: a first downloader page or a second downloader page, wherein the first downloader page is configured to download file data in a first preset format, and the second downloader page is configured to download file data in a first preset format and a second preset format, and the second downloader page is obtained by storing the first downloader page locally; a file acquisition module, configured to respond to an import instruction on the downloader page and acquire a target seed file corresponding to the import instruction, wherein the target seed file includes: first description information of a target folder and second description information, the first description information being hierarchical structure information of the target folder, and the second description information being download information of at least one target file contained in the target folder; a data download module, configured to download file data corresponding to the target folder from a resource server via a network based on the target seed file, wherein the target seed file is used to represent a preset seed file corresponding to the first selection instruction, the composition format of the preset seed file matches the preset format of the downloader page, and the preset seed file is obtained by accessing a file from the resource server through an access program, wherein the access program is an acquisition program for acquiring web page information; The device is further configured to: in response to a network failure, retain the file data corresponding to the first file, and suspend downloading the file data corresponding to the second file, wherein the file data corresponding to the first file is downloaded successfully, and the second file is a file other than the first file in the target folder; and in response to the network returning to normal, continue downloading the file data corresponding to the second file.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 9 when executed by a processor.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Folder uploading / downloading method and device
CN105069009A