CN103229486A - Batch file transmission method and device - Google Patents

Batch file transmission method and device Download PDF

Info

Publication number
CN103229486A
CN103229486A CN2012800029028A CN201280002902A CN103229486A CN 103229486 A CN103229486 A CN 103229486A CN 2012800029028 A CN2012800029028 A CN 2012800029028A CN 201280002902 A CN201280002902 A CN 201280002902A CN 103229486 A CN103229486 A CN 103229486A
Authority
CN
China
Prior art keywords
file
http response
sign
cut apart
index
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.)
Granted
Application number
CN2012800029028A
Other languages
Chinese (zh)
Other versions
CN103229486B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN103229486A publication Critical patent/CN103229486A/en
Application granted granted Critical
Publication of CN103229486B publication Critical patent/CN103229486B/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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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]

Abstract

The embodiment of the invention provides a batch file transmission method and device. The batch file transmission method includes: sending a first hyper text transport protocol (HTTP) request to a Web server, wherein the HTTP request carries file object identifications for indication of at least two files to be acquired; receiving a first HTTP response sent by the Web server according to the file object identifications, wherein the data field of the first HTTP response carries at least two data blocks, each of which contains one file to be acquired, and a first segmentation identification is used for segmentation between every two data blocks; and analyzing the first HTTP response and obtaining the at least two files to be acquired. The batch file transmission method and device enable at least two files to be transmitted in one HTTP transmission so that transmission efficiency is improved and system cost is reduced.

Description

