CN108234539B - File uploading, downloading and transmitting method and device - Google Patents

File uploading, downloading and transmitting method and device Download PDF

Info

Publication number
CN108234539B
CN108234539B CN201611151740.0A CN201611151740A CN108234539B CN 108234539 B CN108234539 B CN 108234539B CN 201611151740 A CN201611151740 A CN 201611151740A CN 108234539 B CN108234539 B CN 108234539B
Authority
CN
China
Prior art keywords
file
management server
request
block
uploaded
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201611151740.0A
Other languages
Chinese (zh)
Other versions
CN108234539A (en
Inventor
刘一鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
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
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201611151740.0A priority Critical patent/CN108234539B/en
Publication of CN108234539A publication Critical patent/CN108234539A/en
Application granted granted Critical
Publication of CN108234539B publication Critical patent/CN108234539B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The embodiment of the invention discloses a method and a device for uploading and downloading a file, wherein the method for uploading the file comprises the following steps: receiving an uploading request aiming at a target file; dividing a target file into file blocks according to a preset division rule; determining a file block to be uploaded in the divided file blocks; sending a first request for uploading file blocks to be uploaded to a management server of the cloud storage system, wherein the first request comprises the number of the file blocks to be uploaded; receiving a first storage position fed back by a management server; uploading a file block to be uploaded according to the first storage position; and under the condition that all the segmented file blocks are not uploaded, selecting the file blocks from the file blocks which are not uploaded, updating the file blocks to be uploaded into the selected file blocks, and returning to execute the step of sending a first request for uploading the file blocks to be uploaded to a management server of the cloud storage system until all the segmented file blocks are uploaded. By applying the embodiment of the invention, the error rate in the file uploading process is reduced.

Description

File uploading, downloading and transmitting method and device
Technical Field
The invention relates to the field of data transmission, in particular to a file uploading, downloading and transmitting method and device.
Background
In the current information explosion era, data information is generated all the time, and data information is transmitted and utilized all the time, and the data information can be stored for better transmission or utilization. There are many ways to store data information, and the most common way is to store data information in a file and store the file. The file referred to herein may be a video file, an audio file, a picture file, a document file, a web page file, and the like.
In general, files can be saved in a storage medium, but as more and more files need to be stored and the storage capacity of the storage medium is limited, the existing storage method cannot meet the actual requirement, and the problem is solved by uploading the files to a cloud storage system for saving. The cloud storage system is an emerging network storage system based on a cloud storage technology, and the storage capacity of the cloud storage system can be expanded in a large amount.
The method for uploading the file to the cloud storage system comprises the steps of sending a file uploading request to a management server of the cloud storage system, uploading the file to a storage position after receiving the storage position of the file fed back by the management server, wherein the storage position is the storage position of the file in a storage server in the cloud storage system. In the uploading process, the whole file is uploaded, so that the uploading time is long, the error probability is high, and the situations of file damage or uploading failure and the like can be caused.
Disclosure of Invention
The embodiment of the invention aims to provide a file uploading, downloading and transmitting method and device so as to reduce the error probability in the file uploading process.
In a first aspect, to achieve the above object, an embodiment of the present invention discloses a file uploading method. The method comprises the following steps:
receiving an uploading request aiming at a target file;
dividing the target file into file blocks according to a preset division rule;
determining a file block to be uploaded in the divided file blocks;
sending a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, wherein the first request comprises the number of the file blocks to be uploaded;
receiving a first storage position fed back by the management server, wherein the first storage position is a storage position of the file block to be uploaded in a storage server of a cloud storage system;
uploading the file block to be uploaded according to the first storage position;
and under the condition that all the segmented file blocks are not uploaded, selecting a file block from the file blocks which are not uploaded, updating the file block to be uploaded into the selected file block, and returning to execute the step of sending a first request for uploading the file block to be uploaded to a management server of the cloud storage system until all the segmented file blocks are uploaded.
In a second aspect, to achieve the above object, an embodiment of the present invention discloses a file downloading method. The method comprises the following steps:
sending a download request for a first file to a management server of a cloud storage system, wherein the first file comprises at least one file block;
receiving third information fed back by the management server, wherein the third information comprises the file block number of the first file;
determining file blocks to be downloaded based on the number of the file blocks;
sending a third request for downloading the file blocks to be downloaded to the management server, wherein the third request comprises the number of the file blocks to be downloaded;
receiving a second storage position of the file block to be downloaded fed back by the management server;
and downloading the file blocks to be downloaded from the second storage position, and returning to the step of executing the number of the blocks based on the first file and determining the file to be downloaded under the condition that the first file is not downloaded completely until the first file is downloaded completely.
In a third aspect, to achieve the above object, an embodiment of the present invention discloses a file uploading apparatus. The device comprises:
the first receiving module is used for receiving an uploading request aiming at a target file;
the segmentation module is used for segmenting the target file into file blocks according to a preset segmentation rule;
the first determining module is used for determining a file block to be uploaded in the divided file blocks;
the system comprises a first sending module, a second sending module and a processing module, wherein the first sending module is used for sending a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, and the first request comprises the number of the file blocks to be uploaded;
the second receiving module is used for receiving a first storage position fed back by the management server, wherein the first storage position is a storage position of the file block to be uploaded in a storage server of a cloud storage system;
the first uploading module is used for uploading the file blocks to be uploaded to the first storage position;
and the updating module is used for selecting the file block from the non-uploaded file blocks under the condition that all the segmented file blocks are not uploaded, updating the file block to be uploaded into the selected file block, and returning to execute the first sending module until all the segmented file blocks are uploaded.
In a fourth aspect, to achieve the above object, an embodiment of the present invention discloses a file downloading device. The device comprises:
a fourth sending module, configured to send a download request for a first file to a management server of a cloud storage system, where the first file includes at least one file block;
a fifth receiving module, configured to receive third information fed back by the management server, where the third information includes a file block number of the first file;
the second determining module is used for determining the file blocks to be downloaded based on the number of the file blocks;
a fifth sending module, configured to send a third request for downloading the file blocks to be downloaded to the management server, where the third request includes the number of the file blocks to be downloaded;
a sixth receiving module, configured to receive the second storage location of the file block to be downloaded, where the second storage location is fed back by the management server;
and the downloading module is used for downloading the file block to be downloaded from the second storage position, and returning to execute the second determining module under the condition that the first file is not downloaded completely until the first file is downloaded completely.
In a fifth aspect, to achieve the above object, an embodiment of the present invention discloses a file transmission method, where the file transmission method includes:
monitoring whether a third display instruction for a third file operation panel is received;
if so, displaying the third file operation panel;
receiving a file transmission instruction sent by the third file operation panel;
judging whether the management server of the cloud storage system is successfully logged in;
if the operation is successful, displaying a third file management panel at a third preset position away from the third file operation panel;
if the login is failed, a third login panel is displayed, the management server is logged in through the third login panel, and after the management server is successfully logged in, a second file management panel is displayed at a third preset position away from the second file operation panel;
and obtaining a target path determined according to the display information of the first file management panel, and transmitting files according to the target path and the file transmission instruction.
In a sixth aspect, to achieve the above object, an embodiment of the present invention discloses a file transfer apparatus, including:
the second monitoring module is used for monitoring whether a third display instruction for a third file operation panel is received or not;
the fifth display module is used for displaying the third file operation panel under the condition that the monitoring result of the second monitoring module is positive;
a tenth receiving module, configured to receive a file transmission instruction sent through the third file operating panel;
the second judgment module is used for judging whether the management server of the cloud storage system is successfully logged in;
the sixth display module is used for displaying a third file management panel at a preset position away from the third file operation panel under the condition that the judgment result of the second judgment module is successful;
the seventh display module is used for displaying a third login panel under the condition that the judgment result of the second judgment module is failure, logging in the management server through the third login panel, and displaying a second file management panel at a preset position away from the second file operation panel after the management server is successfully logged in;
and the transmission module is used for obtaining a target path determined according to the display information of the first file management panel and transmitting files according to the target path and the file transmission instruction.
As can be seen from the foregoing technical solutions, an embodiment of the present invention provides a method and an apparatus for uploading and downloading a file, where the method for uploading a file includes: acquiring an uploading request aiming at a target file; dividing the target file into file blocks according to a preset division rule; determining a file block to be uploaded in the divided file blocks; sending a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, wherein the first request comprises the number of the file blocks to be uploaded; receiving a first storage position fed back by the management server, wherein the first storage position is a storage position of the file to be uploaded in a storage server of a cloud storage system; uploading the file block to be uploaded to the first storage position; determining a file block to be uploaded in other file blocks except the file block which is uploaded in the divided file blocks, and returning to execute the step of sending a first request for uploading the file block to be uploaded to a management server of the cloud storage system; and (4) until all file blocks are uploaded. By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a first flowchart of a file uploading method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a second file uploading method according to an embodiment of the present invention;
FIG. 3 is an effect diagram showing a first file management panel in the PS;
FIG. 4 is an effect diagram showing a first login panel in the PS;
fig. 5 is a third flowchart illustrating a file uploading method according to an embodiment of the present invention;
fig. 6 is a fourth flowchart illustrating a file uploading method according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of a fifth method for uploading a file according to an embodiment of the present invention;
fig. 8 is a schematic flowchart of a sixth method for uploading a file according to an embodiment of the present invention;
fig. 9 is a schematic flowchart of a seventh method for uploading a file according to an embodiment of the present invention;
fig. 10 is a schematic flowchart of a file downloading method according to an embodiment of the present invention;
fig. 11 is a schematic flowchart of a file downloading method according to an embodiment of the present invention;
fig. 12 is a schematic flowchart of a third file downloading method according to an embodiment of the present invention;
fig. 13 is a fourth flowchart illustrating a file downloading method according to an embodiment of the present invention;
fig. 14 is a schematic flowchart of a fifth method for downloading a file according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram of a file uploading apparatus according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a file downloading device according to an embodiment of the present invention;
fig. 17 is a schematic flowchart of a file transmission method according to an embodiment of the present invention;
FIG. 18 is an effect diagram showing a third file management panel in the PS;
FIG. 19 is an effect diagram showing a third login panel in the PS;
fig. 20 is a schematic structural diagram of a file transfer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem of the prior art, embodiments of the present invention provide a method and an apparatus for uploading, downloading, and transmitting a file. First, a file uploading method provided by an embodiment of the present invention is described below.
Fig. 1 is a first flowchart of a file uploading method according to an embodiment of the present invention; the method comprises the following steps:
s101: an upload request for a target file is received.
In the embodiment of the present invention, the client having the upload function may receive an upload request for the target file, where the client having the upload function may be a client having a dedicated upload function, or may be a client having an upload function. The client with the dedicated upload function may be a client with only functions related to upload and download, that is, a client customized specifically for upload and download, and the client with the upload function may have other functions besides the upload function, for example, an editing function for a file, and the like.
The client with the upload function may be, for example, PS (adobe photoshop) with the upload function, where the PS is image processing software and is mainly used to process a digital image formed by pixels, that is, it can be understood that the method provided by the embodiment of the present invention is applied to the PS, and specifically, to a plug-in with the upload function in the PS. Of course, the PS includes various versions, and may be, for example, CC (Creative Cloud) version of PS, CS6 version, CS5 version of PS, and the like, and further, the PS is installed in a Mac system, which is a personal consumer computer that apple has started with "Macintosh" since 1984. Of course, the client with the uploading function can also be office software, video editing software, audio editing software, reading software and the like. In practical application, the client with the uploading function can upload the file through the plug-in with the uploading function. A Plug-in (Plug) is a program written in an application interface conforming to a certain specification, and the execution runs under a system platform specified by the program, but cannot run independently from a specified platform. The specific implementation can be as follows: and storing the Plug-in with the uploading function in a folder for storing the Plug-in under an installation directory in the client, wherein the folder can be called Plug-ins. It should be noted that the plug-in may have a download function in addition to an upload function. Of course, the client of the upload function described herein may be installed in a Mac system or a Windows system, which is an operating system developed by microsoft corporation in the united states.
In practical application, after receiving an upload request for a target file, a client starts a file input stream, the file input stream reads data from the file little by little, the read data is stored in a memory, and the memory is a storage space set for a temporary cache of the upload file. Further, if the uploading function of the client is implemented by a plug-in, the file uploading method provided by the embodiment of the invention is implemented by the plug-in.
In practical applications, the installation method of the plug-in is the prior art, and is not described herein. The plug-in is automatically loaded when the client is started, or can be loaded only when triggered. After the plug-in is loaded, the uploading request can be monitored and received, so that the uploading of the target file is realized.
In the embodiment of the invention, the plug-in and the client installed with the plug-in need linkage to realize the uploading of the file. Specifically, the linkage mode between the plug-in and the client is as follows:
the plug-in monitors events such as opening, storage, new creation and the like of the client, the monitoring of the events is realized by using an SDK (Software Development Kit) of the client, and the specific realization process is as follows: and downloading the SDK of the client, developing according to the required functions based on the SDK of the client, and monitoring the event. When the plug-in monitors an event, creating description of the event, then converting each parameter of the event, wherein the converted parameters are different according to the difference of the event, namely, the alias is different, and the converted parameters can enable the plug-in to be compatible with various operations; further, the event is executed, and response events are enumerated according to the parameters after the event conversion, where the enumeration response event is that the parameters after the conversion have a corresponding relationship with the event, and the parameters after the conversion are matched with the event one by one, for example, if the parameters after the conversion are 1234, and the event corresponding to 1234 is stored, a corresponding relationship exists between 1234 and the stored. Then, the event is executed, an error code is returned, and the execution result is identified, wherein the error code is 0 as an example, which represents that the event is successfully executed, and the error code is not 0, which represents that the event is failed to be executed. Finally, the occupied parameter memory used for executing the event is released, and an execution result, namely an error code, is returned.
The linkage between the plug-in and the client is described by taking uploading a target file in the PS as an example:
when the edited target file needs to be uploaded, the local position of the currently edited target file needs to be acquired, and at this time, when the plug-in obtains an upload request for the target file, a description of an event is created, specifically, an event description for acquiring the local position of the target file may be created through sPSActionDescriptor- > Make, which is a global event response function; then, converting the parameters of the event, wherein the different parameters of the event to be converted are different, converting the parameters of the event into character strings which can be understood and identified by the plug-in, and the plug-in can process the event according to the identified character strings, specifically, converting the parameters of the event into an enumeration type parameter through sPSActionReference- > PutEnumrated; executing the uploading event through sPSActionControl- > Get to obtain the reference position of the target file, then obtaining the alias of the file through sPSActionDescriptor- > GetAllas, converting the reference position of the target file into the alias, converting the alias into the readable address of the real file through AliasToFullPath, returning an error code, and finally releasing the memory occupation of a parameter used for executing the event through sPSActionReference- > Free and returning the real address.
In the embodiment of the invention, the plug-in can comprise a page written in a JavaScript language and an uploading logic written in an Objective-C language, and the two are separated, so that decoupling is facilitated. JavaScript (JS) is an transliterated scripting language, which is a dynamic-type, weak-type, prototype-based language, with built-in support types. Objective-C, usually written as ObjC or OC and less often Objective C or Obj-C, is an object-oriented programming language that extends C. The page written in the JavaScript language can be a UI, namely a User Interface (User Interface) short for short, which generally refers to an operation Interface of a User, and the UI design mainly refers to the style and the aesthetic degree of the Interface. In use, the overall design of human-computer interaction, operation logic and interface beauty of software is another gateway which is also important, and in the embodiment of the invention, the UI is a web (webpage) interface. In practical application, the implementation of the plug-in function can be realized only by the mutual cooperation of the JS language and the OC language, and the interaction of the two languages needs to be communicated, that is, the mutual calling of the two languages is realized, and the calling method of the two languages is explained below.
First, JS calls OC
By using the redirection principle of the web interface, that is, the value of document.location is specified again in the JS language, the meaning of document.location is to locate the page content to a specified location, the value of document.location can be understood as a URL (Uniform Resource Locator), and the URL is a concise representation of the location and access method of the Resource that can be obtained from the internet, and is the address of the standard Resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it. As long as the required method in the OC is appointed to be called according to the custom rule in the URL character string, then the JS call OC is realized by capturing the request for processing the JS through the shouldStartLoadWithRequest function in the OC. It should be noted that the shouldStartLoadWithRequest function is a function of the OC language, and is mainly used to capture a request in the JS language.
JS calling by OC
There is a property of windows script object in JS language, script object can be directly obtained, OC can call callWebScript method: methods and parameters of windows script to forward message to the object in JS, OC call JS can be realized, for example [ self. CallWebScriptMethod: withArgments is a function in the OC language, primarily passing messages in the OC to JS.
Specifically, the interaction between the JS language and the OC language is the prior art, and those skilled in the art can realize the interaction between the JS language and the OC language through the published data. In the embodiment of the invention, if the target file is uploaded by the plug-in, the contact between the plug-in and the management server in the cloud storage system needs to be established, and specifically, the management server is remotely logged in through the plug-in so as to establish the contact. When the management server is remotely logged in, the interaction between the JS language and the OC language is needed to be realized. The interaction between the JS language and the OC language in the login process is realized by the method, which is not described herein again. And when the identification information and the password of the user input by the user are detected, verifying according to the identification information and the password of the user, and if the verification is successful, logging in successfully. In specific application, the identification information of the user may be a user name, a mailbox, a mobile phone number, and the like, and certainly, when the information to be input includes the enterprise identification information, the enterprise identification information also needs to be input. In the embodiment of the invention, the login can be automatically performed, and the login can also be performed after the login information is detected.
S102: and dividing the target file into file blocks according to a preset division rule.
The preset partition rule may be that the target file is partitioned according to a preset size, for example, the target file is 15M, and the preset size is 4M, the target file block is partitioned into 3 file blocks of 4M and 1 file block of 3M; of course, the preset partition rule may also be a partition according to the size of the target file and the preset number of blocks, for example, if the target file is 15M and the preset number of blocks is 4, the target file may be partitioned into 1 file block of 6M and 3 file blocks of 3M; the preset partition rule may also be an average partition according to a preset number of blocks, for example, the target file is 15M, and the preset number of blocks is 5 blocks, so that the target file block may be partitioned into 5 file blocks of 3M. The embodiments of the present invention are described by way of examples, and in practical applications, the preset segmentation rules are not limited to the examples.
In practical application, the client with the upload function divides the target file cached in the memory according to a preset division rule, and further, the plug-in with the upload function at the client divides the target file cached in the memory according to the preset division rule.
S103: and determining the file blocks to be uploaded in the well-divided file blocks.
When only one file block is divided, the file block is determined as a file block to be uploaded, when more than one file block is divided, a fixed number of file blocks can be determined as the file block to be uploaded, illustratively, assuming that the fixed number is 16 blocks and the divided file blocks have 4 blocks, the 4 blocks are determined as the file block to be uploaded, if the divided file has 20 blocks, the 16 blocks are determined as the file block to be uploaded, and specifically, the 16 blocks can be randomly selected from the 20 file blocks; in practical application, each of the divided file blocks has its own block number, the block numbers are determined according to the sequence of the division, the block numbers can be numbers or letters, and the file blocks to be uploaded are determined according to the sequence of the block numbers of the divided file blocks. For example, assuming that there are 5 blocks, respectively file blocks 1-5, and the fixed number is two, file block 1 and file block 2 may be determined as file blocks to be uploaded. Of course, the method is not limited to the above method for determining the file block to be uploaded, and the method is not limited to the above method.
When the divided file blocks are more than one block, one of the file blocks can be determined as a file block to be uploaded, and a plurality of file blocks can be determined as file blocks to be uploaded. It should be noted that the number of file blocks to be uploaded may be the same or different in each determination. Specifically, the number of file blocks to be uploaded determined at each time may be determined according to actual conditions.
S104: sending a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, wherein the first request comprises the number of the file blocks to be uploaded.
When the file blocks to be uploaded need to be uploaded, a first request is sent to the management server, where the first request includes the number of the file blocks to be uploaded, and the number of the file blocks to be uploaded is the number of the file blocks to be uploaded determined in S103. In practical application, each divided file block corresponds to a block number, the determined file block to be uploaded also has the corresponding block number, and the first request further includes the block number of each file block to be uploaded, illustratively, the file blocks to be uploaded are file block 1, file block 2, and file block 3, respectively, and the first request includes information that the file block to be uploaded is 3 blocks, which are file block 1, file block 2, and file block 3, respectively.
It should be noted that all the requests with the management server may be https (hyper Text Transfer Protocol over Secure Socket layer), where https is an http (hyper Text Transfer Protocol) channel targeted for security, and is simply a security version of http. http is one of the most widely used network protocols on the internet. Of course, all requests with the management server may also be http requests.
S105: and receiving a first storage position fed back by the management server, wherein the first storage position is a storage position of the file block to be uploaded in a storage server of a cloud storage system.
After receiving the first request, the management server determines a first storage position according to the number of file blocks to be uploaded in the first request. In practical applications, the first storage locations fed back by the management server may be the same as the number of the file blocks to be uploaded, and each of the first storage locations has a corresponding relationship with each of the file blocks to be uploaded, which may be exemplarily shown in table 1.
TABLE 1
File block Storage location
1 A
2 B
3 C
4 D
The first storage location fed back by the management server may be a segment of storage location of the file block to be uploaded in the storage server, and for example, the first storage location may be storage location a-storage location D; of course, the first storage location may be a starting storage location of the file blocks to be uploaded in the storage server, and the storage server stores the file blocks to be uploaded in sequence from the starting storage location.
It should be noted that, if the management server determines that all the file blocks to be uploaded included in the first request have been uploaded according to the first request, the information that has been uploaded is fed back, and if some file blocks to be uploaded included in the first request have not been uploaded, the information that has been fed back includes the block number of the file block that has been uploaded and a first storage location, where the first storage location is determined based on the number of the file blocks that have not been uploaded, so that waste of resources and efficiency due to repeated uploading can be avoided.
S106: and uploading the file blocks to be uploaded according to the first storage position.
In practical application, if a corresponding relationship exists between each storage position in the first storage positions and each file block in the file blocks to be uploaded, the file blocks are uploaded to the corresponding storage positions according to the corresponding relationship; if the first storage position is a segment of storage position, sequentially uploading file blocks according to the starting storage position and the ending storage position of the segment of storage position; and if the first storage position only comprises the initial storage position, uploading the file blocks to be uploaded by taking the initial storage position as a storage starting point, and determining the ending storage position of the file blocks to be uploaded when the file blocks to be uploaded are uploaded completely.
S107: and under the condition that all the segmented file blocks are not uploaded, selecting the file blocks from the file blocks which are not uploaded, updating the file blocks to be uploaded into the selected file blocks, and returning to execute S104 until all the segmented file blocks are uploaded.
In S013, the determined file blocks to be uploaded may be one or more file blocks in the segmented file blocks, and after the file blocks to be uploaded are uploaded, the file blocks in the file blocks that are not uploaded are selected as the file blocks to be uploaded, and the file blocks are continuously uploaded until all the segmented file blocks are uploaded, and at this time, the target file is uploaded completely.
In the embodiment of the invention, the client with the uploading function can upload the file which is edited by the client to the storage server without storing the file which is edited by the client firstly and then uploading the file to the storage server, so that the local space is not occupied, the worries after the local storage space is insufficient are thoroughly liberated, the problem that the file needs to be stored firstly when being stored to the storage server is solved, and the file is prevented from being damaged or lost. Meanwhile, the target file can be directly uploaded to the storage server, so that the step of installing a special uploading function client is omitted, the step of opening the uploading function client is also omitted, and the office work of the client with the uploading function is simplified. In the prior art, a web disk of a webpage is used for storing files, but due to poor performance of the webpage, compared with the prior art, the embodiment of the invention has better user experience. Compared with the existing method for storing files by using a storage medium, the method is not beneficial to data security because the storage medium is possibly damaged at any time. According to the embodiment of the invention, the file is uploaded to the storage server, so that the data security can be realized.
In the embodiment of the invention, the file can be quickly uploaded to the cloud for storage, and compared with the method of locally storing the file, the method of the invention stores the file to the cloud, thereby greatly reducing the possibility of file loss or damage. Moreover, in practical application, the file is uploaded to the cloud, and the cloud provides a public space, so that the file can be shared to other people through the public space, and certainly, the file can also be shared to other people in an external link mode.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced.
In another specific embodiment of the present invention, referring to fig. 2, a second flowchart of a method for uploading a file is provided, and compared with the embodiment shown in fig. 1, in this embodiment, receiving an upload request for a target file (S101) includes:
s1011: whether a first display instruction for displaying a first file operation panel is received or not is monitored.
In practical application, the first display instruction is a display instruction for displaying the first file operation panel, and further, the first display instruction is a display instruction for displaying the file operation panel in the client, specifically, when monitoring a file saving event, a file opening event, and the like of the file, the plug-in the client may default to receiving the first display instruction. It should be noted that, in the embodiment of the present invention, the clients are all clients with an upload function, and further, are clients with plug-ins with an upload function.
S1012: and displaying the first file operation panel.
After receiving the first display instruction, displaying a first file operation panel on the client, where in practical application, the first file operation panel may be a page written by a JavaScript language and is a UI design. Specifically, the first file operation panel is one of interfaces of the plug-in, and the specific display method is implemented by interaction between JS and OC, which is not described herein again. It should be noted that, in the embodiments of the present invention, all the plug-ins are plug-ins with an upload function.
S1013: and receiving an uploading request aiming at the target file sent by the first file operation panel.
In practical application, the connection is established between the client and the first file operation panel, and the client can receive an uploading request sent by the first file operation panel; illustratively, when a "save to cloud disk" button on the first file operation panel is triggered, the client receives an upload request for the target file, and it should be noted that the cloud disk is a cloud storage system.
Further, in an embodiment of the present invention, after receiving the upload request for the target file sent by the first file operation panel, the method further includes:
judging whether the management server of the cloud storage system is successfully logged in;
if the file management is successful, displaying a first file management panel at a first preset position away from the first file operation panel;
if the login is failed, displaying a first login panel, logging in the management server through the first login panel, and displaying a first file management panel at a first preset position away from the first file operation panel after the management server is successfully logged in;
obtaining a target storage path determined according to the display information of the first file management panel;
the first request further comprises: the target storage path;
the receiving the first storage location fed back by the management server includes:
and receiving a first storage position determined by the management server according to the target storage path.
When uploading a file, the client needs to establish connection with the cloud storage system, and further, the file can be uploaded only by establishing connection with a management server and a storage server in the cloud storage system, so that whether the file is successfully logged in the management server needs to be judged.
And after the management server is successfully logged in, displaying the first file management panel at a first preset position away from the first file operation panel. Illustratively, the first file management panel in the PS may be as shown in fig. 3, and in fig. 3, the first file management panel is located on the upper side of the first file operation panel. The first preset position may also be a position on the left side, the right side, the lower side, etc. of the first file operating panel, which is not limited in the embodiment of the present invention.
In practical applications, if the management server is not successfully logged in, the first login panel is displayed, for example, as shown in fig. 4, login information may be input through a login information input box on the first login panel, and after the input is completed, clicking a "login" button considers that a login request is sent to the management server. In practical application, when the management server confirms that the login information is valid, a confirmation result that the login information is valid is fed back to the client, specifically, the login request sent to the management server is that JS calls OC, and when the management server feeds back the confirmation result, the OC calls JS to display the first file operation panel.
After the first file management panel is displayed, a target storage path of the target file can be selected through the first file management panel, the client can obtain the target storage path through the display information of the first file management panel, and specifically, the target storage path can be obtained through JS and OC calling. In practical applications, the first request sent to the management server includes a target storage path, and the management server may determine the first storage location according to the target storage path.
It should be noted that, when a cancel request sent through the first login panel or the first file management panel is received, the corresponding panel is closed, and for example, if a cancel request sent through the first login panel is received, the first login panel is closed.
In a preferred embodiment of the present invention, after uploading the file block to be uploaded according to the first storage location, the method further includes:
and displaying the uploading progress of the target file through the first file management panel.
In practical applications, after the file block to be uploaded is uploaded, the uploading progress of the target file can be displayed through the first file management panel, the uploading progress can be displayed in a percentage manner, and also can be displayed according to the size of the uploaded file, specifically, the display manner is the prior art, and is not described herein again, and reference is made to a manner of progress display when the file is downloaded by thunder and the like.
In a preferred embodiment of the present invention, the method may further comprise:
sending a first object new creation request to the management server through the first file management panel;
receiving result information fed back by the management server and aiming at the first object new building request;
and displaying the newly-built first object in the first file management panel according to the result information.
In practical applications, the first object new request may be a folder new request, and for example, the first object new request may be sent through a "new folder" button in fig. 3, where the first object new request may also carry information such as a storage location and a name of the first object to be newly created. The newly created first object displayed by the first file management panel may be a folder with a name of the first object displayed at a storage location of the first object.
In a preferred embodiment of the present invention, the method may further comprise:
receiving a first log-out request sent by the first file management panel;
and disconnecting the connection with the management server according to the first log-out request.
Illustratively, a first log-out request may be sent via the "log-out" button in fig. 3, and when the connection between the management servers is disconnected, a first file management panel as shown in fig. 4 is presented.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced. Meanwhile, in the embodiment of the invention, the first operation panel for the cloud storage system is provided for the user to operate, so that a client of the cloud storage system which is separately arranged is not required to be used, the step of uploading files by the user is simplified, great convenience is provided for the user to operate the files in the cloud storage system, the time of the user is saved, and the user experience is improved.
Fig. 5 is a schematic flowchart of a third method for uploading a file according to an embodiment of the present invention. Based on the embodiment provided in fig. 1, the file uploading method provided in the embodiment of the present invention further includes S108 and S109 between S101 and S102, wherein,
s108: and sending an acquisition request for acquiring the identification information of the target file to the management server.
The storage server may store a plurality of files at the same time, because the files are stored in the form of file blocks, in order to enable the file blocks uploaded to the storage server to be correctly stored without confusion with the storage of the file blocks of other files, identification information of a target file needs to be acquired, and the identification information of the target file is carried when the file is communicated with the management server or the storage server every time, so that the confusion caused by the simultaneous uploading of a plurality of files is avoided.
In practical applications, the obtaining request includes the size and name of the target file and the identification information of the parent directory where the target file is located in the client. And the management server determines the identification information of the target file in the cloud storage system according to the acquisition request.
S109: and receiving second information fed back by the management server, wherein the second information comprises the identification information of the target file.
Specifically, the first request further includes: identification information of the target file.
The first storage location is determined by the management server according to the identification information of the target file.
The first request is sent to the management server, and the management server can determine the first storage position according to the identification information of the target file, wherein the identification information of the target file is carried in the first request. The management server can determine whether the file blocks of the target file are uploaded or not according to the identification information of the target file, if so, determine a first storage position according to the storage position of the uploaded file blocks, and if not, select a storage position in the storage server according to the identification information of the target file.
Specifically, the second information includes current version information of the target file.
The management server determines the current version information of the target file according to the name of the target file, if the management server records the upload record corresponding to the name of the target file, the historical version of the target file is uploaded, and the current version information of the target file is the No. 3 version, for example, 2 upload records corresponding to the name of the target file are recorded in the management server. The version information of the target file is beneficial to data backup, if the file stored in a local or storage server is deleted or lost, whether the file is stored in the storage server before can be known according to the current version information of the target file, if so, the target file can be obtained in the storage server, and in practical application, the target file is obtained by checking historical version information or a recycle bin, so that the file is ensured not to be lost. Meanwhile, whether the target file has the instance version or not can be determined through the current version information, if yes, the modified content of the target file can be checked according to the checked historical version, and whether the uploaded file historical version is uploaded wrongly or not can be checked at the same time, namely, error correction can be carried out through the current version information.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced. Meanwhile, based on the identification information of the target file, the condition that file blocks are uploaded disorderly can not occur in the uploading process.
In another specific embodiment of the present invention, referring to fig. 6, a fourth flowchart of a method for uploading a file is provided, and in this embodiment, compared with the embodiment shown in fig. 5, uploading the file block to be uploaded according to the first storage location (S106), includes:
s1061: and determining one file block in the file blocks to be uploaded as a target file block.
When the file block to be uploaded is only one block, determining the file block to be uploaded as a target file block; when the file blocks to be uploaded are more than one, one file block can be randomly selected, the selected file block is determined as a target file block, the file blocks in the file blocks to be uploaded can also be sequenced, specifically, the file block with the top sequence can be determined as the target file block according to the block number of the file block in the file blocks to be uploaded, and the file block with the bottom sequence can also be determined as the target file block. The embodiments of the present invention are described by taking the above as examples, and in practical applications, the method for determining the target file block is not limited to the above.
S1062: sending a second request to the storage server.
It should be noted that all the requests sent to the storage server are http requests or https requests.
S1063: and uploading the target file block according to the first storage position.
When the storage position in the first storage position has a corresponding relationship with the target file block, the target file may be uploaded to the corresponding storage position, of course, a storage position may also be randomly selected from the first storage position, the target file block is uploaded to the selected storage position, and when the first storage position only has an initial storage position, the storage position of the target file block is determined according to the initial storage position, and the target file block is uploaded.
S1064: and under the condition that the file blocks to be uploaded are not all uploaded, selecting file blocks from the file blocks not to be uploaded, updating the target file blocks into the selected file blocks, and returning to execute S1062 until all the file blocks to be uploaded are uploaded.
When a plurality of file blocks to be uploaded are provided, because uploading is performed in a serial manner one by one, when uploading of one file block is completed, the next file block needs to be uploaded, and one file block can be selected from the file blocks which are not uploaded to determine as a target file block.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced.
In another specific embodiment of the present invention, referring to fig. 7, a fifth flowchart of a file uploading method is provided, and compared with the embodiment shown in fig. 6, in this embodiment, after uploading the target file block (S1063) according to the first storage location, the method further includes:
s1065: and sending a query request to the management server under the condition of receiving the information of uploading completion fed back by the storage server, wherein the query request is used for querying whether the target file block is uploaded successfully or not.
Specifically, the second request includes: the file system comprises a file block to be uploaded and a file block to be uploaded, wherein the file block to be uploaded comprises a first hash value of each file block: and calculating the hash value of the data stored in each file block in the file blocks to be uploaded.
It should be noted that the number of the first hash values included in the first request is the same as the number of the file blocks in the file block to be uploaded, and specifically, the first hash values are obtained by calculating hash values stored in each file in the file block to be uploaded. In practical applications, the first Hash value may be md5(Message Digest Algorithm 5, fifth edition) value, or may be sha1(Secure Hash Algorithm 1, Secure Hash Algorithm) value. Of course, the first hash value may also be a RIPEMD (RACE Integrity verification Message Digest), although the first hash value is not limited to the above.
S1066: and receiving the query result fed back by the management server.
The storage server sends an inquiry request to the management server after determining the uploading completed information fed back by the target file block, the management server records that the target file block is uploaded when receiving the inquiry request and sends the inquiry request to the storage server, the verification request comprises identification information and a block number of the target file, the storage server determines the target file block according to the determination request, verifies the complete state of the target file block according to a first hash value of the target file block and feeds back a verification result to the management server, and the management server queries a result to the client based on the verification result. It should be noted that, verifying the complete state of the target file block according to the first hash value of the target file block is prior art, and is not described herein again.
S1067: when the query result indicates that uploading fails, judging whether the uploading frequency of the target file block exceeds a first preset frequency or not; and the query result is determined after the storage server checks the complete state of the file block to be uploaded according to the first hash value.
The storage server verifies the integrity of the target file block according to the first hash value of the target file block, if the verification result is complete, the query result is uploading successful, S1064 is executed, if the verification result is incomplete, the query result is uploading failure, and whether the uploading frequency of the target file block exceeds a first preset frequency is determined, where the first preset frequency may be set according to an actual situation, and for example, the first preset frequency may be 3 times. The first preset times are set in the embodiment of the invention, so that the uploading failure of the target file caused by the uploading failure of one file block can be avoided, and the uploading failure probability is reduced. In the embodiment of the invention, the next file block is uploaded after the last file block is successfully uploaded, and when a network fault occurs, the uncompleted part can be continuously uploaded from the uploaded part without uploading and downloading from the beginning, so that breakpoint continuous transmission can be realized, time can be saved, and speed can be increased.
S1068: and displaying a prompt of uploading failure.
In the embodiment of the present invention, during the uploading process, the uploading progress is also displayed, the uploading progress can be increased after the uploading of the target file block is completed, or can be increased after the uploading of the file block is completed, it needs to be explained that when the information of the uploading failure is displayed, the uploading operation is not performed again, and only when the uploading request of the target file is received again, the uploading of the file is performed, the file block corresponding to the file which is failed to be uploaded, and the storage server can be deleted.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced.
In another specific embodiment of the present invention, referring to fig. 8, a sixth flowchart of a method for uploading a file is provided, and compared with the embodiment shown in fig. 7, in this embodiment, before uploading the target file block (S1063) according to the first storage location, the method further includes:
s1069: and encrypting the target file block by using an encryption algorithm and a first secret key recorded by the target file block.
Specifically, the uploading the file block to be uploaded according to the first storage location includes:
and uploading the encrypted target file block according to the first storage position.
In practical applications, the Encryption algorithm may be an AES (Advanced Encryption Standard) 256 Encryption algorithm, and the AES256 Encryption algorithm is an Encryption algorithm of the united states military. AES is a symmetric key algorithm that uses 128, 192 or 256 bit keys and encrypts and decrypts data in 128-bit data block packets. AES names the different key sizes as AES-x, where x is the key size. In the embodiment of the present invention, the first key may be a 256-bit key, and the encryption algorithm is an AES256 encryption algorithm. Of course, the encryption algorithm is not limited to the above algorithm, and may be other algorithms that can implement encryption, which are not listed here. The specific implementation of encrypting the file block by using the encryption algorithm and the recorded key is the prior art, and will not be described herein. The file block is encrypted, so that the safety of data in the uploading process is ensured.
It should be noted that, in practical applications, the first request further includes a sha1 value and an md5 value of each encrypted file block in the file blocks to be uploaded, and the management server stores the sha1 value and the md5 value, which are used to complete downloading of the target file.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced. The file is encrypted, and the safety of data in the uploading process is guaranteed.
In another specific embodiment of the present invention, referring to fig. 9, a seventh flowchart of the method for uploading a file is provided, and compared with the embodiment shown in fig. 5, in this embodiment, after S107, S110, S111, and S112 are further included.
S110: and sending a file block uploading completion confirmation request to the management server.
And after all the divided file blocks are uploaded, sending a determination request to the management server, and after receiving the determination request, the management server determines whether all the file blocks are uploaded.
S111: and receiving a confirmation result fed back by the management server.
In practical application, the determination request includes identification information and block number of the target file, because there may be a plurality of files being uploaded at the same time, the target file needs to be determined according to the identification information, it should be noted that, after the identification information of the target file is obtained, the requests sent to the management server or the storage server all carry the identification information of the target file. And the management server determines whether the missed file blocks exist or not according to the number of the blocks of the target file and the number of the uploaded file blocks recorded by the management server, and feeds back a determination result.
S112: after the confirmation result shows that the missing file blocks exist, uploading the missing file blocks to the first storage position; and returns to execution S110.
When the result of the determination is that no file blocks are left, the management server splices all file blocks of the target file block into a target file and displays the target file, specifically, the existing file downloading process can be referred to, when the file is not downloaded, the file is unreadable and does not display an icon corresponding to the file, when the file is downloaded, the file is readable and the icon corresponding to the file is displayed, the splicing of the file blocks into the target file is that the target file is readable and the icon corresponding to the target file is displayed. After the management server completes the splicing, calculating the sha1 value of the data stored in the spliced target file, and comparing the sha1 value with the sha1 value carried in the acquisition request, wherein the sha1 value is obtained by calculating the hash value of the data stored in the target file, if the two sha1 values are different, the spliced target file is damaged, notifying the client of the damaged information of the target file, and after receiving the information, the client displays a prompt of uploading failure. In practical application, the obtained md5 value of the target file is also included, the md5 value is obtained by calculating data stored in the target file, it should be noted that both the sha1 value and the md5 are hash values, but the lengths are different, the md5 value is 128 bits, and the sha1 value is 160 bits. The management server may also verify if the file is corrupt using the md5 value.
In practical application, when the confirmation result indicates that there is a missing file block, the confirmation result fed back by the management server includes the block number of the missing file block, and when only one file block is missing, the file block is uploaded, and the step of uploading the missing file block is the same as the step of uploading the file block, which is not described herein again. When the missing file blocks are not only one, all the missing file blocks are file blocks to be uploaded, and the specific uploading method is the same as the method for uploading the file blocks to be uploaded, and is not described herein again.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that the error probability in the file uploading process is reduced compared with the prior art.
Fig. 10 is a schematic flowchart of a first method for downloading a file according to an embodiment of the present invention, where the method includes:
s201: sending a download request for a first file to a management server of a cloud storage system, wherein the first file comprises at least one file block.
In the embodiment of the present invention, the client having the downloading function may send a downloading request for the first file to the management server of the cloud storage system, where the client having the downloading function may be a client having a dedicated downloading function, or may be a client having a downloading function. The client with the downloading function may be a client with only related functions to upload and download, that is, a client customized specifically for upload and download, and the client with the downloading function may have other functions besides the downloading function, for example, an editing function for a file, and the like. The client with the downloading function can be realized by a plug-in with the downloading function. The client with the downloading function can be, for example, PS with the downloading function, office software, or the like, and in practical applications, the client with the downloading function can download the file through the plug-in with the downloading function. It should be noted that the plug-in may have an upload function in addition to a download function. Of course, the client of the downloading function can be installed in the Mac system or the Windows system, which is an operating system developed by microsoft corporation in the united states.
In the embodiment of the invention, the plug-in and the client installed with the plug-in need linkage to realize the downloading of the file. Specifically, the linkage between the plug-in and the client is as follows:
the plug-in monitors events such as opening, storage, new creation and the like of the client, the monitoring of the events is realized by using an SDK (Software Development Kit) of the client, and the specific realization process is as follows: and downloading the SDK of the client, developing according to the required functions based on the SDK of the client, and monitoring the event. When the plug-in monitors an event, creating description of the event, then converting each parameter of the event, wherein the converted parameters are different according to the difference of the event, namely, the alias is different, and the converted parameters can enable the plug-in to be compatible with various operations; further, the event is executed, and a response event is enumerated according to the converted parameters of the event, where the enumeration response event is that the converted parameters and the event have a correspondence relationship, and the converted parameters and the event are matched one by one, for example, if the converted parameters are 1234, and the event corresponding to 1234 is saved, then a correspondence relationship exists between 1234 and the saved event. Then, the event is executed, an error code is returned, and the execution result is identified, wherein the error code is 0 as an example, which represents that the event is successfully executed, and the error code is not 0, which represents that the event is failed to be executed. Finally, the occupied parameter memory used for executing the event is released, and an execution result, namely an error code, is returned.
The linkage between the plug-in and the client is described below by taking the first file which is opened and downloaded in the PS as an example:
after the first file is downloaded, the plug-in creates a description of the event, specifically, the event description of the local position of the target file can be created through sPSActionDescriptor- > Make, and sPSActionDescriptor- > Make is a global event response function; then, converting the parameters of the event, specifically, the parameters can be converted through sPSACTIONDescriptor- > PutAlias, and a behavior alias in a C standard format is set through a given key (key), so that the method can be compatible with various operations, and the alias is different according to different events; then, through sPSActionDescriptor- > PutInteger, the parameters are converted, and through a given key, a digital ID (identification, ID number) of the behavior in the C standard format is set; and executing an event of opening the first file and returning an error code through sPSActionControl- > Play, and finally releasing the parameter memory occupation used for executing the event and returning the error code through sPSActionReference- > Free.
S202: and receiving third information fed back by the management server, wherein the third information comprises the file block number of the first file.
It should be noted that the download request includes identification information of the first file, after receiving the download request, the management server feeds back third information according to a correspondence between the identification information of the first file in the download request and information of the first file stored in the management server, where the third information includes a file block number of the first file block, and the client may determine, based on the file block number of the first file, a file block to be downloaded, or may determine whether all the file blocks of the first file are downloaded.
Specifically, the third information further includes: current version information of the first file.
The current version information of the first file mentioned here has the same function as the current version information of the target file in the file uploading method embodiment, and is not described in detail here.
S203: and determining the file blocks to be downloaded based on the number of the file blocks.
When the number of the file blocks is only one, the file block is determined as a file block to be downloaded, when the number of the file block books is more than one, a fixed number of file blocks can be determined as the file block to be downloaded, for example, assuming that the fixed number is 16 blocks, and 4 divided file blocks are provided, the 4 blocks are determined as the file block to be downloaded, if the divided file has 20 blocks, the 16 blocks are determined as the file block to be downloaded, and specifically, the 16 blocks can be randomly selected from the 20 file blocks; in practical application, each of the file blocks of the first file carries a block number, where the block number may be a number or a letter, and it is determined that the file block to be downloaded may be determined according to the order of the block numbers of the file blocks. For example, assuming that there are 5 blocks, respectively file blocks 1-5, and the fixed number is two, file block 1 and file block 2 may be determined as the file blocks to be downloaded. Of course, the method is not limited to the above method for determining the file blocks to be downloaded, and the method is not limited to the above method.
S204: and sending a third request for downloading the file blocks to be downloaded to the management server, wherein the third request comprises the number of the file blocks to be downloaded.
In practical application, the third request includes not only the number of the file blocks to be downloaded, but also the block number of the file blocks to be downloaded, and further includes the identification information of the first file, and the management server determines the second storage location according to the third request after receiving the third request.
In a preferred embodiment of the present invention, after the sending the third request for downloading the file block to be downloaded to the management server, the method further includes:
receiving a second hash value fed back by the management server, wherein the second hash value is: and the hash value of the data stored in each file block in the file blocks to be downloaded is calculated.
It should be noted that the number of the second hash values fed back by the management server is the same as the number of the file blocks in the file block to be downloaded, and the second hash values and the file blocks in the file block to be downloaded have a one-to-one correspondence relationship. The second hash value may be md5 value, sha1 value, or other hash values. The first hash value and the second hash value may be the same type of hash value or different types of hash values. When the first hash value and the second hash value are the same type of hash value, the management server also feeds back the first hash value of the file block to be downloaded.
S205: and receiving a second storage position of the file block to be downloaded fed back by the management server.
The second storage location is determined by the identification information of the first file and the number of the file blocks to be downloaded, if one file block to be downloaded corresponds to one storage location, the second storage location contains the storage locations with the same number as the file blocks to be downloaded, further, a corresponding relationship exists between the block number of the file block to be downloaded and the storage location, and the second storage location can be determined according to the corresponding relationship.
S206: and downloading the file block to be downloaded from the second storage position, and returning to execute S203 under the condition that the first file is not downloaded completely until the first file is downloaded completely.
In practical application, when the downloading of the first file is completed, all file blocks of the first file are merged into a readable first file, and the merging method is the same as the merging method of the file blocks by the file uploading process management server, and is not described herein again. The client with the uploading function judges whether the client can open the first file, if so, the client directly opens the first file to edit the first file, and after the first file is edited, the first file after editing can be directly uploaded to the storage server. If not, a shell command is invoked to open the first file using a default program. The shell is basically a command interpreter that can call the corresponding application.
In the embodiment of the invention, the client with the downloading function can download the edited file at any time, the file is stored in the storage server, the local space is not occupied, the worries after the local storage space is insufficient are thoroughly liberated, and the file is prevented from being damaged or lost. Meanwhile, the file can be directly downloaded, so that the time for searching the file is saved, the step of installing a client with a special uploading function is also saved, the step of opening the client with the uploading function is further saved, and the office work of the client with the uploading function is simplified. The webpage network disk is adopted for storing the files, but due to poor performance of the webpage, compared with the prior art, the embodiment of the invention has better user experience, and compared with the prior art that the files are stored by using the storage medium, the storage medium is possibly damaged at any time, so that the data backup and the safety are not facilitated, and the time for searching the storage medium is saved. In the embodiment of the invention, the file is uploaded to the storage server, and a plurality of clients can view the file.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced.
Fig. 11 is a schematic flowchart of a second file downloading method according to an embodiment of the present invention. Based on the embodiment provided in fig. 10, before the sending a download request for a first file to a management server of a cloud storage system (S201), a file downloading method provided in an embodiment of the present invention further includes:
s207: and monitoring whether a second display instruction for displaying a second file operation panel is received.
It should be noted that the second display instruction is a display instruction for displaying the second file operation panel, and further, the second display instruction is a display instruction for displaying the file operation panel in the client, specifically, when monitoring a file saving event, a file opening event, and the like of the file, the plug-in the client may default to receiving the second display instruction. It should be noted that, in the embodiments of the present invention, the clients are all clients with a downloading function, and further, the clients are clients with plug-ins with a downloading function.
S208: and displaying the second file operation panel.
In practical applications, the second file operation panel may be a page written by JavaScript language, and is a UI design. Specifically, the second file operation panel is one of interfaces of the plug-in, and the specific display method is implemented by interaction between JS and OC, which is not described herein again. Illustratively, the second file operations panel is similar in interface design to the first file operations panel of FIG. 3. It should be noted that, in the embodiments of the present invention, all the plug-ins are plug-ins with a download function.
S209: and judging whether the login of the management server of the cloud storage system is successful.
In practical application, during downloading, the client needs to establish connection with the cloud storage system to complete downloading of the first file, and whether the connection is established with the cloud storage server is judged, which may be whether the client successfully logs in the management server of the cloud storage system.
S210: and displaying a second file management panel at a second preset position away from the second file operation panel.
And displaying the second file operation panel at a second preset position which is away from the second file operation panel under the condition of successfully logging in the management server of the cloud storage system. The second preset position may also be a position on the left side, right side, upper side, lower side, etc. of the second file operation panel, which is not limited in the embodiment of the present invention.
S211: and displaying a second login panel, logging in the management server through the second login panel, and displaying a second file management panel at a second preset position away from the second file operation panel after the management server is successfully logged in.
In practical application, if the management server is not successfully logged in, the second login panel is displayed, login information can be input through a login information input box on the second login panel, and a login request is sent to the management server after the login information is input. In practical application, when the management server confirms that the login information is valid, a confirmation result that the login information is valid is fed back to the client, specifically, the login request sent to the management server is that JS calls OC, and when the management server feeds back the confirmation result, JS is called OC, and a second file operation panel is displayed. Illustratively, the second login panel is similar in interface design to the first login panel in FIG. 4.
S212: and obtaining a target download path determined according to the display information of the second file management panel.
After the second file management panel is displayed, the target download path of the first file can be selected through the second file management panel, and the plug-in the client can obtain the target storage path through the display information of the second file management panel.
The sending of the download request for the first file to the management server of the cloud storage system includes:
sending a download request for the first file to a management server of the cloud storage system through the second file management panel;
the download request further comprises: the target download path;
the receiving of the second storage location of the file block to be downloaded fed back by the management server includes:
and receiving a second storage position determined by the management server according to the target download path.
In this embodiment of the present invention, when downloading the file block to be downloaded from the second storage location, the method may further include:
and displaying the downloading progress of the first file through the second file management panel.
In the embodiment of the present invention, the method may further include:
sending a third object new request to the management server through the second file management panel;
receiving result information fed back by the management server and aiming at the third object new building request;
and displaying the newly-built third object in the third file management panel according to the result information.
In the embodiment of the present invention, the method may further include:
receiving a third log-out request sent by the second file management panel;
and disconnecting the connection with the management server according to the third log-out request.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced. Meanwhile, in the embodiment of the invention, the second operation panel for the cloud storage system is provided for the user to operate, so that a client of the cloud storage system which is separately arranged is not required to be used, the step of downloading the file by the user is simplified, great convenience is provided for the user to operate the file in the cloud storage system, the time of the user is saved, and the user experience is improved.
In another specific embodiment of the present invention, referring to fig. 12, a third flowchart of a file downloading method is provided, and compared with the embodiment shown in fig. 10, in this embodiment, downloading the file block to be downloaded from the second storage location (S206), includes:
s2061: and determining one file block in the file blocks to be downloaded as a first file block.
The way of determining the first file block is the same as the way of determining the target file block, and is not described herein again.
S2062: a fourth request sent to the storage server.
In practical application, the fourth request includes the identification information of the first file block and the block number of the first file block, and the storage server may determine the specific location of the first file block according to the fourth request.
In a specific application, when the first hash value and the second hash value are the same type of hash value, the fourth request includes the second hash value of the first file block, and when the first hash value and the second hash value are different types of hash values, the fourth request includes the first hash value of the first file block.
S2063: and downloading the first file block to be downloaded from the second storage position.
Specifically, the first file block is downloaded from the storage location corresponding to the first file block, and the second storage location includes the storage location corresponding to the first file block.
S2064: and under the condition that the file blocks to be downloaded are not completely downloaded, selecting the file blocks from the file blocks which are not downloaded, updating the first file block to the selected file block, and returning to the execution direction S2062 until the file blocks to be downloaded are completely downloaded.
The manner of selecting the file block from the file blocks not downloaded is the same as the manner of determining the first file block, and is not described herein again.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced.
In another specific embodiment of the present invention, referring to fig. 13, a third flowchart of the file downloading method is provided, and compared with the embodiment shown in fig. 10, in this embodiment, after S2063, S2065, S2066, and S2067 are further included.
S2065: and determining whether the first file block is complete according to a second hash value fed back by the management server, wherein the second hash value is fed back by the management server when the third request is received.
The method for determining whether the first file block pair is complete according to the second hash value by the client is the same as the method for verifying whether the target file block is complete according to the first hash value by the storage server, which is not described herein again. It should be noted that, whether the first file block pair is complete is determined according to the second hash value fed back by the management server, actually, a corresponding relationship exists between the second hash value fed back by the management server and the first file block, the second hash value of the first file block is determined according to the corresponding relationship, and whether the first file block is complete is determined according to the second hash value of the first file block.
In the case where it is determined that the first file block is complete, execution returns to S2064.
S2066: and judging whether the downloading times of the first file block exceed a second preset time.
It should be noted that the second preset number of times may be set according to actual situations, and may be, for example, three times or five times. And when the downloading times of the first file block do not exceed the second preset times, returning to the step of S2063.
S2067: and displaying the information of the download failure.
In the embodiment of the present invention, during the downloading process, the downloading progress may also be displayed, the downloading progress may be increased when the downloading of the first file block is completed, or may be increased after the downloading of the file block to be downloaded is completed, the downloading progress may be displayed in a percentage manner, or may be displayed in the size of the downloaded file, specifically, the display manner is the prior art, and no repeated description is given here, and a manner of displaying the progress when the file is downloaded such as thunderbolt is referred to. It should be noted that, when the information of the download failure is displayed, the download operation is not performed any more, and only when the download request of the target file is received again, the file is downloaded, and the file block corresponding to the file of the download failure can be deleted by the storage server.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced.
In another embodiment of the present invention, referring to fig. 14, a fifth flowchart of a file downloading method is provided, and compared with the embodiment shown in fig. 11, in this embodiment, after S2063, S2068 is further included.
S2068: and decrypting the first file block based on a decryption algorithm and a second secret key recorded by the first file block.
It will be appreciated by those skilled in the art that decryption is the inverse of encryption, and in embodiments of the present invention the decryption algorithm corresponds to the encryption algorithm in the file upload process, and if the encryption algorithm is an AES encryption algorithm, the decryption algorithm is an AES decryption algorithm. It should be noted that the first key is the same as a key used for encrypting the first file block, and decrypting the first file block based on the decryption algorithm and the second key recorded by the first key is prior art and is not described herein again.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced. The downloaded file block is an encrypted file block, so that the safety of data in the downloading process is ensured.
Corresponding to the embodiment of the method shown in fig. 1, fig. 15 is a schematic structural diagram of a file uploading apparatus provided in the embodiment of the present invention, where the apparatus includes: a first receiving module 301, a dividing module 302, a first determining module 303, a first sending module 304, a second receiving module 305, a first uploading module 306 and an updating module 307.
A first receiving module 301, configured to receive an upload request for a target file.
A dividing module 302, configured to divide the target file into file blocks according to a preset dividing rule.
A first determining module 303, configured to determine a file block to be uploaded in the segmented file blocks.
A first sending module 304, configured to send a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, where the first request includes the number of the file blocks to be uploaded.
A second receiving module 305, configured to receive a first storage location fed back by the management server, where the first storage location is a storage location of the file block to be uploaded in a storage server of a cloud storage system.
A first uploading module 306, configured to upload the file block to be uploaded to the first storage location.
An updating module 307, configured to select a file block from the non-uploaded file blocks when the segmented file blocks are not all uploaded, update the file block to be uploaded to the selected file block, and return to execute the first sending module 304 until all the segmented file blocks are uploaded.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced.
Corresponding to the method embodiment shown in fig. 2, the first receiving module may include: the display device comprises a first monitoring submodule, a first display submodule and a first receiving submodule.
The first monitoring submodule is used for monitoring whether a first display instruction for displaying the first file operation panel is received or not;
the first display submodule is used for displaying the first file operation panel under the condition that the monitoring result of the first monitoring submodule is positive;
and the first receiving submodule is used for receiving an uploading request aiming at the target file sent by the first file operation panel.
In a specific embodiment of the present invention, the first receiving module further includes: the display device comprises a first judgment submodule, a second display submodule, a third display submodule and a first obtaining submodule.
The first judgment submodule is used for judging whether the management server of the cloud storage system is successfully logged in;
the second display submodule is used for displaying the first file management panel at a first preset position away from the first file operation panel under the condition that the judgment result of the first judgment submodule is successful;
the third display submodule is used for displaying a first login panel under the condition that the judgment result of the first judgment submodule is failure, logging in the management server through the first login panel, and displaying a first file management panel at a first preset position away from the first file operation panel after the management server is successfully logged in;
the first obtaining submodule is used for obtaining a target storage path determined according to the display information of the first file management panel;
the first request further comprises: the target storage path;
the second receiving module is specifically configured to:
and receiving a first storage position determined by the management server according to the target storage path.
In a preferred embodiment of the present invention, the apparatus further comprises: a first display module.
And the first display module is used for displaying the uploading progress of the target file through the first file management panel.
In a preferred embodiment of the present invention, the apparatus further comprises: and a sixth sending module.
A sixth sending module, configured to send a first object new creation request to the management server;
an eighth receiving module, configured to receive result information, fed back by the management server, of the new request for the first object;
and the first display module is used for displaying the newly-built first object in the first file management panel according to the result information.
In a preferred embodiment of the present invention, the apparatus further comprises: and a ninth receiving module.
A ninth receiving module, configured to receive a first log-out request sent through the first file management panel;
and the first disconnection module is used for disconnecting the connection with the management server according to the first log-out and log-in request.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced. Meanwhile, in the embodiment of the invention, the first operation panel for the cloud storage system is provided for the user to operate, so that a client of the cloud storage system which is separately arranged is not required to be used, the step of uploading files by the user is simplified, great convenience is provided for the user to operate the files in the cloud storage system, the time of the user is saved, and the user experience is improved.
Corresponding to the method embodiment shown in fig. 5, the apparatus further comprises: the device comprises a second sending module and a third receiving module.
And the second sending module is used for sending an acquisition request for acquiring the identification information of the target file to the management server.
In a specific embodiment, the first request further includes: identification information of the target file; the first storage location is determined by the management server according to the identification information of the target file.
And a third receiving module, configured to receive second information fed back by the management server, where the second information includes identification information of the target file. Specifically, the second information includes current version information of the target file.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and compared with the prior art, the error probability in the file uploading process is reduced. Meanwhile, based on the identification information of the target file, the condition that file blocks are uploaded disorderly can not occur in the uploading process.
Corresponding to the embodiment of the method shown in fig. 6, the first uploading module 306 includes: the device comprises a first determining submodule, a first sending submodule, an uploading submodule and a first updating submodule.
And the first determining submodule is used for determining one file block in the file blocks to be uploaded as a target file block.
And the first sending submodule is used for sending a second request to the storage server.
The second request comprises: the file system comprises a file block to be uploaded and a file block to be uploaded, wherein the file block to be uploaded comprises a first hash value of each file block: and the hash value of the data stored in each file block in the file blocks to be uploaded is calculated.
And the uploading sub-module is used for uploading the target file block according to the first storage position.
And the first updating submodule is used for selecting a file block from the file blocks which are not uploaded under the condition that the file blocks to be uploaded are not all uploaded, updating the target file block into the selected file block, and returning to execute the first sending submodule until all the file blocks to be uploaded are uploaded.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced.
Corresponding to the method embodiment shown in fig. 7, the first upload module 306 further includes: the device comprises a second sending submodule, a first receiving submodule, a first judging submodule and a first displaying submodule.
And the second sending submodule is used for sending a query request to the management server under the condition of receiving the uploading completion information fed back by the storage server, wherein the query request is used for querying whether the target file block is uploaded successfully or not.
And the first receiving submodule is used for receiving the query result fed back by the management server.
The first judgment sub-module is used for judging whether the uploading frequency of the target file block exceeds a first preset frequency or not when the query result shows that the uploading fails; and the query result is determined after the storage server checks the complete state of the file block to be uploaded according to the first hash value.
And the first display submodule is used for displaying a prompt of uploading failure under the condition that the judgment result of the judgment submodule is yes.
The uploading submodule is further configured to upload the target file block according to the first storage location when the determination result of the first determining submodule is negative.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced.
Corresponding to the embodiment of the method shown in fig. 8, the first upload module further includes: and an encryption sub-module.
And the encryption sub-module is used for encrypting the target file block by using an encryption algorithm and a first secret key recorded by the encryption sub-module.
The upload sub-module is specifically configured to: and uploading the encrypted target file block according to the first storage position.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced. The file is encrypted, and the safety of data in the uploading process is guaranteed.
Corresponding to the method embodiment shown in fig. 9, the apparatus further comprises: the device comprises a third sending module, a fourth receiving module and a second uploading module.
And the third sending module is used for sending a file block uploading completion confirmation request to the management server after all the divided file blocks are uploaded.
And the fourth receiving module is used for receiving the confirmation result fed back by the management server.
The second uploading module is used for uploading the missing file blocks to the first storage position after the confirmation result shows that the missing file blocks exist; and returns to execute the third sending module 310.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced.
Corresponding to the method embodiment shown in fig. 10, fig. 16 is a schematic structural diagram of a file downloading device according to an embodiment of the present invention, where the device includes: a fourth sending module 401, a fifth receiving module 402, a second determining module 403, a fifth sending module 404, a sixth receiving module 405, and a downloading module 406.
A fourth sending module 401, configured to send a download request for a first file to a management server of a cloud storage system, where the first file includes at least one file block.
A fifth receiving module 402, configured to receive third information fed back by the management server, where the third information includes a file block number of the first file.
A second determining module 403, configured to determine a file block to be downloaded based on the number of file blocks.
A fifth sending module 404, configured to send a third request for downloading the file blocks to be downloaded to the management server, where the third request includes the number of the file blocks to be downloaded.
A sixth receiving module 405, configured to receive the second storage location of the file block to be downloaded fed back by the management server.
A downloading module 406, configured to download the file block to be downloaded from the second storage location, and return to execute the second determining module 403 when the first file is not completely downloaded until the first file is completely downloaded.
Specifically, the third information includes: current version information of the first file.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced.
Corresponding to the method embodiment shown in fig. 11, the apparatus comprises: the display device comprises a first monitoring module, a second display module, a first judgment module, a third display module, a fourth display module and a first acquisition module.
The first monitoring module is used for monitoring whether a second display instruction for displaying a second file operation panel is received or not;
the second display module is used for displaying the second file operation panel under the condition that the monitoring result of the first monitoring module is positive;
the first judgment module is used for judging whether the management server of the cloud storage system is successfully logged in;
the third display module is used for displaying a second file management panel at a second preset position away from the second file operation panel under the condition that the judgment result of the first judgment module is successful;
the fourth display module is used for displaying a second login panel under the condition that the judgment result of the first judgment module is failure, logging in the management server through the second login panel, and displaying a second file management panel at a second preset position away from the second file operation panel after the management server is successfully logged in;
the first obtaining module is used for obtaining a target downloading path determined according to the display information of the second file management panel;
the sixth receiving module is specifically configured to:
sending a download request for the first file to a management server of the cloud storage system through the second file management panel;
the download request further comprises: the target download path;
the sixth receiving module is specifically configured to:
and receiving a second storage position determined by the management server according to the target download path.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced. Meanwhile, in the embodiment of the invention, the second operation panel for the cloud storage system is provided for the user to operate, so that a client of the cloud storage system which is separately arranged is not required to be used, the step of downloading the file by the user is simplified, great convenience is provided for the user to operate the file in the cloud storage system, the time of the user is saved, and the user experience is improved.
Corresponding to the embodiment of the method shown in fig. 12, the apparatus further includes a seventh receiving module.
A seventh receiving module, configured to receive a second hash value fed back by the management server, where the second hash value is: and the hash value of the data stored in each file block in the file blocks to be downloaded is calculated.
The download module 406 includes: a second determining submodule, a third sending submodule, a downloading submodule and a second updating submodule.
The second determining submodule is used for determining one file block in the file blocks to be downloaded as a first file block;
and the third sending submodule is used for sending a fourth request to the storage server.
And the downloading submodule is used for downloading the first file block to be downloaded from the second storage position.
And the second updating submodule is used for selecting the file blocks from the undelivered file blocks, updating the first file block into the selected file block and returning to execute the third sending submodule under the condition that the file blocks to be downloaded are not completely downloaded.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced.
Corresponding to the embodiment of the method shown in fig. 13, the downloading module 406 includes: the display device comprises a second receiving submodule, a third determining submodule, a second judging submodule and a second displaying submodule.
A second receiving submodule, configured to receive a second hash value fed back by the management server, where the second hash value is: and calculating the hash value of the data stored in the file block to be downloaded.
And a third determining submodule, configured to determine whether the first file block is complete according to a second hash value fed back by the management server, where the second hash value is fed back by the management server when the management server receives the third request.
The second updating sub-module is further configured to, when the determination result of the third determining sub-module is yes and the file blocks to be downloaded are not completely downloaded, select a file block from the file blocks that are not downloaded, update the first file block to the selected file block, and return to execute the third sending sub-module.
And the second judging submodule is used for judging whether the downloading frequency of the first file block exceeds a second preset frequency or not under the condition that the determination result of the third determining submodule is negative.
And the second display submodule is used for displaying a prompt of download failure under the condition that the judgment result of the judgment submodule exceeds the preset value.
The download submodule is further configured to download the first file block to be downloaded from the second storage location when the determination result of the second determination submodule is not greater than the determination result of the second determination submodule.
By applying the embodiment of the invention, the file is downloaded in blocks, the downloading time of each file block is shorter, and compared with the prior art, the error probability in the file downloading process is reduced.
Corresponding to the embodiment of the method shown in fig. 14, the download module further includes a decryption sub-module.
And the decryption submodule is used for decrypting the first file block based on a decryption algorithm and a second secret key recorded by the decryption submodule.
By applying the embodiment of the invention, the file is uploaded in blocks, the uploading time of each file block is shorter, and the file blocks are uploaded one by one, so that compared with the prior art, the error probability in the file uploading process is reduced. The downloaded file block is an encrypted file block, so that the safety of data in the downloading process is ensured.
Fig. 17 is a schematic flowchart of a file transmission method according to an embodiment of the present invention, where the method includes:
s501: and monitoring whether a third display instruction for a third file operation panel is received.
In the embodiment of the present invention, the client having the file transfer function may perform monitoring, and the client having the file transfer function may be a client having a dedicated file transfer function, or may be a client having a file transfer function. The client with the file transfer function may be a client with only functions related to file transfer, that is, a client customized for file transfer, and the client with the file transfer function may have other functions besides the file transfer function, for example, an editing function for a file, and the like.
The client with the file transfer function may be, for example, a PS with the file transfer function, and further, the PS is installed in the Mac system, but of course, the client with the file transfer function may also be office software, video editing software, audio editing software, reading software, and the like. In practical application, a client with a file transfer function can realize file transfer through a plug-in with the file transfer function.
In practical application, the third display instruction is a display instruction for displaying a third file operation panel, and further, the third display instruction is a display instruction for displaying a file operation panel in the client, specifically, when monitoring a file saving event, a file opening event, and the like of a file, a plug-in the client may default to receiving the first display instruction. It should be noted that, in the embodiments of the present invention, the clients are all clients with a file transfer function, and further, are clients with plug-ins with a file transfer function.
S502: and displaying the third file operation panel.
And after receiving the third display instruction, displaying a third file operation panel on the client, wherein in practical application, the third file operation panel can be a page written by a JavaScript language and is a UI design. Specifically, the third file operation panel is one of interfaces of the plug-in, and the specific display method is implemented by interaction between JS and OC, which is not described herein again. It should be noted that, in the embodiments of the present invention, all the plug-ins are plug-ins with a file transfer function.
S503: and receiving a file transmission instruction aiming at the second file sent by the third file operation panel.
In practical applications, a connection is established between the client and the third file operation panel, and the client can receive a file transmission instruction through the third file operation panel.
S504: and judging whether the login of the management server of the cloud storage system is successful.
When a file is transmitted, a client needs to establish connection with a cloud storage system, and further, the file transmission can be completed only by establishing connection with a management server and a storage server in the cloud storage system, so that whether the file is successfully logged in the management server needs to be judged.
S505: and displaying a third file management panel at a third preset position away from the third file operation panel.
And after the management server is successfully logged in, displaying a third file management panel at a third preset position away from the third file operation panel. Illustratively, the third file management panel in the PS may be as shown in fig. 18, and in fig. 18, the third file management panel is located on the right side of the third file operation panel. The third preset position may also be a position on the left side, the upper side, the lower side, etc. of the third file operation panel, which is not limited in the embodiment of the present invention. It should be noted that the cloud disk "opened from the cloud disk" and "saved to the cloud disk" in the third file operation panel are the cloud storage system in the embodiment of the present invention.
S506: and displaying a third login panel, logging in the management server through the third login panel, and displaying a second file management panel at a third preset position away from the second file operation panel after the management server is successfully logged in.
In practical applications, if the management server is not successfully logged in, a third login panel is shown, for example, as shown in fig. 19, login information may be input through a login information input box on the third login panel, and after the input is completed, a "login" button is clicked to determine that a login request is sent to the management server. In practical application, when the management server confirms that the login information is valid, a confirmation result that the login information is valid is fed back to the client, specifically, the login request sent to the management server is that JS calls OC, and when the management server feeds back the confirmation result, the OC calls JS to display a third file operation panel.
S507: and acquiring a target path determined according to the display information of the first file management panel, and transmitting the second file according to the target path and the file transmission instruction.
After the third file management panel is displayed, the target path can be selected through the third file management panel, the client can obtain the target path through the display information of the first file management panel, and specifically, the target storage path can be obtained through JS and OC calling. And transmitting according to the target path and the file transmission instruction. The file transmission may be an upload or download of a file, and specifically, the upload or download method of a file may be as described above, or may be another upload or download method, which is not limited herein.
It should be noted that, when a cancel request sent through the first login panel or the first file management panel is received, the corresponding window is closed, and for example, if a cancel request sent through the third login panel is received, the third login panel is closed.
In a preferred embodiment of the present invention, after the obtaining a target path determined according to the display information of the first file management panel and performing file transfer according to the target path and the file transfer instruction, the method further includes:
and displaying the transmission progress of the second file through the third file management panel.
In practical application, after the file is transmitted, the transmission progress of the second target file can be displayed through the third file management panel, the transmission progress can be displayed in a percentage manner, or can be displayed in the size of the transmitted file, specifically, the display manner is the prior art, and is not described herein any more, and refer to the manner of progress display when the file is downloaded in thunder and the like.
In a preferred embodiment of the present invention, the method further comprises:
sending a second object new building request to the management server through the third file management panel;
receiving result information fed back by the management server and aiming at the second object new building request;
and displaying the newly-built second object in the third file management panel according to the result information.
In practical applications, the second object new request may be a folder new request, and for example, the second object new request may be sent through a "new folder" button in fig. 18, and the second object new request may also carry information such as a storage location and a name of the second object to be newly created. The newly created second object displayed by the second file management panel may be a folder with a name of the second object displayed at a storage location of the second object.
In a preferred embodiment of the present invention, the method may further comprise:
receiving a second log-out request sent by the third file management panel;
and disconnecting the connection with the management server according to the second log-out request.
For example, a second logout login request may be sent through the logout button in fig. 18, and when the connection between the management servers is disconnected, a third file management panel as shown in fig. 19 is presented.
By applying the embodiment of the invention, the third operation panel for the cloud storage system is provided for the user to operate, so that a client side of the cloud storage system which is separately arranged is not required to be used, the step of transmitting files by the user is simplified, great convenience is provided for the user to operate the files in the cloud storage system, the time of the user is saved, and the user experience is improved.
Corresponding to the method embodiment shown in fig. 17, fig. 20 is a schematic structural diagram of a file transfer device according to an embodiment of the present invention, where the file transfer device may include: a second monitoring module 601, a fifth displaying module 602, a tenth receiving module 603, a second determining module 604, a sixth displaying module 605, a seventh displaying module 606, and a transmitting module 607.
A second monitoring module 601, configured to monitor whether a third display instruction for a third file operation panel is received;
a fifth displaying module 602, configured to display the third file operating panel if the monitoring result of the second monitoring module is yes;
a tenth receiving module 603, configured to receive a file transmission instruction for the second file sent through the third file operating panel;
a second judging module 604, configured to judge whether to successfully log in a management server of the cloud storage system;
a sixth displaying module 605, configured to display a third file management panel at a third preset position away from the third file operation panel when the determination result of the second determining module 604 is successful;
a seventh display module 606, configured to display a third login panel when the determination result of the second determination module 604 is failure, log in the management server through the third login panel, and display a second file management panel at a third preset position away from the second file operation panel after the management server is successfully logged in;
the transmission module 607 is configured to obtain a target path determined according to the display information of the first file management panel, and transmit the second file according to the target path and the file transmission instruction.
In a preferred embodiment of the present invention, the apparatus may further include: an eighth display module (not shown).
And the eighth display module is used for displaying the transmission progress of the second file through the third file management panel.
In a preferred embodiment of the present invention, the apparatus may further include: a seventh transmitting module, an eleventh receiving module and a second display module (not shown in the figure).
A seventh sending module, configured to send a second object new creation request to the management server through the third file management panel;
an eleventh receiving module, configured to receive result information, fed back by the management server, of the new request for the second object;
and the second display module is used for displaying the newly-built second object in the third file management panel according to the result information.
In a preferred embodiment of the present invention, the apparatus may further include: a twelfth receiving module and a second disconnection module (not shown in the drawings).
A twelfth receiving module, configured to receive a second log-out request sent through the third file management panel;
and the second disconnection module is used for disconnecting the connection with the management server according to the second log-out and log-in request.
By applying the embodiment of the invention, the third operation panel for the cloud storage system is provided for the user to operate, so that a client side of the cloud storage system which is separately arranged is not required to be used, the step of transmitting files by the user is simplified, great convenience is provided for the user to operate the files in the cloud storage system, the time of the user is saved, and the user experience is improved.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (40)

1. A file uploading method is applied to a plug-in with an uploading function in a client, and the client also has an editing function on a file, and the method comprises the following steps:
receiving an uploading request aiming at a target file;
dividing the target file into file blocks according to a preset division rule;
determining a file block to be uploaded in the divided file blocks;
sending a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, wherein the first request comprises the number of the file blocks to be uploaded and the block number of each file block to be uploaded;
receiving a first storage position fed back by the management server, wherein the first storage position is a storage position of the file block to be uploaded in a storage server of a cloud storage system;
uploading the file block to be uploaded according to the first storage position;
under the condition that all the segmented file blocks are not uploaded, selecting a file block from the file blocks which are not uploaded, updating the file block to be uploaded into the selected file block, and returning to execute the step of sending a first request for uploading the file block to be uploaded to a management server of the cloud storage system until all the segmented file blocks are uploaded;
the uploading the file block to be uploaded according to the first storage position comprises:
determining one file block in the file blocks to be uploaded as a target file block;
sending a second request to the storage server, the second request comprising: the first hash value of each file block in the file blocks to be uploaded;
uploading the target file block according to the first storage position;
and under the condition that the file blocks to be uploaded are not all uploaded, selecting the file blocks from the file blocks not to be uploaded, updating the target file blocks into the selected file blocks, and returning to execute the step of sending the second request to the storage server until all the file blocks to be uploaded are uploaded.
2. The method according to claim 1, wherein after the receiving the upload request for the target file, before the dividing the target file into file blocks according to a preset dividing rule, further comprising:
sending an acquisition request for acquiring the identification information of the target file to the management server;
receiving second information fed back by the management server, wherein the second information comprises identification information of the target file;
the first request further comprises: identification information of the target file;
the first storage location is determined by the management server according to the identification information of the target file.
3. The method of claim 2, wherein the second request comprises: the file system comprises a file block to be uploaded and a file block to be uploaded, wherein the file block to be uploaded comprises a first hash value of each file block: the file block to be uploaded is obtained by calculating the hash value of the data stored in each file block;
after the uploading the target file block according to the first storage location, further comprising:
sending a query request to the management server under the condition of receiving information of uploading completion fed back by the storage server, wherein the query request is used for querying whether the target file block is uploaded successfully or not;
receiving a query result fed back by the management server;
when the query result shows that the uploading fails, judging whether the uploading frequency of the target file block exceeds a first preset frequency; the query result is determined after the storage server checks the complete state of the file block to be uploaded according to the first hash value;
if yes, displaying a prompt of uploading failure;
if not, returning to the step of uploading the target file block according to the first storage position.
4. The method of claim 3, further comprising, prior to said uploading said target file block according to said first storage location:
encrypting the target file block by using an encryption algorithm and a first secret key recorded by the target file block;
the uploading the file block to be uploaded according to the first storage position comprises:
and uploading the encrypted target file block according to the first storage position.
5. The method of claim 2, wherein after uploading all of the partitioned file blocks is completed, the method further comprises:
sending a file block uploading completion confirmation request to the management server;
receiving a confirmation result fed back by the management server;
after the confirmation result shows that the missing file blocks exist, uploading the missing file blocks to the first storage position; and returning to execute the step of sending the file block uploading completion confirmation request to the management server.
6. The method of claim 2, wherein the second information further comprises: current version information of the target file.
7. The method of claim 1, wherein receiving an upload request for a target file comprises:
monitoring whether a first display instruction for displaying a first file operation panel is received or not;
if so, displaying the first file operation panel;
and receiving an uploading request aiming at the target file sent by the first file operation panel.
8. The method of claim 7, after receiving the upload request for the target file sent by the first file operation panel, further comprising:
judging whether the management server of the cloud storage system is successfully logged in;
if the file management is successful, displaying a first file management panel at a first preset position away from the first file operation panel;
if the login is failed, displaying a first login panel, logging in the management server through the first login panel, and displaying a first file management panel at a first preset position away from the first file operation panel after the management server is successfully logged in;
obtaining a target storage path determined according to the display information of the first file management panel;
the first request further comprises: the target storage path;
the receiving the first storage location fed back by the management server includes:
and receiving a first storage position determined by the management server according to the target storage path.
9. The method of claim 8, further comprising, after uploading the file block to be uploaded according to the first storage location:
and displaying the uploading progress of the target file through the first file management panel.
10. The method of claim 8, further comprising:
sending a first object new creation request to the management server through the first file management panel;
receiving result information fed back by the management server and aiming at the first object new building request;
and displaying the newly-built first object in the first file management panel according to the result information.
11. The method of claim 8, further comprising:
receiving a first log-out request sent by the first file management panel;
and disconnecting the connection with the management server according to the first log-out request.
12. A file downloading method is applied to a plug-in with a downloading function in a client, and the client also has an editing function for a file, and the method comprises the following steps:
sending a download request for a first file to a management server of a cloud storage system, wherein the first file comprises at least one file block;
receiving third information fed back by the management server, wherein the third information comprises the file block number of the first file;
determining file blocks to be downloaded based on the number of the file blocks;
sending a third request for downloading the file blocks to be downloaded to the management server, wherein the third request comprises the number of the file blocks to be downloaded, and the third request also comprises the block number of the file blocks to be downloaded;
receiving a second storage position of the file block to be downloaded fed back by the management server;
downloading the file blocks to be downloaded from the second storage position, and returning to the step of executing the number of blocks based on the first file and determining the file to be downloaded under the condition that the first file is not downloaded completely until the first file is downloaded completely;
the downloading the file block to be downloaded from the second storage location includes:
determining one file block in the file blocks to be downloaded as a first file block;
a fourth request is sent to a storage server, and the fourth request comprises the hash value of the first file block;
downloading the first file block to be downloaded from the second storage position;
and under the condition that the file blocks to be downloaded are not completely downloaded, selecting the file blocks from the file blocks which are not downloaded, updating the first file block to the selected file block, and returning to the step of executing the fourth request sent to the storage server until the file blocks to be downloaded are completely downloaded.
13. The method according to claim 12, further comprising, after the sending the third request for downloading the file block to be downloaded to the management server:
receiving a second hash value fed back by the management server, wherein the second hash value is: the method comprises the steps of obtaining a hash value of data stored in each file block in the file blocks to be downloaded through calculation;
after the downloading the first file block to be downloaded from the second storage location, further comprising:
determining whether the first file block is complete according to a second hash value fed back by the management server, wherein the second hash value is fed back by the management server when the management server receives the third request;
if yes, returning to the step of selecting a file block from the file blocks which are not downloaded under the condition that the file blocks to be downloaded are not completely downloaded, and updating the first file block into the selected file block;
if not, judging whether the downloading times of the first file block exceed a second preset time;
if yes, displaying a prompt of download failure;
and if not, returning to the step of downloading the first file block to be downloaded from the second storage position.
14. The method of claim 12, further comprising, after said downloading said first file chunk from said second storage location to be downloaded:
and decrypting the first file block based on a decryption algorithm and a second secret key recorded by the first file block.
15. The method of claim 12, wherein the third information further comprises: current version information of the first file.
16. The method of claim 12, wherein prior to the sending of the download request for the first file to the management server of the cloud storage system, the method further comprises:
monitoring whether a second display instruction for displaying a second file operation panel is received or not;
if yes, displaying the second file operation panel;
judging whether the management server of the cloud storage system is successfully logged in;
if the file management is successful, displaying a second file management panel at a second preset position away from the second file operation panel;
if the login is failed, displaying a second login panel, logging in the management server through the second login panel, and displaying a second file management panel at a first preset position away from the second file operation panel after the management server is successfully logged in;
obtaining a target download path determined according to the display information of the second file management panel;
the sending of the download request for the first file to the management server of the cloud storage system includes:
sending a download request for the first file to a management server of the cloud storage system through the second file management panel;
the download request further comprises: the target download path;
the receiving of the second storage location of the file block to be downloaded fed back by the management server includes:
and receiving a second storage position determined by the management server according to the target download path.
17. A file uploading device is applied to a plug-in with an uploading function in a client, and the client also has an editing function on a file, and the device comprises:
the first receiving module is used for receiving an uploading request aiming at a target file;
the segmentation module is used for segmenting the target file into file blocks according to a preset segmentation rule;
the first determining module is used for determining a file block to be uploaded in the divided file blocks;
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending a first request for uploading the file blocks to be uploaded to a management server of a cloud storage system, the first request comprises the number of the file blocks to be uploaded, and the first request also comprises the block number of each file block to be uploaded;
the second receiving module is used for receiving a first storage position fed back by the management server, wherein the first storage position is a storage position of the file block to be uploaded in a storage server of a cloud storage system;
the first uploading module is used for uploading the file block to be uploaded to the first storage position;
the updating module is used for selecting a file block from the file blocks which are not uploaded under the condition that all the segmented file blocks are not uploaded, updating the file block to be uploaded into the selected file block, and returning to execute the first sending module until all the segmented file blocks are uploaded;
the first upload module, comprising:
the first determining submodule is used for determining one file block in the file blocks to be uploaded as a target file block;
a first sending submodule, configured to send a second request to the storage server, where the second request includes: the first hash value of each file block in the file blocks to be uploaded;
the uploading sub-module is used for uploading the target file block according to the first storage position;
and the first updating submodule is used for selecting a file block from the file blocks which are not uploaded under the condition that the file blocks to be uploaded are not all uploaded, updating the target file block into the selected file block, and returning to execute the first sending submodule until all the file blocks to be uploaded are uploaded.
18. The apparatus of claim 17, further comprising:
the second sending module is used for sending an acquisition request for acquiring the identification information of the target file to the management server;
a third receiving module, configured to receive second information fed back by the management server, where the second information includes identification information of the target file;
the first request further comprises: identification information of the target file;
the first storage location is determined by the management server according to the identification information of the target file.
19. The apparatus of claim 18, wherein the second request comprises a first hash value of each file block of the file blocks to be uploaded, wherein the first hash value is: the file block to be uploaded is obtained by calculating the hash value of the data stored in each file block;
the first uploading module further comprises:
the second sending submodule is used for sending a query request to the management server under the condition of receiving the uploading completion information fed back by the storage server, wherein the query request is used for querying whether the target file block is uploaded successfully;
the first receiving submodule is used for receiving the query result fed back by the management server;
the first judgment sub-module is used for judging whether the uploading frequency of the target file block exceeds a first preset frequency or not when the query result shows that the uploading fails; the query result is determined after the storage server checks the complete state of the file block to be uploaded according to the first hash value;
the first display submodule is used for displaying a prompt of uploading failure under the condition that the judgment result of the judgment submodule is yes;
the uploading submodule is further configured to upload the target file block according to the first storage location when the judgment result of the judging submodule is negative.
20. The apparatus of claim 19, wherein the upload module further comprises:
the encryption submodule is used for encrypting the target file block by utilizing an encryption algorithm and a first secret key recorded by the encryption submodule;
the upload sub-module is specifically configured to:
and uploading the encrypted target file block according to the first storage position.
21. The apparatus of claim 18, further comprising:
the third sending module is used for sending a file block uploading completion confirmation request to the management server after all the divided file blocks are uploaded;
a fourth receiving module, configured to receive a confirmation result fed back by the management server;
the second uploading module is used for uploading the missing file blocks to the first storage position after the confirmation result shows that the missing file blocks exist; and returning to execute the third sending module.
22. The apparatus of claim 18, wherein the second information comprises: current version information of the target file.
23. The apparatus of claim 17, wherein the first receiving module comprises:
the first monitoring submodule is used for monitoring whether a first display instruction for displaying the first file operation panel is received or not;
the first display sub-module is used for displaying the first file operation panel under the condition that the monitoring result of the first monitoring sub-module is positive;
and the first receiving submodule is used for receiving an uploading request aiming at the target file sent by the first file operation panel.
24. The apparatus of claim 23, the first receiving module, further comprising:
the first judgment submodule is used for judging whether the management server of the cloud storage system is successfully logged in;
the second display submodule is used for displaying the first file management panel at a first preset position away from the first file operation panel under the condition that the judgment result of the first judgment submodule is successful;
the third display submodule is used for displaying a first login panel under the condition that the judgment result of the first judgment submodule is failure, logging in the management server through the first login panel, and displaying a first file management panel at a first preset position away from the first file operation panel after the management server is successfully logged in;
the first obtaining submodule is used for obtaining a target storage path determined according to the display information of the first file management panel;
the first request further comprises: the target storage path;
the second receiving module is specifically configured to:
and receiving a first storage position determined by the management server according to the target storage path.
25. The apparatus of claim 24, further comprising:
and the first display module is used for displaying the uploading progress of the target file through the first file management panel.
26. The apparatus of claim 24, further comprising:
a sixth sending module, configured to send a first object new creation request to the management server;
an eighth receiving module, configured to receive result information, fed back by the management server, of the new request for the first object;
and the first display module is used for displaying the newly-built first object in the first file management panel according to the result information.
27. The apparatus of claim 24, further comprising:
a ninth receiving module, configured to receive a first log-out request sent through the first file management panel;
and the first disconnection module is used for disconnecting the connection with the management server according to the first log-out and log-in request.
28. A file downloading apparatus, which is applied to a plug-in having a downloading function in a client, the client further having an editing function for a file, the apparatus comprising:
a fourth sending module, configured to send a download request for a first file to a management server of a cloud storage system, where the first file includes at least one file block;
a fifth receiving module, configured to receive third information fed back by the management server, where the third information includes a file block number of the first file;
the second determining module is used for determining the file blocks to be downloaded based on the number of the file blocks;
a fifth sending module, configured to send a third request for downloading the file blocks to be downloaded to the management server, where the third request includes the number of the file blocks to be downloaded, and the third request further includes a block number of the file block to be downloaded;
a sixth receiving module, configured to receive the second storage location of the file block to be downloaded, where the second storage location is fed back by the management server;
the downloading module is used for downloading the file block to be downloaded from the second storage position, and returning to execute the second determining module under the condition that the first file is not completely downloaded until the first file is completely downloaded;
the download module comprises:
the second determining submodule is used for determining one file block in the file blocks to be downloaded as a first file block;
the third sending submodule is used for sending a fourth request to the storage server, and the fourth request comprises the hash value of the first file block;
the downloading submodule is used for downloading the first file block to be downloaded from the second storage position;
and the second updating submodule is used for selecting the file blocks from the undelivered file blocks, updating the first file block into the selected file block and returning to execute the third sending submodule under the condition that the file blocks to be downloaded are not completely downloaded.
29. The apparatus of claim 28, further comprising:
a seventh receiving module, configured to receive a second hash value fed back by the management server, where the second hash value is: the method comprises the steps of obtaining a hash value of data stored in each file block in the file blocks to be downloaded through calculation;
the download module further comprises:
a third determining submodule, configured to determine whether the first file block is complete according to a second hash value fed back by the management server, where the second hash value is fed back by the management server when the management server receives the third request;
the second updating sub-module is further configured to, if the determination result of the third determining sub-module is yes, select a file block from the file blocks to be downloaded, update the first file block to the selected file block, and return to execute the third sending sub-module, if the file blocks to be downloaded are not all downloaded;
the second judgment submodule is used for judging whether the downloading frequency of the first file block exceeds a second preset frequency or not under the condition that the determination result of the second updating submodule is negative;
the second display submodule is used for displaying a prompt of download failure under the condition that the judgment result of the second judgment submodule exceeds the judgment result of the second judgment submodule;
the download submodule is further configured to download the first file block to be downloaded from the second storage location when the determination result of the second determination submodule is not exceeded.
30. The apparatus of claim 28, wherein the download module further comprises:
and the decryption submodule is used for decrypting the first file block based on a decryption algorithm and a second secret key recorded by the decryption submodule.
31. The apparatus of claim 28, wherein the third information comprises: current version information of the first file.
32. The apparatus of claim 28, further comprising:
the first monitoring module is used for monitoring whether a second display instruction for displaying a second file operation panel is received or not;
the second display module is used for displaying the second file operation panel under the condition that the monitoring result of the first monitoring module is positive;
the first judgment module is used for judging whether the management server of the cloud storage system is successfully logged in;
the third display module is used for displaying a second file management panel at a second preset position away from the second file operation panel under the condition that the judgment result of the first judgment module is successful;
the fourth display module is used for displaying a second login panel under the condition that the judgment result of the first judgment module is failure, logging in the management server through the second login panel, and displaying a second file management panel at a second preset position away from the second file operation panel after the management server is successfully logged in;
the first obtaining module is used for obtaining a target downloading path determined according to the display information of the second file management panel;
the sixth receiving module is specifically configured to:
sending a download request for the first file to a management server of the cloud storage system through the second file management panel;
the download request further comprises: the target download path;
the sixth receiving module is specifically configured to:
and receiving a second storage position determined by the management server according to the target download path.
33. A file transmission method is applied to a plug-in with a file transmission function in a client, and the client also has an editing function for files, and the method comprises the following steps:
monitoring whether a third display instruction for a third file operation panel is received;
if so, displaying the third file operation panel;
receiving a file transmission instruction aiming at a second file sent by the third file operation panel;
judging whether the management server of the cloud storage system is successfully logged in;
if the operation is successful, displaying a third file management panel at a third preset position away from the third file operation panel;
if the login is failed, displaying a third login panel, logging in the management server through the third login panel, and displaying a second file management panel at a third preset position away from the second file operation panel after the management server is successfully logged in;
obtaining a target path determined according to the display information of the first file management panel, and transmitting the second file according to the target path and the file transmission instruction;
the transmission of the second file comprises: uploading the second file according to the uploading method of any one of claims 1-11, or downloading the second file according to the downloading method of any one of claims 12-16.
34. The method according to claim 33, wherein after obtaining the target path determined according to the presentation information of the first document management panel and performing document transmission according to the target path and the document transmission instruction, the method further comprises:
and displaying the transmission progress of the second file through the third file management panel.
35. The method of claim 33, further comprising:
sending a second object new building request to the management server through the third file management panel;
receiving result information fed back by the management server and aiming at the second object new building request;
and displaying the newly-built second object in the third file management panel according to the result information.
36. The method of claim 33, further comprising:
receiving a second log-out request sent by the third file management panel;
and disconnecting the connection with the management server according to the second log-out request.
37. A file transmission device is applied to a plug-in with a file transmission function in a client, and the client also has an editing function for files, and the device comprises:
the second monitoring module is used for monitoring whether a third display instruction for a third file operation panel is received or not;
the fifth display module is used for displaying the third file operation panel under the condition that the monitoring result of the second monitoring module is positive;
a tenth receiving module, configured to receive a file transmission instruction for a second file sent through the third file operating panel;
the second judgment module is used for judging whether the management server of the cloud storage system is successfully logged in;
a sixth display module, configured to display a third file management panel at a third preset position away from the third file operation panel when the determination result of the second determination module is successful;
the seventh display module is used for displaying a third login panel under the condition that the judgment result of the second judgment module is failure, logging in the management server through the third login panel, and displaying a second file management panel at a third preset position away from the second file operation panel after the management server is successfully logged in;
the transmission module is used for obtaining a target path determined according to the display information of the first file management panel and transmitting the second file according to the target path and the file transmission instruction;
the transmission module is specifically configured to upload the second file according to the upload method of any one of claims 1 to 11, or download the second file according to the download method of any one of claims 12 to 16.
38. The apparatus of claim 37, further comprising:
and the eighth display module is used for displaying the transmission progress of the second file through the third file management panel.
39. The apparatus of claim 37, further comprising:
a seventh sending module, configured to send a second object new creation request to the management server through the third file management panel;
an eleventh receiving module, configured to receive result information, fed back by the management server, for the second object new creation request;
and the second display module is used for displaying the newly-built second object in the third file management panel according to the result information.
40. The apparatus of claim 37, further comprising:
a twelfth receiving module, configured to receive a second log-out request sent through the third file management panel;
and the second disconnection module is used for disconnecting the connection with the management server according to the second log-out and log-in request.
CN201611151740.0A 2016-12-14 2016-12-14 File uploading, downloading and transmitting method and device Active CN108234539B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611151740.0A CN108234539B (en) 2016-12-14 2016-12-14 File uploading, downloading and transmitting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611151740.0A CN108234539B (en) 2016-12-14 2016-12-14 File uploading, downloading and transmitting method and device

Publications (2)

Publication Number Publication Date
CN108234539A CN108234539A (en) 2018-06-29
CN108234539B true CN108234539B (en) 2022-06-03

Family

ID=62638309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611151740.0A Active CN108234539B (en) 2016-12-14 2016-12-14 File uploading, downloading and transmitting method and device

Country Status (1)

Country Link
CN (1) CN108234539B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241002B (en) * 2018-09-10 2022-02-01 创新先进技术有限公司 File uploading method, device and equipment
CN109922142B (en) * 2019-02-21 2022-04-19 创新先进技术有限公司 File downloading method, device and system
CN111610970A (en) * 2019-02-22 2020-09-01 广东真才企链信息科技有限公司 Method for asynchronously submitting large data scale list package
CN110247986A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of document transmission method, device and electronic equipment
CN110336871A (en) * 2019-07-01 2019-10-15 江苏满运软件科技有限公司 A kind of document handling method, device, storage medium and electronic equipment
CN110610103A (en) * 2019-09-24 2019-12-24 成都卫士通信息安全技术有限公司 Method and device for verifying confidential document
CN110784524A (en) * 2019-10-14 2020-02-11 广州微算互联信息技术有限公司 Cloud mobile phone file uploading keep-alive method, device and system
CN112883427A (en) * 2019-11-29 2021-06-01 航天信息股份有限公司 Method and device for detecting integrity of file
CN111159291A (en) * 2019-12-19 2020-05-15 视联动力信息技术股份有限公司 Progress bar display method and device, terminal equipment and storage medium
CN111193785B (en) * 2019-12-20 2023-05-02 北京淇瑀信息科技有限公司 File cutting and transmitting method and device and electronic equipment
CN111147332B (en) * 2019-12-29 2022-04-29 北京浪潮数据技术有限公司 Method, system and related device for determining uploading progress of cloud backup of storage system
CN112468511B (en) * 2020-12-11 2023-02-03 建信金融科技有限责任公司 File transmission method and device
CN112822260B (en) * 2020-12-31 2023-06-09 北京天融信网络安全技术有限公司 File transmission method and device, electronic equipment and storage medium
CN113271343A (en) * 2021-04-28 2021-08-17 华录光存储研究院(大连)有限公司 Data downloading and uploading method and electronic equipment
CN114338646A (en) * 2021-11-29 2022-04-12 王建冬 File interactive transmission method, device, equipment and storage medium
CN114401261A (en) * 2021-12-29 2022-04-26 中国电信股份有限公司 File downloading method and device
CN114338653A (en) * 2021-12-29 2022-04-12 中国电信股份有限公司 File breakpoint resuming method and device
CN114500514B (en) * 2022-02-14 2023-12-12 京东科技信息技术有限公司 File transmission method and device for cloud storage, electronic equipment and storage medium
CN114866536A (en) * 2022-05-31 2022-08-05 北京奕斯伟计算技术有限公司 File uploading method and WEB front end

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973421A (en) * 2013-02-06 2014-08-06 腾讯科技(深圳)有限公司 File transmitting method and device
CN104468843A (en) * 2014-12-31 2015-03-25 浪潮软件股份有限公司 File uploading method and device
CN105472035A (en) * 2016-01-04 2016-04-06 百度在线网络技术(北京)有限公司 File transmission method and device
CN105491132A (en) * 2015-12-11 2016-04-13 北京元心科技有限公司 File server, terminal and file subpackage transmission method

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8510267B2 (en) * 2011-03-08 2013-08-13 Rackspace Us, Inc. Synchronization of structured information repositories
KR20130046540A (en) * 2011-10-28 2013-05-08 삼성에스디에스 주식회사 Data transmitting apparatus and method
CN102739689B (en) * 2012-07-16 2015-05-13 四川师范大学 File data transmission device and method used for cloud storage system
CN103685332B (en) * 2012-08-31 2018-04-24 腾讯科技(深圳)有限公司 File uploading method, client, server and system
CN103731451B (en) * 2012-10-12 2018-10-19 腾讯科技(深圳)有限公司 A kind of method and system that file uploads
CN105025053A (en) * 2014-04-24 2015-11-04 苏宁云商集团股份有限公司 Distributed file upload method based on cloud storage technology and system
CN105227610A (en) * 2014-06-30 2016-01-06 北京金山安全软件有限公司 File uploading and storing method and device
CN104580395B (en) * 2014-12-22 2018-02-23 西安电子科技大学 A kind of cloudy collaboration Storage Middleware Applying system based on existing cloud storage platform
CN104539739B (en) * 2015-01-26 2019-03-29 浙江大学 A kind of system, method and device that file uploads
CN105338090A (en) * 2015-11-12 2016-02-17 浪潮软件集团有限公司 WebSocket-based breakpoint continuous transmission method and device
CN105847139A (en) * 2016-03-25 2016-08-10 乐视控股(北京)有限公司 Data transmission method, apparatus and system
CN105872036A (en) * 2016-03-28 2016-08-17 联想(北京)有限公司 Data uploading, downloading method, electronic equipment and server
CN105893511A (en) * 2016-03-30 2016-08-24 电子科技大学 Method for data copy trace retention through agent cloud
CN105872102B (en) * 2016-06-06 2018-12-18 武汉理工大学 A kind of File Upload and Download method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973421A (en) * 2013-02-06 2014-08-06 腾讯科技(深圳)有限公司 File transmitting method and device
CN104468843A (en) * 2014-12-31 2015-03-25 浪潮软件股份有限公司 File uploading method and device
CN105491132A (en) * 2015-12-11 2016-04-13 北京元心科技有限公司 File server, terminal and file subpackage transmission method
CN105472035A (en) * 2016-01-04 2016-04-06 百度在线网络技术(北京)有限公司 File transmission method and device

Also Published As

Publication number Publication date
CN108234539A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
CN108234539B (en) File uploading, downloading and transmitting method and device
WO2022252632A1 (en) Data encryption processing method and apparatus, computer device, and storage medium
US20120226823A1 (en) Document distribution system and method
US9430211B2 (en) System and method for sharing information in a private ecosystem
US9311326B2 (en) Virtual file system for automated data replication and review
CN106878265B (en) Data processing method and device
US20150326667A1 (en) Peer-to-peer sharing of cloud-based content
US20170371625A1 (en) Content delivery method
US10630722B2 (en) System and method for sharing information in a private ecosystem
KR20190018869A (en) System and method for providing storage service based on block chain
KR101623742B1 (en) Method and system for sharing file related messages
CN112948340A (en) Data synchronization method and device, electronic equipment and readable storage medium
US7533125B2 (en) Managing a data file with an access code
US9332405B2 (en) Short message backup method, mobile terminal, and server
US20110154015A1 (en) Method For Segmenting A Data File, Storing The File In A Separate Location, And Recreating The File
WO2021098277A1 (en) Blockchain file access method and apparatus, computer device and storage medium
CN113468599A (en) File storage certificate method, device, system, equipment and storage medium
KR20090003405A (en) File upload system and method
US20080271112A1 (en) Automatic file transfer
CN111222075A (en) Data transmission method based on multiple Webviews, server and storage medium
CN114615031A (en) File storage method and device, electronic equipment and storage medium
US20120030556A1 (en) Method for enabling interactive content within messaging application
US20150046565A1 (en) System and method for archiving messages
US6714950B1 (en) Methods for reproducing and recreating original data
US7650392B1 (en) Dynamic content processing in a reverse proxy service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant