CN105007333A - Managing method and system for file transmitting - Google Patents

Managing method and system for file transmitting Download PDF

Info

Publication number
CN105007333A
CN105007333A CN201510489825.9A CN201510489825A CN105007333A CN 105007333 A CN105007333 A CN 105007333A CN 201510489825 A CN201510489825 A CN 201510489825A CN 105007333 A CN105007333 A CN 105007333A
Authority
CN
China
Prior art keywords
file
management server
document management
parameter
client
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.)
Pending
Application number
CN201510489825.9A
Other languages
Chinese (zh)
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.)
Codyy Education Technology Co Ltd
Original Assignee
Codyy Education 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 Codyy Education Technology Co Ltd filed Critical Codyy Education Technology Co Ltd
Priority to CN201510489825.9A priority Critical patent/CN105007333A/en
Publication of CN105007333A publication Critical patent/CN105007333A/en
Pending legal-status Critical Current

Links

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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a managing method and system for file transmitting. The method comprises following steps. A file managing server receives a file state request first and feeds back a file state response to a client. The client determines the corresponding control strategy of file transmitting based on the types of parameters carried in the corresponding file state response. A managing system for file transmitting is also provided. The system comprises a client, and a file managing server. The client and the file managing server are connected.

Description

A kind of file transfer management method and system
Technical field
The invention belongs to file transfer field, particularly relate to a kind of file transfer management method and system.
Background technology
Existing a lot of download service business supports the breakpoint transmission function downloaded, but is but a vacancy for the big file uploading based on http protocol.Client is when upload file, probably upload interrupting or stopping because the reason such as network interruption, operating system causes, the part of not uploading of file can not be continued to upload, must restart when causing client again to be uploaded, so not only wasted Internet resources but also lost time, reducing efficiency of transmission.
Summary of the invention
The invention provides a kind of file transfer management method and system, to solve the problem.
The invention provides a kind of file transfer management method.Said method comprises the following steps: document management server responds to client feedback file status after receiving file status request; Described client, according to the parameter type carried in file status response, determines corresponding file transfer control strategy.
The present invention also provides a kind of file transfer management systems, and said system comprises client, document management server, and described client is connected with described document management server; Described client, for sending file status request to described document management server; The parameter type carried during the file status of described client also for feeding back according to described document management server responds, determines corresponding file transfer control strategy; Described document management server, after receiving file status request, and to described client feedback file status response.
Compared to prior art, a kind of file transfer management method and system provided by the invention, file status request is sent by client to document management server in the present invention, and according to the parameter type carried in the file status response of document management server feedback, determine corresponding file transfer control strategy, achieve the segment transmissions of file, greatly saved uplink time, improve transfer efficiency.
By following scheme: there is parameter and the existence of file entirety if the parameter type carried in the response of described file status is file, judge that the file MD5 value obtaining the storage of described client is identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is identical file, transmission end of file transfer information; Parameter is there is and the existence of file entirety if the parameter type carried in described file status response is file, judge that the file MD5 value obtaining the storage of described client is not identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is not identical file, then described document management server deletes the file stored, and described client sends upload request to described document management server again; If the parameter type carried in described file status response is file there is parameter and file part existence, then described client sends file increment upload request to described document management server, described document management server responds to described client feedback file transfer result, described client is according to the parameter type carried in described file transfer result response, and control documents transmits; Both achieved file fragmentation transmission, and also verification of correctness had been carried out to the file after uploading, thus both ensure that the efficiency of files passe, also ensure that the fail safe of files passe, avoid file and may be illegally modified in upload procedure.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Figure 1 shows that the flow chart of the file transfer management method that preferred embodiment according to the present invention provides;
Figure 2 shows that the structural representation of the file transfer management systems that preferred embodiment according to the present invention provides;
The schematic flow sheet of the file transfer management method provided according to another preferred embodiment of the invention is provided.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Be illustrated in figure 1 the flow chart of the file transfer management method that preferred embodiment according to the present invention provides.As shown in Figure 1, the file transfer management method that preferred embodiment of the present invention provides comprises step 101-102.
Step 101: document management server responds to client feedback file status after receiving file status request;
Described file status request is HEAD request, wherein, carries document entity parameter in described HEAD request.
The parameter type carried in the response of described file status comprises that file exists parameter and 200OK1 parameter, file does not exist parameter i.e. 404 parameters, resource contention parameter i.e. 409 parameters.
Described file existence comprises the existence of file entirety, file part exists.
Described file part existence refers to that the file size that client stores and Content-Length are greater than the file size Content-Length of described document management server storage.
Step 102: described client, according to the parameter type carried in file status response, determines corresponding file transfer control strategy.
Described client, according to the parameter type carried in file status response, determines that the process of corresponding file transfer control strategy is:
Parameter is there is and the existence of file entirety if the parameter type carried in described file status response is file, judge that the file MD5 value obtaining the storage of described client is identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is identical file, transmission end of file transfer information;
Parameter is there is and the existence of file entirety if the parameter type carried in described file status response is file, judge that the file MD5 value obtaining the storage of described client is not identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is not identical file, then described document management server deletes the file stored, and described client sends upload request to described document management server again;
If the parameter type carried in described file status response is file there is parameter and file part existence, then described client sends file increment upload request to described document management server, described document management server responds to described client feedback file transfer result, described client is according to the parameter type carried in described file transfer result response, and control documents transmits.
The parameter type carried in described file transfer result response comprises files passe Success parameter and 200OK2 parameter, resource contention parameter i.e. 409 parameters, file error parameter; Wherein, described file error parameter comprises 400 parameters, 421 parameters, 422 parameters, 423 parameters.
Described client is according to the parameter type carried in described file transfer result response, determine that the process of corresponding file transfer control strategy is: the parameter type carried in described file transfer result response is resource contention parameter, then described client sends file status request to described document management server again.
When the parameter type carried in the response of described file transfer result be files passe Success parameter and 200OK2 parameter time, after described client sends file status request to described document management server again, described document management server responds to described client feedback file status, described client, according to the parameter type carried in file status response, determines corresponding file transfer control strategy.
Citing is below described in detail:
Carry out in the process of file transfer in client and document management server, specifically as shown in Figure 3, the HEAD based on HTTP that first client sends file 1 to document management server asks (i.e. file status request), after document management server receives the file status request of file 1, judge self whether storage file 1.
When document management server judges to obtain self storing file 1 (namely file exists), and file 1 does not have MD5 value that is locked, file 1 not to be sky, and document management server sends to client and carries the file status response that file exists parameter (i.e. 200OK1).
In another preferred embodiment, when document management server judges to obtain self storing file 1 (namely file exists), and file 1 does not have MD5 value that is locked, file 1 to be sky, then lock file 1, the MD5 value of calculation document 1, and MD5 value is stored in the index of file 1 correspondence, after unlocking, document management server sends to client and carries the file status response that file exists parameter (i.e. 200OK1).
In yet another preferred embodiment, when judgement obtains storing file 1 in document management server, and file 1 is locked, document management server sends to client and carries resource contention parameter (i.e. 409 parameters, 409 parameters refer to document management server files by other client upload or calculating MD5, do not comprise Content-Length and ETag head in response) file status response.The HEAD that client continues to send based on HTTP to document management server after receiving file status response asks;
Carry when client receives document management server transmission the file status response that file exists parameter 200OK1 (comprising Content-Length and ETag head in parameter 200OK1), then the length of the file 1 length of the file 1 stored in document management server and client stored compares:
When being less than the length (Content-Length) of the file 1 that client stores by comparing the length (Content-Length) obtaining the file 1 that document management server stores, namely file part exists, and the POST that client sends based on HTTP to document management server asks (i.e. file increment upload request);
When equaling the length (Content-Length) of the file 1 that client stores by comparing the length (Content-Length) obtaining the file 1 that document management server stores, namely file entirety exists, (the file 1 MD5 value on the client) of the file 1 that the ETag (the MD5 value of file 1 on document management server) of the file 1 that client comparison document management server stores and client store, if the MD5 value of the file 1 that both store is identical, then judge that obtaining both files 1 of storage is identical file, then send end of file transfer information; If the MD5 value of the file 1 that both store is not identical, then judge that obtaining both files 1 of storage is not identical file, file 1 on document management server is deleted by document management server, and described client sends upload request to described document management server again.
When being greater than the length (Content-Length) of the file 1 that client stores by comparing the length (Content-Length) obtaining the file 1 that document management server stores, need the file 1 to document management server stores to delete, after deleting, client sends file status request to document management server.
In another preferred embodiment, when judgement obtains non-storage file 1 (namely file does not exist) in document management server, document management server sends to client and carries the file status response that file does not exist parameter (i.e. 404 parameters).The POST that client sends based on HTTP to document management server asks.
Suppose that the POST sent based on HTTP to document management server when client asks (i.e. file increment upload request), document management server judges the Content-Length head of file 1 and Range information, and sends corresponding file transfer result response.
When judge to obtain the Content-Length head of file 1 and Range information undesirable, then document management server sends file transfer response to client, carry file error parameter in file transfer response, and the initial value of Content-Length and Range compared:
When obtaining lacking Range head or Content-Length head in file transfer result, or Range expression way mistake, client sends the file transfer response of carrying file error parameter 400 to document management server;
When the initial value obtaining Range in file transfer result is greater than Content-Length, client sends the file transfer response of carrying file error parameter 421 to document management server;
When the initial value obtaining Range in file transfer result is less than Content-Length, client sends the file transfer response of carrying file error parameter 422 to document management server;
When the length and Content-Length that obtain Range mark in file transfer result are not mated, client sends the file transfer response of carrying file error parameter 423 to document management server.
When judging the Content-Length head and the requirement of Range information conforms that obtain file 1, (namely file part exists to continue to judge whether document management server exists file 1, suppose file 1 by A, B, C tri-part form, have A and the part B of file 1 in document management server):
When document management server existing file 1, and file 1 locks, document management server sends the file transfer response message carrying resource contention parameter (409 parameter) to client, 409 parameters refer to document management server files by other client upload or calculating MD5, and the HEAD that client sends based on HTTP to document management server again asks;
When document management server existing file 1, and file 1 is not locked, then lock file 1, the C of file 1 part is stored in the file 1 of document management server, and remove the MD5 value of document management server file 1, unlock, client sends the file transfer response message carrying files passe Success parameter (i.e. 200OK2) to document management server;
When document management server does not exist file 1 (suppose file 1 by A, B, C tri-part form, A and the part B of file 1 is there is not in document management server, there is not A, B, C part of file 1 yet, there is not the part A of file 1) yet, create empty file and lock, A, B, C part of file 1 is stored in empty file, remove the MD5 value of file, unlock, client sends the file transfer response message carrying files passe Success parameter (i.e. 200OK2) to document management server.
After client carries the file transfer response message of files passe Success parameter (i.e. 200OK2) to document management server transmission, after client again sends and asks (file status request) to document management server based on the HEAD of HTTP, document management server responds to client feedback file status, client, according to the parameter type carried in file status response, determines corresponding file transfer control strategy.
Suppose that client sends the file transfer response message carrying files passe Success parameter (i.e. 200OK2) to document management server, document management server responds to client feedback file status, client is asked by the GET sent based on HTTP to document management server, the file 1 stored in download file management server.
Figure 2 shows that the system that preferred embodiment according to the present invention provides, as shown in Figure 2, a kind of file transfer management systems that preferred embodiment of the present invention provides, said system comprises client 201, document management server 202, and described client 201 is connected with described document management server 202; Described client 201, for sending file status request to described document management server 202; The parameter type carried during the file status of described client 201 also for feeding back according to described document management server 202 responds, determines corresponding file transfer control strategy; Described document management server 202, after receiving file status request, and to described client 201 feedback file condition responsive.
In addition, about the specific operation process of said system with described in said method, therefore repeat no more in this.
By following scheme: there is parameter and the existence of file entirety if the parameter type carried in the response of described file status is file, judge that the file MD5 value obtaining the storage of described client is identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is identical file, transmission end of file transfer information; Parameter is there is and the existence of file entirety if the parameter type carried in described file status response is file, judge that the file MD5 value obtaining the storage of described client is not identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is not identical file, then described document management server deletes the file stored, and described client sends upload request to described document management server again; If the parameter type carried in described file status response is file there is parameter and file part existence, then described client sends file increment upload request to described document management server, described document management server responds to described client feedback file transfer result, described client is according to the parameter type carried in described file transfer result response, and control documents transmits; Both achieved file fragmentation transmission, and also verification of correctness had been carried out to the file after uploading, thus both ensure that the efficiency of files passe, also ensure that the fail safe of files passe, avoid file and may be illegally modified in upload procedure.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a file transfer management method, is characterized in that, comprises the following steps:
Document management server responds to client feedback file status after receiving file status request;
Described client, according to the parameter type carried in file status response, determines corresponding file transfer control strategy.
2. method according to claim 1, is characterized in that, described file status request is HEAD request, wherein, carries document entity parameter in described HEAD request.
3. method according to claim 2, is characterized in that, the parameter type carried in the response of described file status comprises that file exists parameter and 200OK1 parameter, file does not exist parameter i.e. 404 parameters, resource contention parameter i.e. 409 parameters.
4. method according to claim 3, is characterized in that, described file existence comprises the existence of file entirety, file part exists.
5. method according to claim 4, is characterized in that, described file part existence refers to that the file size that client stores and Content-Length are greater than the file size Content-Length of described document management server storage.
6. method according to claim 4, is characterized in that, described client, according to the parameter type carried in file status response, determines that the process of corresponding file transfer control strategy is:
Parameter is there is and the existence of file entirety if the parameter type carried in described file status response is file, judge that the file MD5 value obtaining the storage of described client is identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is identical file, transmission end of file transfer information;
Parameter is there is and the existence of file entirety if the parameter type carried in described file status response is file, judge that the file MD5 value obtaining the storage of described client is not identical with the file MD5 value that described document management server stores, the file that then file that stores of described client and described document management server store is not identical file, then described document management server deletes the file stored, and described client sends upload request to described document management server again;
If the parameter type carried in described file status response is file there is parameter and file part existence, then described client sends file increment upload request to described document management server, described document management server responds to described client feedback file transfer result, described client is according to the parameter type carried in described file transfer result response, and control documents transmits.
7. method according to claim 6, is characterized in that, the parameter type carried in described file transfer result response comprises files passe Success parameter and 200OK2 parameter, resource contention parameter i.e. 409 parameters, file error parameter; Wherein, described file error parameter comprises 400 parameters, 421 parameters, 422 parameters, 423 parameters.
8. method according to claim 7, it is characterized in that, described client is according to the parameter type carried in described file transfer result response, determine that the process of corresponding file transfer control strategy is: the parameter type carried in described file transfer result response is resource contention parameter, then described client sends file status request to described document management server again.
9. method according to claim 7, it is characterized in that, described method also comprises: when the parameter type carried in the response of described file transfer result be files passe Success parameter and 200OK2 parameter time, after described client sends file status request to described document management server again, described document management server responds to described client feedback file status, described client, according to the parameter type carried in file status response, determines corresponding file transfer control strategy.
10. a file transfer management systems, is characterized in that, said system comprises client, document management server, and described client is connected with described document management server;
Described client, for sending file status request to described document management server; The parameter type carried during the file status of described client also for feeding back according to described document management server responds, determines corresponding file transfer control strategy;
Described document management server, after receiving file status request, and to described client feedback file status response.
CN201510489825.9A 2015-08-12 2015-08-12 Managing method and system for file transmitting Pending CN105007333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510489825.9A CN105007333A (en) 2015-08-12 2015-08-12 Managing method and system for file transmitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510489825.9A CN105007333A (en) 2015-08-12 2015-08-12 Managing method and system for file transmitting

Publications (1)

Publication Number Publication Date
CN105007333A true CN105007333A (en) 2015-10-28

Family

ID=54379851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510489825.9A Pending CN105007333A (en) 2015-08-12 2015-08-12 Managing method and system for file transmitting

Country Status (1)

Country Link
CN (1) CN105007333A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704749A (en) * 2016-01-11 2016-06-22 努比亚技术有限公司 Network parameter recovery apparatus and method thereof
CN107995243A (en) * 2016-10-27 2018-05-04 北京优朋普乐科技有限公司 A kind of communication means and server based on control command

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151005A1 (en) * 2010-12-10 2012-06-14 Inventec Corporation Image file download method
CN102571709A (en) * 2010-12-16 2012-07-11 腾讯科技(北京)有限公司 Method for uploading file, client, server and system
CN103067505A (en) * 2012-12-30 2013-04-24 乐视网信息技术(北京)股份有限公司 Method for uploading files to server
CN203634407U (en) * 2013-12-06 2014-06-11 山东新华医疗器械股份有限公司 Air wall type sterile room
CN103955544A (en) * 2014-05-21 2014-07-30 北京奇艺世纪科技有限公司 File uploading method and file uploading system
CN104539690A (en) * 2014-12-24 2015-04-22 大连理工大学 Server remote data synchronizing method based on feedback mechanism and MD5 code detection
CN104639629A (en) * 2015-01-30 2015-05-20 英华达(上海)科技有限公司 File comparing method and system at client and cloud

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120151005A1 (en) * 2010-12-10 2012-06-14 Inventec Corporation Image file download method
CN102571709A (en) * 2010-12-16 2012-07-11 腾讯科技(北京)有限公司 Method for uploading file, client, server and system
CN103067505A (en) * 2012-12-30 2013-04-24 乐视网信息技术(北京)股份有限公司 Method for uploading files to server
CN203634407U (en) * 2013-12-06 2014-06-11 山东新华医疗器械股份有限公司 Air wall type sterile room
CN103955544A (en) * 2014-05-21 2014-07-30 北京奇艺世纪科技有限公司 File uploading method and file uploading system
CN104539690A (en) * 2014-12-24 2015-04-22 大连理工大学 Server remote data synchronizing method based on feedback mechanism and MD5 code detection
CN104639629A (en) * 2015-01-30 2015-05-20 英华达(上海)科技有限公司 File comparing method and system at client and cloud

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704749A (en) * 2016-01-11 2016-06-22 努比亚技术有限公司 Network parameter recovery apparatus and method thereof
CN107995243A (en) * 2016-10-27 2018-05-04 北京优朋普乐科技有限公司 A kind of communication means and server based on control command