Batch documents transmission method and equipment
Technical field
The embodiment of the invention relates to the communication technology, relates in particular to a kind of batch documents transmission method and equipment.
Background technology
HTTP (Hypertext transfer protocol is called for short HTTP) is the communication protocol between hyper-media system is used.In HTTP transmission, the equipment of initiating HTTP request (Request) is client Client, and the equipment that receives the HTTP request and make response (Response) is Web server.
In the prior art, Client need be when Web server obtains file, the HTTP that sends to Web server asks, carry the parameter informations such as sign of the file that need obtain in this HTTP request, after Web server receives this HTTP request, according to the length of the parameter acquiring respective file such as sign of file, with the header field information of file size as http response, with the data field information of file content, this http response is sent to Client as http response.File of the every request of Client all will be sent out a HTTP request, and correspondingly, Web server returns the file of this request by http response.When Client need obtain heap file, HTTP request and http response frequent between Client and the Web server caused overhead excessive, and efficiency of transmission is very low, and laser propagation effect is not good.
Summary of the invention
The embodiment of the invention provides a kind of batch documents transmission method and equipment, to be implemented at least two files of transmission in the HTTP transmission, improves efficiency of transmission, reduces overhead.
First aspect, the embodiment of the invention provide a kind of batch documents transmission method, comprising:
Send first HTTP HTTP request to Web server, wherein, carry in the described HTTP request to be used to indicate and wait that the file object that obtains file identifies, the described quantity of obtaining file of waiting is at least two;
Receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Described first http response is resolved, obtain described at least two files to be obtained.
In first kind of possible implementation, carry first in the header field of described first http response and cut apart marking head information;
Described described first http response is resolved, obtains described at least two files to be obtained, comprising:
Cut apart marking head information according to described first in the header field of described first http response and determine that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
In conjunction with first kind of first aspect possible implementation, in second kind of possible implementation, also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Describedly from each described data block, extract file described to be obtained, comprising:
Cut apart marking head information according to described second in the header field of described first http response and determine that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In conjunction with first kind of first aspect possible implementation, in the third possible implementation, each described data block comprises index, describedly waits to obtain file and check information;
Describedly from each described data block, extract file described to be obtained, be included as:
Obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In conjunction with second kind or the third possible implementation of first aspect, in the 4th kind of possible implementation, described batch documents transmission method also comprises:
If check failure or unidentified to the end sign in the data field of described first http response then sends the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Receive second http response that described Web server sends, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described second http response is resolved, obtain the file to be obtained that described not success receives.
Second aspect, the embodiment of the invention provide a kind of batch documents transmission method, comprising:
Receive the first HTTP HTTP request that client sends, wherein, carry in the described HTTP request to be used to indicate and wait that the file object that obtains file identifies, the described quantity of obtaining file of waiting is at least two;
Determine at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart sign generation first http response, described first http response is sent to described client, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.
In first kind of possible implementation, describedly wait to obtain file and described first according to described at least two and cut apart sign and generate first http response, comprising:
Cut apart sign generation first according to described first and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
In conjunction with first kind of second aspect possible implementation, in second kind of possible implementation, describedly describedly wait to obtain file and generate described data block respectively according to each, comprising:
For each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, insert described second and cut apart sign described wait to obtain between file and the described check information, generate described data block;
Describedly wait to obtain file and described first according to described at least two and cut apart sign and generate first http response, also comprise:
Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
In conjunction with first kind of second aspect possible implementation, in the third possible implementation, describedly describedly wait to obtain file and generate described data block respectively according to each, comprising:
For each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
In conjunction with second kind or the third possible implementation of second aspect, in the 4th kind of possible implementation, described batch documents transmission method also comprises:
Receive the 2nd HTTP request that described client sends, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
The file to be obtained that at least one does not successfully receive determined in the index that obtains file of waiting according to described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described second http response is sent to described client.
The third aspect, the embodiment of the invention provide a kind of client, comprising:
Request unit is used for sending first HTTP HTTP request to Web server, wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two;
Receiving element, be used to receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Resolution unit links to each other with described receiving element, is used for described first http response is resolved, and obtains described at least two files to be obtained.
In first kind of possible implementation, carry first in the header field of described first http response and cut apart marking head information;
Described resolution unit specifically is used for cutting apart marking head information according to described first of the header field of described first http response and determines that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
In conjunction with first kind of the third aspect possible implementation, in second kind of possible implementation, also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Described resolution unit specifically is used for cutting apart marking head information according to described second of the header field of described first http response and determines that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In conjunction with first kind of the third aspect possible implementation, in the third possible implementation, each described data block comprises index, describedly waits to obtain file and check information;
Described resolution unit specifically is used to obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
Second kind or the third possible implementation in conjunction with the third aspect, in the 4th kind of possible implementation, if the described request unit also is used for check failure or unidentified to finishing sign at the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Described receiving element also is used to receive second http response that described Web server sends, and wherein, carries at least one data block in the data field of described second http response, and each described data block comprises a not file to be obtained of success reception;
Described resolution unit also is used for described second http response is resolved, and obtains the file to be obtained that described not success receives.
Fourth aspect, the embodiment of the invention provide a kind of Web server, comprising:
Receiving element is used to receive the first HTTP HTTP request that client sends, and wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two;
Processing unit, link to each other with described receiving element, be used for determining at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart sign generation first http response, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Transmitting element links to each other with described processing unit, is used for described first http response is sent to described client.
In first kind of possible implementation, described processing unit specifically is used for cutting apart sign generation first according to described first and cuts apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
In conjunction with first kind of fourth aspect possible implementation, in second kind of possible implementation, described processing unit also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, described index and described wait to obtain insert described second between the file and cut apart sign, insert described second and cut apart sign described wait to obtain between file and the described check information, generate described data block; Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
In conjunction with first kind of fourth aspect possible implementation, in the third possible implementation, described processing unit also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
Second kind or the third possible implementation in conjunction with fourth aspect, in the 4th kind of possible implementation, described receiving element also is used to receive the 2nd HTTP request that described client sends, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Described processing unit also is used for determining the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described transmitting element also is used for described second http response is sent to described client.
The 5th aspect, the embodiment of the invention provide a kind of computer node that is used for client, and described computing node comprises processor, communication interface, and memory and bus:
Wherein said processor, described communication interface and described memory are finished mutual communicating by letter by bus;
Described communication interface is used for from send first HTTP HTTP request to Web server, wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two; Receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Described processor is used for executive program;
Described memory is used to deposit described program;
Wherein said program is used for described first http response is resolved, and obtains described at least two files to be obtained.
In first kind of possible implementation, carry first in the header field of described first http response and cut apart marking head information;
Described program specifically is used for cutting apart marking head information according to described first of the header field of described first http response and determines that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
In conjunction with first kind of the 5th aspect possible implementation, in second kind of possible implementation, also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Described program specifically is used for cutting apart marking head information according to described second of the header field of described first http response and determines that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In conjunction with first kind of the 5th aspect possible implementation, in the third possible implementation, each described data block comprises index, describedly waits to obtain file and check information;
Described program specifically is used to obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
Second kind or the third possible implementation in conjunction with the 5th aspect, in the 4th kind of possible implementation, if described communication interface also is used for check failure or unidentified to finishing sign at the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request; Receive second http response that described Web server sends, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described program also is used for described second http response is resolved, and obtains the file to be obtained that described not success receives.
The 6th aspect, the embodiment of the invention provide a kind of computer node that is used for Web server, and described computing node comprises processor, communication interface, and memory and bus:
Wherein said processor, described communication interface and described memory are finished mutual communicating by letter by bus;
Described communication interface is used to receive the first HTTP HTTP request that client sends, and wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two; First http response is sent to described client;
Described processor is used for executive program;
Described memory is used to deposit described program;
Wherein said program, be used for determining at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart described first http response of sign generation, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.
In first kind of possible implementation, described program specifically is used for cutting apart sign generation first according to described first and cuts apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
In conjunction with first kind of the 6th aspect possible implementation, in second kind of possible implementation, described program also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, described index and described wait to obtain insert described second between the file and cut apart sign, insert described second and cut apart sign described wait to obtain between file and the described check information, generate described data block; Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
In conjunction with first kind of the 6th aspect possible implementation, in the third possible implementation, described program also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order form described data block, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
Second kind or the third possible implementation in conjunction with the 6th aspect, in the 4th kind of possible implementation, described communication interface also is used to receive the 2nd HTTP request that described client sends, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request; Second http response is sent to described client.
Described program also is used for determining the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates described second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception.
Batch documents transmission method and equipment that the embodiment of the invention provides, client sends first HTTP HTTP request to Web server, wherein, carry in the one HTTP request and be used to indicate the file object sign of waiting to obtain file, wait that the quantity of obtaining file is at least two, receive first http response that Web server sends, wherein, carry at least two data blocks in the data field of first http response, cutting apart sign by first between per two data blocks cuts apart, each data block comprises a file to be obtained, and first http response is resolved, and obtains at least two files to be obtained.Because client carries the file object sign that is used to indicate at least two files in the HTTP request that Web server sends, correspondingly, Web server comprises in the http response that client is returned by first cuts apart at least two files that sign is cut apart, at least two files of transmission in a HTTP transmission have been realized, improve efficiency of transmission, reduced overhead.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
First kind of batch documents transmission method flow chart that Fig. 1 provides for the embodiment of the invention;
The network application scene schematic diagram that Fig. 2 provides for the embodiment of the invention;
The data field structural representation of first kind of http response that Fig. 3 provides for the embodiment of the invention;
The data field structural representation of second kind of http response that Fig. 4 provides for the embodiment of the invention;
The http response structural representation that Fig. 5 provides for the embodiment of the invention;
First kind of block data structure schematic diagram that Fig. 6 provides for the embodiment of the invention;
Second kind of block data structure schematic diagram that Fig. 7 provides for the embodiment of the invention;
Second kind of batch documents transmission method flow chart that Fig. 8 provides for the embodiment of the invention;
The third batch documents transmission method flow chart that Fig. 9 provides for the embodiment of the invention;
The 4th kind of batch documents transmission method flow chart that Figure 10 provides for the embodiment of the invention;
The client terminal structure schematic diagram that Figure 11 provides for the embodiment of the invention;
The Web server structural representation that Figure 12 provides for the embodiment of the invention;
The computer node structural representation that is used for client that Figure 13 provides for the embodiment of the invention;
The computer node structural representation that is used for Web server that Figure 14 provides for the embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
First kind of batch documents transmission method flow chart that Fig. 1 provides for the embodiment of the invention.As shown in Figure 1, the batch documents transmission method that present embodiment provides specifically can be applied to the network application scene based on the HTTP transmission, especially crossing internet carries out the application scenarios of transfer of data in enormous quantities, as shown in Figure 2, in this application scenarios, comprise Web server 82 and a plurality of client 81.Communicating by letter between client 81 and the Web server 82 based on HTTP.The batch documents transmission method that present embodiment provides can be carried out by client Client, and this client can realize by the electronic equipment that personal computer, notebook computer, panel computer, smart mobile phone or server etc. have a data-handling capacity.
The batch documents transmission method that present embodiment provides specifically comprises:
Step C10, send first HTTP HTTP request to Web server, wherein, carry in the described HTTP request and be used to indicate the file object sign of waiting to obtain file, the described quantity of obtaining file of waiting is at least two;
Particularly, the user is by the client-access Web server, to obtain file from Web server.HTTP is the application layer protocol that operates on the TCP (Transmission Control Protocol, transmission control protocol), and client is at first initiated the TCP connection request to Web server, is connected to set up TCP with Web server.After this TCP connected foundation, client connects by TCP again and Web server communicates.
Client sends HTTP request to Web server, the one HTTP request comprises header field (Header) and data field (Body), can comprise a plurality of headers in the header field, when comprising a plurality of header in the header field, specifically can cut apart by carriage return between the header, header field and data field can be cut apart by null.
Specifically in order to the required file that obtains of indication client, file promptly to be obtained waits that the quantity of obtaining file is at least two to the file object sign.Particularly, client can the acquisition request Web server in All Files under certain catalogue, then this document object identity can be the title of this catalogue, the perhaps All Files that can the acquisition request Web server be generated in certain time range of client, then this document object identity can be this time range.Under above-mentioned application scenarios, client can not known the quantity of file of acquisition request and the title of file.If when the user selected to obtain some specific file in the Web server by client, then this document object identity can be the filename of file.The file object sign can specifically be provided with according to actual conditions, does not exceed with present embodiment.This document object identity can be carried at the form of header in the header field of HTTP request, also can be carried in the HTTP request msg territory.
Web server receives HTTP request, and request is resolved to a HTTP, extracts this document object identity from HTTP request, and determines file to be obtained according to this document object identity.Web server obtains first cuts apart sign (Block Splitter), this first is cut apart sign and is specifically as follows by preset algorithm and generates in advance, and Web server also can be after receiving HTTP request generates this by preset algorithm again and first cuts apart sign.First cuts apart sign is specifically as follows random number, for example general unique identifier (Universally Unique Identifier is called for short UUID), the perhaps combination of a plurality of UUID.Also can adopt other presetting methods to generate this and first cut apart sign, to distinguish and get final product, not exceed with present embodiment with waiting to obtain file with first complexity of cutting apart sign that guarantees to generate.If this first is cut apart to be designated in advance and generates, then can make an appointment by procotol and client, so that can discerning this, client first cuts apart sign.If this first is cut apart and be designated that Web server generates in real time, then Web server can carry in the header field of first http response that sends to client in order to indicate this first header of cutting apart sign.
Web server generates and to include this data block of waiting to obtain file (Data Block) according to waiting to obtain file, and the quantity of for example waiting to obtain file is N, and N is integer and N 〉=2, and then the quantity of the data block of Sheng Chenging also is N.Except comprising this file to be obtained, can also comprise that other and this wait to obtain the relevant information of file in the data block, for example index, length information or checking information etc. also can include only this file to be obtained.Web server inserts one first between per two data blocks cuts apart sign, promptly data block between any two by first cut apart the sign cut apart, form the data field of first http response, as shown in Figure 3.In actual applications, can also insert one first at the head of data field and cut apart sign, cut apart sign in one first of the afterbody insertion of data field, as shown in Figure 4, the afterbody of data field can also insert and finish sign, finishes to indicate this data field.This finishes sign for example can be two continuous carriage return characters.Web server sends to client with this first http response.
First http response that step C20, the described Web server of reception send according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Step C30, described first http response is resolved, obtain described at least two files to be obtained.
Particularly, client receives this first http response that Web server sends, first http response is resolved, cut apart sign and each data block can be extracted, and then obtain file to be obtained in each data block by discerning first in first http response.
The batch documents transmission method that present embodiment provides, client sends first HTTP HTTP request to Web server, wherein, carry in the one HTTP request and be used to indicate the file object sign of waiting to obtain file, wait that the quantity of obtaining file is at least two, receive first http response that Web server sends, wherein, carry at least two data blocks in the data field of first http response, cutting apart sign by first between per two data blocks cuts apart, each data block comprises a file to be obtained, and first http response is resolved, and obtains at least two files to be obtained.Because client carries the file object sign that is used to indicate at least two files in the HTTP request that Web server sends, correspondingly, Web server comprises in the http response that client is returned by first cuts apart at least two files that sign is cut apart, at least two files of transmission in a HTTP transmission have been realized, improve efficiency of transmission, reduced overhead.
In the present embodiment, carry first in the header field of described first http response and cut apart marking head information; Correspondingly, step C30, described described first http response is resolved, obtains described at least two files to be obtained, specifically can comprise:
Cut apart marking head information according to described first in the header field of described first http response and determine that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
Particularly, the form of first http response specifically can be with reference to Fig. 5.Carry first in the header field of this first http response and cut apart marking head information (Block Splitter Header), can also carry other headers (Other Headers) in the header field.Client can be cut apart marking head information according to first in the header field of first http response and determines that this first cuts apart sign.
In the present embodiment, also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Describedly from each described data block, extract file described to be obtained, specifically can comprise:
Cut apart marking head information according to described second in the header field of described first http response and determine that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
Particularly, Web server can not only comprise this file to be obtained according to waiting to obtain the data block that file generates, and can also comprise that this waits to obtain the index and the check information of file.Index is specifically as follows the filename of waiting to obtain file.Web server can wait to obtain the file allocation sequence number for each determining at least two according to file object sign when waiting to obtain file, and index also can be this sequence number.Check information is specifically as follows to treat and obtains file and handle by default checking algorithm that the back generates, should default checking algorithm can for but be not limited to MD (Message DigestAlgorithm, Message Digest 5) 5 or SHA-1 digest algorithms such as (Secure Hash Algorithm, Secure Hash Algorithm).This check information is used to treat the integrality and the fail safe of obtaining file and carries out verification.Web server obtains second cuts apart sign (Inner Splitter), and this second generating mode of cutting apart sign can not repeat them here with reference to first generating mode of cutting apart sign.Web server second is cut apart sign and is generated second and cut apart marking head information (Inner Splitter Header) according to this, by second cut apart sign with index, wait to obtain file and checking information separates in twos, index, wait that the order of obtaining file and checking information can arrange according to preset rules.A kind of implementation as shown in Figure 6.
Client will be in will waiting to obtain the process that file extracts from data block, can be at first according to second cutting apart marking head information and determine that this second cuts apart sign in the header field of first http response, cut apart sign by second of identification data block, with with index, wait to obtain file and checking information extracts respectively, and this file to be obtained is tested by checking information, if verification succeeds, this can be waited to obtain the corresponding preservation of file and index, if the check failure then can be obtained file again to Web server.
In the present embodiment, each described data block comprises index, describedly waits to obtain file and check information; Describedly from each described data block, extract file described to be obtained, specifically can comprise:
Obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
Particularly, in another kind of implementation, each length of index of waiting to obtain file is identical, and each length of check information of waiting to obtain file is also identical.Can not comprise in this data block that then second cuts apart sign, to save the transmission bandwidth resource.Preferably, index and check information come the front of waiting to obtain file, as shown in Figure 7.Then client can be cut apart data block according to index length and checking information length, to obtain index, check information and file to be obtained respectively.Client is tested to this file to be obtained by checking information, if verification succeeds can be treated this to obtain the corresponding preservation of file and index, if the check failure then can be obtained file again to Web server.
Second kind of batch documents transmission method flow chart that Fig. 8 provides for the embodiment of the invention.As shown in Figure 8, this batch documents transmission method can also comprise:
Step C40, if check failure or unidentified to finishing sign in the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Second http response that step C50, the described Web server of reception send wherein, carries at least one data block in the data field of described second http response, each described data block comprises file to be obtained of success reception;
Step C60, described second http response is resolved, obtain the file to be obtained that described success receives.
Particularly, client is treated by check information and is obtained file and carry out verification, and during the verification failure, showing may be owing to reasons such as network interruptions, and this is waited to obtain file and successfully receives.Perhaps do not finish sign in the data field of first http response, show that data field does not have complete reception.Then client can send the 2nd HTTP request to Web server, to obtain the file to be obtained that does not successfully receive.
Client can be carried label information (Marker) in the 2nd HTTP request, this label information is specifically as follows the index of waiting to obtain file of last verification succeeds.Then Web server can be according to this label information, know the file to be obtained that client has successfully received, also can know the file to be obtained that client does not successfully receive, and wait that with what client did not successfully receive obtaining file returns to client by second http response.The form of second http response is identical with the form of first http response, does not repeat them here.
In actual applications, if client knows the file that need obtain, then can be according to the filename of the definite file that does not successfully receive of situation of the file that successfully receives.Client can be carried at filename in the 2nd HTTP request, the file that does not successfully receive with acquisition request.Continuous biography by file that success is not received has reduced and has repeated taking of transmission quantity and network bandwidth resources.
The third batch documents transmission method flow chart that Fig. 9 provides for the embodiment of the invention.As shown in Figure 9, the batch documents transmission method that present embodiment provides specifically can cooperate realization with the method that is applied to client that any embodiment of the present invention provides, and the specific implementation process does not repeat them here.The batch documents transmission method that present embodiment provides can be carried out by Web server.
The batch documents transmission method that present embodiment provides specifically comprises:
The first HTTP HTTP request that step S10, reception client send wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two;
Step S20, determine at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart sign generation first http response, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Step S30, described first http response is sent to described client.
The batch documents transmission method that present embodiment provides, Web server receives the first HTTP HTTP request that client sends, wherein, carry in the one HTTP request and be used to indicate the file object sign of waiting to obtain file, wait that the quantity of obtaining file is at least two, determine at least two files to be obtained according to the file object sign, obtain first and cut apart sign, wait to obtain file and first according at least two and cut apart sign generation first http response, wherein, carry at least two data blocks in the data field of first http response, cutting apart sign by first between per two data blocks cuts apart, each data block comprises a file to be obtained, and first http response is sent to client.Because client carries the file object sign that is used to indicate at least two files in the HTTP request that Web server sends, correspondingly, Web server comprises in the http response that client is returned by first cuts apart at least two files that sign is cut apart, at least two files of transmission in a HTTP transmission have been realized, improve efficiency of transmission, reduced overhead.
In the present embodiment, step S20 describedly waits to obtain file and described first according to described at least two and cuts apart sign and generate first http response, specifically can comprise:
Cut apart sign generation first according to described first and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
In the present embodiment, describedly describedly wait to obtain file and generate described data block respectively, specifically can comprise according to each:
For each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, insert described second and cut apart sign described wait to obtain between file and the described check information, generate described data block;
Step S20 describedly waits to obtain file and described first according to described at least two and cuts apart sign and generate first http response, can also comprise:
Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
In the present embodiment, describedly describedly wait to obtain file and generate described data block respectively, comprising according to each:
For each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
It should be noted that present embodiment provides the generating mode of two kinds of data blocks, but those skilled in the art adopt other modes to generate data block, get final product, do not exceed with present embodiment to guarantee that client can extract file to be obtained.
The 4th kind of batch documents transmission method flow chart that Figure 10 provides for the embodiment of the invention.As shown in figure 10, in the present embodiment, this batch documents transmission method can also comprise:
The 2nd HTTP request that step S40, the described client of reception send wherein, carries the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Step S50, determine the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Step S60, described second http response is sent to described client.
The client terminal structure schematic diagram that Figure 11 provides for the embodiment of the invention.As shown in figure 11, the client 81 that present embodiment provides specifically can realize each step of the batch documents transmission method that is applied to client that any embodiment of the present invention provides, and the specific implementation process does not repeat them here.The client 81 that present embodiment provides specifically comprises request unit 11, receiving element 12 and resolution unit 13.Described request unit 11 is used for sending first HTTP HTTP request to Web server, wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two.Described receiving element 12 is used to receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.Described resolution unit 13 links to each other with described receiving element 12, is used for described first http response is resolved, and obtains described at least two files to be obtained.
The client 81 that present embodiment provides, request unit 11 sends first HTTP HTTP request to Web server, wherein, carry in the one HTTP request and be used to indicate the file object sign of waiting to obtain file, wait that the quantity of obtaining file is at least two, receiving element 12 receives first http response that Web server sends, wherein, carry at least two data blocks in the data field of first http response, cutting apart sign by first between per two data blocks cuts apart, each data block comprises a file to be obtained, and 13 pairs first http responses of resolution unit are resolved, and obtain at least two files to be obtained.Because client 81 carries the file object sign that is used to indicate at least two files in the HTTP request that Web server sends, correspondingly, Web server comprises in the http response that client 81 is returned by first cuts apart at least two files that sign is cut apart, at least two files of transmission in a HTTP transmission have been realized, improve efficiency of transmission, reduced overhead.
In the present embodiment, carry first in the header field of described first http response and cut apart marking head information; Correspondingly, described resolution unit 13 specifically can be used for cutting apart marking head information according to described first of the header field of described first http response and determine that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
In the present embodiment, also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information; Described resolution unit 13 specifically can be used for cutting apart marking head information according to described second of the header field of described first http response and determine that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In the present embodiment, each described data block comprises index, describedly waits to obtain file and check information; Described resolution unit 13 specifically is used to obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In the present embodiment, if described request unit 11 also is used for check failure or unidentified to finishing sign at the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request.Described receiving element 12 also is used to receive second http response that described Web server sends, and wherein, carries at least one data block in the data field of described second http response, and each described data block comprises a not file to be obtained of success reception.Described resolution unit 13 also is used for described second http response is resolved, and obtains the file to be obtained that described not success receives.
The Web server structural representation that Figure 12 provides for the embodiment of the invention.As shown in figure 12, the Web server 82 that present embodiment provides specifically can be realized each step of the batch documents transmission method that is applied to Web server that any embodiment of the present invention provides, and the specific implementation process does not repeat them here.The Web server 82 that present embodiment provides specifically comprises receiving element 21, processing unit 22 and transmitting element 23.Described receiving element 21 is used to receive the first HTTP HTTP request that client sends, and wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two.Described processing unit 22 links to each other with described receiving element 21, be used for determining at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart sign generation first http response, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.Described transmitting element 23 links to each other with described processing unit 22, is used for described first http response is sent to described client.
The Web server 82 that present embodiment provides, receiving element 21 receives the first HTTP HTTP request that client sends, wherein, carry in the one HTTP request and be used to indicate the file object sign of waiting to obtain file, wait that the quantity of obtaining file is at least two, processing unit 22 is determined at least two files to be obtained according to the file object sign, obtain first and cut apart sign, wait to obtain file and first according at least two and cut apart sign generation first http response, wherein, carry at least two data blocks in the data field of first http response, cutting apart sign by first between per two data blocks cuts apart, each data block comprises a file to be obtained, and transmitting element 23 sends to client with first http response.Because client carries the file object sign that is used to indicate at least two files in the HTTP request that Web server 82 sends, correspondingly, Web server 82 comprises in the http response that client is returned by first cuts apart at least two files that sign is cut apart, at least two files of transmission in a HTTP transmission have been realized, improve efficiency of transmission, reduced overhead.
In the present embodiment, described processing unit 22 specifically can be used for cutting apart sign generation first according to described first and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
In the present embodiment, described processing unit 22 can also be used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, described wait to obtain insert described second between file and the described check information and cut apart sign, generate described data block; Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
In the present embodiment, described processing unit 22 can also be used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
In the present embodiment, described receiving element 21 can also be used to receive the 2nd HTTP request that described client sends, and wherein, carries the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request.Described processing unit 22 can also be used for determining the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception.Described transmitting element 23 can also be used for described second http response is sent to described client.
The computer node structural representation that is used for client that Figure 13 provides for the embodiment of the invention.As shown in figure 13, the computer node that is applied to client 700 that present embodiment provides.Computing node 700 may be smart mobile phone, panel computer, personal computer PC, portable portable computer or terminal or the like, and the specific embodiment of the invention is not done qualification to the specific implementation of computing node.Computing node 700 comprises:
Processor (processor) 710, communication interface (Communications Interface) 720, memory (memory) 730, bus 740.
Processor 710, communication interface 720, memory 730 is finished mutual communication by bus 740.
Communication interface 720, be used for communicating by letter, from send first HTTP HTTP request to Web server, wherein with Web server, carry in the described HTTP request to be used to indicate and wait that the file object that obtains file identifies, the described quantity of obtaining file of waiting is at least two; Receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.
Processor 710 is used for executive program 732.
Particularly, program 732 can comprise program code, and described program code comprises computer-managed instruction.
Processor 710 may be a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or is configured to implement one or more integrated circuits of the embodiment of the invention.
Memory 730 is used to deposit program 732.Memory 730 may comprise the high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.Program 732 specifically can comprise:
Resolution unit 13 is used for described first http response is resolved, and obtains described at least two files to be obtained
The specific implementation of unit is not given unnecessary details at this referring to the corresponding units in embodiment illustrated in fig. 11 in the program 732.
In the present embodiment, carry first in the header field of described first http response and cut apart marking head information;
Described resolution unit 13 specifically is used for cutting apart marking head information according to described first of the header field of described first http response and determines that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
In the present embodiment, also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Described resolution unit 13 specifically is used for cutting apart marking head information according to described second of the header field of described first http response and determines that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In the present embodiment, each described data block comprises index, describedly waits to obtain file and check information;
Described resolution unit 13 specifically is used to obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
In the present embodiment, if described communication interface 720 also is used for check failure or unidentified to finishing sign at the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request; Receive second http response that described Web server sends, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described resolution unit 13 also is used for described second http response is resolved, and obtains the file to be obtained that described not success receives.
The computer node structural representation that is used for Web server that Figure 14 provides for the embodiment of the invention.As shown in figure 14, the computer node that is applied to Web server 800 that present embodiment provides.Host server, personal computer PC or portable portable computer of computing node 800 possibility computing capabilitys or the like, the specific embodiment of the invention is not done qualification to the specific implementation of computing node.Computing node 800 comprises:
Processor (processor) 810, communication interface (Communications Interface) 820, memory (memory) 830, bus 840.
Processor 810, communication interface 820, memory 830 is finished mutual communication by bus 840.
Communication interface 820, be used for and client communication, receive the first HTTP HTTP request that client sends, wherein, carry in the described HTTP request to be used to indicate and wait that the file object that obtains file identifies, the described quantity of obtaining file of waiting is at least two; First http response is sent to described client.
Processor 810 is used for executive program 832.
Particularly, program 832 can comprise program code, and described program code comprises computer-managed instruction.
Processor 810 may be a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or is configured to implement one or more integrated circuits of the embodiment of the invention.
Memory 830 is used to deposit program 832.Memory 830 may comprise the high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.Program 832 specifically can comprise:
Processing unit 22, be used for determining at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart described first http response of sign generation, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.
In the present embodiment, described processing unit 22 specifically is used for cutting apart sign generation first according to described first and cuts apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
In the present embodiment, described processing unit 22 also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, described wait to obtain insert described second between file and the described check information and cut apart sign, generate described data block; Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
In the present embodiment, described processing unit 22 also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
In the present embodiment, described communication interface 820 also is used to receive the 2nd HTTP request that described client sends, and wherein, carries the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request; Second http response is sent to described client.
Described processing unit 22 also is used for determining the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates described second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception
The those skilled in the art can be well understood to, and is the convenience described and succinct, and the concrete course of work of the system of foregoing description, device and unit can not repeat them here with reference to the corresponding process among the preceding method embodiment.
In several embodiment that the application provided, should be understood that disclosed system, apparatus and method can realize by other mode.For example, device embodiment described above only is schematic, for example, the division of described unit, only be that a kind of logic function is divided, during actual the realization other dividing mode can be arranged, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, the shown or coupling each other discussed or directly to be coupled or to communicate to connect can be by some communication interfaces, the indirect coupling of device or unit or communicate to connect can be electrically, machinery or other form.
Described unit as separating component explanation can or can not be physically to separate also, and the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of unit to realize the purpose of present embodiment scheme according to the actual needs.
In addition, each functional unit in each embodiment of the present invention can be integrated in the processing unit, also can be that the independent physics in each unit exists, and also can be integrated in the unit two or more unit.
If described function realizes with the form of SFU software functional unit and during as independently production marketing or use, can be stored in the computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or the part of this technical scheme can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out all or part of step of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above each embodiment is not intended to limit only in order to technical scheme of the present invention to be described; Although the present invention is had been described in detail with reference to aforementioned each embodiment, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (30)

