CN110493350A - File uploading method and device, electronic equipment and computer-readable medium - Google Patents

File uploading method and device, electronic equipment and computer-readable medium Download PDF

Info

Publication number
CN110493350A
CN110493350A CN201910794984.8A CN201910794984A CN110493350A CN 110493350 A CN110493350 A CN 110493350A CN 201910794984 A CN201910794984 A CN 201910794984A CN 110493350 A CN110493350 A CN 110493350A
Authority
CN
China
Prior art keywords
file
request
client
server
storage system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910794984.8A
Other languages
Chinese (zh)
Inventor
孙益星
王泰
高家尧
吴永强
张亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910794984.8A priority Critical patent/CN110493350A/en
Publication of CN110493350A publication Critical patent/CN110493350A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This disclosure relates to field of cloud calculation.Embodiment of the disclosure discloses file uploading method and device, electronic equipment and computer-readable medium.This document method for uploading includes: the file upload request in response to receiving client, sends resource address acquisition request to index server;The file that request uploads is written to the interim storage system of nearly client, and sends upload request to the storage server of distal end;In response to determining that file is successfully written interim storage system, feedback information is sent to client, feedback information includes the resource address that file uploads successful notification message and obtains from index server, wherein resource address is indexed to interim storage system.This method reduces waiting time when transmitting file in client.

Description

