1. Technical Field
Embodiments of the present disclosure relate to file downloading systems and methods, and particularly to an application server and a method of error recovery when downloading data files.
2. Description of Related Art
A feature of the Internet is the ability to transmit data files from one computer to another using various file transfer protocols such as File Transfer Protocol (FTP) and Hypertext Transfer Protocol (HTTP). Data files available to be downloaded from file servers are increasingly larger in size resulting in increased overall download times. As a result, downloading files over the Internet can be a time consuming process that often leads to problems occurring during the downloading process.
The downloading process is occasionally interrupted due to a network connection between a client devices and a file server. Additionally, a file may be corrupted during a downloading process due to a hardware or software malfunction of the file server, rendering the downloaded file unreadable or otherwise unusable. An interrupted file download must be downloaded again in its entirety, even if most of the file had already been downloaded at the time of the interruption or failure. Therefore, successfully downloading files over the Internet may require multiple attempts to process abnormalities in the file downloading process.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In the present disclosure, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In one embodiment, the program language may be Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage system. Some non-limiting examples of a non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives.
The application server 1 may further include a storage device 11, at least one processor 12, and a display device 13. In the embodiment, the system 10 may include computerized instructions in the form of one or more programs that are stored in the storage device 11 and executed by the at least one processor 12.
The storage device 11 stores a file configuration table for recording storage information of all the data files to be downloaded from the file servers 3. Referring to
In one embodiment, each of the file servers 3 is located in a different area, such as KunShan and ShenZhen in China, in Taiwan, or in United States of America. The file servers 3 are divided into different groups according to the different locations. Referring back to
In one embodiment, the file error recovery system 10 includes a first download module 101, a second download module 102, and an abnormality processing module 103. The modules 101-103 may comprise computerized instructions in the form of one or more programs that are stored in the storage device 11 and executed by the at least one processor 12. In one embodiment, the storage device 11 may be an internal storage system, such as a random access memory (RAM) for temporary storage of information, and/or a read only memory (ROM) for permanent storage of information. A detailed description of each module will be given in the following paragraphs.
In step S21, the first download module 101 receives a file downloading request from the terminal device 2. In the embodiment, the file downloading request includes an IP address of the terminal device 2, and a file name of a data file to be downloaded from one of the file servers 3.
In step S22, the first download module 101 finds the first file server 3a nearest to the terminal device 2 according to the file downloading request. In the embodiment, the first download module 101 searches all the file server 3 to find the first file server 3a according to the internet protocol (IP) address of the terminal device 2, and determines whether the data file exists in the first file server 3a according to the file name and the recorded file storing state of the data file.
In step S23, the first download module 101 downloads the data file from the first file server 3a to the terminal device 2 if the data file exists in the first file server 3a.
In step S24, the first download module 101 determines whether the data file has been successfully downloaded from the first file server 3a. If the data file has been successfully downloaded from the first file server 3a, the procedure is ended. If the data file has not been downloaded successfully from the first file server 3a, step S25 is implemented. In the embodiment, if the data file has not been successfully downloaded from the first file server 3a, the first download module 101 determines that the data file may be damaged in the first file server 3a.
In step S25, the second download module 102 searches the file configuration table to find all remote file servers 3 which are away from the first file server 3a. In the embodiment, the file configuration table includes a file name of each of the data files stored in each of the file servers 3, an identification (ID) of each of the file servers 3, and a file storing state of the data files indicating which file server 3 stores the data files.
In step S26, the second download module 102 selects one of the remote file servers 3 which does have the data file, as the second file server 3b. In the embodiment, the second download module 102 determines whether the data file exists in the remote file servers 3 according to the file storing state of the data file, and selects a remote file server 3 which has the data file, as the second file server 3b. Referring to
In step S27, the second download module 102 downloads the data file from the second file server 3b through the communication network 4.
In step S28, the second download module 102 determines whether the data file has been successfully downloaded from the second file server 3b. If the data file has been successfully downloaded from the second file server 3b, step S29 is implemented. If the data file has not been downloaded successfully from the second file server 3b, step S30 is implemented.
In step S29, the abnormality processing module 103 synchronizes the data file from the second file server 3b to recover the data file of the first file server 3a. That is to say, the abnormality processing module 103 sends the downloaded data file to the first file server 3a, and stores the downloaded data file into the first file server 3a to update, correct, and complete the incomplete or corrupted data file stored in the first file server 3a.
In step S30, the abnormality processing module 103 records abnormality information of the data file downloading process when the data file has not been downloaded from the second file server 3b successfully, displays the abnormality information on the display device 13, and then step S26 is repeated to select another remote file server 3 to download the data file.
Although certain disclosed embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201210129892.6 | Apr 2012 | CN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN12/78806 | 7/18/2012 | WO | 00 | 4/15/2013 |