CN103547339B - File uploading method, client side and server side - Google Patents

File uploading method, client side and server side Download PDF

Info

Publication number
CN103547339B
CN103547339B CN201380000611.XA CN201380000611A CN103547339B CN 103547339 B CN103547339 B CN 103547339B CN 201380000611 A CN201380000611 A CN 201380000611A CN 103547339 B CN103547339 B CN 103547339B
Authority
CN
China
Prior art keywords
upload
file
loopback address
service end
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201380000611.XA
Other languages
Chinese (zh)
Other versions
CN103547339A (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 CN103547339A publication Critical patent/CN103547339A/en
Application granted granted Critical
Publication of CN103547339B publication Critical patent/CN103547339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

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

Abstract

The embodiment of the invention provides a file uploading method, a client side and a server side, which belongs to the technical field of Internet. The pile uploading method is simplified, the unloading pre and post processing capability is reinforced, and memory devices are not needed and maintained due to the server side. The file uploading method comprises the following steps: receiving a request information from the client side by the uploading server side, wherein the request information comprises a request head domain, and the request head domain in the request information is used to judge whether the request information meets the receiving condition of the file or not, and if the request information meets the receiving condition of the file, the file is received, and a notification information is sent to the application server side according to a callback address, the callback address is carried in the request head domain of the request information sent from the client side, or the callback address is obtained from the application server side. The embodiment of the invention is used for uploading the file.

Description

A kind of file uploading method, client and service end
Technical field
The present invention relates to internet arena, more particularly, to a kind of file uploading method, client and service end.
Background technology
With the high speed development of internet, increasing website provides uploading tools, encourages the upper transmitting file of user.But Due to the restriction of the performance of website upload server, bandwidth, safety etc., the efficiency of the upper transmitting file of user receives and has a strong impact on, In prior art, the method uploading experience can be improved, mainly have two kinds: one kind is cdn(content delivery Network, content distributing network) upload acceleration function, one kind is to use cloud storage.
Specifically, cdn mainly provides upload and accelerates and download to accelerate function.Wherein, uploading the method accelerating is: user By files passe to cdn node, file is transferred to website by cdn node, and so, user needs to carry out 2 files passe, ability By files passe to website.And cloud storage is that various types of storage device substantial amounts of in network is passed through application software collection Collaborative work altogether, externally provides data storage and Operational Visit service jointly.When the method using cloud storage, Yong Huke With by files passe to website, website again by files passe to cloud storage.
Therefore, in the above described two methods, the file of user is required for carrying out 2 uploads, uploads accelerated method in cdn In in addition it is also necessary to buy and safeguard storage facility.In addition, in cloud storage method, after having uploaded file, it is understood that there may be browser Also needing to once be interacted again with the webserver, if applying in cdn system, needing application logic is compared greatly Modification, and amazon s3(amazon simple storage service, Amazon simpler storage services) centered on Centralized service, makes troubles to the upper transmitting file of user.
Content of the invention
Embodiments of the invention provide a kind of file uploading method, client and service end, being capable of simplified-file upload side Formula, strengthens disposal ability before and after uploading, and application service end need not be bought and safeguard storage device.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
In a first aspect, providing a kind of file uploading method, comprising:
Receive the request message that client sends, described request message includes asking header field;
Judge whether to meet the condition of acceptance of file according to the request header field in described request message;
If meeting the condition of acceptance of described file, receive described file, and sent out to application service end according to loopback address Send notification message.
In conjunction with a first aspect, in the first mode in the cards, described loopback address includes uploading front loopback address With loopback address after upload.
In conjunction with the first mode in the cards of first aspect, in second mode in the cards, described request Header field also includes application identities, and described application identities are used to identify described application service end.
In conjunction with the second mode in the cards of first aspect, in the third mode in the cards, described readjustment Address is to carry in the request header field of the request message that described client sends, or described loopback address is from described application Service end obtains.
In conjunction with the third mode in the cards of first aspect, in the 4th kind of mode in the cards, when described time Adjust address to be when described application service end obtains, also include:
Receive the registration message that described application service end sends, described registration message includes described loopback address;
Described loopback address is saved in database.
In conjunction with the 4th kind of mode in the cards of first aspect, in the 5th kind of mode in the cards, when described time Adjust address to be when described application service end obtains, if the described condition of acceptance meeting described file, receive described file, And according to loopback address to application service end send a notification message including:
If meeting the condition of acceptance of described file, being obtained from described database according to application identities and returning before described upload Adjust address, and call described upload before loopback address to described application service end send the first notification message, described first notice Message includes the first fileinfo of described file;
Send to described client and upload response message, described upload response message includes described request header field, in order to Described client continues to upload described file;
Receive and store described client and upload, according to described, the described file that response message sends, then answered according to described With mark obtain from described database described upload after loopback address, and call described upload after loopback address to described application Service end sends second notification message, and described second notification message includes the second fileinfo of described file.
In conjunction with the third mode in the cards of first aspect, in the 6th kind of mode in the cards, when described time Adjust address be described client send request message request header field in carry when, if described meet connecing of described file Receipt part, then receive described file, and according to loopback address to application service end send a notification message including:
If meeting the condition of acceptance of described file, obtain loopback address before described upload from described request header field, and Before calling described upload, loopback address sends the first notification message to described application service end, and described first notification message includes institute State the first fileinfo of file;
Send to described client and upload response message, described upload response message includes described request header field, in order to Described client continues to upload described file;
Receive and store described client and upload, according to described, the described file that response message sends, then from described request Obtain in header field described upload after loopback address, and call described upload after loopback address to described application service end send second Notification message, described second notification message includes the second fileinfo of described file.
In conjunction with first aspect or first aspect the first mode in the cards to the 6th kind of mode in the cards, In 7th kind of mode in the cards, methods described also includes:
After having received described file, it is sent completely response message to described client.
Second aspect, provides a kind of file uploading method, comprising:
Send registration message to uploading service end, described registration message includes loopback address during files passe;
After the completion of registration, the notice receiving the files passe that described upload service end sends according to described loopback address disappears Breath, to obtain the fileinfo of described file.
In conjunction with second aspect, in the first mode in the cards, described loopback address includes uploading front loopback address With loopback address after upload.
In conjunction with the first mode in the cards of second aspect, in second mode in the cards, described reception The notification message of the files passe that described upload service end sends according to described loopback address, is believed with the file obtaining described file Breath includes:
Receive the first notification message that described upload service end sends according to loopback address before described upload, described first leads to Know that message includes the first fileinfo of described file;
When described upload service termination harvests described file, receive described upload service end and adjust back according to after described upload The second notification message that address sends, described second notification message includes the second fileinfo of described file.
The third aspect, provides a kind of file uploading method, comprising:
Send request message to uploading service end, described request message includes asking header field;
Receive the upload response message that described upload service end sends, described upload response message includes described request header Domain;
According to described upload response message, the transmitting file on described upload service end.
In conjunction with the third aspect, in the first mode in the cards, described request header field includes application identities, or institute State request header field and include loopback address and described application identities.
In conjunction with the first mode in the cards of the third aspect, in second mode in the cards, methods described Also include:
After described upload service end adjusts back success by described loopback address to application service end, receive described upload What service end sent completes response message.
Fourth aspect, provides a kind of upload service end, comprising:
Receiving unit, for receiving the request message of client transmission, described request message includes asking header field;
Judging unit, for judging whether to meet the condition of acceptance of file according to the request header field in described request message;
Processing unit, if for the condition of acceptance meeting described file, receives described file, and according to loopback address to Application service end sends a notification message.
In conjunction with fourth aspect, in the first mode in the cards, described loopback address includes uploading front loopback address With loopback address after upload.
In conjunction with the first mode in the cards of fourth aspect, in second mode in the cards, described request Header field also includes application identities, and described application identities are used to identify described application service end.
In conjunction with the second mode in the cards of fourth aspect, in the third mode in the cards, described readjustment Address is to carry in the request header field of the request message that described client sends, or described loopback address is from described application Service end obtains.
In conjunction with the third mode in the cards of fourth aspect, in the 4th kind of mode in the cards, when described time Adjust address to be when described application service end obtains, also include:
First receiving unit, for receiving the registration message that described application service end sends, described registration message includes institute State loopback address;
Memory cell, for being saved in described loopback address in database.
In conjunction with the 4th kind of mode in the cards of fourth aspect, in the 5th kind of mode in the cards, when described time Address is adjusted to be that described processing unit includes when described application service end obtains:
First process subelement, if for meeting described file reception condition, according to application identities from described database Middle obtain described upload before loopback address, and call described upload before loopback address to described application service end send first notice Message, described first notification message includes the first fileinfo of described file;
First transmission subelement, uploads response message for sending to described client, described upload response message includes Described request header field, continues to upload described file in order to described client;
Second processing subelement, for receiving and storing described client according to described upload response message sends File, then obtains loopback address after described upload from described database according to described application identities, and calls described upload Loopback address sends second notification message to described application service end afterwards, and described second notification message includes the second of described file Fileinfo.
In conjunction with the third mode in the cards of fourth aspect or fourth aspect, in the 6th kind of mode in the cards In, when described loopback address be described client send request message request header field in carry when, described process list Unit includes:
3rd process subelement, if for the condition of acceptance meeting described file, obtain institute from described request header field State loopback address before upload, and call described upload before loopback address to described application service end send the first notification message, institute State the first fileinfo that the first notification message includes described file;
Second transmission subelement, uploads response message for sending to described client, described upload response message includes Described request header field, continues to upload described file in order to described client;
Fourth process subelement, for receiving and storing described client according to described upload response message sends File, then from described request header field obtain described upload after loopback address, and call described upload after loopback address to institute State application service end and send second notification message, described second notification message includes the second fileinfo of described file.
In conjunction with fourth aspect or fourth aspect the first mode in the cards to the 6th kind of mode in the cards, In 7th kind of mode in the cards, also include:
Response unit, for, after having received described file, being sent completely response message to described client.
5th aspect, provides a kind of application service end, comprising:
Second transmitting element, for sending registration message to upload service end, when described registration message includes files passe Loopback address;
Second receiving unit, sends according to described loopback address for after the completion of registration, receiving described upload service end Described files passe notification message, to obtain the fileinfo of described file.
In conjunction with the 5th aspect, in the first mode in the cards, described loopback address includes uploading front loopback address With loopback address after upload.
In conjunction with the first mode in the cards of the 5th aspect, in second mode in the cards, described second Receiving unit is used for:
Receive the first notification message that described upload service end sends according to loopback address before described upload, described first leads to Know that message includes the first fileinfo of described file;
When described upload service termination harvests described file, receive described upload service end and adjust back according to after described upload The second notification message that address sends, described second notification message includes the second fileinfo of described file.
6th aspect, provides a kind of client, comprising:
3rd transmitting element, for uploading service end transmission request message, described request message includes asking header field;
3rd receiving unit, for receiving the upload response message that described upload service end sends, described upload response disappears Breath includes described request header field;
Files passe unit, for according to described upload response message, the transmitting file on described upload service end.
In conjunction with the 6th aspect, in the first mode in the cards, described request header field includes application identities, or institute State request header field and include loopback address and described application identities.
In conjunction with the first mode in the cards of the 6th aspect, in second mode in the cards, also include:
After described upload service end adjusts back success by described loopback address to application service end, receive described upload What service end sent completes response message.
7th aspect, provides a kind of upload service end, comprising:
First receiver, for receiving the request message of client transmission, described request message includes asking header field;
First processor, for judging whether to meet the reception bar of file according to the request header field in described request message Part;
If described first receiver is additionally operable to meet the condition of acceptance of described file, receive described file, the first transmitting Device simultaneously sends a notification message to application service end according to loopback address.
In conjunction with the 7th aspect, in the first mode in the cards, described loopback address includes uploading front loopback address With loopback address after upload.
In conjunction with the first mode in the cards of the 7th aspect, in second mode in the cards, described request Header field also includes application identities, and described application identities are used to identify described application service end.
In conjunction with the second mode in the cards of the 7th aspect, in the third mode in the cards, described readjustment Address is to carry in the request header field of the request message that described client sends, or described loopback address is from described application Service end obtains.
In conjunction with the third mode in the cards of the 7th aspect, in the 4th kind of mode in the cards, when described time Adjust address to be when described application service end obtains, also include:
Described first receiver is additionally operable to receive the registration message that described application service end sends, and described registration message includes Described loopback address;
First memory is used for described loopback address is saved in database.
In conjunction with the 4th kind of mode in the cards of the 7th aspect, in the 5th kind of mode in the cards, when described time Address is adjusted to be described first receiver, described first processor, described first memory when described application service end obtains And described first transmitter is additionally operable to:
If meeting the condition of acceptance of described file, described first processor obtains from described database according to application identities Take loopback address before described upload, before described first transmitter calls described upload, loopback address sends to described application service end First notification message, described first notification message includes the first fileinfo of described file;
Described first transmitter is additionally operable to send to described client and uploads response message, and described upload response message includes Described request header field, continues to upload described file in order to described client;
Described first receiver is additionally operable to receive described client according to the described described file uploading response message transmission, Described first memory is additionally operable to and stores described file, and described first processor is according to described application identities from described database Middle obtain described upload after loopback address, described first transmitter call described upload after loopback address to described application service end Send second notification message, described second notification message includes the second fileinfo of described file.
In conjunction with the third mode in the cards of the 7th aspect, in the 6th kind of mode in the cards, when described time Adjust address be carry in the request header field of the request message that described client sends when, described first receiver, described the One processor, described first memory and first transmitter are used for:
If meeting described file reception condition, before described first processor obtains described upload from described request header field Loopback address, before described first transmitter calls described upload, loopback address notifies to disappear to described application service end transmission first Breath, described first notification message includes the first fileinfo of described file;
Described first transmitter sends to described client and uploads response message, and described upload response message includes described asking Seek header field, continue to upload described file in order to described client;
Described first receiver is additionally operable to receive described client according to the described described file uploading response message transmission, Described first memory is additionally operable to and stores described file, and described first processor obtains described upload from described request header field Loopback address afterwards, after described first transmitter calls described upload, loopback address notifies to disappear to described application service end transmission second Breath, described second notification message includes the second fileinfo of described file.
In conjunction with the 7th aspect or the 7th aspect the first mode in the cards to the 6th kind of mode in the cards, In 7th kind of mode in the cards, also include:
After having received described file, described first transmitter is additionally operable to be sent completely response message to described client.
Eighth aspect, provides a kind of application service end, comprising:
Second transmitter, for uploading service end transmission registration message, described registration message is included during files passe Loopback address;
Second receiver, for after the completion of registration, receiving what described upload service end sent according to described loopback address The notification message of described files passe, to obtain the fileinfo of described file.
In conjunction with eighth aspect, in the first mode in the cards, described loopback address includes uploading front loopback address With loopback address after upload.
In conjunction with the first mode in the cards of eighth aspect, in second mode in the cards, described second Receiver is used for:
Receive the first notification message that described upload service end sends according to loopback address before described upload, described first leads to Know that message includes the first fileinfo of described file;
When described upload service termination harvests described file, receive described upload service end and adjust back according to after described upload The second notification message that address sends, described second notification message includes the second fileinfo of described file.
9th aspect, provides a kind of client, comprising:
3rd transmitter, for uploading service end transmission request message, described request message includes asking header field;
3rd receiver, for receiving the upload response message that described upload service end sends, described upload response message Including described request header field;
3rd processor, for according to described upload response message, the transmitting file on described upload service end.
In conjunction with the 9th aspect, in the first mode in the cards, described request header field includes application identities, or institute State request header field and include loopback address and described application identities.
In conjunction with the first mode in the cards of the 9th aspect, in second mode in the cards, on described Pass service end by described loopback address to after the readjustment success of application service end, it is described that described 3rd receiver is additionally operable to reception What upload service end sent completes response message.
Tenth aspect, provides a kind of communication system, comprising:
The described upload service end that described 7th aspect provides, described application service end and institute that described eighth aspect provides State the described client that the 9th aspect provides.
The embodiment of the present invention provides a kind of file uploading method, client and service end, and upload service end receives client The request message sending, request message includes asking header field, judges whether to meet file according to the request header field in request message Condition of acceptance, if meeting the condition of acceptance of file, receive file, and according to loopback address to application service end send notify Message, wherein, loopback address be client send request message request header field in carry, or loopback address be from should With service end acquisition, mode can be uploaded by simplified-file, strengthen disposal ability before and after uploading, and application service end need not be bought With safeguard storage device.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, acceptable Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of file uploading method schematic flow sheet provided in an embodiment of the present invention;
A kind of file uploading method schematic flow sheet that Fig. 2 provides for further embodiment of this invention;
A kind of file uploading method schematic flow sheet that Fig. 3 provides for further embodiment of this invention;
A kind of file uploading method schematic flow sheet that Fig. 4 provides for further embodiment of this invention;
A kind of file uploading method schematic flow sheet that Fig. 5 provides for further embodiment of this invention;
A kind of upload service end structure schematic diagram that Fig. 6 provides for further embodiment of this invention;
Another kind of upload service end structure schematic diagram that Fig. 7 provides for further embodiment of this invention;
Another upload service end structure schematic diagram that Fig. 8 provides for further embodiment of this invention;
Another upload service end structure schematic diagram that Fig. 9 provides for further embodiment of this invention;
Another upload service end structure schematic diagram that Figure 10 provides for further embodiment of this invention;
A kind of application service end structure schematic diagram that Figure 11 provides for further embodiment of this invention;
A kind of client terminal structure schematic diagram that Figure 12 provides for further embodiment of this invention;
A kind of upload service end structure schematic diagram that Figure 13 provides for further embodiment of this invention;
A kind of application service end structure schematic diagram that Figure 14 provides for further embodiment of this invention;
A kind of client terminal structure schematic diagram that Figure 15 provides for further embodiment of this invention;
A kind of communication system architecture schematic diagram that Figure 16 provides for further embodiment of this invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
System architecture in the embodiment of the present invention, can include client, cdn(content delivery network, Content distributing network) node and app website (application, application service end), this client, cdn node and app website All using http(hyper text transport protocol, HTTP) communication protocol communicated.Client End and cdn node need to support 100-continue process.
The embodiment of the present invention provides a kind of file uploading method, as shown in Figure 1, comprising:
101st, upload service end receives the request message that client sends, and request message includes asking header field.
Wherein, upload service end can be the cdn(content delivery network based on cloud storage, and content is divided Hairnet network) node, this cdn node has the advantages that cloud storage and traditional cdn, there is provided mass storage capacity, user can be from Near cdn node uploads and downloads file.
102nd, upload service end judges whether to meet the condition of acceptance of file according to the request header field in request message.
Wherein, the request header field in the request message that this client sends can comprise expect:100-continue, uses To inquire whether cdn is ready to receive file.
If 103 condition of acceptances meeting file, upload service terminates message in-coming part, and according to loopback address to application clothes Business end sends a notification message.
Wherein, app(application, application service end) website can be for employing the upload of cdn node, download service Website.This loopback address can include uploading loopback address after front loopback address and upload.
Exemplary, loopback address is to carry in the request header field of the request message that client sends, or readjustment ground Location is to obtain from application service end.
Specifically, when loopback address is to obtain from application service end, receive the registration message that application service end sends, Registration message includes loopback address, and loopback address is saved in database.If meeting the condition of acceptance of file, cdn node Obtain loopback address before upload according to application identities from database, and call loopback address before upload to send to application service end First notification message, the first notification message includes the first fileinfo of file, and after to client send upload response message, Upload response message to include asking header field, continue upper transmitting file in order to client, and then receive and store client according to upper Pass the file that response message sends, then obtain loopback address after upload from database according to application identities, and call upload Loopback address sends second notification message to application service end afterwards, and second notification message includes the second fileinfo of file.
When loopback address be client send request message request header field in carry when, if meeting connecing of file Receipt part, then loopback address before cdn node obtains from request header field and uploads, and before calling upload loopback address to application service End sends the first notification message, and the first notification message includes the first fileinfo of file, and after send to upload to client and ring Answer message, upload response message and include asking header field, continue upper transmitting file in order to client, and then receive and store client According to uploading the file that response message sends, from request header field, then obtain loopback address after uploading, and call and return after upload Address is adjusted to send second notification message to application service end, second notification message includes the second fileinfo of file.
The embodiment of the present invention provides a kind of file uploading method, and upload service end receives the request message that client sends, Request message includes asking header field, judges whether to meet the condition of acceptance of file according to the request header field in request message, if full The condition of acceptance of sufficient file, then receive file, and sent a notification message to application service end according to loopback address, can simplify literary composition Part uploads mode, strengthens disposal ability before and after uploading, and application service end need not be bought and safeguard storage device.
Further embodiment of this invention provides a kind of file uploading method, as shown in Figure 2, comprising:
201st, upload service end receives the request message that client sends, and request message includes asking header field.
Wherein, client can be the mobile phone of user's use, apparatus such as computer, and upload service end can be cdn node, carries Upload, download service are supplied.Client, app website and cdn node are all using http(hyper text transport Protocol, HTTP) protocol communication.
Specifically, client, to before transmitting file on cdn node, sends http message to cdn node, and this request message includes Request header field, for inquiring whether cdn node is ready to accept client upload file.The first shape can be comprised in this request header field State code expect:100-continue, that is, client and cdn node need to support to 100-continue in http1.1 agreement The process of conditional code.This request header field can also include appid(application identity, application identities) and readjustment Address.This loopback address can include uploading loopback address after front loopback address (callback_url_pre) and upload (callback_url_post), in order to cdn node after the request message receiving client transmission, according to this readjustment ground Location notifies the fileinfo that app website uploads.Appid application identities are for indicating app application service end, and cdn can root To distinguish app website according to this appid.Therefore, this requestor code can be such that
post/app1/path/filename.ext http/1.1
host:upload.cdn.com
expect:100-continue
appid:app1
callback_url_pre:http://app1_domain_name/callback_url_pre
callback_url_post:http://app1_domain_name/callback_url_post
202nd, upload service end judges whether to meet the condition of acceptance of file according to the request header field in request message.
Specifically, cdn node blocks after receiving the request message of client, can be according to asking in this request message Header field is asked to judge whether this http request header field comprises first state code expect:100-continue head, if comprising expect: 100-continue head, then continue to be communicated with client, cdn node is ready to receive the files passe of client;If not wrapping Head containing expect:100-continue, then the connection of the disconnection of cdn node and client.
If 203 condition of acceptances meeting file, upload service end obtains loopback address before uploading from request header field, And loopback address sends the first notification message to application service end before calling upload, the first notification message includes the first literary composition of file Part information.
Specifically, if comprising expect:100-continue head in the request message of client transmission, that is, meet file Condition of acceptance.Cdn just obtains loopback address callback_ before uploading from the request header field of the request message that client sends Url_pre, and call loopback address before this upload to send the first notification message to app website application service end, to notify this app First fileinfo of the file that website uploads.This first fileinfo can include the letter such as the size of file and the title of file Breath.
The program code of the readjustment request of this step process can be:
post/callback_url_pre http/1.1
host:app1_domain_name
file_upload_info
http/1.1200ok
connection:close
{ filename: filename.ext success: true }
204th, upload service end sends to client and uploads response message, uploads response message and includes asking header field, so that Continue upper transmitting file in client.
Specifically, after cdn node calls before upload loopback address to the readjustment success of app website, can return to client Return response message, agree to receive the file content that client sends.Wherein, this response message can include 100-continue Head, so that client continues to transmitting file on cdn node.Client carries 100-continue receiving from cdn node Head response after, continue to cdn node upload file content.When client is not received by the response header of cdn node return, The failure of client upload file.
In this step, the program code of response process can be such that
http/1.1100continue
205th, upload service end receives and stores client according to uploading the file that response message sends, then from request header Obtain loopback address after uploading in domain, and call after upload loopback address to send second notification message to application service end, second Notification message includes the second fileinfo of file.
Specifically, after cdn node sends to client and uploads response message, continue to the file of client upload, When client continue to cdn node upload file content until files passe complete when, cdn node after having received file content, Obtain loopback address callback_url_post after uploading from the request header field that client sends, and call and return after this upload Address is adjusted to send second notification message to app website, this second notification message includes the second file of the file of client upload Information.This second fileinfo can include the file content of client upload file.Wherein, this second notification message is acceptable Including download url(universal resource locator, URL) field, can use in order to user This url address downloads this document from cdn node.
Program code in this step can be:
post/callback_url_post http/1.1
host:app1_domain_name
file_upload_info
http/1.1200ok
connection:close
Filename: filename.ext success: true url: http: // download.cdn.com/path/to/filename.ext〞}
206th, upload service end, after having received file, is sent completely response message to client.
Specifically, cdn node, after being properly received the file content of client upload, file content is stored, And returning response message to client, client obtains file success upload message.So, app website is obtaining file letter It is assumed that user is when app application site downloads this document after breath, app website can be somebody's turn to do in second notification message after upload File corresponding url guiding user downloads this document content in cdn node.Cdn node is as upload service end, there is provided literary composition Part uploads, download service, and app website as application service end, carries out uploading using cdn node, download service.So, upper During transmitting file, by loopback address, file only needs to once be uploaded to cdn, thus simplifying upload mode, enhances Disposal ability before and after biography, application service end simultaneously need not be bought and safeguard storage facility.
The embodiment of the present invention provides a kind of file uploading method, receives the request message that client sends, request message bag Include request header field, request header field includes loopback address, judge whether to meet connecing of file according to the request header field in request message Receipt part, if meeting the condition of acceptance of file, upload service end obtains loopback address before uploading from request header field, and calls Before upload, loopback address sends the first notification message to application service end, and the first notification message includes the first file letter of file Breath, sends to client and uploads response message, uploads response message and includes asking header field, continues to upload literary composition in order to client Part, receives and stores client according to uploading the file that response message sends, and then obtains from request header field and adjusts back after uploading Address, and call loopback address after upload to send second notification message to application service end, second notification message includes file Second fileinfo, after having received file, is sent completely response message to client, can upload mode by simplified-file, increase Disposal ability before and after upload, and application service end by force need not be bought and safeguard storage device.
Further embodiment of this invention provides a kind of file uploading method, as shown in Figure 3, comprising:
301st, upload service end receives the registration message that application service end sends, and registration message includes loopback address.
Wherein, upload service end can be cdn node, there is provided upload, download service.App website can be for employing Cdn node uploads, the website of download service.
Specifically, cdn node can provide readjustment registration interface to app website, and app website calls this readjustment registration interface Send registration message to cdn node, this registration message can include loopback address, including loopback address callback_ before uploading Loopback address callback_url_post after url_pre and upload.This loopback address can be saved to cdn by app website Point registered callbacks address is to obtain files passe notice.This app registration process program code can be:
post/upload/regester http/1.1
host:upload.cdn.com
Appid=app1 callback_url_pre=http 3a 2f 2fapp1_domain_nam e 2fcallback_url_pre callback_url_post=http 3a 2f 2fapp1_domain_name 2fcallback_url_post
http/1.1200ok
connection:close
{ appid: app1 success: true }
302nd, loopback address is saved in database at upload service end.
Specifically, after app website is to cdn Node registry success, cdn node just returns registration response to app website Message, notifies the success of app site registration.Cdn node just the loopback address of app site registration is saved in database.
303rd, upload service end receives the request message that client sends, and request message includes asking header field.
Specifically, client, app website and cdn node are all using http(hyper text transport Protocol, HTTP) protocol communication.When client is to the upper transmitting file of cdn node request, send out to cdn node Send request message, this request message includes asking header field, and this request header field includes first state code expect:100- Continue, that is, client and cdn node need to support the process to 100-continue conditional code in http1.1 agreement.Should Request header field also includes appid, and appid application identities are for indicating app application service end, and cdn node can be according to this Appid is distinguishing app website.The program code of this request message can be such that
post/app1/path/filename.ext http/1.1
host:upload.cdn.com
expect:100-continue
appid:app1
304th, upload service end judges whether to meet the condition of acceptance of file according to the request header field in request message.
Specifically, cdn node blocks after receiving the request message of client, can be according to asking in this request message Header field is asked to judge whether this http request header field comprises first state code expect:100-continue head, if comprising expect: 100-continue head, then continue to be communicated with client, cdn node is ready to receive the files passe of client;If not wrapping Head containing expect:100-continue, then the connection of the disconnection of cdn node and client.
If 305 condition of acceptances meeting file, upload service end obtains before upload according to application identities from database Loopback address, and call loopback address before upload to send the first notification message to application service end, the first notification message includes literary composition First fileinfo of part.
Specifically, when the request message when client upload file meets the condition of acceptance of file, then cdn node just root Call loopback address callback_url_pre before upload according to appid application identities from database, and call and return before this upload Address is adjusted to send the first notification message to app website, to notify the first fileinfo of the file of app site customers end upload. This first fileinfo can include the information such as the size of file and the title of file.
The program code of the readjustment request of this step process can be:
post/callback_url_pre http/1.1
host:app1_domain_name
file_upload_info
http/1.1200ok
connection:close
{ filename: filename.ext success: true }
306th, upload service end sends to client and uploads response message, uploads response message and includes asking header field, so that Continue upper transmitting file in client.
Specifically, after cdn node calls before upload loopback address to the readjustment success of app website, can return to client Return response message, agree to receive the file content that client sends.Wherein, this response message can include 100-continue Head, so that client continues to transmitting file on cdn node.
In this step, the program code of response process can be such that
http/1.1100continue
Client, after receive the head response carrying 100-continue from cdn node, continues to upload literary composition to cdn node Part content.When client is not received by the response header of cdn node return, the failure of client upload file.
307th, upload service end receives and stores client according to uploading the file that response message sends, then according to application Mark obtains loopback address after uploading from database, and calls loopback address after upload to send the second notice to application service end Message, second notification message includes the second fileinfo of file.
Specifically, when client continues to upload file content to cdn node until when files passe is complete, cdn node is connecing After harvesting file content, cdn node inquires about the upload obtaining app site registration in database according to this appid application identities Loopback address callback_url_post afterwards, notifies the second fileinfo uploading to app website.This second fileinfo can To include the file content of client upload file.Wherein, this second notification message can also include downloading url field, so that This document can be downloaded in user using this url address from cdn node.
Program code in this step can be:
post/callback_url_post http/1.1
host:app1_domain_name
file_upload_info
http/1.1200ok
connection:close
Filename: filename.ext success: true url: http: // download.cdn.com/path/to/filename.ext〞}
308th, upload service end, after having received file, is sent completely response message to client.
Specifically, cdn node, after being properly received the file content of client upload, file content is stored, And returning response message to client, client obtains file success upload message.So, app website is obtaining file letter It is assumed that user is when app application site downloads this document after breath, app website can be somebody's turn to do in second notification message after upload The corresponding url of file makes guiding user download this document content in cdn node.Cdn node is as upload service end, there is provided Files passe, download service, app website as application service end, carries out uploading using cdn node, download service.Additionally, cdn Node employs the framework that cdn and cloud storage combine, and so, in upper transmitting file, the file of client upload only needs to carry out Once being uploaded to cdn, thus simplifying upload mode, enhancing disposal ability before and after upload, app website simultaneously need not be bought and tie up Shield storage facility.
The embodiment of the present invention provides a kind of file uploading method, receives the registration message that application service end sends, and registration disappears Breath includes loopback address, and loopback address is saved in database, receives the request message that client sends, and request message includes Request header field, judges whether to meet the condition of acceptance of file according to the request header field in request message, if meeting the reception of file Condition, then loopback address before upload service end obtains from database according to application identities and uploads, and call readjustment ground before upload Location sends the first notification message to application service end, and the first notification message includes the first fileinfo of file, and backward client End sends and uploads response message, uploads response message and includes asking header field, continues upper transmitting file in order to client, and then receive And store client according to uploading the file that response message sends, then obtained from database according to application identities and return after upload Adjust address, and call loopback address after upload to send second notification message to application service end, second notification message includes file The second fileinfo, after having received file, be sent completely response message to client, can simplified-file upload mode, Strengthen disposal ability before and after uploading, and application service end need not be bought and safeguard storage device.
Further embodiment of this invention provides a kind of file uploading method, as shown in Figure 4, comprising:
401st, application service end sends registration message to uploading service end, and registration message includes readjustment ground during files passe Location.
Wherein, application service end is app website, for example, can be the Internet, applications website, website etc..Cdn node provides Readjustment registration interface, app website can call this readjustment registration interface to send registration message, this registration message to cdn node Including loopback address, including loopback address after loopback address before uploading and upload.This loopback address can be permissible by app website To cdn Node registry loopback address to obtain files passe notice.
App registration process program code can be:
post/upload/regester http/1.1
host:upload.cdn.com
Appid=app1 callback_url_pre=http 3a 2f 2fapp1_domain_nam e 2fc
Allback_url_pre callback_url_post=http 3a 2f 2fapp1_domain_name 2fcallback_url_post
http/1.1200ok
connection:close
{ appid: app1 success: true }
402nd, after the completion of the registration of application service end, receive the files passe that upload service end sends according to loopback address Notification message, to obtain the fileinfo of file.
Specifically, after app website is to cdn Node registry success, cdn node just returns registration response to app website Message, notifies the success of app site registration.Cdn node just the loopback address of app site registration is saved in database.
Cdn node receives the request message that client sends, and request message includes asking header field, and cdn node is according to request Request header field in message judges whether to meet the condition of acceptance of file, if meeting the condition of acceptance of file, app website receives The first notification message that cdn node sends according to loopback address before uploading, the first notification message includes the first file letter of file Cease this first fileinfo and can include the information such as the size of file and the title of file.
Wherein, before the upload that cdn node obtains, loopback address can obtain from the request header field that client sends, and that is, please Carry loopback address in the request header field seeking message, or obtained from database by appid.
Then, cdn node sends to client and uploads response message, uploads response message and includes asking header field, in order to Client continues upper transmitting file.
When cdn node has received file, cdn node obtains readjustment ground after upload from the request header field that client sends Location, or loopback address after appid obtains upload from database, and loopback address is sent out to app website after this upload Send second notification message, that is, app website receives the second notification message that upload service end sends according to loopback address after uploading, the Two notice message packages include the second fileinfo of file, and this second fileinfo can be included in the file of client upload file Hold..
The embodiment of the present invention provides a kind of file uploading method, and application service end sends registration message to uploading service end, Registration message includes loopback address during files passe, application service end registration after the completion of, receive upload service end according to time Adjust the notification message of the files passe of address transmission, to obtain the fileinfo of file, mode can be uploaded by simplified-file, strengthen Disposal ability before and after upload, and application service end need not buy and safeguard storage device.
Further embodiment of this invention provides a kind of file uploading method, as shown in Figure 5, comprising:
501st, client sends request message to uploading service end, and request message includes asking header field.
Wherein, client refers to corresponding with server, provides the program of local service, such as browser, various for client Mobile phone is applied.In addition to some are only in the application program of local runtime, it is typically mounted in common client computer, need and clothes Work in coordination operation in business end.For example may operate in the equipment such as computer, the mobile phone of user.
This request header field can include first state code expect:100-continue, and client and cdn node need to prop up Hold the process to 100-continue conditional code in http1.1 agreement.Also include appid, this appid is should for indicating app With service end, cdn can distinguish app website according to this appid.
502nd, client receives the upload response message that upload service end sends.
Specifically, after client sends request message to cdn node, cdn node is according to the request header field of request message Whether comprise first state code expect:100-continue, judge whether to meet the condition of acceptance of file, if meet file connecing Receipt part, before cdn node passes through to upload, loopback address sends the first notification message to client, and the first notification message includes file The first fileinfo, and after to client send upload response message.
Wherein, this upload response message includes the request header field in the request message of client transmission, in order to client Upper transmitting file can be continued.Loopback address can carry in the request header field of the request message that client sends, or returns Address is adjusted to be to obtain from application service end, including loopback address after loopback address before uploading and upload.When loopback address be from Application service end obtain when, by receiving the registration message that application service end sends, registration message includes loopback address, and will Loopback address is saved in database.
503rd, client is according to upload response message, the transmitting file in upload service end.
Specifically, client, after receive the head response carrying 100-continue from cdn node, continues to save to cdn Point uploads file content.When client is not received by the response header of cdn node return, the failure of client upload file.
Then, loopback address after cdn node obtains from request header field and uploads, or adjust back after acquisition upload from database Address, and call loopback address after upload to send second notification message to application service end, second notification message includes file Second fileinfo.
The embodiment of the present invention provides a kind of file uploading method, and client sends request message to uploading service end, is connecing After receiving the upload response message that upload service end sends, according to this upload response message to uploading transmitting file in service end, can Simplified-file uploads mode.
Further embodiment of this invention provides a kind of upload service end 01, as shown in Figure 6, comprising:
Receiving unit 016, for receiving the request message of client transmission, request message includes asking header field.
Judging unit 011, for judging whether to meet file reception condition according to the request header field in request message.
Processing unit 012, if for meeting file reception condition, receive file, and according to loopback address to application clothes Business end sends a notification message.
Wherein, loopback address after loopback address includes uploading front loopback address and uploading.
Optionally, request header field also includes application identities, and application identities are used to identify application service end.
Optionally, loopback address is to carry in the request header field of the request message that client sends, or loopback address It is to obtain from application service end.
Optionally, as shown in fig. 7, when loopback address is to obtain from application service end, also including:
First receiving unit 014, sends for before receiving the request message that client sends, receiving application service end Registration message, registration message includes loopback address.
Memory cell 015, for being saved in loopback address in database.
Optionally, as shown in figure 8, when loopback address is to obtain from application service end, processing unit 012 can wrap Include:
First process subelement 0121, if for meeting file reception condition, obtain from database according to application identities Take loopback address before upload, and call loopback address before upload to send the first notification message to application service end, first notifies to disappear Breath includes the first fileinfo of file.
First transmission subelement 0122, uploads response message for sending to client, uploads response message and includes asking Header field, continues upper transmitting file in order to client.
Second processing subelement 0123, for receiving and storing client according to the file uploading response message transmission, and Obtain loopback address after upload according to application identities from database afterwards, and loopback address is sent out to application service end after calling upload Send second notification message, second notification message includes the second fileinfo of file.
Optionally, as shown in figure 9, when loopback address be client send request message request header field in carry When, processing unit 012 may include that
3rd process subelement 0124, if for the condition of acceptance meeting file, obtains before uploading from request header field Loopback address, and call loopback address before upload to send the first notification message to application service end, the first notification message includes literary composition First fileinfo of part.
Second transmission subelement 0125, uploads response message for sending to client, uploads response message and includes asking Header field, continues upper transmitting file in order to client.
Fourth process subelement 0126, for receiving and storing client according to the file uploading response message transmission, and Obtain loopback address after uploading afterwards from request header field, and call loopback address after upload to send the second notice to application service end Message, second notification message includes the second fileinfo of file.
Optionally, as shown in Figure 10, can also include:
Response unit 013, for, after having received file, being sent completely response message to client.
Wherein, receiving unit 016 is used for executing the step 101 in the embodiment shown in Fig. 1, or the embodiment shown in Fig. 2 In step 201, or the step 303 in embodiment illustrated in fig. 3;Judging unit 011 is used for executing in the embodiment shown in Fig. 1 Step 304 in step 202 in step 102, or embodiment illustrated in fig. 2, or embodiment illustrated in fig. 3;Processing unit 012 is used for Step 103 in execution embodiment illustrated in fig. 1, or the step 203 in embodiment illustrated in fig. 2~step 205, or real shown in Fig. 3 Apply the step 305~step 307 in example;First receiving unit 014 is used for executing the step 301 in embodiment illustrated in fig. 3;Storage Unit 015 is used for executing the step 302 in embodiment illustrated in fig. 3;First process subelement 0121 is used for executing to be implemented shown in Fig. 3 Step 305 in example;First transmission subelement 0122 is used for executing the step 306 in embodiment illustrated in fig. 3;Second processing is single Unit 0123 is used for executing the step 307 in embodiment illustrated in fig. 3;3rd process subelement 0124 is used for executing to be implemented shown in Fig. 2 Step 203 in example;Second transmission subelement 0125 is used for executing the step 204 in embodiment illustrated in fig. 2;Fourth process is single Unit 0126 is used for executing the step 205 in embodiment illustrated in fig. 2;Response unit 013 is used for executing the step in embodiment illustrated in fig. 2 Rapid 206, or the step 308 in embodiment illustrated in fig. 3.
The embodiment of the present invention provides a kind of upload service end, and upload service end receives the request message that client sends, please Asking message to include request header domain, judging whether to meet the condition of acceptance of file according to the request header field in request message, if meeting The condition of acceptance of file, then receive file, and sent a notification message to application service end according to loopback address, being capable of simplified-file Upload mode, strengthens disposal ability before and after uploading, and application service end need not be bought and safeguard storage device.
Further embodiment of this invention provides a kind of application service end 02, as shown in figure 11, comprising:
Second transmitting element 021, for uploading service end transmission registration message, registration message is included during files passe Loopback address.
Second receiving unit 022, for, after the completion of registration, receiving the file that upload service end sends according to loopback address The notification message uploading, to obtain the fileinfo of file.
Wherein, loopback address after loopback address includes uploading front loopback address and uploading.
Optionally, the second receiving unit 022 can be used for:
Receive the first notification message that upload service end sends according to loopback address before uploading, the first notification message includes literary composition First fileinfo of part;
When upload service termination harvests file, receive upload service end and lead to according to loopback address after uploading sends second Know message, second notification message includes the second fileinfo of file.
Wherein, the second transmitting element 021 is used for executing the step 401 in the embodiment shown in Fig. 4, the second receiving unit 022 is used for executing the step 402 in the embodiment shown in Fig. 4.
The embodiment of the present invention provides a kind of application service end, and application service end sends registration message, note to uploading service end Volume message includes loopback address during files passe, after the completion of the registration of application service end, receives upload service end according to readjustment The notification message of the files passe that address sends, to obtain the fileinfo of file, can upload mode, in enhancing by simplified-file Disposal ability before and after biography, and application service end need not buy and safeguard storage device.
Further embodiment of this invention provides a kind of client 03, as shown in figure 12, comprising:
3rd transmitting element 031, for uploading service end transmission request message, request message includes asking header field.
3rd receiving unit 032, for receiving the upload response message of upload service end transmission, uploads response message and includes Request header field.
Files passe unit 033, for according to upload response message, the transmitting file in upload service end.
Optionally, request header field includes application identities, or request header field includes loopback address and application identities.
Optionally, can also include:
After upload service end adjusts back success by loopback address to application service end, receive what upload service end sent Complete response message.
Wherein, the 3rd transmitting element 031 is used for executing the step 501 in the embodiment shown in Fig. 5;3rd receiving unit 032 is used for executing the step 502 in embodiment illustrated in fig. 5;Files passe unit 033 is used for executing in embodiment illustrated in fig. 5 Step 503.
The embodiment of the present invention provides a kind of client, and client sends request message, request message bag to uploading service end Include request header field, receive the upload response message that upload service end sends, upload response message and include asking header field, according to upload Response message, to uploading transmitting file in service end, can upload mode by simplified-file.
Further embodiment of this invention provides a kind of upload service end 04, and as shown in figure 13, this upload service end 04 includes: the One bus 041, and it is connected to the first processor 042 of the first bus 041, first memory 043, the first receiver 044 and First transmitter 045, wherein, this first memory 043 is used for store instruction, and this first receiver 044 is used for executing this instruction For receiving the request message of client transmission, request message includes asking header field, specifically for the embodiment shown in execution Fig. 1 In step 101, or the step 201 in the embodiment shown in Fig. 2, or the step 303 in embodiment illustrated in fig. 3;First process Device 042 is used for executing the condition of acceptance for judging whether to meet file according to the request header field in request message for this instruction, tool Body is used for executing the step 102 in the embodiment shown in Fig. 1, or the step 202 in embodiment illustrated in fig. 2, or implements shown in Fig. 3 Step 304 in example;If this first receiver 044 is additionally operable to execute this instruction and is additionally operable to meet file reception condition, receive File, first transmitter 045 calls loopback address to send a notification message to application service end, specifically for real shown in execution Fig. 1 Apply the step 203~step 205 in the step 103 in example, or embodiment illustrated in fig. 2, or the step in embodiment illustrated in fig. 3 305~step 307;
In embodiments of the present invention, optionally, loopback address after loopback address includes uploading front loopback address and uploading.
In embodiments of the present invention, optionally, request header field includes application identities, and application identities are used to mark application clothes Business end.
In embodiments of the present invention, optionally, loopback address is in the request header field of the request message that client sends Carry, or loopback address is to obtain from application service end.
Individual in embodiments of the present invention, optionally, when loopback address is to obtain from application service end, the first receiver 044 is used for executing this instruction, comprising:
Before receiving the request message that client sends, the first receiver is additionally operable to receive the note that application service end sends Volume message, registration message includes loopback address, specifically for the step 301 in execution embodiment illustrated in fig. 3;
First memory 043 is used for loopback address is saved in database, specifically in execution embodiment illustrated in fig. 3 Step 302.
In embodiments of the present invention, optionally, when loopback address is to obtain from application service end, this first receiver 044th, first processor 042 and first transmitter 045 execute this instruction and are additionally operable to:
If meeting file reception condition, first processor 042 simultaneously obtains before upload according to application identities from database Loopback address, before first transmitter 045 calls upload, loopback address sends the first notification message, the first notice to application service end Message includes the first fileinfo of file specifically for the step 305 in execution embodiment illustrated in fig. 3;
First transmitter 045 is additionally operable to send to client and uploads response message, uploads response message and includes asking header field, Continue upper transmitting file in order to client, specifically for the step 306 in execution embodiment illustrated in fig. 3;
If the first receiver 044 is additionally operable to receive and store client according to uploading the file that response message sends, first Memory 043 is additionally operable to and storage file, and first processor 042 obtains readjustment ground after upload according to application identities from database Location, after first transmitter 045 calls upload, loopback address sends second notification message, second notification message bag to application service end Include the second fileinfo of file, specifically for the step 307 in execution embodiment illustrated in fig. 3.
In embodiments of the present invention, optionally, when loopback address is the request header field of the request message sending in client In carry when, this first receiver 044, first processor 042, first memory 043 and first transmitter 045 execution this refer to Order is additionally operable to:
If meeting file reception condition, loopback address before first processor 042 acquisition upload from request header field, first Before transmitter 045 calls upload, loopback address sends the first notification message to application service end, and the first notification message includes file The first fileinfo, specifically for execution embodiment illustrated in fig. 2 in step 203;
First transmitter 045 sends to client and uploads response message, uploads response message and includes asking header field, in order to Client continues upper transmitting file, specifically for the step 204 in execution embodiment illustrated in fig. 2;
If the first receiver 044 is additionally operable to receive and store client according to uploading the file that response message sends, first Memory 043 is additionally operable to and storage file, loopback address after first processor 042 acquisition upload from request header field, first After emitter 045 calls upload, loopback address sends second notification message to application service end, and second notification message includes file Second fileinfo, specifically for the step 205 in execution embodiment illustrated in fig. 2.
In embodiments of the present invention, optionally, after having received file, first transmitter 045 executes this instruction and is additionally operable to It is sent completely response message to client, specifically for the step 206 in execution embodiment illustrated in fig. 2, or embodiment illustrated in fig. 3 In step 308.
Therefore, the upload service end of the embodiment of the present invention, upload service end receives the request message that client sends, request Message includes request header domain, judges whether to meet the condition of acceptance of file according to the request header field in request message, if meeting literary composition The condition of acceptance of part, then receive file, and sent a notification message to application service end according to loopback address, can be on simplified-file Biography mode, strengthens disposal ability before and after uploading.
Further embodiment of this invention provides a kind of application service end 05, and as shown in figure 14, this application service end includes: second Bus 041, and it is connected to the second processing device 042 of the second bus 041, second memory 043, the second receiver 044 and Two transmitters 045, wherein, this second memory 043 be used for store instruction, this second transmitter 045 execute this instruction be used for Upload service end sends registration message, and registration message includes loopback address during files passe;The execution of this second receiver 044 should Instruct for, after the completion of registration, receiving the notification message of the files passe that upload service end sends according to loopback address, to obtain Take the fileinfo of file.
In embodiments of the present invention, optionally, loopback address after loopback address includes uploading front loopback address and uploading.
In embodiments of the present invention, optionally, this second receiver 044 executes this instruction and is used for:
Receive the first notification message that upload service end sends according to loopback address before uploading, the first notification message includes literary composition First fileinfo of part;
When upload service termination harvests file, receive upload service end and lead to according to loopback address after uploading sends second Know message, second notification message includes the second fileinfo of file.
Wherein, this second transmitter 045 is used for executing the step 401 in the embodiment shown in Fig. 4, this second receiver 044 is used for executing the step 402 in the embodiment shown in Fig. 4.
Therefore, the application service end of the embodiment of the present invention, application service end sends registration message, registration to uploading service end Message includes loopback address during files passe, after the completion of the registration of application service end, receives upload service end according to readjustment ground The notification message of the files passe that location sends, to obtain the fileinfo of file, can upload mode by simplified-file, strengthen and upload Disposal ability in front and back, and application service end need not buy and safeguard storage device.
Further embodiment of this invention provides a kind of client 06, and as shown in figure 15, this client 06 includes: the 3rd bus 041, and it is connected to the 3rd processor 042 of the 3rd bus 041, the 3rd memory 043, the 3rd receiver 044 and the 3rd Emitter 045, wherein, the 3rd memory 043 is used for store instruction;3rd transmitter 045 executes this instruction and is used for upload Service end sends request message, and request message includes asking header field;3rd receiver 044 executes this instruction and is used for receiving upload The upload response message that service end sends, uploads response message and includes asking header field;3rd processor 042 executes this instruction and uses According to upload response message, the transmitting file in upload service end.
In embodiments of the present invention, optionally, request header field includes application identities, or request header field includes loopback address And application identities.
In embodiments of the present invention, optionally, adjusted back successfully to application service end by loopback address at upload service end Afterwards, the 3rd receiver 044 is used for executing this instruction and is additionally operable to receive that upload service end sends completes response message.
Wherein, the 3rd transmitter 045 is used for executing the step 501 in the embodiment shown in Fig. 5;3rd receiver 044 is used for executing the step 502 in embodiment illustrated in fig. 5;3rd processor 042 is used for executing in embodiment illustrated in fig. 5 Step 503.
Therefore, the client of the embodiment of the present invention, client sends request message to uploading service end, and request message includes Request header field, receives the upload response message that upload service end sends, and uploads response message and includes asking header field, rings according to uploading Answer message, to uploading transmitting file in service end, mode can be uploaded by simplified-file.
Further embodiment of this invention provides a kind of communication system 1, as shown in figure 16, comprising: it is upper that previous embodiment provides Pass service end 04, application service end 05 and client 06.
Wherein, upload service end 04 is used for executing the step 101~step 103 in embodiment illustrated in fig. 1, or shown in Fig. 2 Step 301 in step 201 in embodiment~step 206, or embodiment illustrated in fig. 3~308;Application service end 05 is used for holding Step 401~step 402 in row embodiment illustrated in fig. 4;Client 06 is used for executing the step 501 in embodiment illustrated in fig. 5 ~step 503.
The embodiment of the present invention provides a kind of communication system, and upload service end receives the request message that client sends, request Message includes request header domain, judges whether to meet file reception condition according to the request header field in request message, if meeting file Condition of acceptance, then receive file, and sent a notification message to application service end according to loopback address, loopback address includes uploading Loopback address after front loopback address and upload, if having received file, file is stored in upload service end, and to client It is sent completely response message, wherein, loopback address is to carry in the request header field of the request message that client sends, or returns Adjust address to be to obtain from application service end, mode can be uploaded by simplified-file, strengthen disposal ability before and after uploading, and apply clothes Business end need not be bought and safeguard storage device.
It should be understood that disclosed system in several embodiments provided herein, client, service end and Method, can realize by another way.For example, apparatus embodiments described above are only schematically, for example, institute State the division of unit, only a kind of division of logic function, actual can have other dividing mode when realizing, for example multiple lists Unit or assembly can in conjunction with or be desirably integrated into another system, or some features can be ignored, or does not execute.It is another, Shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, device or unit INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
In addition, in the equipment and system in each embodiment of the present invention, each functional unit can be integrated in a process In unit or the independent physics of unit includes it is also possible to two or more units are integrated in a unit. And above-mentioned each unit both can be to be realized in the form of hardware, it would however also be possible to employ the form that hardware adds SFU software functional unit is real Existing.
The all or part of step realizing said method embodiment can be completed by the related hardware of programmed instruction, front The program stated can be stored in a computer read/write memory medium, and upon execution, it is real that execution includes said method to this program The step applying example;And aforesaid storage medium includes: u disk, portable hard drive, read-only storage (read only memory, referred to as Rom), random access memory (random access memory, abbreviation ram), magnetic disc or CD etc. are various can store The medium of program code.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by described scope of the claims.

Claims (22)

1. a kind of file uploading method is it is characterised in that include:
Receive the request message that client sends, described request message includes asking header field, described request header field includes readjustment ground Location, described loopback address includes uploading loopback address after front loopback address and upload;
Judge whether to meet the condition of acceptance of file according to the request header field in described request message;
If meeting the condition of acceptance of described file, obtaining loopback address before described upload from described request header field, and calling Before described upload, loopback address sends the first notification message to application service end, and described first notification message includes described file First fileinfo;
Send to described client and upload response message, described upload response message includes described request header field, in order to described Client continues to upload described file;
Receive and store described client and upload, according to described, the described file that response message sends, then from described request header field Middle obtain described upload after loopback address, and call described upload after loopback address to described application service end send second notice Message, described second notification message includes the second fileinfo of described file.
2. method according to claim 1 is it is characterised in that methods described also includes:
After having received described file, it is sent completely response message to described client.
3. a kind of file uploading method is it is characterised in that include:
Receive the request message that client sends, described request message includes asking header field, described request header field also includes applying Mark, described application identities are used to identify application service end, and receive the registration message that described application service end sends, institute State registration message and include loopback address, described loopback address includes uploading loopback address after front loopback address and upload, will be described Loopback address is saved in database;
Judge whether to meet the condition of acceptance of file according to the request header field in described request message;
If meeting the condition of acceptance of described file, obtain loopback address before upload from database according to described application identities, And loopback address sends the first notification message to described application service end before calling described upload, described first notification message includes First fileinfo of described file;
Send to described client and upload response message, described upload response message includes described request header field, in order to described Client continues to upload described file;
Receive and store described client and upload, according to described, the described file that response message sends, then according to described application mark Know from described database obtain upload after loopback address, and call described upload after loopback address send out to described application service end Send second notification message, described second notification message includes the second fileinfo of described file.
4. method according to claim 3 is it is characterised in that methods described also includes:
After having received described file, it is sent completely response message to described client.
5. a kind of file uploading method is it is characterised in that include:
Send registration message to uploading service end, described registration message includes loopback address during files passe, described readjustment ground Location includes uploading loopback address after front loopback address and upload;
After the completion of registration, receive the first notification message that described upload service end sends according to loopback address before described upload, Described first notification message includes the first fileinfo of described file;
When described upload service termination harvests described file, receive described upload service end according to loopback address after described upload The second notification message sending, described second notification message includes the second fileinfo of described file.
6. a kind of file uploading method is it is characterised in that include:
Send request message to uploading service end, described request message includes asking header field, described request header field includes application mark Know, or described request header field includes loopback address and described application identities, described loopback address includes uploading front loopback address With loopback address after upload, before described upload, loopback address is used for making described upload service end receive the file that client sends Forward direction application server end send the first notification message, described first notification message include described file first file letter Breath, after described upload, loopback address is used for making described upload service end send to described application service end after receiving described file Second notification message, described second notification message includes the second fileinfo of described file;
Receive the upload response message that described upload service end sends, described upload response message includes described request header field;
According to described upload response message, the transmitting file on described upload service end.
7. method according to claim 6 is it is characterised in that methods described also includes:
After described upload service end adjusts back success by described loopback address to application service end, receive described upload service What end sent completes response message.
8. a kind of upload service end is it is characterised in that combine cloud storage function, comprising:
Receiving unit, for receiving the request message of client transmission, described request message includes asking header field, described request header Domain includes loopback address, and described loopback address includes uploading loopback address after front loopback address and upload;
Judging unit, for judging whether to meet the condition of acceptance of file according to the request header field in described request message;
Processing unit, if for the condition of acceptance meeting described file, return before obtaining described upload from described request header field Adjust address, and call described upload before loopback address to application service end send the first notification message, described first notification message The first fileinfo including described file;
Send to described client and upload response message, described upload response message includes described request header field, in order to described Client continues to upload described file;
Receive and store described client and upload, according to described, the described file that response message sends, then from described request header field Middle obtain described upload after loopback address, and call described upload after loopback address to described application service end send second notice Message, described second notification message includes the second fileinfo of described file.
9. upload service end according to claim 8 is it is characterised in that also include:
Response unit, for, after having received described file, being sent completely response message to described client.
10. a kind of upload service end is it is characterised in that include:
Receiving unit, for receiving the request message of client transmission, described request message includes asking header field, described request header Domain also includes application identities, and described application identities are used to identify application service end;And first receiving unit, for receiving The registration message that described application service end sends, described registration message includes loopback address, before described loopback address includes uploading Loopback address after loopback address and upload;Memory cell, for being saved in described loopback address in database;
Judging unit, for judging whether to meet the condition of acceptance of file according to the request header field in described request message;
Processing unit, if for the condition of acceptance meeting described file, obtain from database according to described application identities Loopback address before biography, and loopback address sends the first notification message to described application service end before calling described upload, described the One notification message includes the first fileinfo of described file;
Send to described client and upload response message, described upload response message includes described request header field, in order to described Client continues to upload described file;
Receive and store described client and upload, according to described, the described file that response message sends, then according to described application mark Know from described database obtain upload after loopback address, and call described upload after loopback address send out to described application service end Send second notification message, described second notification message includes the second fileinfo of described file.
11. upload service ends according to claim 10 are it is characterised in that also include:
Response unit, for, after having received described file, being sent completely response message to described client.
A kind of 12. application service ends are it is characterised in that include:
Second transmitting element, for uploading service end transmission registration message, described registration message includes returning during files passe Adjust address, described loopback address includes uploading loopback address after front loopback address and upload;
Second receiving unit, sends out according to loopback address before described upload for after the completion of registration, receiving described upload service end The first notification message sending, described first notification message includes the first fileinfo of described file;
When described upload service termination harvests described file, receive described upload service end according to loopback address after described upload The second notification message sending, described second notification message includes the second fileinfo of described file.
A kind of 13. clients, are characterised by, comprising:
3rd transmitting element, for upload service end send request message, described request message include ask header field, described please Ask header field to include application identities, or described request header field includes loopback address and described application identities, described loopback address bag Loopback address after including before upload loopback address and uploading, before described upload, loopback address is used for making described upload service end receive The forward direction application server end of the file that client sends sends the first notification message, and described first notification message includes described literary composition First fileinfo of part, after described upload, loopback address is used for making described upload service end to described after receiving described file Application service end sends second notification message, and described second notification message includes the second fileinfo of described file;
3rd receiving unit, for receiving the upload response message that described upload service end sends, described upload response message bag Include described request header field;
Files passe unit, for according to described upload response message, the transmitting file on described upload service end.
14. clients according to claim 13 are it is characterised in that also include:
After described upload service end adjusts back success by described loopback address to application service end, receive described upload service What end sent completes response message.
A kind of 15. upload service ends are it is characterised in that include:
First receiver, for receiving the request message of client transmission, described request message includes asking header field, described request Header field includes loopback address, and described loopback address includes uploading loopback address after front loopback address and upload;
First processor, for judging whether to meet the condition of acceptance of file according to the request header field in described request message;
Described first processor, if being additionally operable to meet the condition of acceptance of described file, obtains described from described request header field Loopback address before upload, before first transmitter is used for calling described upload, loopback address notifies to disappear to application service end transmission first Breath, described first notification message includes the first fileinfo of described file;
Described first transmitter, is additionally operable to send upload response message to described client, described upload response message includes institute State request header field, continue to upload described file in order to described client;
Described first receiver, for receive described client according to described upload response message send described file, first Memory is additionally operable to store described file, and described first processor is adjusted back after being used for obtaining described upload from described request header field Address, after described first transmitter is used for calling described upload, loopback address notifies to disappear to described application service end transmission second Breath, described second notification message includes the second fileinfo of described file.
16. upload service ends according to claim 15, it is characterised in that described first transmitter, are additionally operable to receiving After complete described file, it is sent completely response message to described client.
A kind of 17. upload service ends are it is characterised in that include:
First receiver, for receiving the request message of client transmission, described request message includes asking header field, described request Header field also includes application identities, and described application identities are used to identify application service end;Described first receiver is additionally operable to connect Receive the registration message that described application service end sends, described registration message includes loopback address, described loopback address includes uploading Loopback address after front loopback address and upload;
First memory is used for described loopback address is saved in database;
First processor, for judging whether to meet the condition of acceptance of file according to the request header field in described request message;
Described first processor, if be additionally operable to meet the condition of acceptance of described file, according to described application identities from database Loopback address before middle acquisition upload, before first transmitter is used for calling described upload, loopback address sends to described application service end First notification message, described first notification message includes the first fileinfo of described file;
Described first transmitter, is additionally operable to send upload response message to described client, described upload response message includes institute State request header field, continue to upload described file in order to described client;
Described first receiver, is additionally operable to receive and store described client according to the described described literary composition uploading response message transmission Part, described first processor is additionally operable to obtain loopback address after upload from described database according to described application identities, described First transmitter be additionally operable to call described after uploading loopback address send second notification message to described application service end, described the Two notice message packages include the second fileinfo of described file.
18. upload service ends according to claim 17 are it is characterised in that also include:
After having received described file, described first transmitter is additionally operable to be sent completely response message to described client.
A kind of 19. application service ends are it is characterised in that include:
Second transmitter, for uploading service end transmission registration message, described registration message includes readjustment during files passe Address, described loopback address includes uploading loopback address after front loopback address and upload;
Second receiver, sends according to loopback address before described upload for after the completion of registration, receiving described upload service end The first notification message, described first notification message includes the first fileinfo of described file;
When described upload service termination harvests described file, receive described upload service end according to loopback address after described upload The second notification message sending, described second notification message includes the second fileinfo of described file.
A kind of 20. clients are it is characterised in that include:
3rd transmitter, for uploading service end transmission request message, described request message includes asking header field, described request Header field includes application identities, or described request header field includes loopback address and described application identities, and described loopback address includes Loopback address and loopback address after uploading before upload, before described upload, loopback address is used for making described upload service end receiving visitor The forward direction application server end of the file that family end sends sends the first notification message, and described first notification message includes described file The first fileinfo, after described upload loopback address be used for making described upload service end after receiving described file to described should Send second notification message with service end, described second notification message includes the second fileinfo of described file;
3rd receiver, for receiving the upload response message that described upload service end sends, described upload response message includes Described request header field;
3rd processor, for according to described upload response message, the transmitting file on described upload service end.
21. clients according to claim 20 are it is characterised in that also include:
After described upload service end adjusts back success by described loopback address to application service end, described 3rd receiver is also Complete response message for receive that described upload service end sends.
A kind of 22. communication systems are it is characterised in that include:
Upload service end as described in claim 15 or 16, or the upload service end as described in claim 17 or 18;Right Require the application service end described in 19;Client described in claim 20 or 21.
CN201380000611.XA 2013-05-08 2013-05-08 File uploading method, client side and server side Active CN103547339B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/075331 WO2014179950A1 (en) 2013-05-08 2013-05-08 File uploading method, client, and server

Publications (2)

Publication Number Publication Date
CN103547339A CN103547339A (en) 2014-01-29
CN103547339B true CN103547339B (en) 2017-01-25

Family

ID=49970070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201380000611.XA Active CN103547339B (en) 2013-05-08 2013-05-08 File uploading method, client side and server side

Country Status (2)

Country Link
CN (1) CN103547339B (en)
WO (1) WO2014179950A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105991751A (en) * 2015-03-06 2016-10-05 天津铂创国茂电子科技发展有限公司 Direct access method through center server based on embed cloud branch server
CN105141696A (en) * 2015-09-17 2015-12-09 成都华为技术有限公司 File uploading method and device
CN107092635B (en) * 2017-02-15 2020-08-04 北京星选科技有限公司 Data query method, device, server, request terminal and system
CN107707616B (en) * 2017-08-21 2019-02-12 贵州白山云科技股份有限公司 A kind of data transmission method and system
CN109450990A (en) * 2018-10-19 2019-03-08 深圳点猫科技有限公司 A kind of cloud storage implementation method and electronic equipment based on educational system
CN110012055A (en) * 2018-12-29 2019-07-12 北京乐我无限科技有限责任公司 File uploading method, apparatus and system
CN109951550A (en) * 2019-03-21 2019-06-28 浪潮软件集团有限公司 A kind of method and system of object storage
CN111083222B (en) * 2019-12-13 2022-11-18 中富通集团股份有限公司 Data uploading method and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196012A (en) * 2010-03-17 2011-09-21 华为技术有限公司 Service opening method, system and service opening server
CN102546836A (en) * 2012-03-09 2012-07-04 腾讯科技(深圳)有限公司 Method, terminal, server and system for uploading files
CN102833337A (en) * 2012-08-30 2012-12-19 北京星网锐捷网络技术有限公司 FTP (File Transfer Protocol) file uploading, downloading method and device
CN103002029A (en) * 2012-11-26 2013-03-27 北京百度网讯科技有限公司 Management method, system and client for uploaded files

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023881B (en) * 2012-11-26 2016-05-25 北京奇虎科技有限公司 Information Security determination methods and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196012A (en) * 2010-03-17 2011-09-21 华为技术有限公司 Service opening method, system and service opening server
CN102546836A (en) * 2012-03-09 2012-07-04 腾讯科技(深圳)有限公司 Method, terminal, server and system for uploading files
CN102833337A (en) * 2012-08-30 2012-12-19 北京星网锐捷网络技术有限公司 FTP (File Transfer Protocol) file uploading, downloading method and device
CN103002029A (en) * 2012-11-26 2013-03-27 北京百度网讯科技有限公司 Management method, system and client for uploaded files

Also Published As

Publication number Publication date
CN103547339A (en) 2014-01-29
WO2014179950A1 (en) 2014-11-13

Similar Documents

Publication Publication Date Title
CN103547339B (en) File uploading method, client side and server side
CN103731451B (en) A kind of method and system that file uploads
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN102904959B (en) Network accelerating method and gateway
EP2429225A1 (en) Method for provisioning parameters of terminal, system thereof, and terminal management device
CN102821057A (en) File sending method, device and system
CN108200165A (en) Ask Transmission system, method, apparatus and storage medium
CN104580376B (en) The methods, devices and systems connected between terminal are established in a local network
CN103124275A (en) Method and device of obtaining files
JP2013504806A (en) Method, apparatus and system for file transfer based on file directory
US20180176157A1 (en) Conveying instant messages via http
CN107181804A (en) The method for down loading and device of resource
CN103368897B (en) The method of delivery applications program, Apparatus and system
CN106789878B (en) A kind of file towards large traffic environment also original system and method
CN109089299A (en) It is a kind of to allow facility registration to cloud with network method based on SmartConfig mode
CN107113281A (en) Content shared method, terminal, server and system
CN106302605A (en) Real-time messages repeater system based on OpenFire server and implementation method
JP5570463B2 (en) Wireless relay device, virtual machine creation server, wireless relay method, and virtual machine creation method
CN105847286B (en) The acquisition methods and device of multimedia file
CN104243522B (en) Method and wideband network gateway for HTTP network
CN106209666A (en) A kind of link multiplexing method based on load equalizer and system
CN101808080A (en) Data transmitting method and associated device
CN101662740A (en) Transmission method of multimedia message accessory at network side and equipment thereof
CN105450894A (en) Method for transmitting picture from handset to television in cross-network manner
KR20080039081A (en) Contents back-up method for mobile communication terminal, mobile communication terminal and contents back-up server for the same

Legal Events

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