1. a batch documents transmission method is characterized in that, comprising:
Send first HTTP HTTP request to Web server, wherein, carry in the described HTTP request to be used to indicate and wait that the file object that obtains file identifies, the described quantity of obtaining file of waiting is at least two;
Receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Described first http response is resolved, obtain described at least two files to be obtained.
2. batch documents transmission method according to claim 1 is characterized in that: carry first in the header field of described first http response and cut apart marking head information;
Described described first http response is resolved, obtains described at least two files to be obtained, comprising:
Cut apart marking head information according to described first in the header field of described first http response and determine that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
3. batch documents transmission method according to claim 2 is characterized in that: also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Describedly from each described data block, extract file described to be obtained, comprising:
Cut apart marking head information according to described second in the header field of described first http response and determine that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
4. batch documents transmission method according to claim 2 is characterized in that, each described data block comprises index, describedly waits to obtain file and check information;
Describedly from each described data block, extract file described to be obtained, be included as:
Obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
5. according to claim 3 or 4 described batch documents transmission methods, it is characterized in that, also comprise:
If check failure or unidentified to the end sign in the data field of described first http response then sends the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Receive second http response that described Web server sends, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described second http response is resolved, obtain the file to be obtained that described not success receives.
6. a batch documents transmission method is characterized in that, comprising:
Receive the first HTTP HTTP request that client sends, wherein, carry in the described HTTP request to be used to indicate and wait that the file object that obtains file identifies, the described quantity of obtaining file of waiting is at least two;
Determine at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart sign generation first http response, described first http response is sent to described client, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.
7. batch documents transmission method according to claim 6 is characterized in that, describedly waits to obtain file and described first according to described at least two and cuts apart sign and generate first http response, comprising:
Cut apart sign generation first according to described first and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
8. batch documents transmission method according to claim 7 is characterized in that, describedly describedly waits to obtain file and generates described data block respectively according to each, comprising:
For each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, insert described second and cut apart sign described wait to obtain between file and the described check information, generate described data block;
Describedly wait to obtain file and described first according to described at least two and cut apart sign and generate first http response, also comprise:
Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
9. batch documents transmission method according to claim 7 is characterized in that, describedly describedly waits to obtain file and generates described data block respectively according to each, comprising:
For each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
10. according to Claim 8 or 9 described batch documents transmission methods, it is characterized in that, also comprise:
Receive the 2nd HTTP request that described client sends, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
The file to be obtained that at least one does not successfully receive determined in the index that obtains file of waiting according to described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described second http response is sent to described client.
11. a client is characterized in that, comprising:
Request unit is used for sending first HTTP HTTP request to Web server, wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two;
Receiving element, be used to receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Resolution unit links to each other with described receiving element, is used for described first http response is resolved, and obtains described at least two files to be obtained.
12. client according to claim 11 is characterized in that: carry first in the header field of described first http response and cut apart marking head information;
Described resolution unit specifically is used for cutting apart marking head information according to described first of the header field of described first http response and determines that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
13. client according to claim 12 is characterized in that: also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Described resolution unit specifically is used for cutting apart marking head information according to described second of the header field of described first http response and determines that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
14. client according to claim 12 is characterized in that: each described data block comprises index, describedly waits to obtain file and check information;
Described resolution unit specifically is used to obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
15., it is characterized in that according to claim 13 or 14 described clients:
If the described request unit also is used for check failure or unidentified to finishing sign at the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Described receiving element also is used to receive second http response that described Web server sends, and wherein, carries at least one data block in the data field of described second http response, and each described data block comprises a not file to be obtained of success reception;
Described resolution unit also is used for described second http response is resolved, and obtains the file to be obtained that described not success receives.
16. a Web server is characterized in that, comprising:
Receiving element is used to receive the first HTTP HTTP request that client sends, and wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two;
Processing unit, link to each other with described receiving element, be used for determining at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart sign generation first http response, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Transmitting element links to each other with described processing unit, is used for described first http response is sent to described client.
17. Web server according to claim 16, it is characterized in that: described processing unit specifically is used for cutting apart sign generation first according to described first and cuts apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
18. Web server according to claim 17, it is characterized in that: described processing unit also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, described wait to obtain insert described second between file and the described check information and cut apart sign, generate described data block; Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
19. Web server according to claim 17, it is characterized in that: described processing unit also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
20., it is characterized in that according to claim 18 or 19 described Web servers:
Described receiving element also is used to receive the 2nd HTTP request that described client sends, and wherein, carries the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request;
Described processing unit also is used for determining the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described transmitting element also is used for described second http response is sent to described client.
21. a computer node that is used for client is characterized in that described computing node comprises processor, communication interface, and memory and bus:
Wherein said processor, described communication interface and described memory are finished mutual communicating by letter by bus;
Described communication interface is used for from send first HTTP HTTP request to Web server, wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two; Receive first http response that described Web server sends according to described file object sign, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by first between per two data blocks and cut apart, each described data block comprises a file described to be obtained;
Described processor is used for executive program;
Described memory is used to deposit described program;
Wherein said program is used for described first http response is resolved, and obtains described at least two files to be obtained.
22. the computer node that is used for client according to claim 21 is characterized in that: carry first in the header field of described first http response and cut apart marking head information;
Described program specifically is used for cutting apart marking head information according to described first of the header field of described first http response and determines that described first cuts apart sign, cut apart sign according to described first and from the data field of described first http response, extract by described first and cut apart described at least two data blocks of cutting apart of sign, from each described data block, extract file described to be obtained.
23. the computer node that is used for client according to claim 22 is characterized in that: also carry second in the header field of described first http response and cut apart marking head information, each described data block comprises index, describedly waits to obtain file and check information;
Described program specifically is used for cutting apart marking head information according to described second of the header field of described first http response and determines that second cuts apart sign, cutting apart sign according to described second extracts from each described data block by described second cutting apart described index that sign cuts apart, describedly waiting to obtain file and described check information, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
24. the computer node that is used for client according to claim 22 is characterized in that: each described data block comprises index, describedly waits to obtain file and check information;
Described program specifically is used to obtain index length and check information length, according to described index length and described check information length, from each described data block, extract described index, described check information and file described to be obtained successively, by described check information file described to be obtained is carried out verification, if verification succeeds, then will describedly wait to obtain file and the preservation of described index.
25., it is characterized in that according to claim 23 or the 24 described computer nodes that are used for client:
If described communication interface also is used for check failure or unidentified to finishing sign at the data field of described first http response, then send the 2nd HTTP request to described Web server, wherein, carry the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request; Receive second http response that described Web server sends, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception;
Described program also is used for described second http response is resolved, and obtains the file to be obtained that described not success receives.
26. a computer node that is used for Web server is characterized in that described computing node comprises processor, communication interface, and memory and bus:
Wherein said processor, described communication interface and described memory are finished mutual communicating by letter by bus;
Described communication interface is used to receive the first HTTP HTTP request that client sends, and wherein, carries in the described HTTP request to be used to indicate and waits that the file object that obtains file identifies, and the described quantity of obtaining file of waiting is at least two; First http response is sent to described client;
Described processor is used for executive program;
Described memory is used to deposit described program;
Wherein said program, be used for determining at least two files to be obtained according to described file object sign, obtain first and cut apart sign, wait to obtain file and described first according to described at least two and cut apart described first http response of sign generation, wherein, carry at least two data blocks in the data field of described first http response, cut apart sign by described first between per two data blocks and cut apart, each described data block comprises a file described to be obtained.
27. the computer node that is used for Web server according to claim 26 is characterized in that:
Described program specifically is used for cutting apart sign generation first according to described first and cuts apart marking head information, cut apart in the header field that marking head information is carried at described first http response described first, describedly wait to obtain file and generate described data block respectively according to each, between per two described data blocks, insert described first and cut apart sign, form the data field of described first http response.
28. the computer node that is used for Web server according to claim 27 is characterized in that:
Described program also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, obtain second and cut apart sign, insert described second and cut apart sign at described index and described wait to obtain between the file, insert described second and cut apart sign described wait to obtain between file and the described check information, generate described data block; Cut apart sign according to described second and generate second and cut apart marking head information, cut apart in the header field that marking head information is carried at described first http response described second.
29. the computer node that is used for Web server according to claim 27 is characterized in that:
Described program also is used for for each file described to be obtained, obtain the described index of waiting to obtain file, wait to obtain file and generate check information according to described, described index, described check information and file described to be obtained are arranged in order the described data block of formation, wherein, each is described waits to obtain the equal in length of the index of file, and each is described waits to obtain the equal in length of the check information of file.
30., it is characterized in that according to claim 28 or the 29 described computer nodes that are used for Web server:
Described communication interface also is used to receive the 2nd HTTP request that described client sends, and wherein, carries the index of waiting to obtain file of last verification succeeds in described the 2nd HTTP request; Second http response is sent to described client.
Described program also is used for determining the file to be obtained that at least one does not successfully receive according to the index that obtains file of waiting of described verification succeeds, obtaining file and described first according to described at least one waiting of successfully not receiving cuts apart sign and generates described second http response, wherein, carry at least one data block in the data field of described second http response, each described data block comprises a not file to be obtained of success reception.
CN201280002902.8A 2012-12-03 2012-12-03 Batch file transmission method and equipment Active CN103229486B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/085740 WO2014085959A1 (en) 2012-12-03 2012-12-03 Batch file transmission method and device

