WO2015085939A1 - 一种文件传输方法、设备和系统 - Google Patents

一种文件传输方法、设备和系统 Download PDF

Info

Publication number
WO2015085939A1
WO2015085939A1 PCT/CN2014/093577 CN2014093577W WO2015085939A1 WO 2015085939 A1 WO2015085939 A1 WO 2015085939A1 CN 2014093577 W CN2014093577 W CN 2014093577W WO 2015085939 A1 WO2015085939 A1 WO 2015085939A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
server
computing device
data
download request
Prior art date
Application number
PCT/CN2014/093577
Other languages
English (en)
French (fr)
Inventor
赵化强
王林
肖江
王鹏飞
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201310684043.1A external-priority patent/CN103747032B/zh
Priority claimed from CN201310681921.4A external-priority patent/CN103780676B/zh
Application filed by 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Priority to US15/103,734 priority Critical patent/US20160315997A1/en
Publication of WO2015085939A1 publication Critical patent/WO2015085939A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD

Definitions

  • the present invention relates to the field of computers and the Internet, and more particularly to data synchronization techniques in networks.
  • a typical network storage system can include a storage server and multiple computing terminals. Each computing terminal communicates with a storage server via a network. The computing terminal can transfer local files to the server for centralized storage. When the user uses other computing terminals, the files stored on the server can be browsed through these computing terminals, and can be downloaded to the computing terminal for use. When the network speed is getting faster, this kind of network storage method is more and more popular among users.
  • the present invention provides a new solution in an effort to solve or at least alleviate the above problems.
  • a file transfer device operating at a computing device adapted to transfer a file on a computing device to a server and to browse and/or download a file stored on the server, the file transfer
  • the device includes: an upload controller, configured to transfer a file in the local device of the computing device to the server and generate a corresponding file transfer record; and a download controller adapted to receive a download request for downloading data from the server, according to the file generated by the upload controller
  • the record is transmitted to determine if the data in the download request is associated with a file local to the computing device, and if so, the data is retrieved from a file local to the computing device; if not, the data is downloaded from the server.
  • a file transfer method running on a computing device adapted to transfer a file on a computing device to a server and to browse and/or download a file stored on the server, the file
  • the transmission method includes the steps of: transferring the file in the local device of the computing device Going to the server and generating a corresponding file transfer record; receiving a download request for downloading data from the server, determining, according to the generated file transfer record, whether the data in the download request is associated with a file local to the computing device, and if so, The data is then retrieved from a file local to the computing device; if not, the data is downloaded from the server.
  • a computer program comprising computer readable code which, when executed on a computer, performs the aforementioned file transfer method.
  • a computer readable medium storing the aforementioned computer program is provided.
  • a network storage system comprising: a server; and a plurality of computing devices, each computing device comprising a file transfer device according to the present invention for transferring files on the computing device to the server And browse the files on the server.
  • the file transmission scheme of the present invention at a computing device, before downloading data from the server, it is first determined whether the file associated with the data is uploaded from the computing device to the server, and if so, directly from the file transfer device The corresponding file of the computing device is used to obtain the data without sending the request to the server, thereby significantly reducing the user's waiting time and data transmission, improving the user experience and reducing network transmission.
  • a file transfer device operating at a computing device adapted to transfer a file on a computing device to a server and to browse and/or download a file stored on the server, the file transfer
  • the device includes: a proximity device identifier adapted to acquire one or more first other computing devices in the same local area network as the computing device from the server; and a download controller adapted to receive the first download request to download data from the server, Transmitting the first download request to one or more first other computing devices in the same local area network, and if any of the first other computing devices is capable of processing the first download request, downloading data from the first other computing device, otherwise
  • the server downloads the data.
  • a file transfer method running on a computing device adapted to transfer a file on a computing device to a server and to browse and/or download a file stored on the server, the file
  • the transmission method includes the steps of: obtaining, from a server, one or more first other computing devices in the same local area network as the computing device; and receiving a first download request to download data from the server, and transmitting the first download request to the same local area network
  • One or more first other computing devices if any of the first other computing devices are capable of processing the first download request, downloading data from the first other computing device, otherwise downloading data from the server.
  • a computer program comprising computer readable code which, when executed on a computer, performs the aforementioned file transfer method.
  • a computer readable medium storing the aforementioned computer program is provided.
  • a network storage system comprising: a server; and a plurality of computing devices, each computing device comprising a file transfer device according to the present invention for computing A file on the device is uploaded to the server, and data associated with the file is downloaded from the server/other computing device.
  • the file transfer scheme of the present invention at a computing device, before downloading data from the server, it is first determined whether the file associated with the data is on another computing device in the same local area network as the computing device, and if so, Data is then retrieved from the corresponding files of these other computing devices without sending the request to the server, thereby significantly reducing the user's latency and data throughput, improving the user experience and reducing network transmission.
  • FIG. 1 shows a schematic diagram of a network storage system in accordance with one embodiment of the present invention
  • FIG. 2 shows a schematic diagram of a file transfer device in accordance with one embodiment of the present invention
  • FIG. 3 shows a schematic diagram of a file transfer method in accordance with one embodiment of the present invention.
  • FIG. 4 shows a schematic diagram of a network storage system in accordance with one embodiment of the present invention
  • Figure 5 shows a schematic diagram of a file transfer device in accordance with one embodiment of the present invention
  • Figure 7 shows schematically a block diagram of a server for performing a method according to the invention
  • Fig. 8 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • computing devices 110 and 120 can be any device in the art that can process electronic data, including but not limited to desktop computers, notebook computers, personal digital assistants, smart mobile terminals, tablets, and the like.
  • a modern operating system is typically run in computing devices 110 and 120, utilizing an operating system to manage hardware resources in the computing device.
  • Computing devices 110 and 120 can run various applications on an operating system.
  • File transfer device 200 in the present invention can operate on computing devices 110 and 120 as an application.
  • the implementation of the file transfer device 200 is also different, and the present invention is not limited to the various specific implementations that the file transfer device 200 employs to accommodate different operating systems, but only It is limited by the implementation logic that file transfer device 200 must have to implement the functionality of the present invention.
  • File transfer device 200 is included in any of computing devices 110 and 120 shown in FIG. 1 for file transfer device 200 to operate in a computing device, adapted to transfer files on the computing device to storage server 130 and to browse and/or Or download the file stored on the server 130.
  • the file transfer device 200 includes an upload controller 210 and a download controller 220.
  • the upload controller 210 transmits the files in the local devices of the computing devices 110 and 120 to the storage server 130.
  • Users of computing devices 110 and 120 may frequently transfer unfinished files in the office to storage server 130 when they are frequently moved between the office and the field, and then retrieve the files when they are in the field.
  • the user may need to browse multimedia files on various mobile terminals, and these multimedia files are originally stored in other desktop computers, and then the multimedia controllers need to be uploaded by the upload controller 210 in the desktop computer. Transfer to the storage server.
  • the upload controller 210 generates a corresponding file transfer record while transferring the file to the storage server 130.
  • the upload controller 210 generates a file transfer record each time a file is uploaded, and each file transfer record may include the time of transferring the file, the storage location of the file locally on the computing device, and the storage location on the storage server 130.
  • the file transfer device 200 may further include a storage unit 240 for storing the file transfer record generated by the upload controller 210.
  • the download controller 220 is coupled to the download request generator 230 to receive the generated download request for processing.
  • the download controller 220 processes the download request based on the file transfer record generated by the upload controller 210.
  • the download controller 220 directly obtains the data from the local file of the computing device. Otherwise, the download controller 220 sends a download request to the server 130 to retrieve data from the server 130.
  • the download controller 220 when the data requested by the download request is the entire file, the download controller 220 also generates a file transfer record while downloading the file to the local device, and each file transfer record may include the time for transferring the file.
  • the storage location of the file locally on the computing device and the storage location on the storage server 130, and the like.
  • the user requests to download the same file on the server again, it is also possible to transfer the record according to the file, and directly obtain the file from the local without downloading the file from the server. Since the user may download a file on the server multiple times to different locations on the local device, there may be multiple file transfer records on the storage server with the same storage location but different local storage locations.
  • the download request includes a file storage location on the server 130 associated with the data associated with the download request, and each file transfer record also includes a storage location of the file local to the computing device and the file on the server 130.
  • the corresponding storage location The download controller 220 can perform a query in the file transfer record list to find a file transfer record in which the file storage location on the server matches the file storage location in the download request. If the corresponding record can be found, the download request can be considered to be satisfied by the local file, otherwise the download request is sent to the server 130 for processing by the server 130.
  • the download controller 220 needs to further determine whether the locally stored file is consistent with the file stored on the server 130.
  • the download controller 220 finds the corresponding record in the file transfer record, the file information of the file at the corresponding storage location on the server is obtained from the server 130, and the file information is at the local storage location.
  • the file information of the file is compared to determine whether the locally stored file is consistent with the file stored on the server. If they are consistent, the download request is directly satisfied by the local file; otherwise, the download request is sent to the server 130 by the server 130.
  • the file information may include, for example, the latest modification time of the file, the file size, and/or a hash value such as an MD5 value obtained by hashing the file content.
  • the present invention is not limited to the specific content of the file information, and all information that can be used to determine whether the local file and the corresponding file on the server are consistent is within the scope of the present invention.
  • the download controller 220 may first check whether the latest modification time and size of the file match, and only continue matching the hash value after matching. Calculation and matching, otherwise it can be determined that the local file and the file on the server are inconsistent, no need to compare the hash value.
  • the file transfer device 200 may determine whether a file associated with the data in the download request is uploaded from the computing device to the server before downloading the data from the server, and if so, directly from the computing device The corresponding file is used to obtain data without sending the request to the server, which significantly reduces the user's waiting time and data transfer, improves the user experience and reduces network transmission.
  • the user has a mobile terminal (corresponding to the computing device 110).
  • the user uses the mobile terminal at home, he finds that there is a good music on the network, and then downloads it to the mobile terminal and stores it as a.mp3.
  • the user uploads the file to the "Music" directory on the server 130.
  • the upload controller 210 on the file transfer device 200 generates a file transfer record including the file transfer time, the local directory, and the location "a. Mp3" and the storage location "Music/a.mp3" on the server.
  • the download request generator 230 After a period of time, the user forgets to store "a.mp3" locally, but the user uses the mobile terminal to browse the files on the server, finds the a.mp3 music file, and wants to listen to the music, the user can directly click
  • the file is played online, at this time, the download request generator 230 generates a download request for requesting a.mp3 data, and when the download controller 220 receives the request, it searches for the file transfer record and finds the a.
  • the mp3 file is already stored locally in the mobile terminal, and the download controller 220 directly reads the local a.mp3 file for playback, thereby avoiding unnecessary network transmission and reducing the time for the user to wait for the music to be played.
  • the user experience The user experience.
  • FIG. 3 shows a schematic diagram of a file transfer method 300 in accordance with one embodiment of the present invention, the file transfer method 300 shown in FIG. 3 being adapted to be executed in the computing devices 110 and 120 of FIG. 1 to place files in the computing device Transferred to server 130, as well as browsing and/or downloading files stored on server 130.
  • the file transfer method 300 can be performed by the file transfer device 200 shown in FIG. 2.
  • the file transfer method 300 begins at step S310, where files in the computing device local are transferred to the storage server 130.
  • Users of computing devices 110 and 120 may need to transfer unfinished files in the office to storage server 130, for example, when they are frequently moved between the office and the field, and then retrieve the files when they are in the field.
  • the user may need to browse multimedia files on various mobile terminals that were originally stored in other desktop computers, and then need to transfer the multimedia files to the storage server using the desktop computer.
  • step S310 while the file is transferred to the storage server 130, a corresponding file transfer record is generated.
  • a file transfer record is generated each time a file is uploaded, and each file transfer record may include the time when the file was uploaded, the storage location of the file locally on the computing device, and the storage location on the storage server 130.
  • the generated file transfer record is also stored.
  • the user browses the files stored on the storage server 130 on the computing devices 110 and 120.
  • the computing device obtains the corresponding file storage structure from the storage server 130 (for example, the directory structure of the storage file, the file list in a certain directory, etc.) And presented to the user.
  • the user can select a file and download the file to view.
  • the computing device when the user browses the server file directory as a graphic file, when the user browses the file directory, the computing device presents a thumbnail of the graphic file. .
  • the computing device requests, from the server, the multimedia data that is tailored to the computing device according to the characteristics of the computing device. In the above example, the computing device requests the downloaded data from the server not the file itself, but the data generated based on the contents of the file.
  • a download request to download data from the server is generated according to a user's operation, and the data requested to be downloaded by the download request is associated with a file stored on the server, for example, the data is data of the file itself, or Is the data generated based on the file.
  • the download request typically also includes the location where the associated file is stored on the server so that the server 130 can process the download request accurately.
  • step S320 the generated download request is processed.
  • step S320 the download request is processed in accordance with the file transfer record generated in step S310.
  • the data requested in the download request can be obtained from the file local to the computing device according to the file transfer record (ie, when associated with the local file)
  • step S320 the data is directly obtained from the local file of the computing device. Otherwise, a download request is sent to the server 130 to retrieve data from the server 130.
  • step S320 when the data requested by the download request is the entire file, in step S320, when the download request is completed to download the file to the local, a file transfer record is also generated, and each file transfer record may include the file transfer file.
  • the user requests to download the same file on the server again, it is also possible to transfer the record according to the file, and directly obtain the file from the local without downloading the file from the server. Since the user may download a file on the server multiple times to different locations on the local device, there may be multiple file transfer records on the storage server with the same storage location but different local storage locations.
  • the download request includes a file storage location on the server 130 associated with the data associated with the download request, and each file transfer record also includes a storage location of the file local to the computing device and the file on the server 130. The corresponding storage location. Therefore, in step S320, a query can be made in the file transfer record list to find a file transfer record in which the storage location of the file on the server matches the file storage location in the download request. If you can find the corresponding record, The download request can then be considered to be satisfied by the local file, otherwise the download request is sent to the server 130 for processing by the server 130.
  • step S320 it is necessary to further determine whether the locally stored file is consistent with the file stored on the server 130.
  • the file information of the file at the corresponding storage location on the server is obtained from the server 130, and the file information and the file information of the file at the local storage location are obtained. A comparison is made to determine whether the locally stored file is consistent with the file stored on the server.
  • the download request is directly satisfied by the local file; otherwise, the download request is sent to the server 130 for processing by the server 130. It should be understood that, since there may be multiple file transfer records on the storage server with the same storage location but different local storage locations, when a query is found in the file transfer record list, when a certain transfer record is found to be unsatisfactory, The search should continue from the list.
  • the file information may include, for example, the latest modification time of the file, the file size, and/or a hash value such as an MD5 value obtained by hashing the file content.
  • the present invention is not limited to the specific content of the file information, and all information that can be used to determine whether the local file and the corresponding file on the server are consistent is within the scope of the present invention.
  • step S320 since calculating the file hash value requires too much computing time of the server and the computing device, in step S320, it may first check whether the latest modification time and size of the file match, and only continue to perform hashing after matching. The value is calculated and matched. Otherwise, it can be determined that the local file and the file on the server are inconsistent, so there is no need to compare the hash values.
  • the file transfer method 300 may determine whether a file associated with the data in the download request is uploaded from the computing device to the server before downloading the data from the server, and if so, directly from the computing device The corresponding file is used to obtain data without sending the request to the server, which significantly reduces the user's waiting time and data transfer, improves the user experience and reduces network transmission.
  • FIG. 4 shows a schematic diagram of a network storage system 400, as shown in FIG. 4, which includes a storage server 440 and a plurality of computing devices 410-430 and the like, in accordance with an embodiment of the present invention.
  • Computing devices 410-430 and the like are all coupled to storage server 440 via a network, wherein computing devices 410 and 420 are also in the same local area network.
  • a file transfer device 500 can be included in each computing device.
  • computing devices 410-430 can be any device in the art that can process electronic data, including but not limited to desktop computers, notebook computers, personal digital assistants, smart mobile terminals, tablets, and the like.
  • a modern operating system is typically run in computing devices 410-430, utilizing an operating system to manage hardware resources in the computing device.
  • Computing devices 410-430 can run various applications on an operating system.
  • File transfer device 500 in the present invention can operate on computing devices 410 and 420 as an application.
  • the file transfer device 500 is implemented differently, and the present invention is not limited to the various specific implementations that the file transfer device 500 employs to accommodate different operating systems, but only It is limited by the implementation logic that file transfer device 500 must have to implement the functionality of the present invention.
  • Figure 5 shows a schematic diagram of a file transfer device in accordance with one embodiment of the present invention.
  • File transfer device 500 is included in any of computing devices 410-430 shown in FIG. 1 for operation in a computing device to browse and/or download files stored on server 440 and to transfer files on the computing device Stored in storage server 440.
  • file transfer device 500 includes a proximity device identifier 510.
  • the proximity device identifier 510 is used to find a computing device on which the file transfer device 500 resides (hereinafter, the file transfer device 500 shown in FIG. 2 resides on the computing device 410 of FIG. 1 for description, but It should be understood that the above description is only illustrative, and not limiting of the invention, other computing devices in the same local area network.
  • Proximity device recognizer 510 can use a variety of ways to find other computing devices that are in the same local area network. For example, the proximity device identifier 510 can be broadcast in the local area network using the UDP protocol, and other computing devices that also have neighboring device identifiers can reply to the broadcast, thereby establishing communications and identifying each other.
  • the proximity device identifier 510 can periodically communicate with the storage server 440.
  • the storage server 440 is in communication with the various computing devices 410-430, information is obtained as to which Internet computing address the respective computing devices 410-430 are connected to the storage server 440. Since different computing devices in the same local area network typically connect to the Internet through the same IP address, when storage server 440 finds that multiple computing devices (such as computing devices 410 and 420) are connected to storage server 440 using the same IP address, You can think that these multiple computing devices are in the same LAN.
  • the storage server 440 can then interact with the computing devices to obtain an IP address of the computing device in the local area network (this can be accomplished by sending an instruction to the computing device for the computing device to send its IP address in the local area network to the server 440).
  • the present invention is not limited thereto, and all embodiments in which the IP address of the computing device local area network can be obtained are within the scope of the present invention.
  • the storage server 440 transmits the obtained local area network IP address of the computing device to the neighboring device identifier 510 of the other computing device in the same local area network, thereby making the neighboring device aware
  • the packet 510 learns one or more other computing devices in the same local area network as the computing device 410.
  • the file transfer device 500 when the user wants to play a multimedia file on a certain server, the file transfer device 500 requests the multimedia data that is tailored to be suitable for the computing device from the server according to the characteristics of the computing device in which it is located. In the above example, the file transfer device 500 requests the downloaded data from the storage server 440 not the file itself, but the data generated based on the file contents.
  • file transfer device 500 includes a download request generator 520.
  • the download request generator 520 generates a download request to download data from the storage server according to an operation of the user, and the data requested to be downloaded by the download request is associated with a file stored on the storage server, for example, the data is data of the file itself, or The data generated from this file.
  • the download request typically also includes a storage location for the associated file on the storage server so that the storage server 440 can process the download request accurately.
  • the file transfer device 500 includes a download controller 530.
  • the download controller 530 is coupled to the download request generator 520 to receive the generated download request for processing.
  • the download controller 530 will obtain information from the neighboring device identifier 510 from other computing devices (computing devices 420) in the same local area network as the computing device 410, and if there are no other computing devices, send the download request to the storage server 440.
  • the download controller 530 sends a download request to each of the other computing devices for processing. If any of the other computing devices returns a message that the download request cannot be processed, the download controller 530 sends the download request to the server 440 to download the data. If there are other computing devices capable of processing the download request, the download controller 530 downloads data from the other computing device.
  • the download controller 530 can employ a peer-to-peer network transmission. Ways to download data. That is, the download controller 530 may divide the download request into multiple download requests, each download request is used to request to download a part of the data to be downloaded, and send the download requests to one other computing device to obtain corresponding data. . Subsequently, the download controller 530 combines the acquired data to complete the processing of the original download request.
  • the file transfer device 500 is used to upload files local to the computing device 410 to the storage server 440 in addition to browsing and/or downloading files in the storage server 440.
  • the file transfer device 500 includes an upload controller 540.
  • Upload controller 540 uploads files in computing device 410 local to storage server 440. Users of computing devices move frequently between the office and the field, for example When the office is working, it is necessary to upload the unfinished files in the office to the storage server 440, and then obtain the file when the office is in the field.
  • the user may need to browse multimedia files on various mobile terminals, and the multimedia files are originally stored in other desktop computers. In this case, the multimedia controllers need to be uploaded by the upload controller 540 in the desktop computer. Upload to the storage server.
  • the upload controller 540 generates a corresponding file upload record while uploading the file to the storage server 440.
  • the upload controller 540 generates a file upload record each time a file is uploaded, and each file upload record may include the time when the file was uploaded, the storage location of the file locally on the computing device, and the storage location on the storage server 440.
  • the file transfer device 500 may further include a storage unit 550 for storing a file upload record generated by the upload controller 540.
  • file transfer device 500 also includes a download request processor 560.
  • the download request processor 560 receives download requests from other computing devices and processes them.
  • the download request processor 560 determines whether the data in the download request is associated with a file local to the computing device based on the file upload record generated by the upload controller 540, and if so, returns a message capable of processing the download request to the send request.
  • the computing device then retrieves data from files local to the computing device and returns the acquired data to other computing devices. If not associated, the download request handler 560 returns a message that the download request could not be processed.
  • the download request includes a file storage location on the server 440 for the file associated with the data in the download request, and each file upload record also includes a storage location of the file local to the computing device and the file on the server 440. The corresponding storage location.
  • the download request processor 560 can query the file upload record list to find a file upload record in which the file is stored on the server and the file storage location in the download request matches. If the corresponding record can be found, the download request can be considered to be satisfied by the local file, otherwise a message that cannot process the download request is returned.
  • the download request processor 560 needs to further determine whether the locally stored file is consistent with the file stored on the server 440.
  • the download request processor 560 finds the corresponding record in the file upload record, the file information of the file at the corresponding storage location on the server is obtained from the server 440, and the file information and the local storage location are obtained.
  • the file information of the file is compared to determine whether the locally stored file is consistent with the file stored on the server. If they are consistent, the download request is directly satisfied by the local file; otherwise, the message that cannot process the download request is returned.
  • the download request processor 560 may first check whether the latest modification time and size of the file match, and only continue to hash after matching. The calculation and matching of values, otherwise it can be determined that the local file and the file on the server are inconsistent, so there is no need to compare the hash values.
  • the file transfer device 500 may determine whether the file associated with the data is on another computing device in the same local area network as the computing device before downloading the data from the server, and if so, from the other computing devices The corresponding file to obtain data without sending the request to the server, thereby significantly reducing the user's waiting time and data transmission, improving the user experience and reducing network transmission.
  • a user has at home a mobile terminal (corresponding to computing device 410) and a notebook computer (corresponding to computing device 420) that are connected to the Internet through the same router at home.
  • a mobile terminal corresponding to computing device 410
  • a notebook computer corresponding to computing device 420
  • the user uses the mobile terminal at home, he finds that there is a good music on the network, so it is downloaded to the mobile terminal and stored as a.mp3.
  • the office computer corresponding to computing device 430
  • the user uploads the file to the "Music" directory on storage server 440, at which point upload controller 540 on file transfer device 500 on the mobile terminal
  • a file transfer record is generated, including the file transfer time, the local directory and location "a.mp3", and the storage location "music/a.mp3" on the server.
  • the user uses the notebook computer to browse the files on the server at home, finds the a.mp3 music file, and wants to listen to the music.
  • the user can directly click the file to play online.
  • the proximity device identifier 510 recognizes that the mobile terminal and the notebook are in the same local area network, and the download request generator 520 generates a download request for requesting a.mp3 data, and the download controller 530 receives the request.
  • other devices in the same local area network that is, the mobile terminal, are first acquired from the neighboring device device 410, and the download request is sent to the mobile terminal.
  • the download request processor 560 in the mobile terminal searches in the file transfer record and finds that the a.mp3 file has been stored locally in the mobile terminal, so the download request processor 560 directly reads the local a.mp3 of the mobile terminal.
  • the data is returned to the download controller 530 of the notebook, thereby avoiding unnecessary network transmissions, while also reducing the time the user waits to play music, enhancing the user experience.
  • FIG. 6 shows a schematic diagram of a file transfer method 600 in accordance with one embodiment of the present invention, the file transfer method 600 shown in FIG. 6 being adapted to be executed in the computing devices 410-430 of FIG. 4 to place files in the computing device Uploaded to storage server 440, as well as browsing and/or downloading files stored on storage server 440.
  • the file transfer method 600 can be performed by the file transfer device 500 shown in FIG.
  • the UDP protocol can be used for broadcasting in the local area network, and other computing devices that also have neighboring device identifiers can reply to the broadcast, thereby establishing communication and mutually identifying each other.
  • the storage server 440 can then interact with the computing devices to obtain an IP address of the computing device in the local area network (this can be by sending an instruction to the computing device for the computing device to send its IP address in the local area network to the storage server 440) Implementation, but the invention is not limited thereto, and all embodiments in which the computing device local area network IP address can be obtained are within the scope of the present invention.
  • Storage server 440 transmits the obtained local area network IP address of the computing device to other computing devices in the same local area network such that each computing device learns one or more other computing devices in the same local area network as computing device 110.
  • the user browses the file stored on the storage server 440 through the computing device 410.
  • the computing device 410 obtains a corresponding file storage structure (for example, a directory structure of the storage file, a file list in a certain directory, etc.) from the storage server 440. And presented to the user.
  • the user can select a file and download the file to view.
  • the server file directory as a graphic file
  • the thumbnail of the graphic file is presented when the user browses the file directory.
  • the computing device requests, from the server, the multimedia data that is tailored to the computing device according to the characteristics of the computing device.
  • the computing device requests the downloaded data from the server not the file itself, but the data generated based on the contents of the file.
  • the file transfer method further includes a step S620 of receiving a download request for generating data to be downloaded from the server according to a user's operation.
  • the data requested for download by the download request is associated with a file stored on the server, for example, the data is data of the file itself, or data generated according to the file.
  • the download request typically also includes a storage location for the associated file on the server so that the server 440 can process the download request accurately.
  • step S620 it is checked whether the information of other computing devices (the computing device 120) in the same local area network as the computing device 410 is acquired in step S610. If no other computing device exists, the download request is sent to the storage server. 440 to download data.
  • step S620 a download request is sent to each of the other computing devices for processing. If any other computing device returns a message that cannot process the download request, the download request is sent to the storage server 440 to download the data. If there are other computing devices capable of processing the download request, the download controller 530 downloads the data from the other computing device.
  • the data may be downloaded in a manner similar to peer-to-peer network transmission in step S620. That is, the download request can be divided into multiple download requests, each download request is used to request to download a part of the data to be downloaded, and the download requests are separately sent to one other computing device to obtain corresponding data. Subsequently, the acquired data is combined in step S620 to complete the processing of the original download request.
  • the method 600 is used to upload files local to the computing device to the storage server 440 in addition to browsing and/or downloading files in the storage server 440.
  • the file transfer method includes step S630.
  • step S630 the files in the local area of the computing device 410 are uploaded to the storage server 440.
  • the unfinished file in the office needs to be uploaded to the storage server 440, and then the file is acquired again when the office is in the field.
  • the user may need to browse multimedia files on various mobile terminals, and the multimedia files are originally stored in other desktop computers, and the desktop computers are required to upload the multimedia files to the storage server.
  • step S630 a corresponding file upload record is generated while the file is uploaded to the storage server 440.
  • a file upload record is generated each time a file is uploaded, and each file upload record may include the time of uploading the file, the storage location of the file locally on the computing device, and the storage location on the storage server 440.
  • step S630 may further comprise the step of storing the generated file upload record.
  • file transfer method 600 also includes step S640.
  • a download request from another computing device is received and processed in step S640.
  • step S640 it is determined whether the data in the download request is associated with a file local to the computing device according to the file upload record generated in step S630, and if associated, returns a message capable of processing the download request to the sending request.
  • the computing device then retrieves data from files local to the computing device and returns the acquired data to other computing devices. If not associated, returns a message that cannot process the download request.
  • the download request includes a file storage location on the server 440 for the file associated with the data in the download request, and each file upload record also includes a storage location of the file local to the computing device and the file on the server 440. The corresponding storage location.
  • a query may be made in the file upload record list to find a file upload record in which the storage location of the file on the server matches the file storage location in the download request. If the corresponding record can be found, the download request can be considered to be satisfied by the local file, otherwise a message that cannot process the download request is returned.
  • Comparing the file information of the file at the corresponding storage location on the server comparing the file information with the file information of the file at the local storage location to determine whether the locally stored file and the file stored on the server are consistent, if they are consistent, directly A local file to satisfy the download request; otherwise, a message that cannot process the download request is returned.
  • the file information may include, for example, the latest modification time of the file, the file size, and/or a hash value such as an MD5 value obtained by hashing the file content.
  • the present invention is not limited to the specific content of the file information, and all information that can be used to determine whether the local file and the corresponding file on the server are consistent is within the scope of the present invention.
  • step S640 since calculating the file hash value requires too much computing time of the server and the computing device, in step S640, it may first check whether the latest modification time and size of the file match, and only continue to perform hashing after matching. The calculation and matching of values, otherwise it can be determined that the local file and the file on the server are inconsistent, so there is no need to compare the hash values.
  • the file transfer method 600 may determine whether a file associated with the data is on another computing device in the same local area network as the computing device before downloading the data from the server, and if so, from the other computing devices The corresponding file to obtain data without sending the request to the server, thereby significantly reducing the user's waiting time and data transmission, improving the user experience and reducing network transmission.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components in a client or server in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 7 illustrates an electronic device in which the above method in accordance with the present invention can be implemented.
  • the electronic device typically includes a processor 710 and a computer program product or computer readable medium in the form of a memory 730.
  • the memory 730 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 730 has a memory space 750 for program code 751 for performing any of the method steps described above.
  • storage space 750 for program code can include various program code 751 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 730 in the server of FIG.
  • Program code can be an example If compressed in a suitable form.
  • the storage unit includes computer readable code 751', code that can be read by a processor, such as 710, which, when executed by a server, causes the server to perform various steps in the methods described above.

Abstract

本发明公开了一种文件传输设备,该文件传输设备在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输设备包括:上传控制器,适于将计算设备本地中的文件传输到服务器上并生成相应的文件传输记录;下载控制器,适于接收从服务器下载数据的下载请求,根据上传控制器生成的文件传输记录来确定该下载请求中的数据是否与计算设备本地的文件相关联,如果是,则从计算设备本地的文件获取数据;如果不是,则从服务器下载数据。本发明还公开一种相应的文件传输方法以及相应的网络存储系统。

Description

一种文件传输方法、设备和系统 技术领域
本发明涉及计算机和互联网领域,尤其涉及在网络中的数据同步技术。
背景技术
随着互联网络和计算机的普及,人们在生活和工作中一般都会拥有多个计算设备,例如,在工作单位至少会使用一台计算机,而在家中还会使用另一台计算机,而在外出或者娱乐时会使用各种移动计算设备如平板或者智能手机等。为了统一管理这些计算设备中的文件,出现了网络存储系统。一个典型的网络存储系统可以包括存储服务器和多个计算终端。每个计算终端经由网络与存储服务器进行通信。计算终端可以把本地文件传输到服务器上来集中存储。当用户使用其他计算终端时,可以通过这些计算终端来浏览服务器上存储的文件,并且可以下载到计算终端本地来使用。当网络速度越来越快时,这种网络存储方式越来越受到用户的欢迎。
但是,在这种网络存储方式中,每当用户要在计算终端上查看服务器上的文件内容时,如果该文件内容未例如缓存在计算终端上(例如,计算终端先前从服务器上获取过该文件并进行了缓存),则每次都需要从服务器获取该文件内容。随着媒体内容数字化的发展,多媒体内容的分辨率越来越高,文件内容也越来越大,此时从服务器下载这些数据耗费的时间和网络流量也越来越大,用户为了查看文件等待的时间也会变长。因此,迫切需要一种可以提高从服务器下载数据的效率的文件传输方式以提高用户体验和网络利用率。
发明内容
为此,本发明提供一种新的方案以力图解决或者至少缓解上面存在的问题。
根据本发明的一个方面,提供了一种文件传输设备,该文件传输设备在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输设备包括:上传控制器,适于将计算设备本地中的文件传输到服务器上并生成相应的文件传输记录;下载控制器,适于接收从服务器下载数据的下载请求,根据上传控制器生成的文件传输记录来确定该下载请求中的数据是否与计算设备本地的文件相关联,如果是,则从计算设备本地的文件获取数据;如果不是,则从服务器下载数据。
根据本发明的另一个方面,提供了一种文件传输方法,该文件传输方法在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输方法包括步骤:将计算设备本地中的文件传输 到服务器上并生成相应的文件传输记录;接收从服务器下载数据的下载请求,根据所生成的文件传输记录来确定该下载请求中的数据是否与所述计算设备本地的文件相关联,如果是,则从计算设备本地的文件获取数据;如果不是,则从服务器下载数据。
根据本发明的再一个方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算机上运行时,将执行前述的文件传输方法。
根据本发明的又一个方面,提供了一种计算机可读介质,其中存储了前述的计算机程序。
根据本发明的又一个方面,提供了一种网络存储系统,包括:服务器;以及多个计算设备,每个计算设备包括根据本发明的文件传输设备,以便将计算设备上的文件传输到服务器中,以及浏览在服务器上的文件。
根据本发明的文件传输方案,在某个计算设备处,从服务器下载数据之前,先判断下与该数据相关联的文件是否是从该计算设备上传到服务器上的,如果是,则直接从该计算设备的相应文件来获取数据,而不用将请求发送给服务器,从而显著降低了用户的等待时间和数据传输量,提高了用户体验并减少了网络传输。
根据本发明的一个方面,提供了一种文件传输设备,该文件传输设备在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输设备包括:邻近设备识别器,适于从服务器获取与该计算设备在同一局域网中的一个或者多个第一其它计算设备;以及下载控制器,适于接收从服务器下载数据的第一下载请求,将第一下载请求发送给同一局域网中的一个或者多个第一其它计算设备,如果任一个第一其它计算设备能够处理该第一下载请求,则从该第一其它计算设备下载数据,否则从服务器下载数据。
根据本发明的另一个方面,提供了一种文件传输方法,该文件传输方法在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输方法包括步骤:从服务器获取与该计算设备在同一局域网中的一个或者多个第一其它计算设备;以及接收从服务器下载数据的第一下载请求,将第一下载请求发送给同一局域网中的一个或者多个第一其它计算设备,如果任一个第一其它计算设备能够处理该第一下载请求,则从该第一其它计算设备下载数据,否则从服务器下载数据。
根据本发明的再一个方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算机上运行时,将执行前述的文件传输方法。
根据本发明的又一个方面,提供了一种计算机可读介质,其中存储了前述的计算机程序。
根据本发明的又一个方面,提供了一种网络存储系统,包括:服务器;以及多个计算设备,每个计算设备包括根据本发明的文件传输设备,以便将计算 设备上的文件上传到所述服务器中,以及从所述服务器/其它计算设备下载与文件相关联的数据。
根据本发明的文件传输方案,在某个计算设备处,从服务器下载数据之前,先判断下与该数据相关联的文件是否在与该计算设备在同一局域网中的其它计算设备上,如果是,则从这些其它计算设备的相应文件来获取数据,而不用将请求发送给服务器,从而显著降低了用户的等待时间和数据传输量,提高了用户体验并减少了网络传输。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明一个实施例的网络存储系统的示意图;
图2示出了根据本发明一个实施例的文件传输设备的示意图;
图3示出了根据本发明一个实施例的文件传输方法的示意图。
图4示出了根据本发明一个实施例的网络存储系统的示意图;
图5示出了根据本发明一个实施例的文件传输设备的示意图;
图6示出了根据本发明一个实施例的文件传输方法的示意图;以及
图7示意性地示出了用于执行根据本发明的方法的服务器的框图;以及
图8示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
图1示出了根据本发明一个实施例的网络存储系统100的示意图,如图1所示,网络存储系统100包括存储服务器130和多个计算设备110和120等。计算设备110和120通过网络与存储服务器130相连接。每个计算设备中可以驻留文件传输设备200。可以通过文件传输设备200将计算设备中的文件传输到存储服务器130中,并且可以通过其来浏览和/或下载存储服务器130中存储的文件。这样,存储服务器130提供了一个集中的存储空间。用户可以利用多个计算设备中的任何一个来查看在存储服务器30上的文件,而且当用户认 为文件需要在多个计算设备上浏览时,则可以将该文件传输到存储服务器130上。
在本发明中,计算设备110和120可以是本领域任何可以处理电子数据的设备,包括但不限于桌面型计算机、笔记本式计算机、个人数字助理、智能移动终端、平板电脑等。计算设备110和120中通常运行现代的操作系统,利用操作系统来管理计算设备中的硬件资源。计算设备110和120可以在操作系统上运行各种应用。本发明中的文件传输设备200可以作为一种应用而在计算设备110和120上运行。当然取决于在计算设备上运行的操作系统的不同,文件传输设备200的实现方式也有所不同,本发明不受限于文件传输设备200为了适应不同操作系统才采用的各种特定实现,而仅仅受限于文件传输设备200实现本发明的功能而必须具有的实现逻辑。
图2示出了根据本发明一个实施例的文件传输设备的示意图。文件传输设备200包含在图1所示的计算设备110和120的任一个中,用于文件传输设备200在计算设备中运行,适于将计算设备上的文件传输到存储服务器130以及浏览和/或下载服务器130上存储的文件。
如图2所示,文件传输设备200包括上传控制器210和下载控制器220。上传控制器210将计算设备110和120本地中的文件传输到存储服务器130上。计算设备110和120的用户会例如在办公室和外地之间频繁移动办公时,会需要将办公室中未完成的文件传输到存储服务器130上,然后在外地办公时再获取该文件。另外,在一个示例中,用户可能在需要在各种移动终端上浏览多媒体文件,而这些多媒体文件原先存储在其它桌面计算机中,此时就需要利用桌面计算机中的上传控制器210将这些多媒体文件传输到存储服务器上。
上传控制器210在将文件传输到存储服务器130上的同时,会生成相应的文件传输记录。上传控制器210每上传一个文件就会生成一条文件传输记录,每条文件传输记录可以包括传输文件的时间、文件在计算设备本地的存储位置以及在存储服务器130上的存储位置等。可选地,文件传输设备200还可以包括存储单元240,用于存储上传控制器210生成的文件传输记录。
用户在计算设备110和120上运行文件传输设备200以浏览在存储服务器130上存储的文件,此时文件传输设备200会从存储服务器130获取相应的文件存储结构(例如存储文件的目录结构,某个目录中的文件列表等),并呈现给用户。用户可以选择某个文件并下载该文件来查看,在一个例子中,当用户浏览的服务器文件目录下为图形文件时,在用户浏览该文件目录时,文件传输设备200就会呈现该图形文件的缩略图。而在另一个例子中,当用户要播放某个服务器上的多媒体文件时,文件传输设备200会根据所处的计算设备的特征,从服务器请求经过裁剪后、适于该计算设备的多媒体数据。在上面的示例中,文件传输设备200从服务器请求下载的并非文件本身的数据,而是根据文件内容而生成的数据。
因此,可选地,文件传输设备200包括下载请求生成器230。下载请求生成器230根据用户的操作而生成要从服务器下载数据的下载请求,该下载请求所请求下载的数据与服务器上存储的文件相关联,例如数据为该文件本身的数据,或者为根据该文件而生成的数据。下载请求通常还包括要相关文件在服务器上的存储位置,这样服务器130就可以准确地处理该下载请求。
下载控制器220耦接到下载请求生成器230以接收生成的下载请求进行处理。下载控制器220根据上传控制器210生成的文件传输记录来处理下载请求。当根据文件传输记录,下载请求中所请求的数据可以从计算设备本地的文件中获取时(即与本地文件相关联时),则下载控制器220直接从计算设备的本地文件来获取该数据,否则,下载控制器220将下载请求发送到服务器130以便从服务器130获取数据。
可选地,当下载请求所请求的数据是整个文件时,下载控制器220在完成下载请求将文件下载到本地的同时,也生成一条文件传输记录,每条文件传输记录可以包括传输文件的时间、文件在计算设备本地的存储位置以及在存储服务器130上的存储位置等。这样,当用户再次请求下载在服务器上的相同文件时,也可以根据该文件传输记录、直接从本地获取文件而不用从服务器下载文件。由于用户可能将服务器上的一个文件多次分别下载到本地设备的不同位置处,因此可能存在多条存储服务器上的存储位置相同、但是本地存储位置不同的文件传输记录。
在一个实施方式中,下载请求包括与下载请求中的数据相关联的文件在服务器130上的文件存储位置,而每条文件传输记录也包括文件在计算设备本地的存储位置以及文件在服务器130上的相应存储位置。下载控制器220可以在文件传输记录列表中进行查询,以查找文件在服务器上的存储位置与下载请求中的文件存储位置相匹配的文件传输记录。如果能够查找到相应记录,则可以认为该下载请求可以由本地文件来满足,否则就将该下载请求发送到服务器130以便由服务器130来处理该下载请求。
进一步地,由于在把文件传输到服务器上之后,用户可以通过其它计算设备从服务器获取该文件、进行编辑然后再上传。因此计算设备本地存储的文件不一定是最新的文件,为此,下载控制器220需要进一步确定本地存储的文件是否和服务器130上存储的文件是一致的。在一种实现方式中,在下载控制器220在文件传输记录中查找到相应的记录时,从服务器130获取在服务器上相应存储位置处的文件的文件信息,将该文件信息与本地存储位置处的文件的文件信息进行比较以确定本地存储的文件和服务器上存储的文件是否一致,如果一致,则直接由本地文件来满足下载请求;否则,还是将该下载请求发送到服务器130,由服务器130来处理。应当理解的是,由于可能存在多条存储服务器上的存储位置相同、但是本地存储位置不同的文件传输记录,所以在文件传输记录列表中进行查询时,当发现某个传输记录不符合要求时,应当从列表中 继续进行查找。
文件信息可以包括例如文件的最新修改时间、文件大小和/或对文件内容进行散列计算后得到的MD5值等哈希值等。本发明不受限于文件信息的具体内容,所有可以用于确定本地文件和服务器上的相应文件是否一致的信息都在本发明的保护范围之内。
另外,可选地,由于计算文件哈希值需要耗费服务器和计算设备太多的计算时间,下载控制器220可以首先检查文件的最新修改时间和大小是否匹配,只有匹配了才继续进行哈希值的计算和匹配,否则则可以确定本地文件和服务器上的文件是不一致的,就不用进行哈希值的比较。
根据本发明的文件传输设备200可以从服务器下载数据之前,先判断与与下载请求中的数据相关联的文件是否是从该计算设备上传到服务器上的,如果是,则直接从该计算设备的相应文件来获取数据,而不用将请求发送给服务器,从而显著降低了用户的等待时间和数据传输量,提高了用户体验并减少了网络传输。
举例来说,用户具有一个移动终端(对应于计算设备110),用户在家里使用移动终端时,发现网络上有个好的音乐,于是就下载到了移动终端上并存储为a.mp3。用户将该文件上传到服务器130上的“音乐”目录下,此时文件传输设备200上的上传控制器210会生成一条文件传输记录,记录内容包括文件传输时间、本地的目录及位置“a.mp3”以及在服务器上的存储位置“音乐/a.mp3”。在过了一段时间之后,用户忘记了在本地存储有“a.mp3”,但是用户利用该移动终端来浏览服务器上的文件,发现a.mp3音乐文件,并且想收听该音乐,用户可以直接点击该文件以进行在线播放,此时下载请求生成器230会生成请求a.mp3数据的下载请求,而下载控制器220在接收到该请求时,会从文件传输记录中进行查找,发现该a.mp3文件在移动终端本地已经存储了,则下载控制器220会直接读取本地a.mp3的文件来进行播放,从而避免了不必要的网络传输,同时还减少了用户等待播放音乐的时间,增强了用户体验。
图3示出了根据本发明一个实施方法的文件传输方法300的示意图,图3所示的文件传输方法300适于在图1中的计算设备110和120中执行,以便将计算设备中的文件传输到服务器130中,以及浏览和/或下载服务器130上存储的文件。根据一个实施例,该文件传输方法300可以由图2所示的文件传输设备200来执行。
文件传输方法300始于步骤S310,其中将计算设备本地中的文件传输到存储服务器130上。计算设备110和120的用户会例如在办公室和外地之间频繁移动办公时,需要将办公室中未完成的文件传输到存储服务器130上,然后在外地办公时再获取该文件。在另一个示例中,用户可能在需要在各种移动终端上浏览多媒体文件,而这些多媒体文件原先存储在其它桌面计算机中,此时就需要利用桌面计算机将这些多媒体文件传输到存储服务器上。
在步骤S310中,在将文件传输到存储服务器130上的同时,会生成相应的文件传输记录。每上传一个文件就会生成一条文件传输记录,每条文件传输记录可以包括上传文件的时间、文件在计算设备本地的存储位置以及在存储服务器130上的存储位置等。可选地,在步骤S310中,还存储所生成的文件传输记录。
用户在计算设备110和120上浏览在存储服务器130上存储的文件,此时计算设备会从存储服务器130获取相应的文件存储结构(例如存储文件的目录结构,某个目录中的文件列表等),并呈现给用户。用户可以选择某个文件并下载该文件来查看,在一个例子中,当用户浏览的服务器文件目录下为图形文件时,在用户浏览该文件目录时,计算设备就会呈现该图形文件的缩略图。而在另一个例子中,当用户要播放某个服务器上的多媒体文件时,计算设备会根据所处的计算设备的特征,从服务器请求经过裁剪后、适于该计算设备的多媒体数据。在上面的示例中,计算设备从服务器请求下载的并非文件本身的数据,而是根据文件内容而生成的数据。
因此,在计算设备中,会根据用户的操作而生成要从服务器下载数据的下载请求,该下载请求所请求下载的数据与服务器上存储的文件相关联,例如数据为该文件本身的数据,或者为根据该文件而生成的数据。下载请求通常还包括要相关文件在服务器上的存储位置,这样服务器130就可以准确地处理该下载请求。
随后,在步骤S320中,对所生成的下载请求进行处理。在步骤S320中,根据步骤S310生成的文件传输记录来处理下载请求。当根据文件传输记录,下载请求中所请求的数据可以从计算设备本地的文件中获取时(即与本地文件相关联时),则在步骤S320中,直接从计算设备的本地文件来获取该数据,否则,将下载请求发送到服务器130以便从服务器130获取数据。
可选地,当下载请求所请求的数据是整个文件时,在步骤S320中,在完成下载请求将文件下载到本地的同时,也生成一条文件传输记录,每条文件传输记录可以包括传输文件的时间、文件在计算设备本地的存储位置以及在存储服务器130上的存储位置等。这样,当用户再次请求下载在服务器上的相同文件时,也可以根据该文件传输记录、直接从本地获取文件而不用从服务器下载文件。由于用户可能将服务器上的一个文件多次分别下载到本地设备的不同位置处,因此可能存在多条存储服务器上的存储位置相同、但是本地存储位置不同的文件传输记录。
在一个实施方式中,下载请求包括与下载请求中的数据相关联的文件在服务器130上的文件存储位置,而每条文件传输记录也包括文件在计算设备本地的存储位置以及文件在服务器130上的相应存储位置。因此,在步骤S320中,可以在文件传输记录列表中进行查询,以查找文件在服务器上的存储位置与下载请求中的文件存储位置相匹配的文件传输记录。如果能够查找到相应记录, 则可以认为该下载请求可以由本地文件来满足,否则就将该下载请求发送到服务器130以便由服务器130来处理该下载请求。
进一步地,由于在把文件传输到服务器上之后,用户可以通过其它计算设备从服务器获取该文件、进行编辑然后再上传。因此计算设备本地存储的文件不一定是最新的文件,为此,在步骤S320中,需要进一步确定本地存储的文件是否和服务器130上存储的文件是否是一致的。在一种实现方式中,在文件传输记录中查找到相应的记录时,从服务器130获取在服务器上相应存储位置处的文件的文件信息,将该文件信息与本地存储位置处的文件的文件信息进行比较以确定本地存储的文件和服务器上存储的文件是否一致,如果一致,则直接由本地文件来满足下载请求;否则,还是将该下载请求发送到服务器130,由服务器130来处理。应当理解的是,由于可能存在多条存储服务器上的存储位置相同、但是本地存储位置不同的文件传输记录,所以在文件传输记录列表中进行查询时,当发现某个传输记录不符合要求时,应当从列表中继续进行查找。
文件信息可以包括例如文件的最新修改时间、文件大小和/或对文件内容进行散列计算后得到的MD5值等哈希值等。本发明不受限于文件信息的具体内容,所有可以用于确定本地文件和服务器上的相应文件是否一致的信息都在本发明的保护范围之内。
另外,可选地,由于计算文件哈希值需要耗费服务器和计算设备太多的计算时间,在步骤S320中,可以首先检查文件的最新修改时间和大小是否匹配,只有匹配了才继续进行哈希值的计算和匹配,否则则可以确定本地文件和服务器上的文件是不一致的,就不用进行哈希值的比较。
根据本发明的文件传输方法300可以从服务器下载数据之前,先判断与与下载请求中的数据相关联的文件是否是从该计算设备上传到服务器上的,如果是,则直接从该计算设备的相应文件来获取数据,而不用将请求发送给服务器,从而显著降低了用户的等待时间和数据传输量,提高了用户体验并减少了网络传输。
图4示出了根据本发明一个实施例的网络存储系统400的示意图,如图4所示,网络存储系统400包括存储服务器440和多个计算设备410-430等。计算设备410-430等都通过网络与存储服务器440相连接,其中计算设备410和420还处于同一个局域网中。随着移动互联网的发展,在家庭中,一种常见的情况是,除了传统的计算机之外,还通常有多个具有强大计算性能的智能移动终端,它们会通过家庭的局域网而连接到互联网上,并进而与存储服务器440进行通信。每个计算设备中可以包括文件传输设备500。可以通过文件传输设备500来浏览和/或下载存储服务器440中存储的文件,而且还可以通过其将计算设备中的文件上传到存储服务器440中。这样,存储服务器440提供了一 个集中的存储空间。用户可以利用多个计算设备中的任何一个来查看在存储服务器440上的文件,而且当用户认为文件需要在多个计算设备上浏览时,则可以将该文件上传到存储服务器440上。
在本发明中,计算设备410-430可以是本领域任何可以处理电子数据的设备,包括但不限于桌面型计算机、笔记本式计算机、个人数字助理、智能移动终端、平板电脑等。计算设备410-430中通常运行现代的操作系统,利用操作系统来管理计算设备中的硬件资源。计算设备410-430可以在操作系统上运行各种应用。本发明中的文件传输设备500可以作为一种应用而在计算设备410和420上运行。当然取决于在计算设备上运行的操作系统的不同,文件传输设备500的实现方式也有所不同,本发明不受限于文件传输设备500为了适应不同操作系统才采用的各种特定实现,而仅仅受限于文件传输设备500实现本发明的功能而必须具有的实现逻辑。
图5示出了根据本发明一个实施例的文件传输设备的示意图。文件传输设备500包含在图1所示的计算设备410-430的任一个中,用于在计算设备中运行,以便浏览和/或下载服务器440上存储的文件,以及将计算设备上的文件传输到存储服务器440中存储。
如图5所示,文件传输设备500包括邻近设备识别器510。邻近设备识别器510用于查找与文件传输设备500一起驻留在其上的计算设备(在下文中,以图2所示的文件传输设备500驻留在图1的计算设备410上进行描述,但是应当理解,上面的描述仅仅是示意性的,而非对本发明的限制)处于同一局域网中的其他计算设备。
邻近设备识别器510可以采用多种方式来查找处于同一局域网中的其它计算设备。例如,邻近设备识别器510可以在局域网中利用UDP协议进行广播,其它同样具有邻近设备识别器的计算设备可以回复该广播,从而建立通信,并相互识别出对方。
根据本发明的一种实现方式,邻近设备识别器510可以定时与存储服务器440进行通信。存储服务器440在和各个计算设备410-430进行通信时,会获得各个计算设备410-430通过哪个互联网IP地址连接到存储服务器440的信息。由于在同一个局域网中的不同计算设备通常会通过同一个IP地址连接到互联网,因此当存储服务器440发现多个计算设备(如计算设备410和420)利用同一个IP地址连接到存储服务器440时,就可以认为这多个计算设备处于同一个局域网中。随后,存储服务器440可以和这些计算设备进行交互,以获得计算设备在局域网中的IP地址(这可以通过发送指令给计算设备,以便计算设备将其在局域网中的IP地址发送给服务器440来实现,但是本发明不受限于此,所有可以获得计算设备局域网IP地址的实施方式都在本发明的保护范围之内)。存储服务器440将所获得的计算设备的局域网IP地址发送给同一个局域网中的其他计算设备的邻近设备识别器510,从而使得邻近设备识 别器510获悉与计算设备410处于同一局域网中的一个或者多个其它计算设备。
用户在计算设备410上运行文件传输设备500以浏览在存储服务器440上存储的文件,此时文件传输设备500会从存储服务器440获取相应的文件存储结构(例如存储文件的目录结构,某个目录中的文件列表等),并呈现给用户。用户可以选择某个文件并下载该文件来查看,在一个例子中,当用户浏览的服务器文件目录下为图形文件时,在用户浏览该文件目录时,文件传输设备500就会呈现该图形文件的缩略图。而在另一个例子中,当用户要播放某个服务器上的多媒体文件时,文件传输设备500会根据所处的计算设备的特征,从服务器请求经过裁剪后、适于该计算设备的多媒体数据。在上面的示例中,文件传输设备500从存储服务器440请求下载的并非文件本身的数据,而是根据文件内容而生成的数据。
因此,可选地,文件传输设备500包括下载请求生成器520。下载请求生成器520根据用户的操作而生成要从存储服务器下载数据的下载请求,该下载请求所请求下载的数据与存储服务器上存储的文件相关联,例如数据为该文件本身的数据,或者为根据该文件而生成的数据。下载请求通常还包括要相关文件在存储服务器上的存储位置,这样存储服务器440就可以准确地处理该下载请求。
如图5所示,文件传输设备500包括下载控制器530。下载控制器530耦接到下载请求生成器520以接收生成的下载请求进行处理。下载控制器530会从邻近设备识别器510获取与计算设备410在同一个局域网中的其他计算设备(计算设备420)的信息,如果不存在其他计算设备,则将该下载请求发送给存储服务器440以下载数据。如果存在其他计算设备,则下载控制器530会把下载请求发送给每个其他计算设备进行处理。如果任何一个其他计算设备都返回不能处理该下载请求的消息,则下载控制器530会将该下载请求发送给服务器440以下载数据。如果有其他计算设备能够处理该下载请求,则下载控制器530从该其他计算设备下载数据。
可选地,当邻近设备识别器510获取到多个其他计算设备,而且有多个其他计算设备都可以处理下载控制器530接收的下载请求时,下载控制器530可以采用类似对等网络传输的方式来下载数据。即下载控制器530可以就将下载请求划分为多个下载请求,每个下载请求用于请求下载一部分原先要下载的数据,并将这些下载请求分别发送给一个其他计算设备,以获取相应的数据。随后,下载控制器530组合所获取的数据来完成对原下载请求的处理。
文件传输设备500除了用于浏览和/或下载存储服务器440中的文件之外,还用于将计算设备410本地的文件上传到存储服务器440中,为此,文件传输设备500包括上传控制器540。上传控制器540将计算设备410本地中的文件上传到存储服务器440上。计算设备的用户会例如在办公室和外地之间频繁移 动办公时,会需要将办公室中未完成的文件上传到存储服务器440上,然后在外地办公时再获取该文件。另外,在一个示例中,用户可能在需要在各种移动终端上浏览多媒体文件,而这些多媒体文件原先存储在其它桌面计算机中,此时就需要利用桌面计算机中的上传控制器540将这些多媒体文件上传到存储服务器上。
上传控制器540在将文件上传到存储服务器440上的同时,会生成相应的文件上传记录。上传控制器540每上传一个文件就会生成一条文件上传记录,每条文件上传记录可以包括上传文件的时间、文件在计算设备本地的存储位置以及在存储服务器440上的存储位置等。可选地,文件传输设备500还可以包括存储单元550,用于存储上传控制器540生成的文件上传记录。
为了处理来自同一局域网中的其它计算设备的下载请求,文件传输设备500还包括下载请求处理器560。下载请求处理器560接收来自其它计算设备的下载请求并进行处理。下载请求处理器560根据上传控制器540生成的文件上传记录来确定该下载请求中的数据是否与计算设备本地的文件相关联,如果相关联,则返回能够处理该下载请求的消息给发送请求的计算设备,随后,从计算设备本地的文件中获取数据并将所获取的数据返回给其它计算设备。如果不相关联,则下载请求处理器560返回不能处理该下载请求的消息。
在一个实施方式中,下载请求包括与下载请求中的数据相关联的文件在服务器440上的文件存储位置,而每条文件上传记录也包括文件在计算设备本地的存储位置以及文件在服务器440上的相应存储位置。下载请求处理器560可以在文件上传记录列表中进行查询,以查找文件在服务器上的存储位置与下载请求中的文件存储位置相匹配的文件上传记录。如果能够查找到相应记录,则可以认为该下载请求可以由本地文件来满足,否则返回不能处理该下载请求的消息。
进一步地,由于在把文件上传到服务器上之后,用户可以通过其它计算设备从服务器获取该文件、进行编辑然后再上传。因此计算设备本地存储的文件不一定是最新的文件,为此,下载请求处理器560需要进一步确定本地存储的文件是否和服务器440上存储的文件是否是一致的。在一种实现方式中,在下载请求处理器560在文件上传记录中查找到相应的记录时,从服务器440获取在服务器上相应存储位置处的文件的文件信息,将该文件信息与本地存储位置处的文件的文件信息进行比较以确定本地存储的文件和服务器上存储的文件是否一致,如果一致,则直接由本地文件来满足下载请求;否则返回不能处理该下载请求的消息。
文件信息可以包括例如文件的最新修改时间、文件大小和/或对文件内容进行散列计算后得到的MD5值等哈希值等。本发明不受限于文件信息的具体内容,所有可以用于确定本地文件和服务器上的相应文件是否一致的信息都在本发明的保护范围之内。
另外,可选地,由于计算文件哈希值需要耗费服务器和计算设备太多的计算时间,下载请求处理器560可以首先检查文件的最新修改时间和大小是否匹配,只有匹配了才继续进行哈希值的计算和匹配,否则可以确定本地文件和服务器上的文件是不一致的,就不用进行哈希值的比较。
根据本发明的文件传输设备500可以从服务器下载数据之前,先判断下与该数据相关联的文件是否在与该计算设备在同一局域网中的其它计算设备上,如果是,则从这些其它计算设备的相应文件来获取数据,而不用将请求发送给服务器,从而显著降低了用户的等待时间和数据传输量,提高了用户体验并减少了网络传输。
举例来说,用户在家里具有一个移动终端(对应于计算设备410)和一个笔记本计算机(对应于计算设备420),这两个设备通过家里的同一个路由器连接到互联网。用户在家里使用移动终端时,发现网络上有个好的音乐,于是就下载到了移动终端上并存储为a.mp3。为了能够和办公室的计算机(对应于计算设备430)共享该文件,用户将该文件上传到存储服务器440上的“音乐”目录下,此时移动终端上的文件传输设备500上的上传控制器540会生成一条文件传输记录,记录内容包括文件传输时间、本地的目录及位置“a.mp3”以及在服务器上的存储位置“音乐/a.mp3”。在过了一段时间之后,用户在家中使用笔记本计算机浏览服务器上的文件,发现a.mp3音乐文件,并且想收听该音乐,此时用户可以直接点击该文件以进行在线播放。此时在笔记本中,邻近设备识别器510会识别出移动终端和笔记本在同一个局域网中,下载请求生成器520会生成请求a.mp3数据的下载请求,而下载控制器530在接收到该请求时,会首先从邻近设备设备410获取在同一个局域网中的其它设备,即移动终端,将该下载请求发送给移动终端。移动终端中的下载请求处理器560在文件传输记录中进行查找,发现该a.mp3文件在移动终端本地已经存储了,因此下载请求处理器560会直接读取移动终端本地的a.mp3这的数据并返回给笔记本的下载控制器530,从而避免了不必要的网络传输,同时还减少了用户等待播放音乐的时间,增强了用户体验。
图6示出了根据本发明一个实施方法的文件传输方法600的示意图,图6所示的文件传输方法600适于在图4中的计算设备410-430中执行,以便将计算设备中的文件上传到存储服务器440中,以及浏览和/或下载存储服务器440上存储的文件。根据一个实施例,该文件传输方法600可以由图5所示的文件传输设备500来执行。
文件传输方法600始于步骤S610。在步骤S610中,查找与执行方法600的计算设备(在下文中,以方法600由图4的计算设备410执行进行描述,但是应当理解,上面的描述仅仅是示意性的,而非对本发明的限制)处于同一局域网中的其他计算设备。
可以采用多种方式来查找处于同一局域网中的其它计算设备。例如,在一 个方式中,可以在局域网中利用UDP协议进行广播,其它同样具有邻近设备识别器的计算设备可以回复该广播,从而建立通信,并相互识别出对方。
根据本发明的另一种实现方式,计算设备可以定时与存储服务器440进行通信。存储服务器440在和各个计算设备410-430进行通信时,会获得各个计算设备410-430通过哪个互联网IP地址连接到存储服务器440的信息。由于在同一个局域网中的不同计算设备通常会通过同一个IP地址连接到互联网,因此当存储服务器440发现多个计算设备(如计算设备110和120)利用同一个IP地址连接到存储服务器440时,就可以认为这多个计算设备处于同一个局域网中。随后,存储服务器440可以和这些计算设备进行交互,以获得计算设备在局域网中的IP地址(这可以通过发送指令给计算设备,以便计算设备将其在局域网中的IP地址发送给存储服务器440来实现,但是本发明不受限于此,所有可以获得计算设备局域网IP地址的实施方式都在本发明的保护范围之内)。存储服务器440将所获得的计算设备的局域网IP地址发送给同一个局域网中的其他计算设备,从而使得每个计算设备获悉与计算设备110处于同一局域网中的一个或者多个其它计算设备。
用户通过计算设备410来浏览在存储服务器440上存储的文件,此时计算设备410会从存储服务器440获取相应的文件存储结构(例如存储文件的目录结构,某个目录中的文件列表等),并呈现给用户。用户可以选择某个文件并下载该文件来查看,在一个例子中,当用户浏览的服务器文件目录下为图形文件时,在用户浏览该文件目录时,就会呈现该图形文件的缩略图。而在另一个例子中,当用户要播放某个服务器上的多媒体文件时,计算设备会根据所处的计算设备的特征,从服务器请求经过裁剪后、适于该计算设备的多媒体数据。在上面的示例中,计算设备从服务器请求下载的并非文件本身的数据,而是根据文件内容而生成的数据。
因此,文件传输方法还包括步骤S620中,其中接收根据用户的操作而生成要从服务器下载数据的下载请求进行处理。下载请求所请求下载的数据与服务器上存储的文件相关联,例如数据为该文件本身的数据,或者为根据该文件而生成的数据。下载请求通常还包括要相关文件在服务器上的存储位置,这样服务器440就可以准确地处理该下载请求。在步骤S620中,会查看步骤S610中是否获取了与计算设备410在同一个局域网中的其他计算设备(计算设备120)的信息,如果不存在其他计算设备,则将该下载请求发送给存储服务器440以下载数据。如果存储其他计算设备,则在步骤S620中,会把下载请求发送给每个其他计算设备进行处理。如果任何一个其他计算设备都返回不能处理该下载请求的消息,则会将该下载请求发送给存储服务器440以下载数据。如果有其他计算设备能够处理该下载请求,则下载控制器530从其他计算设备下载数据。
可选地,当在步骤S610中获取到多个其他计算设备,而且在步骤S620 中确定多个其他计算设备都可以处理下载请求时,在步骤S620中可以采用类似对等网络传输的方式来下载数据。即可以将下载请求划分为多个下载请求,每个下载请求用于请求下载一部分原先要下载的数据,并将这些下载请求分别发送给一个其他计算设备,以获取相应的数据。随后,在步骤S620中组合所获取的数据来完成对原下载请求的处理。
方法600除了用于浏览和/或下载存储服务器440中的文件之外还用于将计算设备本地的文件上传到存储服务器440中,为此,文件传输方法包括步骤S630。在步骤S630中,将计算设备410本地中的文件上传到存储服务器440上。计算设备的用户会例如在办公室和外地之间频繁移动办公时,会需要将办公室中未完成的文件上传到存储服务器440上,然后在外地办公时再获取该文件。另外,在一个示例中,用户可能在需要在各种移动终端上浏览多媒体文件,而这些多媒体文件原先存储在其它桌面计算机中,此时就需要这些桌面计算机将这些多媒体文件上传到存储服务器上。
在步骤S630中,在将文件上传到存储服务器440上的同时,会生成相应的文件上传记录。在步骤S630中,每上传一个文件就会生成一条文件上传记录,每条文件上传记录可以包括上传文件的时间、文件在计算设备本地的存储位置以及在存储服务器440上的存储位置等。可选地,步骤S630还可以包括存储所生成的文件上传记录的步骤。
为了处理来自同一局域网中的其它计算设备的下载请求,文件传输方法600还包括步骤S640。在步骤S640中接收来自其它计算设备的下载请求并进行处理。在步骤S640中,根据在步骤S630中生成的文件上传记录来确定该下载请求中的数据是否与计算设备本地的文件相关联,如果相关联,则返回能够处理该下载请求的消息给发送请求的计算设备,随后,从计算设备本地的文件中获取数据并将所获取的数据返回给其它计算设备。如果不相关联,则返回不能处理该下载请求的消息。
在一个实施方式中,下载请求包括与下载请求中的数据相关联的文件在服务器440上的文件存储位置,而每条文件上传记录也包括文件在计算设备本地的存储位置以及文件在服务器440上的相应存储位置。在步骤S640中,可以在文件上传记录列表中进行查询,以查找文件在服务器上的存储位置与下载请求中的文件存储位置相匹配的文件上传记录。如果能够查找到相应记录,则可以认为该下载请求可以由本地文件来满足,否则返回不能处理该下载请求的消息。
进一步地,由于在把文件上传到服务器上之后,用户可以通过其它计算设备从服务器获取该文件、进行编辑然后再上传。因此计算设备本地存储的文件不一定是最新的文件,为此,在步骤S640中,需要进一步确定本地存储的文件是否和服务器440上存储的文件是否是一致的。在一种实现方式中,在步骤S640中在文件上传记录中查找到相应的记录时,从存储服务器440获取在服 务器上相应存储位置处的文件的文件信息,将该文件信息与本地存储位置处的文件的文件信息进行比较以确定本地存储的文件和服务器上存储的文件是否一致,如果一致,则直接由本地文件来满足下载请求;否则返回不能处理该下载请求的消息。
文件信息可以包括例如文件的最新修改时间、文件大小和/或对文件内容进行散列计算后得到的MD5值等哈希值等。本发明不受限于文件信息的具体内容,所有可以用于确定本地文件和服务器上的相应文件是否一致的信息都在本发明的保护范围之内。
另外,可选地,由于计算文件哈希值需要耗费服务器和计算设备太多的计算时间,在步骤S640中,可以首先检查文件的最新修改时间和大小是否匹配,只有匹配了才继续进行哈希值的计算和匹配,否则可以确定本地文件和服务器上的文件是不一致的,就不用进行哈希值的比较。
根据本发明的文件传输方法600可以从服务器下载数据之前,先判断下与该数据相关联的文件是否在与该计算设备在同一局域网中的其它计算设备上,如果是,则从这些其它计算设备的相应文件来获取数据,而不用将请求发送给服务器,从而显著降低了用户的等待时间和数据传输量,提高了用户体验并减少了网络传输。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的客户端或服务器中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者设备程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图7示出了可以实现根据本发明上述方法的电子装置。该电子装置通常包括处理器710和以存储器730形式的计算机程序产品或者计算机可读介质。存储器730可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器730具有用于执行上述方法中的任何方法步骤的程序代码751的存储空间750。例如,用于程序代码的存储空间750可以包括分别用于实现上面的方法中的各种步骤的各个程序代码751。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图8所述的便携式或者固定存储单元。该存储单元可以具有与图7的服务器中的存储器730类似布置的存储段、存储空间等。程序代码可以例 如以适当形式进行压缩。通常,存储单元包括计算机可读代码751’,即可以由例如诸如710之类的处理器读取的代码,这些代码当由服务器运行时,导致该服务器执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”或“包括”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (34)

  1. 一种文件传输设备,该文件传输设备在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输设备包括:
    上传控制器,适于将所述计算设备本地中的文件传输到服务器上并生成相应的文件传输记录;
    下载控制器,适于接收从服务器下载数据的下载请求,根据所述上传控制器生成的文件传输记录来确定该下载请求中的数据是否与所述计算设备本地的文件相关联,如果是,则从所述计算设备本地的文件获取数据;如果不是,则从所述服务器下载数据。
  2. 如权利要求1所述的文件传输设备,还包括下载请求生成器,适于生成所述从服务器下载数据的下载请求。
  3. 如权利要求1或者2所述的文件传输设备,其中在所述下载请求请求从服务器下载文件时,所述下载控制器生成相应的文件传输记录。
  4. 如权利要求1-3中任一个所述的文件传输设备,其中所述文件传输记录包括文件在计算设备本地的存储位置和在服务器上的存储位置。
  5. 如权利要求1-4中任一个所述的文件传输设备,其中所述下载控制器通过确定提供下载请求中的数据的文件在服务器上的存储位置是否存储在文件传输记录中来确定该数据是否与计算设备本地的文件相关联。
  6. 如权利要求5中所述的文件传输设备,其中所述下载控制器从服务器获取提供下载请求中的数据的文件的文件信息,将该文件信息与文件传输记录中的本地存储位置处的文件的文件信息进行比较,如果匹配,则确定该数据是否与计算设备本地的文件相关联。
  7. 如权利要求6所述的文件传输设备,其中所述文件信息包括文件的修改时间、大小以及文件内容哈希值中的一个或者多个。
  8. 一种文件传输方法,该文件传输方法在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输方法包括步骤:
    将所述计算设备本地中的文件传输到服务器上并生成相应的文件传输记录;
    接收从服务器下载数据的下载请求,根据所生成的文件传输记录来确定该下载请求中的数据是否与所述计算设备本地的文件相关联,如果是,则从所述 计算设备本地的文件获取数据;如果不是,则从所述服务器下载数据。
  9. 如权利要求8所述的文件传输方法,还包括步骤:在所述下载请求请求从服务器下载文件时,生成相应的文件传输记录。
  10. 如权利要求8或者9所述的文件传输方法,其中所述文件传输记录包括文件在计算设备本地的存储位置和在服务器上的存储位置。
  11. 如权利要求10所述的文件传输方法,其中所述确定该下载请求中的数据是否与所述计算设备本地的文件相关联的步骤包括:确定提供下载请求中的数据的文件在服务器上的存储位置是否与文件传输记录的服务器上存储位置相匹配。
  12. 如权利要求11中所述的文件传输方法,其中确定该下载请求中的数据是否与所述计算设备本地的文件相关联的步骤包括:从服务器获取提供下载请求中的数据的文件的文件信息,将该文件信息与文件传输记录中的本地存储位置处的文件的文件信息进行比较,如果匹配,则确定该数据是否与计算设备本地的文件相关联。
  13. 如权利要求12所述的文件传输方法,其中所述文件信息包括文件的修改时间、大小以及文件内容哈希值中的一个或者多个。
  14. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算机上运行时,将执行根据权利要求8至13中的任一项所述的文件传输方法。
  15. 一种计算机可读介质,其中存储了如权利要求14所述的计算机程序。
  16. 一种网络存储系统,包括:
    服务器;以及
    多个计算设备,每个计算设备包括如权利要求1-7中任一个所述的文件传输设备,以便将计算设备上的文件传输到所述服务器中,以及浏览在服务器上的文件。
  17. 一种文件传输设备,该文件传输设备在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输设备包括:
    邻近设备识别器,适于从所述服务器获取与该计算设备在同一局域网中的一个或者多个第一其它计算设备;以及
    下载控制器,适于接收从服务器下载数据的第一下载请求,将所述第一下载请求发送给所述同一局域网中的一个或者多个第一其它计算设备,如果任一个第一其它计算设备能够处理该第一下载请求,则从该第一其它计算设备下载数据,否则从所述服务器下载数据。
  18. 如权利要求17所述的文件传输设备,还包括:
    上传控制器,适于将所述计算设备本地中的文件上传到服务器上并生成相应的文件上传记录;以及
    下载请求处理器,适于接收来自第二其它计算设备的第二下载请求,根据所述上传控制器生成的文件上传记录来确定该第二下载请求中的数据是否与所述计算设备本地的文件相关联,如果是,则处理该第二下载请求,从所述计算设备本地的文件获取数据并将所获取的数据返回给第二其它计算设备。
  19. 如权利要求17或者18所述的文件传输设备,还包括下载请求生成器,适于生成所述从服务器下载数据的第一下载请求。
  20. 如权利要求18所述的文件传输设备,其中所述文件上传记录包括文件在计算设备本地的存储位置和在服务器上的存储位置。
  21. 如权利要求20所述的文件传输设备,其中所述下载请求处理器通过确定与第二下载请求中的数据相关联的文件在服务器上的存储位置是否包含在文件上传记录中来确定该数据是否与计算设备本地的文件相关联。
  22. 如权利要求21中所述的文件传输设备,其中所述下载请求处理器从服务器获取与第二下载请求中的数据相关联的文件的文件信息,将该文件信息与文件上传记录中的本地存储位置处的文件的文件信息进行比较,如果匹配,则确定该数据是否与计算设备本地的文件相关联。
  23. 如权利要求22所述的文件传输设备,其中所述文件信息包括文件的修改时间、大小以及文件内容哈希值中的一个或者多个。
  24. 如权利要求17-23中任一个所述的文件传输设备,如果多个第一其它计算设备能够处理该第一下载请求,则所述下载请求处理器将所述第一下载请求拆分为多个第三下载请求,并且将每个第三下载请求发送给一个相应的第一其它计算设备,以便分别从多个第一其它设备获取数据的不同部分。
  25. 一种文件传输方法,该文件传输方法在计算设备运行,适于将计算设备上的文件传输到服务器以及浏览和/或下载服务器上存储的文件,该文件传输方法包括步骤:
    从所述服务器获取与该计算设备在同一局域网中的一个或者多个第一其它计算设备;以及
    接收从服务器下载数据的第一下载请求,将所述第一下载请求发送给所述同一局域网中的一个或者多个第一其它计算设备,如果任一个第一其它计算设备能够处理该第一下载请求,则从该第一其它计算设备下载数据,否则从所述服务器下载数据。
  26. 如权利要求25所述的文件传输方法,还包括步骤:
    将所述计算设备本地中的文件上传到所述服务器上并生成相应的文件上传记录;以及
    接收来自第二其它计算设备的第二下载请求,根据所生成的文件上传记录来确定该第二下载请求中的数据是否与所述计算设备本地的文件相关联,如果是,则根据该第二下载请求从所述计算设备本地的文件获取数据并将所获取的数据返回给第二其它计算设备。
  27. 如权利要求25或者26所述的文件传输方法,其中所述文件上传记录包括文件在计算设备本地的存储位置和在服务器上的存储位置。
  28. 如权利要求27所述的文件传输方法,其中所述确定该第二下载请求中的数据是否与所述计算设备本地的文件相关联的步骤包括:确定与该第二下载请求中的数据相关联的文件在服务器上的存储位置是否与文件上传记录中的服务器上存储位置相匹配。
  29. 如权利要求28中所述的文件传输方法,其中确定该第二下载请求中的数据是否与所述计算设备本地的文件相关联的步骤包括:从服务器获取与第二下载请求中的数据相关联的文件的文件信息,将该文件信息与文件上传记录中的本地存储位置处的文件的文件信息进行比较,如果匹配,则确定该数据是否与计算设备本地的文件相关联。
  30. 如权利要求29所述的文件传输方法,其中所述文件信息包括文件的修改时间、大小以及文件内容哈希值中的一个或者多个。
  31. 如权利要求25-30中任一个所述的文件传输方法,还包括步骤:
    如果多个第一其它计算设备能够处理该第一下载请求,则将所述第一下载请求拆分为多个第三下载请求,并且将每个第三下载请求发送给一个相应的第一其它计算设备,以便分别从多个第一其它设备获取数据的不同部分。
  32. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算机上运行时,将执行根据权利要求25至31中的任一项所述的文件传输方法。
  33. 一种计算机可读介质,其中存储了如权利要求32所述的计算机程序。
  34. 一种网络存储系统,包括:
    服务器;以及
    多个计算设备,每个计算设备包括如权利要求17-24中任一个所述的文件传输设备,以便将计算设备上的文件上传到所述服务器中,以及从所述服务器/其它计算设备下载与文件相关联的数据。
PCT/CN2014/093577 2013-12-12 2014-12-11 一种文件传输方法、设备和系统 WO2015085939A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/103,734 US20160315997A1 (en) 2013-12-12 2014-12-11 File transfer method, device, and system

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201310684043.1A CN103747032B (zh) 2013-12-12 2013-12-12 一种文件传输方法、设备和系统
CN201310681921.4 2013-12-12
CN201310681921.4A CN103780676B (zh) 2013-12-12 2013-12-12 一种文件传输方法、设备和系统
CN201310684043.1 2013-12-12

Publications (1)

Publication Number Publication Date
WO2015085939A1 true WO2015085939A1 (zh) 2015-06-18

Family

ID=53370634

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/093577 WO2015085939A1 (zh) 2013-12-12 2014-12-11 一种文件传输方法、设备和系统

Country Status (2)

Country Link
US (1) US20160315997A1 (zh)
WO (1) WO2015085939A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108449427A (zh) * 2018-04-17 2018-08-24 银川华联达科技有限公司 一种基于家用计算机的大数据系统
CN110825932A (zh) * 2019-11-01 2020-02-21 山东劳动职业技术学院(山东劳动技师学院) 受碎片化时间制约的信息检索和浏览系统
CN114422499A (zh) * 2021-12-27 2022-04-29 北京奇艺世纪科技有限公司 一种文件下载方法、系统及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230344895A1 (en) * 2022-04-25 2023-10-26 Citrix Systems, Inc. Systems and methods for downloading files

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968099A (zh) * 2006-11-09 2007-05-23 华为技术有限公司 一种文件传输的方法及装置
CN101552669A (zh) * 2008-04-02 2009-10-07 林兆祥 数据传输的方法及系统
CN102739791A (zh) * 2012-06-28 2012-10-17 奇智软件(北京)有限公司 一种文件的下载、上传方法及装置
CN102780779A (zh) * 2012-07-23 2012-11-14 北京星网锐捷网络技术有限公司 一种园区网出口p2p流量优化方法、装置及网关设备
CN103747032A (zh) * 2013-12-12 2014-04-23 北京奇虎科技有限公司 一种文件传输方法、设备和系统
CN103780676A (zh) * 2013-12-12 2014-05-07 北京奇虎科技有限公司 一种文件传输方法、设备和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968099A (zh) * 2006-11-09 2007-05-23 华为技术有限公司 一种文件传输的方法及装置
CN101552669A (zh) * 2008-04-02 2009-10-07 林兆祥 数据传输的方法及系统
CN102739791A (zh) * 2012-06-28 2012-10-17 奇智软件(北京)有限公司 一种文件的下载、上传方法及装置
CN102780779A (zh) * 2012-07-23 2012-11-14 北京星网锐捷网络技术有限公司 一种园区网出口p2p流量优化方法、装置及网关设备
CN103747032A (zh) * 2013-12-12 2014-04-23 北京奇虎科技有限公司 一种文件传输方法、设备和系统
CN103780676A (zh) * 2013-12-12 2014-05-07 北京奇虎科技有限公司 一种文件传输方法、设备和系统

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108449427A (zh) * 2018-04-17 2018-08-24 银川华联达科技有限公司 一种基于家用计算机的大数据系统
CN108449427B (zh) * 2018-04-17 2020-10-30 银川华联达科技有限公司 一种基于家用计算机的大数据系统
CN110825932A (zh) * 2019-11-01 2020-02-21 山东劳动职业技术学院(山东劳动技师学院) 受碎片化时间制约的信息检索和浏览系统
CN110825932B (zh) * 2019-11-01 2022-04-26 山东劳动职业技术学院(山东劳动技师学院) 受碎片化时间制约的信息检索和浏览系统
CN114422499A (zh) * 2021-12-27 2022-04-29 北京奇艺世纪科技有限公司 一种文件下载方法、系统及装置
CN114422499B (zh) * 2021-12-27 2023-12-05 北京奇艺世纪科技有限公司 一种文件下载方法、系统及装置

Also Published As

Publication number Publication date
US20160315997A1 (en) 2016-10-27

Similar Documents

Publication Publication Date Title
US8725680B2 (en) Media content location awareness and decision making
WO2016070718A1 (zh) 进行文件下载的方法、装置和浏览器
KR20160030381A (ko) 웹 페이지 액세스 방법, 장치, 라우터, 프로그램 및 기록매체
US20080059535A1 (en) Annotating media content with related information
CN110401724B (zh) 文件管理方法、文件传输协议服务器及存储介质
JP2009277219A (ja) 複数の供給源からのメディアファイルの管理
US11100162B2 (en) Systems and methods for generating playlists in a music service
CN103747032A (zh) 一种文件传输方法、设备和系统
JP6336624B2 (ja) マルチメディア表示方法、装置及びデバイス
WO2015085939A1 (zh) 一种文件传输方法、设备和系统
US9122709B2 (en) Management of media files
CN103944994A (zh) 分布式资源获取方法及装置
WO2016000507A1 (zh) 省流量模式搜索服务的方法、服务器、客户端和系统
JP2007527575A (ja) コンテンツを同期及び識別する方法及び装置
CN103780676A (zh) 一种文件传输方法、设备和系统
US9300700B2 (en) Method and terminal for editing information in social network service applications
WO2015154682A1 (zh) 一种网络请求处理方法、网络服务器和网络系统
WO2015000433A1 (zh) 一种多媒体查找方法、终端、服务器及系统
JP7217181B2 (ja) ウェアラブルデバイス、情報処理方法、装置及びシステム
EP3866027B1 (en) Communicating shuffled media content
WO2015078124A1 (zh) 一种网络数据处理方法及装置
WO2014064907A1 (ja) コンテンツ管理装置、コンテンツ管理方法、及び集積回路
EP2634706A2 (en) System and method for multimedia stream data searching and retrieval
WO2015085764A1 (zh) 文件访问的方法和云网关
US20090319489A1 (en) System and Method for Improving Operations on a Media Server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14868805

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15103734

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14868805

Country of ref document: EP

Kind code of ref document: A1