CN106953892A - A kind of method for obtaining file, apparatus and system - Google Patents

A kind of method for obtaining file, apparatus and system Download PDF

Info

Publication number
CN106953892A
CN106953892A CN201710079150.XA CN201710079150A CN106953892A CN 106953892 A CN106953892 A CN 106953892A CN 201710079150 A CN201710079150 A CN 201710079150A CN 106953892 A CN106953892 A CN 106953892A
Authority
CN
China
Prior art keywords
file
monitoring
file content
content
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710079150.XA
Other languages
Chinese (zh)
Other versions
CN106953892B (en
Inventor
许赫赫
沈操
张超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing time Ltd.
Original Assignee
Beijing Time Ltd By Share 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 Time Ltd By Share Ltd filed Critical Beijing Time Ltd By Share Ltd
Priority to CN201710079150.XA priority Critical patent/CN106953892B/en
Publication of CN106953892A publication Critical patent/CN106953892A/en
Application granted granted Critical
Publication of CN106953892B publication Critical patent/CN106953892B/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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The invention provides a kind of method for obtaining file, apparatus and system, wherein, it is adaptable to the method for the acquisition file of document processing server, including:The file acquisition from client forwarded by web cluster is received to ask;It is determined that when the local file acquisition that is not stored with asks asked file content, waiting the monitoring from file monitor server to notify;When receiving monitoring notice, judge the end mark that file has terminated whether is included in new file content;If so, the file content after deletion is sent to web cluster, so that the file content after deleting is forwarded to client by web cluster;If not, new file content is forwarded to web cluster, so that new file content is forwarded to client by web cluster, until including end mark in new file content, so as to enable users to the new file content for obtaining generation in time, the real-time for obtaining file is effectively improved.

Description

A kind of method for obtaining file, apparatus and system
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method for obtaining file, apparatus and system.
Background technology
With continuing to develop for Internet technology, network information is increasing, obtained using network information into The important channel of information is obtained for most of users.When the information content that user wants acquisition is larger, generally require by obtaining The mode for including the file of bulk information obtains user's information needed.
Often there are some unknown factors in the file obtained in users from networks, for example, it is not known that the file of reading It whether there is, it is not known that whether file increases state in dynamic, it is not known that when file terminates growth etc..Prior art In, for unknown file, its acquisition modes taken is whether to remove inquiry file at regular intervals to common web server In the presence of, and judge the growth state of file, if user needs the file obtained to be in dynamic growth state, then user can not This document is obtained, can only increase end ability server when file can send file to user.
Using the acquisition modes of prior art, on the one hand, during web server inquiry file, the interval of inquiry Time can make it that file produces larger delay in acquisition process so that file exists ageing not high in acquisition process Problem.On the other hand, only when file is complete file content, server can just send file to user, with Family pending file may need to take some time during increasing, and both waste user time, also result in user's body The problem of testing not good.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on State method, the apparatus and system of the acquisition file of problem.
According to an aspect of of the present present invention, there is provided a kind of method for obtaining file, it is adaptable to document processing server, bag Include:
The file acquisition from the client forwarded by web cluster is received to ask;
It is determined that when the local file acquisition that is not stored with asks asked file content, waiting from file monitor clothes Business device, carry and notified because system file changes the monitoring of new file content generated;
When receiving the monitoring notice, the new file content carried during the monitoring is notified is read, is gone forward side by side One step judges the end mark that file has terminated whether is included in the new file content;If comprising the end mark, deleting Sent except the end mark, and by the file content after deletion to the web cluster, so that the file content after the deletion The client is forwarded to by the web cluster;If not comprising the end mark, the new file content is forwarded into institute Web cluster is stated, so that the new file content is forwarded to the client by the web cluster, and continues to come from institute The monitoring for carrying the new file content for stating file monitor server is notified, is included until in the new file content The end mark.
Alternatively, however, it is determined that the file acquisition is locally stored and asks asked file content, then by the request File content send to the web cluster so that the file content of the request is forwarded to the client by the web cluster End.
Alternatively, it is described wait from file monitor server, carry because system file change generated it is new File content monitoring notify when, also include:
If the file monitor server monitoring is created, changes or deleted to the system file, given birth to by file The new file content is generated according to the system file for being created, changing or deleting and send to the file into server After monitoring server, receive the monitoring for carrying the new file content from the file monitor server and notify.
Alternatively, methods described also includes:Client and the web cluster as described in the file monitor server monitoring Between network connection state;
If when reading the new file content carried during the monitoring is notified, the file monitor server monitoring It is disconnected to the file acquisition request that the client is sent to the web cluster, then interrupts the reading of the new file content Take, and interrupt notification message is sent to the web cluster, so that the interrupt notification message is forwarded to institute by the web cluster State client.
Alternatively, it is described wait from file monitor server, carry because system file change generated it is new File content monitoring notify when, also include:
Whether the stand-by period for judging to wait the monitoring from file monitor server to notify exceedes preset time;
If it is not, then when receiving the monitoring notice, reading in the new file carried during the monitoring is notified Hold, and determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and send file acquisition request failure to the web cluster Notification message, so that the notification message of the request failure is forwarded to the client by the web cluster.
Alternatively, the file acquisition request includes following any one:
Hypertext transfer protocol requests, the request of Hyper text transfer security protocol and FTP request.
According to another aspect of the present invention, a kind of method for obtaining file is additionally provided, it is adaptable to file monitor server, Including:
Monitoring system file change;
When monitoring the system file change, the new file content after change is received;
The new file content received is carried and sent in monitoring is notified to document processing server, with by institute State document processing server to send the new file content to web cluster, then by the web cluster by the new text Part content is sent to client.
Alternatively, it is described to receive the new file content after change when monitoring the system file change, including:
When monitoring the system file and being created, change or delete, by the file generated server according to quilt The system file for creating, changing or deleting is generated after new file content, is received from the file generated server The new file content.
Alternatively, methods described also includes:Monitor the network connection state between the client and the web cluster;
It is disconnected if monitoring the client and sending to the file acquisition request of the web cluster, triggers the text Part processing server interrupts the reading of the new file content, and triggers the document processing server to the web cluster Interrupt notification message is sent, so that the interrupt notification message is forwarded to the client by the web cluster.
According to another aspect of the invention, a kind of device for obtaining file is additionally provided, it is adaptable to document processing server, Including:
First receiver module, suitable for receiving the request of the file acquisition from the client forwarded by web cluster;
Determining module, when being adapted to determine that the local file acquisition that is not stored with asks asked file content, is waited It is from file monitor server, carry and notified because system file changes the monitoring of new file content generated;
Read module, what is carried suitable for when receiving the monitoring and notifying, reading during the monitoring is notified is described new File content, and determine whether the end mark that file has terminated whether is included in the new file content;
First sending module, if suitable for including the end mark in the new file content, deleting the end mark Will, and the file content after deletion is sent to the web cluster, so that the file content after the deletion is by the web collection Group is forwarded to the client;
If not including the end mark in the new file content, the new file content is forwarded to described Web cluster, so that the new file content is forwarded to the client by the web cluster, and is continued to from described The monitoring for carrying the new file content of file monitor server is notified, until including institute in the new file content State end mark.
Alternatively, if the determining module determines that the file acquisition, which is locally stored, asks asked file content, The file content of the request is then forwarded to the web cluster by first sending module, so that the file of the request Content is forwarded to the client by the web cluster.
Alternatively, first receiver module is further adapted for:If the file monitor server monitoring is to the system file It is created, changes or deletes, then generates institute according to the system file for being created, changing or deleting by file generated server State new file content and send to the file monitor server, receive the carrying from the file monitor server The monitoring for having the new file content is notified.
Alternatively, described device also includes interrupt module, is suitable to:Read during the monitoring is notified and take in the read module During the new file content of band, the file monitor server monitoring to the client is sent to the web cluster File acquisition request is disconnected, and interrupts the reading of the new file content, and triggers first sending module to the web Collect pocket transmission interrupt notification message, so that the interrupt notification message is forwarded to the client by the web cluster.
Alternatively, described device also includes judge module, is suitable to:Judge to wait the monitoring from file monitor server to lead to Whether the stand-by period known exceedes preset time;
If it is not, then when receiving the monitoring notice, reading what is carried during the monitoring is notified by the read module The new file content, and determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and sent from first sending module to the web cluster The notification message of file acquisition request failure so that the notification message of the request failure be forwarded to by the web cluster it is described Client.
Alternatively, the file acquisition request includes following any one:Hypertext transfer protocol requests, Hyper text transfer Security protocol is asked and FTP request.
According to another aspect of the invention, a kind of device for obtaining file is additionally provided, it is adaptable to file monitor server, Including:
Monitoring module, suitable for monitoring system file change;
Second receiver module, suitable for when monitoring the system file change, receiving the new file content after change;
Second sending module, sends to file suitable for the new file content received is carried in monitoring is notified Processing server, to be sent the new file content to web cluster, then by described by the document processing server Web cluster sends the new file content to client.
Alternatively, second receiver module is further adapted for:Be created when the monitoring module monitors the system file, When modification or deletion, generated newly according to the system file for being created, changing or deleting by the file generated server After file content, the new file content from the file generated server is received.
Alternatively, the monitoring module is further adapted for:Monitor the network connection shape between the client and the web cluster State;
It is disconnected if monitoring the client and sending to the file acquisition request of the web cluster, triggers the text Part processing server interrupts the reading of the new file content, and triggers the document processing server to the web cluster Interrupt notification message is sent, so that the interrupt notification message is forwarded to the client by the web cluster.
According to another aspect of the present invention, a kind of system for obtaining file, including client, web cluster, text are additionally provided Part processing server and file monitor server,
The client, is asked to the web cluster suitable for sending file acquisition;
The web cluster, suitable for receiving the file acquisition request, is forwarded to the document processing server;
The document processing server, suitable for receiving the file acquisition request forwarded by the web cluster, and is determined When the file acquisition that is not stored with the document processing server asks asked file content, wait and come from the text The monitoring of part monitoring server is notified;
The file monitor server, suitable for monitoring system file change, receives the new file content after change, and will The new file content is carried to be sent to the document processing server in monitoring is notified;
The document processing server, is further adapted for, when receiving the monitoring notice, reading during the monitoring is notified and taking The new file content of band, and determine whether the end mark that file has terminated whether is included in the new file content Will;If comprising the end mark, deleting the end mark, and the file content after deletion is sent to the web cluster; If not comprising the end mark, the new file content is forwarded into the web cluster, and continue to come from the text The monitoring for carrying the new file content of part monitoring server is notified, described until being included in the new file content End mark;
The web cluster, is further adapted for the file content received from the document processing server being forwarded to the client End.
Alternatively, the web cluster is further adapted for:Selected to be used to receive in the web cluster according to load-balancing algorithm The web server of the file acquisition request.
Alternatively, the document processing server is further adapted for:If it is determined that it is described to be stored with the document processing server File acquisition asks asked file content, then sends the file content of the request to the web cluster.
Alternatively, the system also includes file generated server, is suitable to:If the file monitor server monitoring is to institute System file is stated to be created, change or delete, then according to be created, change or delete system file generation it is described newly File content is simultaneously sent to the file monitor server.
Alternatively, the file generated server is further adapted for:If the new file content is the complete request File content, then add the end mark in the new file content.
Alternatively, the file monitor server is further adapted for:Monitor the network between the client and the web cluster Connection status;
If when the document processing server reads the new file content carried during the monitoring is notified, monitoring It is disconnected, then is triggered in the document processing server to the file acquisition request that the client is sent to the web cluster The disconnected reading to the new file content, and the document processing server is triggered to web cluster transmission interrupt notification Message, so that the interrupt notification message is forwarded to the client by the web cluster.
Alternatively, the document processing server is further adapted for:Judge to wait the monitoring from file monitor server to notify Stand-by period whether exceed preset time;
If it is not, then when receiving the monitoring notice, reading in the new file carried during the monitoring is notified Hold, and determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and send file acquisition request failure to the web cluster Notification message, so that the notification message of the request failure is forwarded to the client by the web cluster.
Alternatively, the file acquisition request includes following any one:Hypertext transfer protocol requests, Hyper text transfer Security protocol is asked and FTP request.
In the embodiment of the present invention, when the file from client that document processing server receives web cluster forwarding is obtained Request is taken, and when determining that the local file acquisition that is not stored with asks asked file content, document processing server can be selected Select wait it is from file monitor server, carry and lead to because system file changes the monitoring of new file content generated Know.If the monitoring that document processing server receives the transmission of file monitor server is notified, and by judging to learn that monitoring is notified End mark is included in the new file content of middle carrying, then it represents that new file increases and terminated, document processing server can be with The file content deleted after end mark is sent to web cluster, user is then transmitted to by web cluster.If in new file Do not include end mark in appearance, represent that new file increases, i.e., the demand file content that user is asked is in dynamic and increased Long status, document processing server also needs the monitoring for continuing waiting for file monitor server to notify until being wrapped in new file content Contain end mark.Thus, no matter the file content that user is asked, whether in dynamic growth state, passes through the present invention program User can be made to get the file content of request in time.Particularly, if by judging to learn in new file content do not have When having comprising end mark, i.e., when the demand file content that user is asked is in dynamic growth state, document processing server The monitoring for pending file monitoring server always is notified, to receive the new file content of generation in time until new file End-of-file mark is included in content, when including end-of-file mark in new file content, the file of this request of user Content obtaining is completed.In the process, request is just got after waiting demand file content to be all generated without user File content, so as to effectively improve the real-time for obtaining file, reduce user and wait in asked demand file Hold the time of generation, and then improve the operating experience of user.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the embodiment of the present invention.
According to the accompanying drawings to the detailed description of the specific embodiment of the invention, those skilled in the art will be brighter The above-mentioned and other purposes of the present invention, advantages and features.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows the schematic flow sheet of the method for acquisition file according to an embodiment of the invention;
Fig. 2 shows the schematic flow sheet of the method for acquisition file in accordance with another embodiment of the present invention;
Fig. 3 shows the structural representation of the device of acquisition file according to an embodiment of the invention;
Fig. 4 shows the structural representation of the device of acquisition file in accordance with another embodiment of the present invention;
Fig. 5 shows the structural representation of the device of acquisition file in accordance with another embodiment of the present invention;
Fig. 6 shows the structural representation of the system of acquisition file according to an embodiment of the invention;
Fig. 7 shows the structural representation of the system of acquisition file in accordance with another embodiment of the present invention;And
Fig. 8 shows the signal stream signal of each equipment room in the system according to an embodiment of the invention for obtaining file Figure.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
In order to solve the above technical problems, the embodiments of the invention provide a kind of method for obtaining file, it is adaptable at file Manage server.Fig. 1 shows the schematic flow sheet of the method for acquisition file according to an embodiment of the invention., should referring to Fig. 1 Method at least includes step S102 to step S110.
Step S102, receives the file acquisition from client forwarded by web cluster and asks.
In the step, the form of file acquisition request can be HTTP (HTTP, Hyper Text Transfer Protocol), Hyper text transfer security protocol (HTTPS, Hyper Text Transfer Protocol over Secure Socket Layer) and FTP (FTP, File Transfer Protocol) etc., the present invention is implemented The concrete form that example is asked file acquisition is not limited.
In the step, multiple web servers can be included in web cluster, such as Nginx servers, Internet take Business device etc., embodiment of the present invention onserver-class is not specifically limited.
Step S104, it is determined that when the local file acquisition that is not stored with asks asked file content, waiting and coming from file Monitoring server, carry and notified because system file changes the monitoring of new file content generated.
In this step, file monitor server can be with the change of monitoring system file, while can also receive after change New file content.When file monitor server monitoring to system file changes, the server generation of triggering file generated is new File content, and the new file content that is generated from file generated server is received, while new file content is taken Band is sent to document processing server in monitoring is notified.
Step S106, when receiving monitoring notice, reads the new file content carried during monitoring is notified, judges newly Whether end mark that file terminated is included in file content.
In the step, the end mark that file has terminated actually is intended to indicate that file acquisition asks asked file The identifier whether content has generated completely.End mark can be a numeral, letter or character string etc. Deng.If including end mark in new file content, then it represents that file acquisition asks asked file content to be given birth to completely Into if not comprising end mark in the new file content, then it represents that file acquisition asks asked file content not Have and generated completely, be only to generate a part of file content, and now file acquisition is asked at asked file content In dynamically growth state.
End mark in the step can be added new by file generated server after new file content is generated File content in or by file monitor server receiving file generated server transmission new file content It is added to afterwards in new file content, the embodiment of the present invention is not limited this.
Step S108, if comprising end mark, deleting end mark, and the file content after deletion is sent to web collection Group, so that the file content after deleting is forwarded to client by web cluster.
Step S110, if not comprising end mark, new file content being forwarded into web cluster, makes new file content Client is forwarded to by web cluster, and continues to the monitoring for carrying new file content from file monitor server Notify, until including end mark in new file content.
In the embodiment of the present invention, when the file from client that document processing server receives web cluster forwarding is obtained Request is taken, and when determining that the local file acquisition that is not stored with asks asked file content, document processing server can be selected Select wait it is from file monitor server, carry and lead to because system file changes the monitoring of new file content generated Know.If the monitoring that document processing server receives the transmission of file monitor server is notified, and by judging to learn that monitoring is notified End mark is included in the new file content of middle carrying, then it represents that new file increases and terminated, document processing server can be with The file content deleted after end mark is sent to web cluster, user is then transmitted to by web cluster.If in new file Do not include end mark in appearance, represent that new file increases, i.e., the demand file content that user is asked is in dynamic and increased Long status, document processing server also needs the monitoring for continuing waiting for file monitor server to notify until being wrapped in new file content Contain end mark.Thus, no matter the file content that user is asked, whether in dynamic growth state, passes through the present invention program User can be made to get the file content of request in time.Particularly, if by judging to learn in new file content do not have When having comprising end mark, i.e., when the demand file content that user is asked is in dynamic growth state, document processing server The monitoring for pending file monitoring server always is notified, to receive the new file content of generation in time until new file End-of-file mark is included in content, when including end-of-file mark in new file content, the file of this request of user Content obtaining is completed.In the process, request is just got after waiting demand file content to be all generated without user File content, so as to effectively improve the real-time for obtaining file, reduce user and wait in asked demand file Hold the time of generation, and then improve the operating experience of user.
Step S102 is seen above, in an embodiment of the present invention, web cluster, can when receiving the request of client So that the web server for receiving file acquisition request is selected in web cluster according to load-balancing algorithm.Wherein, load equal Weighing apparatus refers to entering the loading condition of the website of each in system (such as server) Mobile state adjustment, to eliminate or reduce system as far as possible In each website load imbalance phenomenon.Concrete methods of realizing can be that the task on heavily loaded website is transferred into other underloadings On website, the load balancing of each website in system is realized as far as possible, so as to improve the handling capacity of system.In the embodiment, File acquisition can be asked on the relatively low server of the load being assigned in web cluster, with by loading relatively low server Manage this document and obtain request task.
Step S104 is seen above, in an embodiment of the present invention, if document processing server determines that text has been locally stored Part obtains the asked file content of request, then, the file content of request can be directly read and sent to web cluster, with The file content of request is set to be forwarded to client by web cluster.By file acquisition ask asked file content send to During web cluster, the file content of request can be packaged into the form of chunk with first, so by the file content of request with The form of chunk bags is sent to web cluster.
With continued reference to above step S104, in an embodiment of the present invention, when file monitor server monitoring to system text When part changes, such as system file is created, deletes or changed, and can be created, repaiied by file generated server foundation Change or the system file deleted generates new file content, so that by file monitor server by the new file content of generation Carry in monitoring is notified and send to document processing server.
In this embodiment, document processing server wait from file monitor server, carry because system text , can also be by judging to wait from file monitor server when the monitoring for the new file content that part change is generated is notified Monitor whether the stand-by period notified exceedes preset time, to determine whether document processing server needs to continue waiting for monitoring logical Know.For example, preset time can be 3 seconds, 4 seconds, the time such as 5 seconds, the embodiment of the present invention is not specifically limited to preset time.
If the stand-by period of the notice to be monitored such as document processing server is logical receiving monitoring not less than preset time When knowing, the new file content carried during monitoring is notified is read, and determine whether whether include file in new file content The end mark terminated.
If the stand-by period of the notice to be monitored such as document processing server exceedes preset time, it is determined that this file acquisition Request failure, and from document processing server to web cluster send file acquisition request failure notification message, and then again by Web cluster will ask the notification message of failure to be forwarded to client.The request failure notification message can be voice, word, The forms such as numeral.Such as, the notification message " file acquisition fails, and file is please obtained again " of written form.
Referring to step S106, in an embodiment of the present invention, when document processing server is reading carrying during monitoring is notified New file content when, file monitor server monitoring to client send to web cluster file acquisition request be disconnected, Such as, any one device fails, network disconnect in client and web cluster, or user closes client, refreshes client Page of display etc. is held, the connection that these situations can all cause the file acquisition between client and web cluster to be asked disconnects.This When, file monitor server can trigger the reading that document processing server interrupts new file content, and by file process service Device sends interrupt notification message to web cluster, and then interrupt notification message is forwarded to client by web cluster, so that user Solve file acquisition failure.
In order to clearly embody the embodiment of the present invention, now the present invention is carried out with the embodiment under a concrete scene Introduce.In this embodiment, client is " 360 secure browser ", and it is video that file acquisition, which asks asked file content, Content.
When user opens " 360 secure browser ", and click on the video " beginning lecturing " on " 360 secure browser " page, " 360 secure browser " can send http agreement requests to corresponding web cluster.When web cluster receives http agreement requests When, the relatively low web server of a present load can be chosen and receive http agreement requests, when the web server of selection is received To after http agreement requests, the http agreement requests are forwarded to document processing server.
When document processing server receives the http agreement requests of video file " beginning lecturing ", first determine it is local in whether Be stored with the video file content of " beginning lecturing ", if so, then directly send the video file of " beginning lecturing " to web server, Web server, can be by after transcoding after carrying out transcoding according to the order of video time line to video file " beginning lecturing " and caching Video file send to " 360 secure browser " so that on " 360 secure browser " play video " beginning lecturing ".
If it is determined that be not stored with document processing server " beginning lecturing " video file content when, document processing server It can select to wait the monitoring from file monitor server to notify.When video file of the file monitor server monitoring into system When " beginning lecturing " is created, file generated server generation video file " beginning lecturing " can be triggered.File generated server is in life Into after the partial content of video file " beginning lecturing ", first the partial video file content of generation can be sent to file monitor and taken Business device, and then sent partial video file content carrying to file process clothes in monitoring is notified by file monitor server Business device.Document processing server is received after monitoring notice, is read out partial video file content in being notified from monitoring and " is begun lecturing ".
If document processing server is learnt by judging, not comprising end in the partial video file content " beginning lecturing " Mark, then be forwarded directly to web server, and continue waiting for monitoring notice by the partial video file content " beginning lecturing ".So Afterwards, web server carries out transcoding simultaneously to the partial video file content " beginning lecturing " received according to the order of video time line Sent after caching to " 360 secure browser ".And then, " 360 secure browser " " is opened the partial video file content received Say " played out according to the order of transcoding.
If document processing server is learnt by judging, end mark is included in the partial video file content " beginning lecturing " Will, then delete the end mark, and the partial video file content " beginning lecturing " is sent to web server.Web server pair The partial video file content " beginning lecturing " received according to video time line order carry out transcoding and cache after send to " 360 secure browser ".And then, " 360 secure browser " is to the partial video file content " beginning lecturing " that receives according to turning The order of code is played out.
Certainly, above-described embodiment is only schematical, and file acquisition asks asked file content not merely to limit In video file, other any file contents are can also be, e.g., text content, audio file content etc., the present invention are implemented Example is not limited the type of file.But, the process of file acquisition is roughly the same, and the embodiment of the present invention is not another to this One introduces.
The method that the embodiment of the present invention additionally provides another acquisition file, it is adaptable to file monitor server.Fig. 2 is shown The schematic flow sheet of the method in accordance with another embodiment of the present invention for obtaining file.Referring to Fig. 2, this method at least includes step Rapid S202 to step S206.
Step S202, monitoring system file change.
In the step, monitoring system file change can be specifically that monitoring system file is created, changes or deleted The various change state of system file.
Step S204, when monitoring system file change, receives the new file content after change.
In the step, new file content after change can by file generated server according to being created, change or The system file of deletion is generated.
Step S206, the new file content received is carried and sent in monitoring is notified to document processing server, To be sent new file content to web cluster by document processing server, then new file content is sent by web cluster To client.
Step S204 is seen above, in an embodiment of the present invention, when file monitor server monitoring to system file quilt When creating, change or deleting, it can be generated by file generated server according to the system file that be created, change or delete New file content is simultaneously sent to file monitor server, and then, file monitor server is by the new file content received It is forwarded to document processing server.
In an embodiment of the present invention, file monitor server can be also used between monitor client and web cluster Network connection state.When monitor client send to web cluster file acquisition request be disconnected, e.g., client and web collection Any one device fails, network disconnect in group, or user closes client, refreshes page that client is shown etc., The connection that these situations can all cause the file acquisition between client and web cluster to be asked disconnects.Then triggering file process takes Business device interrupts the reading of new file content, and triggers document processing server to web cluster transmission interrupt notification message, so that Interrupt notification message is forwarded to client by web cluster, and then user is recognized that file acquisition fails.
The embodiment of the present invention by using file monitor server real-time monitoring system file change so that when file prison Control server monitoring to system file change when, user can be made to get the new file content of generation in time, so as to have Improve the real-time for obtaining file to effect.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of device for obtaining file, it is adaptable at file Manage server.Fig. 3 shows the structural representation of the device of acquisition file according to an embodiment of the invention., should referring to Fig. 3 The first receiver module 310, determining module 320, read module 330 and first can at least be included by obtaining the device 300 of file Sending module 340.
Between each composition of device 300 or the function and each several part of device of now introducing the acquisition file of the embodiment of the present invention Annexation:
First receiver module 310, suitable for receiving the request of the file acquisition from client forwarded by web cluster;
Determining module 320, is coupled with the first receiver module 310, is adapted to determine that the local file acquisition request that is not stored with During the file content asked, wait it is from file monitor server, carry because system file changes generated new The monitoring of file content is notified;
Read module 330, is coupled with determining module 320, suitable for when receiving monitoring notice, reading in monitoring notice The new file content carried, and determine whether the end mark that file has terminated whether is included in new file content;
First sending module 340, is coupled with read module 330, if suitable for including end mark in new file content, End mark is deleted, and the file content after deletion is sent to web cluster, so that the file content after deleting is by web cluster It is forwarded to client;
If not including end mark in new file content, new file content is forwarded to web cluster, so that new text Part content is forwarded to client by web cluster, and continues to carry new file content from file monitor server Monitoring notify, until in new file content include end mark.
In an embodiment of the present invention, file acquisition request includes following any one:It is hypertext transfer protocol requests, super File Transfer security protocol is asked and FTP request.
In an embodiment of the present invention, however, it is determined that module 320 determines that file acquisition, which is locally stored, asks asked text Part content, then be forwarded to web cluster by the first sending module 340 by the file content of request so that request file content by Web cluster is forwarded to client.
In an embodiment of the present invention, the first receiver module 310 is further adapted for, if file monitor server monitoring is literary to system Part is created, changes or deleted, then is generated by file generated server according to the system file for being created, changing or deleting After new file content and transmission to file monitor server, reception carries new file from file monitor server The monitoring of content is notified.
The embodiment of the present invention additionally provides the device of another acquisition file, it is adaptable to document processing server.Referring to figure 4, the device 300 of the acquisition file is except comprising the device 300 (suitable for document processing server) for obtaining file above Modules outside, can also at least include interrupt module 350 and judge module 360.
Interrupt module 350, is coupled with read module 330, suitable for reading what is carried during monitoring is notified in read module 330 During new file content, file monitor server monitoring to client sends to the file acquisition request of web cluster and is disconnected, in The reading of disconnected new file content, and the first sending module 340 is triggered to web cluster transmission interrupt notification message, so as to interrupt Notification message is forwarded to client by web cluster.
Judge module 360, is coupled with determining module 320, suitable for judging to wait the monitoring from file monitor server Whether the stand-by period of notice exceedes preset time.If it is not, then reading prison by read module 330 when receiving monitoring notice The new file content that control is carried in notifying, and determine whether the end that file has terminated whether is included in new file content Mark;If, it is determined that the request failure of this file acquisition, and send file acquisition from the first sending module 340 to web cluster The notification message of failure is asked, so that the notification message of request failure is forwarded to client by web cluster.
The embodiment of the present invention additionally provides the device of another acquisition file, it is adaptable to file monitor server.Fig. 5 is shown The structural representation of the device in accordance with another embodiment of the present invention for obtaining file.Referring to Fig. 5, the device of the acquisition file 500 can at least include monitoring module 510, the second receiver module 520 and the second sending module 530.
Between each composition of device 500 or the function and each several part of device of now introducing the acquisition file of the embodiment of the present invention Annexation:
Monitoring module 510, suitable for monitoring system file change;
Second receiver module 520, is coupled with monitoring module 510, suitable for when monitoring system file change, receiving and becoming New file content after change;
Second sending module 530, is coupled with the second receiver module 520, suitable for the new file content received is taken Band is sent to document processing server in monitoring is notified, to be sent new file content to web by document processing server Cluster, is then sent new file content to client by web cluster.
In an embodiment of the present invention, monitoring module 510 is further adapted for, and the network between monitor client and web cluster connects State is connect, is disconnected if monitoring client and sending to the file acquisition request of web cluster, in triggering document processing server The reading of disconnected new file content, and trigger document processing server and send interrupt notification message to web cluster so that in it is open close Know that message is forwarded to client by web cluster.
In an embodiment of the present invention, the second receiver module 520 is further adapted for, when monitoring module 510 monitors system file When being created, change or deleting, generated by file generated server according to the system file for being created, changing or deleting new File content after, receive the new file content from file generated server.
The embodiment of the present invention additionally provides a kind of system for obtaining file.Fig. 6 is shown according to one embodiment of the invention Acquisition file system structural representation.Referring to Fig. 6, the system 600 of the acquisition file can at least include client 610th, web cluster 620, document processing server 630 and file monitor server 640.
Between each composition of system 600 or the function and each several part of device of now introducing the acquisition file of the embodiment of the present invention Annexation:
Client 610, is asked to web cluster 620 suitable for sending file acquisition;
Web cluster 620, is coupled with client 610, suitable for receiving file acquisition request, is forwarded to file process service Device 630;
Document processing server 630, is coupled with web cluster 620, is obtained suitable for receiving the file forwarded by web cluster 620 Request is taken, and the file acquisition that determines not to be stored with document processing server 630 is when asking asked file content, waits and Notified from the monitoring of file monitor server 640;
File monitor server 640, is coupled with document processing server 630, suitable for monitoring system file change, receives New file content after change, and new file content carrying is sent to document processing server 630 in monitoring is notified;
Document processing server 630, is further adapted for, when receiving monitoring notice, reading the new text carried during monitoring is notified Part content, and determine whether the end mark that file has terminated whether is included in new file content;If comprising end mark, End mark is deleted, and the file content after deletion is sent to web cluster 620;If not comprising end mark, by new file Content is forwarded to web cluster 620, and continues to the prison for carrying new file content from file monitor server 640 Control is notified, until including end mark in new file content;
Web cluster 620, is further adapted for the file content received from document processing server 630 being forwarded to client 610.
In an embodiment of the present invention, web cluster 620 is further adapted for, and is selected according to load-balancing algorithm in web cluster 620 Select the web server for receiving file acquisition request.
In an embodiment of the present invention, document processing server 630 is further adapted for, however, it is determined that in document processing server 630 The file acquisition that is stored with asks asked file content, then sends the file content of request to web cluster 620.
In an embodiment of the present invention, file monitor server 640 is further adapted for, monitor client 610 and web cluster 620 Between network connection state.If when document processing server 630 reads the new file content carried during monitoring is notified, prison Control client 610 send to web cluster 620 file acquisition request be disconnected, then trigger document processing server 630 interrupt Reading to new file content, and document processing server 630 is triggered to the transmission interrupt notification message of web cluster 620, so that Interrupt notification message is forwarded to client 610 by web cluster 620.
In an embodiment of the present invention, document processing server 630 is further adapted for, and judges to wait from file monitor server Whether the stand-by period that 640 monitoring is notified exceedes preset time.If it is not, then reading monitoring logical when receiving monitoring notice Know the new file content of middle carrying, and determine whether the end mark that file has terminated whether is included in new file content Will;If, it is determined that the request failure of this file acquisition, and disappear to the notice of the transmission file acquisition request failure of web cluster 620 Breath, so that the notification message of request failure is forwarded to client 610 by web cluster 620.
In an embodiment of the present invention, file acquisition request can include following any one, and HTTP please Ask, the request of Hyper text transfer security protocol and FTP are asked.
The system that the embodiment of the present invention additionally provides another acquisition file.Fig. 7 is shown according to one implementation of the present invention The structural representation of the system of the acquisition file of example.Referring to Fig. 7, the system 600 of the acquisition file is except comprising mentioned above Outside each equipment in system, file generated server 650 can also be included.
File generated server 650, is coupled with file monitor server 640, if being supervised suitable for file monitor server 640 Control system file to be created, change or delete, then new text is generated according to the system file for being created, changing or deleting Part content is simultaneously sent to file monitor server 640.
In an embodiment of the present invention, file generated server 650 is further adapted for, if new file content is complete request File content, then add end mark in new file content.
In order to clearly embody the embodiment of the present invention, now in the system 600 by obtaining file between each equipment Signal flow direction the embodiment of the present invention is specifically introduced, it is shown in Figure 8:
Client 610 sends file acquisition and asked to web cluster 620;
Web cluster 620 receives the file acquisition request from client 610, and is forwarded to document processing server 630;
Document processing server 630 receives the file acquisition request forwarded from web cluster 620, and determine it is local whether The file acquisition that is stored with asks asked file content,
If so, the then file content of read requests, and the file content of request is sent to web cluster 620, web cluster 620 receive the file content of the request from document processing server 630, and are forwarded to client 610;
If it is not, document processing server 630 waits the monitoring from file monitor server 640 to notify;
The change of the real-time monitoring system file of file monitor server 640, when monitor system file be created, change or Person deletes, then triggers file generated server 650 according to the system file generation for being created, changing or deleting, and send new File content to file monitor server 640;
File monitor server 640 receives new file content, and new file content is carried in monitoring notice transfer It is sent to document processing server 630;
Document processing server 630 is received to be carried in the new file of generation from what file monitor server 640 was forwarded After the monitoring of appearance is notified, the new file content carried during monitoring is notified is read, and judge whether wrapped in new file content The end mark terminated containing file,
If it is not, then forwarding new file content to web cluster 620, the forwarding of Web clusters 620 comes from document processing server 630 new file content continues to carry new file from file monitor server 640 to client 610 The monitoring of content is notified, until including end mark in new file content;
If so, then deleting end mark, and the file content deleted after end mark is sent to web cluster 620, Web Cluster 620 forwards the file content after the deletion end mark from document processing server 630 to client 610;
Client 610 receives new file content or deletes the file content after end mark.
After the embodiment of the present invention can make user without waiting for being all generated in its demand file asked content The file content of request can be just got, the real-time for obtaining file can be not only effectively improved, user's wait is also reduced The time for the demand file content generation asked, improve the operating experience of user.
According to the combination of any one above-mentioned preferred embodiment or multiple preferred embodiments, the embodiment of the present invention can reach Following beneficial effect:
In the embodiment of the present invention, when the file from client that document processing server receives web cluster forwarding is obtained Request is taken, and when determining that the local file acquisition that is not stored with asks asked file content, document processing server can be selected Select wait it is from file monitor server, carry and lead to because system file changes the monitoring of new file content generated Know.If the monitoring that document processing server receives the transmission of file monitor server is notified, and by judging to learn that monitoring is notified End mark is included in the new file content of middle carrying, then it represents that new file increases and terminated, document processing server can be with The file content deleted after end mark is sent to web cluster, user is then transmitted to by web cluster.If in new file Do not include end mark in appearance, represent that new file increases, i.e., the demand file content that user is asked is in dynamic and increased Long status, document processing server also needs the monitoring for continuing waiting for file monitor server to notify until being wrapped in new file content Contain end mark.Thus, no matter the file content that user is asked, whether in dynamic growth state, passes through the present invention program User can be made to get the file content of request in time.Particularly, if by judging to learn in new file content do not have When having comprising end mark, i.e., when the demand file content that user is asked is in dynamic growth state, document processing server The monitoring for pending file monitoring server always is notified, to receive the new file content of generation in time until new file End-of-file mark is included in content, when including end-of-file mark in new file content, the file of this request of user Content obtaining is completed.In the process, request is just got after waiting demand file content to be all generated without user File content, so as to effectively improve the real-time for obtaining file, reduce user and wait in asked demand file Hold the time of generation, and then improve the operating experience of user.
In the specification that this place is provided, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself All as the separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can or similar purpose identical, equivalent by offer alternative features come generation Replace.
Although in addition, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of be the same as Example does not mean in of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any Mode it can use in any combination.
The present invention all parts embodiment can be realized with hardware, or with one or more processor run Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that can use in practice In the apparatus and system of microprocessor or digital signal processor (DSP) to realize acquisition file according to embodiments of the present invention Some or all parts some or all functions.The present invention is also implemented as being used to perform side as described herein The some or all equipment or program of device (for example, computer program and computer program product) of method.It is such Realizing the program of the present invention can store on a computer-readable medium, or can have the shape of one or more signal Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal Formula is provided.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and coming real by means of properly programmed computer It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.
So far, although those skilled in the art will appreciate that detailed herein have shown and described multiple showing for the present invention Example property embodiment, still, still can be direct according to present disclosure without departing from the spirit and scope of the present invention It is determined that or deriving many other variations or modifications for meeting the principle of the invention.Therefore, the scope of the present invention is understood that and recognized It is set to and covers other all these variations or modifications.
The embodiment of the present invention additionally provides A1, a kind of method of acquisition file, it is adaptable to document processing server, including:
The file acquisition from the client forwarded by web cluster is received to ask;
It is determined that when the local file acquisition that is not stored with asks asked file content, waiting from file monitor clothes Business device, carry and notified because system file changes the monitoring of new file content generated;
When receiving the monitoring notice, the new file content carried during the monitoring is notified is read, is gone forward side by side One step judges the end mark that file has terminated whether is included in the new file content;If comprising the end mark, deleting Sent except the end mark, and by the file content after deletion to the web cluster, so that the file content after the deletion The client is forwarded to by the web cluster;If not comprising the end mark, the new file content is forwarded into institute Web cluster is stated, so that the new file content is forwarded to the client by the web cluster, and continues to come from institute The monitoring for carrying the new file content for stating file monitor server is notified, is included until in the new file content The end mark.
A2, the method according to A1, wherein,
If it is determined that the file acquisition, which is locally stored, asks asked file content, then by the file of the request Hold and send to the web cluster, so that the file content of the request is forwarded to the client by the web cluster.
A3, the method according to A1 or A2, wherein, it is described wait from file monitor server, carry because When the monitoring for the new file content that system file change is generated is notified, also include:
If the file monitor server monitoring is created, changes or deleted to the system file, given birth to by file The new file content is generated according to the system file for being created, changing or deleting and send to the file into server After monitoring server, receive the monitoring for carrying the new file content from the file monitor server and notify.
A4, the method according to any one of A1-A3, wherein, methods described also includes:
Network connection state as described in the file monitor server monitoring between client and the web cluster;
If when reading the new file content carried during the monitoring is notified, the file monitor server monitoring It is disconnected to the file acquisition request that the client is sent to the web cluster, then interrupts the reading of the new file content Take, and interrupt notification message is sent to the web cluster, so that the interrupt notification message is forwarded to institute by the web cluster State client.
A5, the method according to any one of A1-A4, wherein, it is described wait from file monitor server, take When being notified with the monitoring for changing the new file content generated because of system file, also include:
Whether the stand-by period for judging to wait the monitoring from file monitor server to notify exceedes preset time;
If it is not, then when receiving the monitoring notice, reading in the new file carried during the monitoring is notified Hold, and determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and send file acquisition request failure to the web cluster Notification message, so that the notification message of the request failure is forwarded to the client by the web cluster.
A6, the method according to any one of A1-A5, wherein, the file acquisition request includes following any one:
Hypertext transfer protocol requests, the request of Hyper text transfer security protocol and FTP request.
B7, a kind of method of acquisition file, it is adaptable to file monitor server, including:
Monitoring system file change;
When monitoring the system file change, the new file content after change is received;
The new file content received is carried and sent in monitoring is notified to document processing server, with by institute State document processing server to send the new file content to web cluster, then by the web cluster by the new text Part content is sent to client.
B8, the method according to B7, wherein, it is described when monitoring the system file change, receive after change New file content, including:
When monitoring the system file and being created, change or delete, by the file generated server according to quilt The system file for creating, changing or deleting is generated after new file content, is received from the file generated server The new file content.
B9, the method according to B7 or B8, wherein, methods described also includes:
Monitor the network connection state between the client and the web cluster;
It is disconnected if monitoring the client and sending to the file acquisition request of the web cluster, triggers the text Part processing server interrupts the reading of the new file content, and triggers the document processing server to the web cluster Interrupt notification message is sent, so that the interrupt notification message is forwarded to the client by the web cluster.
C10, a kind of device of acquisition file, it is adaptable to document processing server, including:
First receiver module, suitable for receiving the request of the file acquisition from the client forwarded by web cluster;
Determining module, when being adapted to determine that the local file acquisition that is not stored with asks asked file content, is waited It is from file monitor server, carry and notified because system file changes the monitoring of new file content generated;
Read module, what is carried suitable for when receiving the monitoring and notifying, reading during the monitoring is notified is described new File content, and determine whether the end mark that file has terminated whether is included in the new file content;
First sending module, if suitable for including the end mark in the new file content, deleting the end mark Will, and the file content after deletion is sent to the web cluster, so that the file content after the deletion is by the web collection Group is forwarded to the client;
If not including the end mark in the new file content, the new file content is forwarded to described Web cluster, so that the new file content is forwarded to the client by the web cluster, and is continued to from described The monitoring for carrying the new file content of file monitor server is notified, until including institute in the new file content State end mark.
C11, the device according to C10, wherein,
If the determining module determines that the file acquisition, which is locally stored, asks asked file content, by described The file content of the request is forwarded to the web cluster by the first sending module, so that the file content of the request is by institute State web cluster and be forwarded to the client.
C12, the device according to C10 or C11, wherein, first receiver module is further adapted for:
If the file monitor server monitoring is created, changes or deleted to the system file, given birth to by file The new file content is generated according to the system file for being created, changing or deleting and send to the file into server After monitoring server, receive the monitoring for carrying the new file content from the file monitor server and notify.
C13, the device according to any one of C10-C12, wherein, described device also includes interrupt module, is suitable to:
When the read module reads the new file content carried during the monitoring is notified, the file monitor Server monitoring is disconnected to the file acquisition request that the client is sent to the web cluster, interrupts the new file The reading of content, and first sending module is triggered to web cluster transmission interrupt notification message, so that open close in described Know that message is forwarded to the client by the web cluster.
C14, the device according to any one of C10-C13, wherein, described device also includes judge module, is suitable to:
Whether the stand-by period for judging to wait the monitoring from file monitor server to notify exceedes preset time;
If it is not, then when receiving the monitoring notice, reading what is carried during the monitoring is notified by the read module The new file content, and determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and sent from first sending module to the web cluster The notification message of file acquisition request failure so that the notification message of the request failure be forwarded to by the web cluster it is described Client.
C15, the device according to any one of C10-C14, wherein, the file acquisition request includes following any one :
Hypertext transfer protocol requests, the request of Hyper text transfer security protocol and FTP request.
D16, a kind of device of acquisition file, it is adaptable to file monitor server, including:
Monitoring module, suitable for monitoring system file change;
Second receiver module, suitable for when monitoring the system file change, receiving the new file content after change;
Second sending module, sends to file suitable for the new file content received is carried in monitoring is notified Processing server, to be sent the new file content to web cluster, then by described by the document processing server Web cluster sends the new file content to client.
D17, the device according to D16, wherein, second receiver module is further adapted for:
When the monitoring module, which monitors the system file, to be created, change or delete, by the file generated Server is generated according to the system file for being created, changing or deleting after new file content, is received and is come from the file Generate the new file content of server.
D18, the device according to D16 or D17, wherein, the monitoring module is further adapted for:
Monitor the network connection state between the client and the web cluster;
It is disconnected if monitoring the client and sending to the file acquisition request of the web cluster, triggers the text Part processing server interrupts the reading of the new file content, and triggers the document processing server to the web cluster Interrupt notification message is sent, so that the interrupt notification message is forwarded to the client by the web cluster.
E19, a kind of system of acquisition file, including client, web cluster, document processing server and file monitor clothes Business device,
The client, is asked to the web cluster suitable for sending file acquisition;
The web cluster, suitable for receiving the file acquisition request, is forwarded to the document processing server;
The document processing server, suitable for receiving the file acquisition request forwarded by the web cluster, and is determined When the file acquisition that is not stored with the document processing server asks asked file content, wait and come from the text The monitoring of part monitoring server is notified;
The file monitor server, suitable for monitoring system file change, receives the new file content after change, and will The new file content is carried to be sent to the document processing server in monitoring is notified;
The document processing server, is further adapted for, when receiving the monitoring notice, reading during the monitoring is notified and taking The new file content of band, and determine whether the end mark that file has terminated whether is included in the new file content Will;If comprising the end mark, deleting the end mark, and the file content after deletion is sent to the web cluster; If not comprising the end mark, the new file content is forwarded into the web cluster, and continue to come from the text The monitoring for carrying the new file content of part monitoring server is notified, described until being included in the new file content End mark;
The web cluster, is further adapted for the file content received from the document processing server being forwarded to the client End.
E20, the system according to E19, wherein, the web cluster is further adapted for:
Selected according to load-balancing algorithm in the web cluster for receiving the web services that the file acquisition is asked Device.
E21, the system according to E19 or E20, wherein, the document processing server is further adapted for:
If it is determined that the file acquisition that is stored with the document processing server asks asked file content, then will The file content of the request is sent to the web cluster.
E22, the system according to any one of E19-E21, wherein, the system also includes file generated server, It is suitable to:
If the file monitor server monitoring is created, changes or deleted to the system file, foundation is created The system file built, change or deleted generates the new file content and sent to the file monitor server.
E23, the system according to E22, wherein, the file generated server is further adapted for:
If the new file content is the file content of the complete request, add in the new file content Plus the end mark.
E24, the system according to any one of E19-E23, wherein, the file monitor server is further adapted for:
Monitor the network connection state between the client and the web cluster;
If when the document processing server reads the new file content carried during the monitoring is notified, monitoring It is disconnected, then is triggered in the document processing server to the file acquisition request that the client is sent to the web cluster The disconnected reading to the new file content, and the document processing server is triggered to web cluster transmission interrupt notification Message, so that the interrupt notification message is forwarded to the client by the web cluster.
E25, the system according to any one of E19-E24, wherein, the document processing server is further adapted for:
Whether the stand-by period for judging to wait the monitoring from file monitor server to notify exceedes preset time;
If it is not, then when receiving the monitoring notice, reading in the new file carried during the monitoring is notified Hold, and determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and send file acquisition request failure to the web cluster Notification message, so that the notification message of the request failure is forwarded to the client by the web cluster.
E26, the system according to any one of E19-E25, wherein, the file acquisition request includes following any one :
Hypertext transfer protocol requests, the request of Hyper text transfer security protocol and FTP request.

Claims (10)

1. a kind of method for obtaining file, it is adaptable to document processing server, including:
The file acquisition from the client forwarded by web cluster is received to ask;
It is determined that when the local file acquisition that is not stored with asks asked file content, waiting and coming from file monitor server , carry and notified because system file changes the monitoring of new file content generated;
When receiving the monitoring notice, the new file content carried during the monitoring is notified is read, and further Judge the end mark that file has terminated whether is included in the new file content;If comprising the end mark, deleting institute End mark is stated, and the file content after deletion is sent to the web cluster, so that the file content after the deletion is by institute State web cluster and be forwarded to the client;If not comprising the end mark, the new file content is forwarded to described Web cluster, so that the new file content is forwarded to the client by the web cluster, and is continued to from described The monitoring for carrying the new file content of file monitor server is notified, until including institute in the new file content State end mark.
2. according to the method described in claim 1, wherein,
If it is determined that the file acquisition, which is locally stored, asks asked file content, then the file content of the request is sent out The web cluster is delivered to, so that the file content of the request is forwarded to the client by the web cluster.
3. method according to claim 1 or 2, wherein, in the wait from file monitor server, carry because When the monitoring for the new file content that system file change is generated is notified, also include:
If the file monitor server monitoring is created, changes or deleted to the system file, taken by file generated Business device generates the new file content according to the system file for being created, changing or deleting and sent to the file monitor After server, receive the monitoring for carrying the new file content from the file monitor server and notify.
4. the method according to any one of claim 1-3, wherein, methods described also includes:
Network connection state as described in the file monitor server monitoring between client and the web cluster;
If when reading the new file content carried during the monitoring is notified, the file monitor server monitoring to institute State client send to the web cluster file acquisition request be disconnected, then interrupt the reading of the new file content, and Interrupt notification message is sent to the web cluster, so that the interrupt notification message is forwarded to the client by the web cluster End.
5. the method according to any one of claim 1-4, wherein, in the wait from file monitor server, When carrying the monitoring notice for changing the new file content generated because of system file, also include:
Whether the stand-by period for judging to wait the monitoring from file monitor server to notify exceedes preset time;
If it is not, then when receiving the monitoring notice, the new file content carried during the monitoring is notified is read, and Determine whether the end mark that file has terminated whether is included in the new file content;
If, it is determined that the request failure of this file acquisition, and send the notice that file acquisition request fails to the web cluster Message, so that the notification message of the request failure is forwarded to the client by the web cluster.
6. the method according to any one of claim 1-5, wherein, the file acquisition request includes following any one :
Hypertext transfer protocol requests, the request of Hyper text transfer security protocol and FTP request.
7. a kind of method for obtaining file, it is adaptable to file monitor server, including:
Monitoring system file change;
When monitoring the system file change, the new file content after change is received;
The new file content received is carried and sent in monitoring is notified to document processing server, with by the text Part processing server sends the new file content to web cluster, then by the web cluster by the new file Hold and send to client.
8. a kind of device for obtaining file, it is adaptable to document processing server, including:
First receiver module, suitable for receiving the request of the file acquisition from the client forwarded by web cluster;
Determining module, when being adapted to determine that the local file acquisition that is not stored with asks asked file content, wait comes from File monitor server, carry and notified because system file changes the monitoring of new file content generated;
Read module, suitable for when receiving the monitoring notice, reading the new file carried during the monitoring is notified Content, and determine whether the end mark that file has terminated whether is included in the new file content;
First sending module, if suitable for including the end mark in the new file content, the end mark is deleted, and File content after deletion is sent to the web cluster, so that the file content after the deletion is forwarded by the web cluster To the client;
If not including the end mark in the new file content, the new file content is forwarded to the web collection Group, so that the new file content is forwarded to the client by the web cluster, and continues to from file prison The monitoring for carrying the new file content of control server is notified, until terminating in the new file content comprising described Mark.
9. a kind of device for obtaining file, it is adaptable to file monitor server, including:
Monitoring module, suitable for monitoring system file change;
Second receiver module, suitable for when monitoring the system file change, receiving the new file content after change;
Second sending module, sends to file process suitable for the new file content received is carried in monitoring is notified Server, to be sent the new file content to web cluster, then by the web collection by the document processing server Group sends the new file content to client.
10. a kind of system for obtaining file, including client, web cluster, document processing server and file monitor server,
The client, is asked to the web cluster suitable for sending file acquisition;
The web cluster, suitable for receiving the file acquisition request, is forwarded to the document processing server;
The document processing server, suitable for receiving the file acquisition request forwarded by the web cluster, and is determined described When the file acquisition that is not stored with document processing server asks asked file content, wait from file prison The monitoring for controlling server is notified;
The file monitor server, suitable for monitoring system file change, receives the new file content after change, and will be described New file content is carried to be sent to the document processing server in monitoring is notified;
The document processing server, is further adapted for, when receiving the monitoring notice, reading what is carried during the monitoring is notified The new file content, and determine whether the end mark that file has terminated whether is included in the new file content; If comprising the end mark, deleting the end mark, and the file content after deletion is sent to the web cluster;If Not comprising the end mark, the new file content is forwarded to the web cluster, and continues to come from the file The monitoring for carrying the new file content of monitoring server is notified, until including the knot in the new file content Bundle flag;
The web cluster, is further adapted for the file content received from the document processing server being forwarded to the client.
CN201710079150.XA 2017-02-14 2017-02-14 Method, device and system for acquiring file Active CN106953892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710079150.XA CN106953892B (en) 2017-02-14 2017-02-14 Method, device and system for acquiring file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710079150.XA CN106953892B (en) 2017-02-14 2017-02-14 Method, device and system for acquiring file

Publications (2)

Publication Number Publication Date
CN106953892A true CN106953892A (en) 2017-07-14
CN106953892B CN106953892B (en) 2020-08-07

Family

ID=59465844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710079150.XA Active CN106953892B (en) 2017-02-14 2017-02-14 Method, device and system for acquiring file

Country Status (1)

Country Link
CN (1) CN106953892B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118253A (en) * 2009-12-30 2011-07-06 华为技术有限公司 Method, system and device for sending media file
CN102638731A (en) * 2011-12-13 2012-08-15 中兴通讯股份有限公司 Method and system for optimizing broadcasting-on-demand of user
CN102710966A (en) * 2012-06-13 2012-10-03 百视通网络电视技术发展有限责任公司 Video live broadcast method and system based on HTTP (Hyper Text Transport Protocol)
CN102780618A (en) * 2012-07-23 2012-11-14 华为技术有限公司 Method and device for data message transmission
CN103024456A (en) * 2011-09-27 2013-04-03 腾讯科技(深圳)有限公司 Online video playing method and video playing server
CN103297452A (en) * 2012-02-24 2013-09-11 北京对角巷科技发展有限公司 Method and system for publishing and broadcasting streaming media on Internet in live mode
CN103813185A (en) * 2014-01-26 2014-05-21 中兴通讯股份有限公司 Method, server and client for quickly distributing segmented programs
CN104104971A (en) * 2013-04-02 2014-10-15 腾讯科技(深圳)有限公司 Video file processing method and system
CN104301743A (en) * 2014-09-11 2015-01-21 华为技术有限公司 Method for transmitting video, gateway device and video transmitting system
US20150381685A1 (en) * 2006-12-06 2015-12-31 Carnegie Mellon University System and Method for Capturing, Editing, Searching, and Delivering Multi-Media Content with Local and Global Time
CN105812833A (en) * 2016-04-07 2016-07-27 网宿科技股份有限公司 File processing method and device
CN105893433A (en) * 2015-12-09 2016-08-24 乐视云计算有限公司 File storage method, file access method, file storage device and file access device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150381685A1 (en) * 2006-12-06 2015-12-31 Carnegie Mellon University System and Method for Capturing, Editing, Searching, and Delivering Multi-Media Content with Local and Global Time
CN102118253A (en) * 2009-12-30 2011-07-06 华为技术有限公司 Method, system and device for sending media file
CN103024456A (en) * 2011-09-27 2013-04-03 腾讯科技(深圳)有限公司 Online video playing method and video playing server
CN102638731A (en) * 2011-12-13 2012-08-15 中兴通讯股份有限公司 Method and system for optimizing broadcasting-on-demand of user
CN103297452A (en) * 2012-02-24 2013-09-11 北京对角巷科技发展有限公司 Method and system for publishing and broadcasting streaming media on Internet in live mode
CN102710966A (en) * 2012-06-13 2012-10-03 百视通网络电视技术发展有限责任公司 Video live broadcast method and system based on HTTP (Hyper Text Transport Protocol)
CN102780618A (en) * 2012-07-23 2012-11-14 华为技术有限公司 Method and device for data message transmission
CN104104971A (en) * 2013-04-02 2014-10-15 腾讯科技(深圳)有限公司 Video file processing method and system
CN103813185A (en) * 2014-01-26 2014-05-21 中兴通讯股份有限公司 Method, server and client for quickly distributing segmented programs
CN104301743A (en) * 2014-09-11 2015-01-21 华为技术有限公司 Method for transmitting video, gateway device and video transmitting system
CN105893433A (en) * 2015-12-09 2016-08-24 乐视云计算有限公司 File storage method, file access method, file storage device and file access device
CN105812833A (en) * 2016-04-07 2016-07-27 网宿科技股份有限公司 File processing method and device

Also Published As

Publication number Publication date
CN106953892B (en) 2020-08-07

Similar Documents

Publication Publication Date Title
EP3117590B1 (en) Computer system to support failover in an event stream processing system
US10230770B2 (en) Network proxy layer for policy-based application proxies
CN102355426B (en) Method for transmitting off-line file and system
US6675212B1 (en) Method and apparatus for efficient data browsing
JP2012503255A (en) System and method for automatic detection and adapted delivery of high-load media content
WO2007032549A1 (en) Content delivering method and system
CN107231402A (en) HTTP request processing method, apparatus and system
CN106534257A (en) Multi-level cluster-type construction multi-source safety log collection system and method
US8607233B2 (en) Web service management
EP1405224A1 (en) System and method for pushing data from an information source to a mobile communication device including transcoding of the data
CN103733568A (en) Stream processing using a client-server architecture
CN104065681B (en) The method and system of preview is carried out to the ciphered compressed packet in attachment
US10412055B2 (en) Enabling transmission encryption
KR20080090976A (en) Method for processing content and terminal thereof
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
CN113517985B (en) File data processing method and device, electronic equipment and computer readable medium
US20080059593A1 (en) Symbol-based message transmission method and system
US9621580B2 (en) Security aware email server
CN106953892A (en) A kind of method for obtaining file, apparatus and system
US11811894B2 (en) Reduction of data transmissions based on end-user context
CN109302435A (en) Message issuance method, device, system, server and computer readable storage medium
US20070124405A1 (en) Chat detection
CN112788076A (en) Method and device for deploying multi-service load
CN103914477B (en) A kind of data processing method and device
CN104980479B (en) A kind of file pre-push method, associated server and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100089 710, 7 / F, building 1, zone 1, No.3, Xisanhuan North Road, Haidian District, Beijing

Patentee after: Beijing time Ltd.

Address before: 100089 710, 7 / F, building 1, zone 1, No.3, Xisanhuan North Road, Haidian District, Beijing

Patentee before: BEIJING TIME Co.,Ltd.

CP01 Change in the name or title of a patent holder