Publications (2)

Publication Number Publication Date
CN103229486A true CN103229486A (en) 2013-07-31
CN103229486B CN103229486B (en) 2016-10-05

Family

ID=48838361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201280002902.8A Active CN103229486B (en) 2012-12-03 2012-12-03 Batch file transmission method and equipment

Country Status (2)

Country Link
CN (1) CN103229486B (en)
WO (1) WO2014085959A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656920A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 HTTP service processing method and device
CN109150984A (en) * 2018-07-27 2019-01-04 平安科技(深圳)有限公司 The method and apparatus for obtaining data resource
CN109600403A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 A kind of method and device sending information
CN110120938A (en) * 2019-04-02 2019-08-13 视联动力信息技术股份有限公司 It is a kind of to assist the control method and device for turning server
CN110162619A (en) * 2019-05-27 2019-08-23 上海吉江数据技术有限公司 Online comparison reading system, method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164178A (en) * 2011-03-28 2011-08-24 华为技术有限公司 Content acquiring method and client
CN102420840A (en) * 2010-09-27 2012-04-18 西安龙飞软件有限公司 Method for realizing brew-based Http (Hyper Text Transport Protocol) progressive video player

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2437682B (en) * 2005-01-31 2009-02-25 Jow Tong Technology Co Ltd Eyeglasses with signal receiving function
CN102497415A (en) * 2011-03-22 2012-06-13 苏州阔地网络科技有限公司 Transmission control method and system for batch processing of files
CN102571739A (en) * 2011-05-26 2012-07-11 中兴通讯股份有限公司 Batch data transmission method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420840A (en) * 2010-09-27 2012-04-18 西安龙飞软件有限公司 Method for realizing brew-based Http (Hyper Text Transport Protocol) progressive video player
CN102164178A (en) * 2011-03-28 2011-08-24 华为技术有限公司 Content acquiring method and client

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656920A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 HTTP service processing method and device
CN106656920B (en) * 2015-10-30 2019-09-06 北京国双科技有限公司 Processing method, device, storage medium and the processor of HTTP service
CN109600403A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 A kind of method and device sending information
CN109150984A (en) * 2018-07-27 2019-01-04 平安科技(深圳)有限公司 The method and apparatus for obtaining data resource
WO2020019476A1 (en) * 2018-07-27 2020-01-30 平安科技(深圳)有限公司 Method and device for acquiring data resources
CN110120938A (en) * 2019-04-02 2019-08-13 视联动力信息技术股份有限公司 It is a kind of to assist the control method and device for turning server
CN110120938B (en) * 2019-04-02 2021-11-16 视联动力信息技术股份有限公司 Control method and device for cooperative server
CN110162619A (en) * 2019-05-27 2019-08-23 上海吉江数据技术有限公司 Online comparison reading system, method and device

