Web page content block intelligent intercepting method
Technical field
The present invention relates to a kind of web page contents intercept method, particularly relate to a kind of intelligent intercepting method of Web page content block.
Background technology
The search engine of existing internet is browsed for convenience of the user in search procedure, when web page interlinkage is provided, also provides snapshots of web pages.When webpage link address can't use, can obtain the essential information of webpage by snapshots of web pages.Snapshots of web pages is exactly that the main contents piece of river webpage in advance intercepts and is kept in the specific server, this intercepting implementation is owing to almost intercepted all the elements piece of webpage, on the space of a whole page, do not carry out integration processing yet, need expend a large amount of system resource, cause the lifting of equipment cost.
Summary of the invention
The technical matters that the present invention solves is to have proposed a kind of Web page content block intercept method, can select the content piece of needs intercepting according to system requirements.The content piece of intercepting can also be edited, put in order the back new content of formation issues by service end.
Web page content block intercept method of the present invention comprises following treatment step:
1) client obtains by the page window of intercepting page;
2) client is constructed the intelligent intercepting control command and is sent to the described page window of step 1);
3) on page window, intercept and capture command messages, and carry out the intelligent intercepting operation of Web page content block according to the content of command messages, described intelligent intercepting operation is to indicate minimum intelligently or optimal content of pages piece intercepts according to user's mouse pointer position.
Preferably, also comprise following processing procedure after the described step 3): the content piece of intercepting is transferred to service end by data channel, and issues by service end.
Preferably, the content piece of intercepting also comprised following processing procedure before being transferred to service end: the content piece of intercepting is edited and put in order, and form fresh content.
Preferably, the client in the step 1) can obtain page window in the following ways: by loading tool bar plug-in unit in client browser, obtain the interface of the client site of browser by this plug-in unit, thereby obtain page window.
Preferably, the client in the step 1) can also obtain page window in the following ways: client is by the long-range browser process that is injected into, and obtains page window in browser process.
Preferably, described intelligent intercepting comprises one or more in the following interception way: intercepting content, intercepting picture, rolling sectional drawing, screenshotss.
Preferably, described content piece comprises: one or more among literal, picture, video, sound and the flash.
Because Web page content block intercept method of the present invention is by intercepting the content piece to the page window transmitting control commands of intercepting and capturing, the appointed information on the intercepting page comprises: literal, picture, video etc. as required.Content piece by will intercepting carries out secondary processing in addition, forms new content, and feasible have good page effect when issuing by service end, makes things convenient for the user to browse.Intercept and capture page window among the present invention and adopt the implementation that plug-in unit or long-range injection are installed to be suitable for the needs of different application environment, have higher flexibility.
Description of drawings
Fig. 1 is the initialization flowchart that the plug-in unit mode is installed in the intercept method preferred embodiment of the present invention;
Fig. 2 is the initialization flowchart of intercept method preferred embodiment medium-long range injection mode of the present invention;
Fig. 3 is an intelligent intercepting method process flow diagram in the intercept method preferred embodiment of the present invention;
Fig. 4 is a service end processing flow chart in the intercept method preferred embodiment of the present invention.
Embodiment
Also the present invention is described in detail in conjunction with the accompanying drawings below by specific embodiment.
Intercept method of the present invention is provided with server host (hereinafter to be referred as service end) part and client computer (hereinafter to be referred as client) part on the internet, and the intercepting of realization is handled and comprised content acquisition, editor and transmission etc.The collection of client is by optionally gathering the arbitrary content piece in the highlighted sign webpage of intelligence, further edit then and put in order, be transferred to directly issue in the service end by proprietary data channel after regenerating fresh content, other page viewers can use browser optionally to watch the content of this part new arrangement.Its processing procedure mainly comprises following process: client obtains by the page window of intercepting page; Client structure intelligent intercepting control command also sends to page window; On page window, intercept and capture command messages, and carry out the intelligent intercepting operation of Web page content block according to the content of command messages.The content piece of intercepting is transferred to service end by data channel, and issues by service end.Wherein client obtains page window two kinds of implementations: the one, be carried in the toolbar on the browser, and another part is a client independently; Both functions are identical, can both finish a certain content of pages piece is intercepted content, and the intercepting picture, the rolling sectional drawing, and screen carried out sectional drawing.But the two is complete independence, and one of them does not rely on another part, and the user can be according to hobby selection a kind of or whole installation wherein.As shown in Figure 1, the user is when using first kind of mode, loaded the tool bar plug-in unit by browser, system obtains the interface of the client site of browser in this process, obtain the page window of browser, thereby the content piece of searching needs from this window can be intelligent saves as it text or picture or edits and upload onto the server first-class subsequent treatment.When using the second way as shown in Figure 2, client is injected in the browser process by long-range, in the process of browser, obtain corresponding page window, on window, intercept and capture command messages, and long-range client is passed through this window transmitting control commands, control the function of carrying out the content piece and search, intercept page, picture such as edit and upload at follow-up processing logic.
Intelligent intercepting method flow process as shown in Figure 3 comprises two sub-processes: client is initiated intelligent intercepting order flow process, searches, edits and preserve treatment scheme.In the content acquisition process, can be according to the highlighted intelligently minimum or optimal content of pages piece that to comprise mouse pointer position that indicates of user's mouse pointer position, highlighted content piece of while is followed moving of mouse pointer and can dynamically be changed.Can select highlighted content piece by the mode of clicking the mouse left button or import other order, to be further processed.Collectable content can be to appear on the webpage literal and media resource arbitrarily in the intercept method of the present invention, and the compound document that forms of various combination of resources.The type of resource includes but not limited to literal, picture, video, sound and flash etc.The default layout of gathering content is consistent with the layout of being gathered page appropriate section content, but the user also can directly edit and put in order the part or the integral body of gathering content.In the gatherer process, the content piece of selecting can also be saved as picture.The target of gathering is not limited to a browser window, and content and picture that the screen area outside a plurality of browser windows or window collects can concentrate on it in the same window zone and edit and put in order.When the target window of gathering is not same browser window, can search the window of handling editor when cutting figure, if do not have this window then create this editor,, so solved the problem of same editing and processing because this system is unique.Server process flow process as shown in Figure 4 can arrive server host by the content of proprietary data channel transmission arrangement, quickens and the raising security.Server host is after content acquisition and editor, and these contents are issued in classification automatically.