Similar Documents

Publication Publication Date Title
CN111131501B (en) MQTT protocol-based message pushing system and method
CN109309730B (en) Credible file transmission method and system
JP5585062B2 (en) Information processing apparatus, information processing method, data management server, and data synchronization system
JP4829316B2 (en) Method, apparatus, and system for synchronizing data in response to an interrupted synchronization process
CN106850841B (en) Method and device for transmitting data resources
CN101431413B (en) Method, system, server and terminal for authentication
CN103297529B (en) Based on the tree-type structure data synchronous method of timestamp
US20060129631A1 (en) Method for controlling a media message upload through a wireless communication network
US20120203850A1 (en) Folder transmission method and system
CN101179393A (en) Method and system for implementing document breakpoint transmission
JP2010509813A (en) Notification message processing method and apparatus
CN101160913A (en) Off-line message processing method
US20100077024A1 (en) Method for transmitting data transmitted incompletely between server and client
JP2007520819A (en) Software distribution driven by distributed policies
CN102025515A (en) File directory based file transmission method, device and system
JP4494970B2 (en) Method, apparatus, and system for synchronizing data in response to an interrupted synchronization process
WO2009103212A1 (en) Method, system and device of data synchronization
KR20120063454A (en) Method and apparatus for sessionless reporting by device management client
CN105007333A (en) Managing method and system for file transmitting
US9268877B2 (en) Method and arrangements for enabling modifications of XML documents
EP2081318B1 (en) Method and device for initiating the session connection
CN106790665A (en) A kind of document transmission method under C/S frameworks
CN110417850B (en) Software configuration acquisition method, system, server and medium
CN112527369B (en) Resource updating method of intelligent terminal
CN103618753A (en) Trans-secret-region data exchange method based on one-way transmission equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20151028

WD01 Invention patent application deemed withdrawn after publication