Also Published As

Publication number Publication date
CN103229486B (en) 2016-10-05
WO2014085959A1 (en) 2014-06-12

Similar Documents

Publication Publication Date Title
CN107800819A (en) A kind of generation method of file identification, device and server
CN103229486A (en) Batch file transmission method and device
CN108933805A (en) A kind of document transmission method and system
CN104144419A (en) Identity authentication method, device and system
CN104426862A (en) Method, system, and browser realizing cross-domain request login
US10284561B2 (en) Method and server for providing image captcha
CN103546432A (en) Method and system for realizing cross-domain jumping, browser and domain name servers
CN103475682A (en) File transfer method and file transfer equipment
CN106534268B (en) Data sharing method and device
CN113190778A (en) Business data pushing method, system, computer equipment and computer storage medium
CN103024043A (en) Method, server and system for sharing data
CN105141605A (en) Session method, web server and browser
CN105320760A (en) Document processing method and server
CN112468511B (en) File transmission method and device
CN105657677A (en) Short message sending method, short message gateway and service platform
CN104142975A (en) Microblog information promotion method, device and system
CN105099769A (en) Method, device and system for processing abnormal operations of service platform
CN104518968A (en) Message processing method and transparent proxy server
CN110619022B (en) Node detection method, device, equipment and storage medium based on block chain network
CN104935548A (en) Identity verification method, device and system based on intelligent tattooing equipment
CN104778389A (en) Numerical value transferring method, terminal, server and system
CN111541521A (en) Data packet length identification method and system
CN108280228A (en) A kind of processing method and relevant device of webpage
CN108133026B (en) Multi-data processing method, system and storage medium
CN104751323A (en) Method for transferring electronic account data and related device and related system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant