File upload method and system

  • US 10,681,127 B2
  • Filed: 04/10/2015
  • Issued: 06/09/2020
  • Est. Priority Date: 10/12/2012
  • Status: Active Grant
First Claim
Patent Images

1. A file upload method, comprising:

  • performing, by a first client, fragmentation on a to-be-uploaded file, to obtain a fixed number of file fragments, each file fragment having a unique identifier and a fragment size dependent on a total size of the to-be-uploaded file;

    sending, by the first client, a query to a storage interface server for an address of an upload logic server, wherein the storage interface server is the communicatively coupled to the upload logic server for accessing the address of the upload logic server;

    uploading, by the first client at a first time, at least one of the file fragments to the upload logic server according to the address of the upload logic server obtained from the storage interface server;

    sending, by the storage interface server, a file identifier of the file to a storage index server when the first client uploads the at least one of the file fragments to the upload logic server, wherein the file identifier of the file is calculated from the unique identifiers of the file fragments of the file;

    determining, by the storage index server according to the file identifier of the file, file upload information identifying (a) a plurality of file segments associated with the file and (b) a second client that saves at least one of the plurality of file fragments and that has submitted query information that includes the file identifier of the file to the storage index server, wherein;

    the file upload information is further divided into (i) first file upload information including a first set of file fragment identifiers corresponding to the file fragments stored at the first client and (ii) second file upload information including a second set of file fragment identifiers corresponding to the file fragments stored at the second client;

    the first set of file fragment identifiers does not overlap the second set of file fragment identifiers;

    the storage index server is configured to receive heartbeat communication from the second client; and

    the second client has downloaded, at a prior time, at least the second set of file fragments of the file and received the file identifier of the file from a peer device using a peer-to-peer (P2P) relationship;

    in response to a determination that the second client saves at least one of the file fragments and the file upload information;

    sending, by the storage index server to the first client, a first request including the first file upload information corresponding to the first set of file fragments stored at the first client;

    sending, by the storage index server to the second client, a second request including the second upload file information corresponding to the second set of file fragments stored at the second client;

    in response to the first request, resuming uploading, by the first client to the upload logic server at a second time, a first file fragment corresponding to a file fragment identifier within the first set of file fragment identifiers carried in the first file upload information; and

    in response to the second request, uploading, by the second client to the upload logic server, a second file fragment corresponding to a file fragment identifier within the second set of file fragment identifiers carried in the second file upload information, wherein the second client is configured to report the file fragment identifier to the storage index by heartbeat.

View all claims
    ×
    ×

    Thank you for your feedback

    ×
    ×