File uploading method and device, electronic equipment and computer-readable medium
Technical field
Embodiment of the disclosure is related to field of computer technology, and in particular to data transfer of computer technical field, especially It is related to file uploading method and device, electronic equipment and computer-readable medium.
Background technique
In Internet application, it is a kind of common business scenario that file, which uploads,.In client in server-side transmitting file In scene, the file that user uploads needs to be stored in storage server, and the network connection quality of client and server determines The speed and success rate uploaded.
In current file uploading file, client and server directly or indirectly (such as passing through proxy server) connect After connecing, file is uploaded to server.However, since farther out, file uploads speed to physical distance between client and server Degree is subject to certain restrictions.Client needs to wait long period of time, and server returns to visitor after the message successfully uploaded Family end just can be confirmed that file uploads successfully.
Summary of the invention
Embodiment of the disclosure proposes file uploading method and device, electronic equipment and computer-readable medium.
In a first aspect, embodiment of the disclosure provides a kind of file uploading method, comprising: in response to receiving client File upload request, to index server send resource address acquisition request;Nearly client is written in the file that request is uploaded Interim storage system, and to the storage server of distal end send upload request;It is temporarily deposited in response to determining that file is successfully written Storage system sends feedback information to client, and feedback information includes that file uploads successful notification message and from index server The resource address of acquisition, wherein resource address is indexed to interim storage system.
In some embodiments, the above method further include: be successfully written distal end in response to the file for determining that request uploads Storage server sends address update message to index server, and address update message indicates that index server uploads request The resource address of file be indexed to the storage server of distal end.
In some embodiments, the above method further include: be successfully written distal end in response to the file for determining that request uploads Storage server deletes the file that the request stored in interim storage system uploads.
In some embodiments, the above method further include: the file acquisition in response to receiving client user's sending is asked It asks, file is read based on the file address that index server is indexed to.
In some embodiments, above-mentioned that file that request uploads is written into the interim storage system of nearly client, and to remote The storage server at end sends upload request, comprising: asks the file upload that the file write-in that request uploads receives client The proxy server asked corresponding interim storage system and receive client file upload request proxy server The corresponding interim storage system of at least one neighbor proxies server;And above-mentioned be successfully written in response to determining file is temporarily deposited Storage system sends feedback information to client, comprising: the file upload for receiving client is successfully written in response to determining file The corresponding interim storage system of the proxy server of request and receive client file upload request proxy server The corresponding interim storage system of at least one neighbor proxies server, to client send feedback information.
Second aspect, embodiment of the disclosure provide a kind of file upload device, comprising: transmission unit is configured as In response to receiving the file upload request of client, resource address acquisition request is sent to index server;Writing unit, quilt It is configured to that the interim storage system of nearly client is written the file that request uploads into, and sends and upload to the storage server of distal end Request;Feedback unit is configured to respond to determine that file is successfully written interim storage system, sends feedback letter to client Breath, feedback information include the resource address that file uploads successful notification message and obtains from index server, wherein resource Location is indexed to interim storage system.
In some embodiments, above-mentioned apparatus further include: updating unit is configured to respond to determine the text that request uploads Part is successfully written the storage server of distal end, sends address update message, address update message instruction index to index server The resource address for the file that request uploads is indexed to the storage server of distal end by server.
In some embodiments, above-mentioned apparatus further include: delete unit, be configured to respond to determine the text that request uploads Part is successfully written the storage server of distal end, deletes the file that the request stored in interim storage system uploads.
In some embodiments, above-mentioned apparatus further include: reading unit is configured to respond to receive client user The file acquisition of sending is requested, and reads file based on the file address that index server is indexed to.
In some embodiments, above-mentioned writing unit is configured to: the file write-in that request uploads is received The corresponding interim storage system of the proxy server of the file upload request of client and the file for receiving client upload The corresponding interim storage system of at least one neighbor proxies server of the proxy server of request;And above-mentioned feedback unit into One step is configured as: the proxy server for being successfully written the file upload request for receiving client in response to determining file is corresponding Interim storage system and receive client file upload request proxy server at least one neighbor proxies clothes The corresponding interim storage system of business device sends feedback information to client.
The third aspect, embodiment of the disclosure provide a kind of electronic equipment, comprising: one or more processors;Storage Device, for storing one or more programs, when one or more programs are executed by one or more processors so that one or Multiple processors realize the file uploading method provided such as first aspect.
Fourth aspect, embodiment of the disclosure provide a kind of computer-readable medium, are stored thereon with computer program, Wherein, the file uploading method that first aspect provides is realized when program is executed by processor.
File uploading method and device, the electronic equipment and computer-readable medium of above-described embodiment of the disclosure, pass through In response to receiving the file upload request of client, resource address acquisition request is sent to index server, request is uploaded File the interim storage system of nearly client is written, and upload request is sent to the storage server of distal end, in response to determination File is successfully written interim storage system, sends feedback information to client, feedback information includes that file uploads successfully notice Message and the resource address obtained from index server, wherein resource address is indexed to interim storage system, realizes at edge Interim storage system be successfully written after file and to return to the message being successfully written to client, when reducing transmitting file in client Waiting time, and do not need to dispose a plurality of network communication circuit, cost is relatively low.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that embodiment of the disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the file uploading method of the disclosure;
Fig. 3 is the flow chart according to another embodiment of the file uploading method of the disclosure;
Fig. 4 is the data interaction schematic diagram in one embodiment of the file uploading method of the disclosure;
Fig. 5 is the structural schematic diagram that the file of the disclosure uploads one embodiment of device;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present disclosure.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the exemplary system architecture that device can be uploaded using the file uploading method or file of the disclosure 100。
As shown in Figure 1, system architecture 100 may include 101,102 and CDN of client (Content Delivery Network, content distributing network) 103.Wherein, content distributing network CDN 103 includes CDN proxy server 1031, index clothes Business device 1032 and storage server 1033.Client 101,102 can be carried out by network and content distributing network CDN 103 Interaction, to send or receive data.In content distributing network CDN 103, CDN proxy server 1031 and index server 1032 and storage server 1033 pass through network be connected with each other.
Client 101,102 can be mounted on the terminal devices such as computer, mobile phone and be used to access content distribution The client of network C DN 103.Client 101,102 specifically can be implemented as browser or dedicated client.User can be with Data transfer request, and reception content distribution network CDN are initiated to content distributing network CDN 103 by client 101,102 103 message returned.
CDN proxy server 1031 in content distributing network CDN 103 can be requested with the user of direct reception client end, Made by DNS (Domain Name System, domain name system) parsing remote in client user accesses content distributing network CDN Journey server.CDN proxy server 1031 can be the server for being deployed in edge, closer with the geographical location of client.CDN Proxy server 1031 can have storage system, in the application scenarios of the disclosure, the storage system of CDN proxy server 1031 System is used as the interim storage system of interim storage file.
Index server 1032 is the mapping relations for being responsible for saving resource address and IP in content distributing network CDN 103, With by the resource impact in content distributing network CDN 103 to corresponding storage address.
Storage server 1033 is to provide the server of resource storage service.CDN proxy server 1031 can be to storage Server 1033 issues resource access request, to obtain the resource data in storage server 1033, CDN proxy server 1031 The resource that can be will acquire is issued to client 101,102.Index server 1032 is with can saving the IP of storage server Location, to be indexed to the resource address of file accordingly when client 101,102 uploads data to content distributing network CDN 103 Storage server 1033.
It should be noted that above content distribution network CDN 103 would generally dispose CDN in multiple and different geographical locations Proxy server 1031, and can have multiple index servers 1032 and multiple storages clothes in content distributing network CDN 103 Business device 1033.
Above-mentioned CDN proxy server 1031, index server 1031, storage server 1033 can be hardware, can also be with It is software.When CDN proxy server 1031, index server 1031, storage server 1033 are hardware, may be implemented into more The distributed server cluster of a server composition, also may be implemented into individual server.When CDN proxy server 1031, rope Draw server 1031, when storage server 1033 is software, multiple softwares or software module may be implemented into (such as providing The multiple softwares or software module of Distributed Services), single software or software module also may be implemented into.Specific limit is not done herein It is fixed.
File uploading method provided by embodiment of the disclosure can be executed by CDN proxy server 1031, correspondingly, File uploads device and can be set in CDN proxy server 1031.
It should be understood that client, content distributing network, CDN proxy server in Fig. 1, index server, storage service The number of device is only schematical.According to needs are realized, any number of client, content distributing network, CDN can have Proxy server, index server, storage server.
With continued reference to Fig. 2, it illustrates the processes 200 according to one embodiment of the file uploading method of the disclosure.It should File uploading method, comprising the following steps:
Step 201, in response to receiving the file upload request of client, resource address is sent to index server and is obtained Request.
In the present embodiment, executing subject (such as CDN proxy server shown in FIG. 1 or the CDN of file uploading method Fringe node) it can detecte the file upload request issued with the presence or absence of client.Herein, file upload request may include Request upload file or request upload file local path, can also include issue request client mark or The user identifier of the user of file upload request is issued using client.Wherein, file can be various formats to be stored File, such as text file, digital audio/video file, image file, etc..
In practice, the cloud storage service or file distribution service that CDN can be provided a user.For example, resource website Content publisher storage server, Zhi Houke can be uploaded to by the content that CDN to be issued it in the form of a file It is issued with realizing to obtain at content subscriber end by the terminal of the content and the person that is transmitted to content subscription that read storage server The content of person's publication.At this moment, content publisher can access CDN by the network address of access CDN in client, and in client Fill in or select the path that is locally stored for the file to be uploaded, upload request of then presenting a paper in end.Client obtains content hair The file upload request that cloth person submits, and it is forwarded to the executing subject of above-mentioned file uploading method.
After receiving the file upload request of client, it can request to be file to be uploaded point to index server With resource address.Wherein, the resource allocation address that index server is used for as the upload in CDN, and configuration resource address Access path.Index server is that the resource address for the file distribution that request uploads can be directed toward index server, is then indexed The resource address can be indexed to phase according to the mapping relations of the IP address of the resource address and storage system of preservation by server The storage system answered.
Step 202, file that request uploads is written into the interim storage system of nearly client, and to the storage service of distal end Device sends upload request.
In the present embodiment, above-mentioned executing subject can be determined according to the IP address for the client for issuing file upload request Then the interim storage system being closer in CDN with client is searched, as nearly client in the geographical location of client Interim storage system, alternatively, network communication matter of the distance in a certain range and with client for client can be searched Measure preferable interim storage system, the interim storage system as nearly client.Optionally, the interim storage system of nearly client It can be nearest apart from client interim storage system on geographical location, be also possible at a distance from client in certain model Enclose the interior and interim storage system best with the network communication quality of client.
Above-mentioned interim storage system, which can be, temporarily provides the file system of file storage service, such as can be edge The storage system of node or proxy server.The interim storage system can be implemented as fringe node or agency service in practice The memory of device, or with fringe node or the storage server of proxy server wired connection, etc..
The file that above-mentioned executing subject can be uploaded by client acquisition request.In the interim storage for finding nearly client After system, the interim storage system of the nearly client can be written in the file that request uploads by above-mentioned executing subject.Due to nearly visitor Interim storage system and the client at family end are closer, so the transmission speed of file is very fast.
Above-mentioned executing subject can also send upload request to the storage server of distal end.The upload request is that request will be literary The request of storage server is written in part, also may include the storage road requested the file uploaded or request the file uploaded Diameter can also include the mark for the client for issuing request or issue the user identifier of the user of request using client.
The storage server of distal end is the server for long-term storage file.The storage server can be in CDN with It is pre-assigned in the corresponding storage server of client or CDN to provide the server of storage service for client user. The storage server can realize content distribution by CDN, by the fringe node of the file distributing of storage to diverse geographic location. The storage server can be set and in the geographical location with client with certain space distance.Herein, the storage of distal end Server and the space length of client are greater than the interim storage system of nearly client and the space length of client.
After the storage server of distal end receives the upload request that above-mentioned executing subject is sent, it can receive and request The file of biography.
Step 203, in response to determining that file is successfully written interim storage system, feedback information is sent to client.
In the present embodiment, above-mentioned executing subject is properly received the file and the interim storage system of completion that client request uploads After the write-in of system, feedback information can be sent to client.Feedback information includes that file uploads successful notification message and from rope Draw the resource address of server acquisition, wherein resource address is indexed to interim storage system.
The interim storage system of above-mentioned nearly client, can be to above-mentioned after completing to request the write-in of file of upload Executing subject, which returns, is written successful notification message.Above-mentioned executing subject is in the notification message for receiving interim storage system return Later, client can be notified to be written successfully.Also, above-mentioned executing subject can will be obtained from index server in request The corresponding resource address of text of biography returns to client, so that client accesses the file uploaded by the resource address.At this moment, The resource address can be indexed to interim storage system by index server.
In some optional implementations of the present embodiment, storage server at the far end is successfully written what request uploaded After file, file can also be returned to above-mentioned executing subject and successful notification message is written.Above-mentioned executing subject can be nearly The file of the storage server return of successful notification message and distal end is written in the file that the interim storage system of client returns Successful notification message is written and is forwarded to index server.Index server can be according to whether receive the storage server of distal end Above-mentioned resource address is indexed to the interim storage system of nearly client or the storage clothes of distal end to determine by the notification message of sending Business device.If index server determines the notification message that the storage server for not receiving distal end issues, resource address is indexed to The interim storage system of nearly client;If index server determines the notification message that the storage server for having been received by distal end issues, Show that file has been successfully uploaded to the storage server of distal end, at this moment resource address can be indexed to the storage service of distal end Device.
The file uploading method of disclosure above-described embodiment, by the file upload request in response to receiving client, Resource address acquisition request is sent to index server, the file that request uploads is written to the interim storage system of nearly client, And upload request is sent to the storage server of distal end, in response to determining that file is successfully written interim storage system, to client Feedback information is sent, feedback information includes the resource address that file uploads successful notification message and obtains from index server, Wherein, resource address is indexed to interim storage system, realizes after the interim storage system of nearly client is successfully written file The message being successfully written is returned to client, reduces waiting time when transmitting file in client, compared to a plurality of net of deployment The method that network communication line selects the route of optimal communication quality to carry out file upload, effectively reduces cost.
With continued reference to Fig. 3, it illustrates the flow charts according to another embodiment of the file uploading method of the disclosure.Such as Shown in Fig. 3, the process 300 of the file uploading method of the present embodiment, comprising the following steps:
Step 301, in response to receiving the file upload request of client, resource address is sent to index server and is obtained Request.
Step 302, file that request uploads is written into the interim storage system of nearly client, and to the storage service of distal end Device sends upload request.
Step 303, in response to determining that file is successfully written interim storage system, feedback information is sent to client.
Herein, feedback information includes the resource that file uploads successful notification message and obtains from index server Location, wherein resource address is indexed to interim storage system.
Above-mentioned steps 301, step 302, step 303 respectively with the step 201, step 202, step 203 of previous embodiment Unanimously, step 301, step 302, the specific implementation of step 303 can respectively with reference to it is aforementioned to step 201, step 202, The description of step 203, details are not described herein again.
Step 304, in response to determining that the file of request upload is successfully written the storage server of distal end, to index server Send address update message.
In the present embodiment, the storage server of distal end is after receiving the upload request that above-mentioned executing subject is sent, It can receive the file that request uploads.Optionally, the storage server of distal end can be uploaded from above-mentioned executing subject read requests File and be written in memory, or optionally, in the case where client is online, the storage server of distal end can be direct The file that request uploads is received from client.
The storage server of distal end is in the file for being successfully written request upload, i.e., in the institute for receiving the file that request uploads After having data, it can be returned to above-mentioned executing subject and upload successful notification message.Above-mentioned executing subject can be according to reception To distal end storage server send the notification message determine request upload file be successfully written into distal end storage clothes Business device.At this moment, above-mentioned executing subject can send address update message to index server.Herein, address update message refers to Show that the resource address for the file that request uploads is indexed to the storage server of distal end by index server.
Before storage server at the far end successfully completes the file of write request upload, index server can be by file Resource address be indexed to the interim storage system of nearly client.The storage service of distal end is successfully written in the file that request uploads After device, the resource address rope of the file of the storage system of distal end can will be successfully written based on the address update message received The storage server of distal end is led to, so that the storage when resource address of the accessible this document of the user of client, from distal end Server returns to file data.
It is successfully written after the file that request uploads in the present embodiment by storage server at the far end, to index service Device sends address update message to indicate index server by the storage server of the allocation index of file to distal end, thus in time Ground by user to the access index of file to storage server, avoid the access excessive to interim storage system from causing temporarily to store The load excessive of system.
In some optional implementations of the present embodiment, above-mentioned executing subject may also respond to determine that request uploads File be successfully written the storage server of distal end, delete the file that the request stored in interim storage system uploads.Specifically, Above-mentioned executing subject is after the storage server for determining distal end has been successfully written the file for requesting to upload, to interim storage System, which is sent, is used to indicate the deletion instruction for deleting the file that above-mentioned request uploads, and interim storage system can be instructed according to deleting Delete corresponding file.Can successfully be uploaded ensuring file in this way, avoid in the case that user quickly can access file it is interim The space of storage system guarantees the content distribution efficiency of CDN by occupancy excessive or too long.
In some optional implementations for the embodiment that above-mentioned combination Fig. 2 and Fig. 3 is described, the above method can also be wrapped Include: the file acquisition in response to receiving client user's sending is requested, and is read based on the file address that index server is indexed to Take file.
In these implementations, file is successfully written after the interim storage system of above-mentioned proximal end, can be to client Return to feedback message.It include the resource address of file in feedback message.Client user is with can issuing the resource of access file Access request can be forwarded to index server by the request of location, at this moment, above-mentioned executing subject, and index server is according to file Resource address is indexed to the interim storage system of the accessed file of storage or the storage server of distal end.
Specifically, it if accessed file is successfully written into the interim storage system of nearly client, but is not yet successfully written The resource address of file can be indexed to the interim storage system of nearly client by the storage server of distal end, index server. If accessed file is successfully written into the storage server of distal end, the resource address of file is indexed to far by index server The storage server at end.Since storage server at the far end is successfully written after file and has provided file index server The state of source address is changed to the state of access remote storage server by the state for accessing the interim storage system of nearly client, When above-mentioned executing subject sends access request to index server, index server can according to the state of file resource address from Dynamic search leads to the storage server of distal end.
In above-mentioned implementation, after file is written in interim storage system, that is, file reading service can provide.It completes Before transmitting file to the storage server of distal end, the file that user reads can be obtained from the interim storage system of nearly client It takes, to reduce period of reservation of number, can efficiently provide download service.
In some optional implementations for the embodiment that above-mentioned combination Fig. 2 and Fig. 3 is described, request is uploaded above-mentioned File the interim storage system of nearly client is written, can and in the step of sending upload request to the storage server of distal end With the corresponding interim storage system of proxy server for the file upload request that the file write-in for uploading request receives client At least one the neighbor proxies server for uniting and receiving the proxy server of the file upload request of client is corresponding interim Storage system.
The file upload request of client can be obtained by the proxy server of nearly client, and by the agency of nearly client Corresponding interim storage system is written in server.It, can be with that is, when above-mentioned executing subject is the proxy server of nearly client In the file upload request for receiving client, it is using the storage system of executing subject as the interim storage of nearly client System.It can also be issued at least one neighbor proxies server of the proxy server for the file upload request for receiving client The interim write request of file, the geographical location between proxy server and neighbor proxies server is closer, can by with it is current Geographical location distance between proxy server is no more than other a certain range of proxy servers as current agency service The neighbor proxies server of device.Neighbor proxies server file can temporarily be written after receiving the interim write request of file In storage system.
Further, above-mentioned in response to determining that file is successfully written interim storage system, feedback information is sent to client The step of may include: to receive the proxy server pair of the file upload request of client in response to determining that file is successfully written At least one neighbor proxies of the proxy server of the interim storage system answered and the file upload request for receiving client The corresponding interim storage system of server sends feedback information to client.Namely it is asked in the file upload for receiving client The neighboring server device of the proxy server asked and the proxy server for the file upload request for receiving client is successfully written After file, above-mentioned executing subject reinforms client file and is successfully written into.In this manner it is achieved that more copies of file are interim Storage guarantees the success rate that file uploads, guarantees the reliability of data.
Further, it in above-mentioned implementation, after file is successfully written the storage server of distal end, can delete Duplicate of the document in the interim storage system of each write-in this document.
Referring to FIG. 4, it illustrates the data interaction schematic diagrames in one embodiment of the file uploading method of the disclosure.
As shown in figure 4, client is then operating CDN in 2 to CDN proxy server initiation upload request in operation 1 For proxy server to one resource address of index server application, which is the resource address of uploaded file, is referred to To index server.Then, operation 3.1 and operation 3.2, the CDN proxy server storage to distal end respectively be may be performed simultaneously The interim storage system of server and proximal end transmits file.Interim storage system has received the file data of upload, executes operation 4, notification message is returned to CDN proxy server.At this moment, CDN proxy server can execute operation 5, return to client Successful notification message is passed, while returning to the resource address of file.Later, storage server complete file data write-in it Afterwards, operation 6 can be executed, returns to notification message to CDN proxy server, CDN proxy server can execute operation 7 later, Address update message is sent to index server, to indicate that the resource address of file is indexed to storage service by index server Device.
It uploads and fills present disclose provides a kind of file as the realization to above-mentioned file uploading method with further reference to Fig. 5 The one embodiment set, the Installation practice is corresponding with Fig. 2 and embodiment of the method shown in Fig. 3, which can specifically answer For in various electronic equipments.
As shown in figure 5, it includes: transmission unit 501, writing unit 502 and anti-that the file of the present embodiment, which uploads device 500, Present unit 503.Wherein, transmission unit 501 is configured to respond to receive the file upload request of client, to index service Device sends resource address acquisition request;Writing unit 502 is configured as the file that request uploads the interim of nearly client is written Storage system, and upload request is sent to the storage server of distal end;Feedback unit 503 be configured to respond to determine file at Interim storage system is written in function, sends feedback information to client, feedback information include file upload successful notification message and The resource address obtained from index server, wherein resource address is indexed to interim storage system.
In some embodiments, above-mentioned apparatus further include: updating unit is configured to respond to determine the text that request uploads Part is successfully written the storage server of distal end, sends address update message, address update message instruction index to index server The resource address for the file that request uploads is indexed to the storage server of distal end by server.
In some embodiments, above-mentioned apparatus further include: delete unit, be configured to respond to determine the text that request uploads Part is successfully written the storage server of distal end, deletes the file that the request stored in interim storage system uploads.
In some embodiments, above-mentioned apparatus further include: reading unit is configured to respond to receive client user The file acquisition of sending is requested, and reads file based on the file address that index server is indexed to.
In some embodiments, above-mentioned writing unit 502 is configured to: the file that request is uploaded, which is written, to be received To the file upload request of client the corresponding interim storage system of proxy server and receive on the file of client Pass the corresponding interim storage system of at least one neighbor proxies server of the proxy server of request;And above-mentioned feedback unit 503 are configured to: the agency service for receiving the file upload request of client is successfully written in response to determining file The corresponding interim storage system of device and receive client file upload request proxy server at least one neighbour The corresponding interim storage system of proxy server sends feedback information to client.
It should be appreciated that all units recorded in device 500 and each step phase in the method described referring to figs. 2 and 3 It is corresponding.Device 500 and list wherein included are equally applicable to above with respect to the operation and feature of file uploading method description as a result, Member, details are not described herein.
The file of above-described embodiment of the disclosure uploads device 500, by transmission unit in response to receiving client File upload request sends resource address acquisition request to index server, and the file that writing unit uploads request is written close The interim storage system of client, and upload request is sent to the storage server of distal end, feedback unit is in response to determining file It is successfully written interim storage system, sends feedback information to client, feedback information includes that file uploads successful notification message With the resource address obtained from index server, wherein resource address is indexed to interim storage system, realizes facing at edge When storage system be successfully written after file and to return to the message being successfully written to client, when reducing transmitting file in client etc. It to the time, and does not need to dispose a plurality of network communication circuit, cost is relatively low.
Below with reference to Fig. 6, it illustrates the electronic equipments for being suitable for being used to realize embodiment of the disclosure (such as shown in Fig. 1 CDN proxy server) 600 structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, should not be to the disclosure Embodiment function and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.) 601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608 Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM603 are connected with each other by bus 604. Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 607 of dynamic device etc.;Storage device 608 including such as hard disk etc.;And communication device 609.Communication device 609 can To allow electronic equipment 600 wirelessly or non-wirelessly to be communicated with other equipment to exchange data.Although Fig. 6 is shown with various The electronic equipment 600 of device, it should be understood that being not required for implementing or having all devices shown.It can be alternatively Implement or have more or fewer devices.Each box shown in Fig. 6 can represent a device, also can according to need Represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608 It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.It should be noted that computer-readable medium described in embodiment of the disclosure can To be computer-readable signal media or computer readable storage medium either the two any combination.Computer can Reading storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device Or device, or any above combination.The more specific example of computer readable storage medium can include but is not limited to: tool There are electrical connection, the portable computer diskette, hard disk, random access storage device (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer Readable storage medium storing program for executing can be any tangible medium for including or store program, which can be commanded execution system, device Either device use or in connection.And in embodiment of the disclosure, computer-readable signal media may include In a base band or as the data-signal that carrier wave a part is propagated, wherein carrying computer-readable program code.It is this The data-signal of propagation can take various forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate Combination.Computer-readable signal media can also be any computer-readable medium other than computer readable storage medium, should Computer-readable signal media can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on computer-readable medium can transmit with any suitable medium, Including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: the file upload request in response to receiving client, to rope Draw server and sends resource address acquisition request;The interim storage system that will request the file uploaded that nearly client is written, and to The storage server of distal end sends upload request;In response to determining that file is successfully written interim storage system, sent to client Feedback information, feedback information include the resource address that file uploads successful notification message and obtains from index server, wherein Resource address is indexed to interim storage system.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, programming language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet Include local area network (LAN) or wide area network (WAN) --- it is connected to subscriber computer, or, it may be connected to outer computer (such as It is connected using ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including transmission unit, writing unit and feedback unit.Wherein, the title of these units is not constituted under certain conditions to the list Restriction of member itself, for example, transmission unit be also described as " in response to receiving the file upload request of client, to The unit of index server transmission resource address acquisition request ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of file uploading method, comprising:
In response to receiving the file upload request of client, resource address acquisition request is sent to index server;
The file that request uploads is written to the interim storage system of nearly client, and sends to upload to the storage server of distal end and ask It asks;
In response to determining that file is successfully written the interim storage system, feedback information, the feedback information are sent to client The resource address for uploading successful notification message including file and being obtained from the index server, wherein the resource address It is indexed to the interim storage system.
2. according to the method described in claim 1, wherein, the method also includes:
In response to determining that the file of request upload is successfully written the storage server of the distal end, Xiang Suoshu index server is sent Address update message, the address update message indicate the resource address for the file that the index server uploads the request It is indexed to the storage server of the distal end.
3. according to the method described in claim 2, wherein, the method also includes:
In response to determining that the file of request upload is successfully written the storage server of the distal end, the interim storage system is deleted The file that the request of middle storage uploads.
4. according to the method described in claim 1, wherein, the method also includes:
File acquisition in response to receiving client user's sending is requested, the file being indexed to based on the index server Read file in location.
5. method according to claim 1-4, wherein nearly client is written in the file for uploading request Interim storage system, and upload request is sent to the storage server of distal end, comprising:
The proxy server for the file upload request that the file write-in that the request uploads is received client is corresponding interim At least one neighbor proxies service of the proxy server of storage system and the file upload request for receiving client The corresponding interim storage system of device;And
It is described to be successfully written the interim storage system in response to determining file, feedback information is sent to client, comprising:
Corresponding face in response to determining that file is successfully written the proxy server of the file upload request for receiving client When storage system and the file upload request for receiving client proxy server at least one neighbor proxies clothes The corresponding interim storage system of business device sends feedback information to client.
6. a kind of file uploads device, comprising:
Transmission unit is configured to respond to receive the file upload request of client, with sending resource to index server Location acquisition request;
Writing unit is configured as that the interim storage system of nearly client, and depositing to distal end is written the file that request uploads into It stores up server and sends upload request;
Feedback unit is configured to respond to determine that file is successfully written the interim storage system, sends and feed back to client Information, the feedback information include the resource address that file uploads successful notification message and obtains from the index server, Wherein, the resource address is indexed to the interim storage system.
7. device according to claim 6, wherein described device further include:
Updating unit is configured to respond to determine the storage server that the file of request upload is successfully written the distal end, to The index server sends address update message, and the address update message indicates that the index server will be in the request The resource address of the file of biography is indexed to the storage server of the distal end.
8. device according to claim 7, wherein described device further include:
Unit is deleted, is configured to respond to determine the storage server that the file of request upload is successfully written the distal end, delete The file uploaded except the request stored in the interim storage system.
9. device according to claim 6, wherein described device further include:
Reading unit is configured to respond to receive the file acquisition request of client user's sending, be taken based on the index Read file in the file address that business device is indexed to.
10. according to the described in any item devices of claim 6-9, wherein said write unit is configured to:
The proxy server for the file upload request that the file write-in that the request uploads is received client is corresponding interim At least one neighbor proxies service of the proxy server of storage system and the file upload request for receiving client The corresponding interim storage system of device;And
The feedback unit is configured to:
Corresponding face in response to determining that file is successfully written the proxy server of the file upload request for receiving client When storage system and the file upload request for receiving client proxy server at least one neighbor proxies clothes The corresponding interim storage system of business device sends feedback information to client.
11. a kind of electronic equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein real when described program is executed by processor Now such as method as claimed in any one of claims 1 to 5.
CN201910794984.8A 2019-08-27 2019-08-27 File uploading method and device, electronic equipment and computer-readable medium Pending CN110493350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910794984.8A CN110493350A (en) 2019-08-27 2019-08-27 File uploading method and device, electronic equipment and computer-readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910794984.8A CN110493350A (en) 2019-08-27 2019-08-27 File uploading method and device, electronic equipment and computer-readable medium

Publications (1)

Publication Number Publication Date
CN110493350A true CN110493350A (en) 2019-11-22

Family

ID=68554400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910794984.8A Pending CN110493350A (en) 2019-08-27 2019-08-27 File uploading method and device, electronic equipment and computer-readable medium

Country Status (1)

Country Link
CN (1) CN110493350A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933184A (en) * 2019-12-17 2020-03-27 广州市百果园信息技术有限公司 Resource publishing platform and resource publishing method
CN111444457A (en) * 2020-03-30 2020-07-24 北京字节跳动网络技术有限公司 Data distribution method and device, storage medium and electronic equipment
CN112866409A (en) * 2021-02-08 2021-05-28 深圳市杉岩数据技术有限公司 Object transmission and collection method based on object storage fragment uploading and terminal equipment
CN113076125A (en) * 2021-04-25 2021-07-06 北京金山云网络技术有限公司 Live broadcast service upgrade processing method, device, medium and server
CN113448919A (en) * 2020-03-25 2021-09-28 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for creating and verifying index files
CN113852665A (en) * 2021-08-23 2021-12-28 青岛海尔科技有限公司 File uploading method and device, electronic equipment, storage medium and program product
CN113901356A (en) * 2021-09-28 2022-01-07 北京五八信息技术有限公司 Information processing method and device
CN114390044A (en) * 2021-12-29 2022-04-22 杭州华橙软件技术有限公司 File uploading method, system, device and storage medium
CN115348258A (en) * 2022-08-17 2022-11-15 中国建设银行股份有限公司贵州省分行 File transmission method, device and system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1956448A (en) * 2005-10-28 2007-05-02 中兴通讯股份有限公司 Contents distributing method based on outer condition trigger node action
CN103338272A (en) * 2013-07-23 2013-10-02 星云融创(北京)信息技术有限公司 Content distribution network and cache implementation method thereof
CN105897456A (en) * 2015-12-07 2016-08-24 乐视云计算有限公司 Content distributing method and system
CN107580021A (en) * 2017-08-01 2018-01-12 北京奇艺世纪科技有限公司 A kind of method and apparatus of file transmission
CN108574685A (en) * 2017-03-14 2018-09-25 华为技术有限公司 A kind of Streaming Media method for pushing, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1956448A (en) * 2005-10-28 2007-05-02 中兴通讯股份有限公司 Contents distributing method based on outer condition trigger node action
CN103338272A (en) * 2013-07-23 2013-10-02 星云融创(北京)信息技术有限公司 Content distribution network and cache implementation method thereof
CN105897456A (en) * 2015-12-07 2016-08-24 乐视云计算有限公司 Content distributing method and system
CN108574685A (en) * 2017-03-14 2018-09-25 华为技术有限公司 A kind of Streaming Media method for pushing, apparatus and system
CN107580021A (en) * 2017-08-01 2018-01-12 北京奇艺世纪科技有限公司 A kind of method and apparatus of file transmission

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933184B (en) * 2019-12-17 2022-08-23 广州市百果园信息技术有限公司 Resource publishing platform and resource publishing method
CN110933184A (en) * 2019-12-17 2020-03-27 广州市百果园信息技术有限公司 Resource publishing platform and resource publishing method
CN113448919A (en) * 2020-03-25 2021-09-28 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for creating and verifying index files
CN113448919B (en) * 2020-03-25 2024-04-12 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for creating and validating index files
CN111444457A (en) * 2020-03-30 2020-07-24 北京字节跳动网络技术有限公司 Data distribution method and device, storage medium and electronic equipment
CN112866409A (en) * 2021-02-08 2021-05-28 深圳市杉岩数据技术有限公司 Object transmission and collection method based on object storage fragment uploading and terminal equipment
CN112866409B (en) * 2021-02-08 2022-10-11 深圳市杉岩数据技术有限公司 Object transmission and collection method based on object storage fragment uploading and terminal equipment
CN113076125A (en) * 2021-04-25 2021-07-06 北京金山云网络技术有限公司 Live broadcast service upgrade processing method, device, medium and server
CN113076125B (en) * 2021-04-25 2024-04-12 北京金山云网络技术有限公司 Live broadcast service upgrading processing method, device, medium and server
CN113852665A (en) * 2021-08-23 2021-12-28 青岛海尔科技有限公司 File uploading method and device, electronic equipment, storage medium and program product
CN113901356B (en) * 2021-09-28 2022-08-09 北京五八信息技术有限公司 Information processing method and device
CN113901356A (en) * 2021-09-28 2022-01-07 北京五八信息技术有限公司 Information processing method and device
CN114390044A (en) * 2021-12-29 2022-04-22 杭州华橙软件技术有限公司 File uploading method, system, device and storage medium
CN114390044B (en) * 2021-12-29 2024-05-14 杭州华橙软件技术有限公司 File uploading method, system, equipment and storage medium
CN115348258A (en) * 2022-08-17 2022-11-15 中国建设银行股份有限公司贵州省分行 File transmission method, device and system and electronic equipment

Similar Documents

Publication Publication Date Title
CN110493350A (en) File uploading method and device, electronic equipment and computer-readable medium
US10515058B2 (en) Unified file and object data storage
US10242100B2 (en) Managing cached data in a network environment
CN108282529B (en) System, method and device for publishing and subscribing data
JP6186015B2 (en) Share content items
CN110096660B (en) Method and device for loading page pictures and electronic equipment
CN110417842A (en) Fault handling method and device for gateway server
CN109521956B (en) Cloud storage method, device, equipment and storage medium based on block chain
CN109992406B (en) Picture request method, picture request response method and client
CN105472045A (en) Database migration method and database migration device
CN105897850A (en) Response processing method and system and scheduling proxy server for CDN platform
CN109005232A (en) Method for down loading, providing method and the equipment of container image file
CN107105336A (en) Data processing method and data processing equipment
CN109873855A (en) A kind of resource acquiring method and system based on block chain network
CN110134805A (en) Network storage method, device, electronic equipment and the medium of picture category comment data
CN109918146A (en) Page generation method and device
CN114466018A (en) Scheduling method and device for content distribution network, storage medium and electronic equipment
CN107003981A (en) It is synchronous with the equipment locally matched to obtain data from remote server using point to point link
CN110401731B (en) Method and apparatus for distributing content distribution nodes
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
CN110267077A (en) Offline cache method, apparatus, terminal and readable storage medium storing program for executing
CN109716731A (en) For providing the system and method for functions reliably and efficiently data transmission
JP7217181B2 (en) WEARABLE DEVICE, INFORMATION PROCESSING METHOD, APPARATUS AND SYSTEM
CN109417566B (en) Constraint-based controlled seed propagation
CN110677484B (en) Bypass distribution preheating method and device and electronic equipment

Legal Events

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

Application publication date: 20191122