Summary of the invention
Technical matters to be solved by this invention provides imperfect picture information processing method and apparatus in a kind of webpage; Can't the imperfect picture information in the web page contents be carried out throwing in to the teenager after specific aim is handled to the teenager to solve in the prior art again, can't effectively handle the problem of imperfect picture information.
In order to address the above problem, the invention discloses imperfect picture information processing method in a kind of webpage, comprising:
Send web-page requests to server, and obtain info web from said server;
Resolve the corresponding document object model tree of said info web;
Search the imperfect picture information of each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
According to said positional information processing is replaced or covered to said imperfect picture information;
Document object model tree after perhaps covering is handled with said replacement is played up and is shown.
Preferably, according to said positional information said imperfect picture information being covered processing comprises:
Generate piece level element according to said positional information and cover said imperfect picture information;
Then further said with said replacement or cover that document object model tree after handling is played up and demonstration comprises:
The piece level element of said generation and said document object model tree are played up and shown.
Preferably, according to said positional information said imperfect picture information being replaced processing comprises:
According to individualized content and the said positional information that the user presets, the imperfect picture information of relevant position in the document object model tree is replaced with said user's individualized content.
Preferably, said imperfect picture information comprises:
At least a in porny, the violence picture.
Preferably, said step of searching the imperfect picture information of each node in the said document object model tree comprises:
Begin each node of traversal DOM Document Object Model from the root node of DOM Document Object Model;
Obtain pictorial information in each node, analyze the content of this pictorial information, determine the imperfect picture information in the pictorial information of obtaining.
Preferably, the step of the said definite positional information of said imperfect picture information in document object model tree comprises:
According to the imperfect picture information that finds, confirm the ID of this picture in document object model tree;
Confirm the node of this imperfect picture information in document object model tree according to said Image ID.
Preferably, the said positional information of said foundation generates the step that piece level element covers said imperfect picture information and comprises:
Generate at least one piece level element of arranging with respect to the node at said imperfect picture information place;
This piece level element covers the zone of continuous specified pixel in the said imperfect picture information content.
Preferably, at least one piece level element of arranging with respect to the node at said imperfect picture information place of said generation, the step that this piece level element covers the zone of continuous specified pixel in the said imperfect picture information content comprises:
Obtain the Pixel Dimensions of said imperfect picture information;
Obtain the size at least one continuous specified pixel zone in the said imperfect picture information;
Confirm the relative position information that said specified pixel is regional according to the size in specified pixel zone and the Pixel Dimensions of imperfect picture information with respect to imperfect picture information;
According to said relative position information, generate at least one piece level element of arranging with respect to the node at said imperfect picture information place, its height, wide parameter are corresponding height, the wide parameter in said continuous specified pixel zone.
Preferably, the content of said this pictorial information of analysis, the step that determines the imperfect picture information in the pictorial information of obtaining comprises:
Judge in the content of said pictorial information that whether the distribution proportion of specified pixel is greater than threshold value continuously;
If greater than, judge that then said pictorial information is an imperfect picture information.
Preferably, said specified pixel is at least a in yellowish pink type, color class pixel; Or
Said specified pixel is user configured.
Preferably, said threshold value is user configured.
Preferably, the content of said this pictorial information of analysis, the step that determines the imperfect picture information in the pictorial information of obtaining comprises:
Obtain the eigenwert of photo current information;
Said eigenwert is sent to the high in the clouds server, and carries out matching ratio with the eigenwert of the imperfect picture information of high in the clouds server stores;
When mating last time, judge that then photo current information is imperfect picture information.
Preferably, the content of said this pictorial information of analysis, the step that determines the imperfect picture information in the pictorial information of obtaining comprises:
According to the content of said pictorial information, obtain the eigenwert of this pictorial information;
The eigenwert of the imperfect picture information of said eigenwert and browser side storage is carried out matching ratio;
When mating last time, judge that then photo current information is imperfect picture information.
Accordingly, the invention also discloses imperfect picture information processing device in a kind of webpage, comprising:
The info web acquisition module is suitable for sending web-page requests to server, and obtains info web from said server;
Parsing module is suitable for resolving the corresponding document object model tree of said info web;
Imperfect picture information analysis module, the imperfect picture information that is suitable for searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
The imperfect picture message processing module is suitable for according to said positional information processing is replaced or covered to said imperfect picture information;
Rendering module is suitable for said replacement or the document object model tree after cover handling is played up and shown.
Preferably, said imperfect picture message processing module comprises:
Piece level element generation module is suitable for generating piece level element according to said positional information and covers said imperfect picture information;
Then further said rendering module comprises:
First rendering module is suitable for the piece level element of said generation and said document object model tree are played up and shown.
Preferably, said imperfect picture message processing module comprises:
The replacement module is suitable for the individualized content and the said positional information that preset according to the user, the imperfect picture information of relevant position in the document object model tree is replaced with said user's individualized content.
Preferably, said imperfect picture information comprises:
At least a in porny, the violence picture.
Preferably, said imperfect picture information analysis module comprises:
Spider module is suitable for beginning from the root node of DOM Document Object Model, each node of traversal DOM Document Object Model;
Obtain analysis module, be suitable for obtaining pictorial information in each node, analyze the content of this pictorial information, determine the imperfect picture information in the pictorial information of obtaining.
Preferably, said imperfect picture information analysis module comprises:
The ID determination module is suitable for confirming the ID of this picture in document object model tree according to the imperfect picture information that finds;
The node determination module is suitable for confirming the node of this imperfect picture information in document object model tree according to said Image ID.
Preferably, said level element generation module comprises:
First level element generation module is suitable for generating at least one piece level element of arranging with respect to the node at said imperfect picture information place;
This piece level element covers the zone of continuous specified pixel in the said imperfect picture information content.
Preferably, said first level element generation module comprises:
The first size acquisition module is suitable for obtaining the Pixel Dimensions of said imperfect picture information;
The second size acquisition module is suitable for obtaining the size at least one continuous specified pixel zone in the said imperfect picture information;
The relative position information determination module is suitable for confirming the relative position information with respect to imperfect picture information that said specified pixel is regional according to the size in specified pixel zone and the Pixel Dimensions of imperfect picture information;
The 3rd level element generation module is suitable for according to said relative position information, generates at least one piece level element of arranging with respect to the node at said imperfect picture information place, and its height, wide parameter are corresponding height, the wide parameter in said continuous specified pixel zone.
Preferably, said imperfect picture information analysis module comprises:
First judge module is suitable for judging in the content of said pictorial information that whether the distribution proportion of specified pixel is greater than threshold value continuously;
If greater than, judge that then said pictorial information is an imperfect picture information.
Preferably, said specified pixel is at least a in yellowish pink type, color class pixel; Or
Said specified pixel is user configured.
Preferably, said threshold value is user configured.
Preferably, said imperfect picture information analysis module comprises:
The first eigenwert acquisition module is suitable for obtaining the eigenwert of photo current information;
The eigenwert sending module is suitable for said eigenwert is sent to the high in the clouds server, and carries out matching ratio with the eigenwert of the imperfect picture information of high in the clouds server stores;
Second judge module is suitable for judging then that when mating last time photo current information is imperfect picture information.
Preferably, said imperfect picture information analysis module comprises:
The second eigenwert acquisition module is suitable for the content according to said pictorial information, obtains the eigenwert of this pictorial information;
The second eigenwert comparison module is suitable for the eigenwert of the imperfect picture information of said eigenwert and browser side or server side storage is carried out matching ratio;
The 3rd judge module when mating last time, judges that then photo current information is imperfect picture information.
Compared with prior art, the present invention includes following advantage:
The present invention is through analyzing the picture in the dom tree; Obtain imperfect picture information and positional information thereof in the dom tree; According to said positional information processing is replaced or covered to imperfect picture information then, the document object model tree after perhaps covering is handled with said replacement is then played up and is shown.Can effectively handle in the browser side imperfect picture; Especially can can't unify to handle to server side; And belong to the picture of imperfect picture for a certain specific crowd (such as the teenager); Can carry out specific aim to this specific crowd and handle, avoid these pictorial informations in the network the misleading and the unhealthy influence of this specific crowd.
Embodiment
For make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing and embodiment the present invention done further detailed explanation.
Introduce according to the invention a kind of below in detail through embodiment.
With reference to Fig. 1, show the schematic flow sheet of imperfect picture information processing method embodiment one in a kind of webpage of the present invention, specifically can comprise:
Step 110 is sent web-page requests to server, and obtains info web from said server;
The major function of browser is that the web resource (being info web) that the user selects is shown; It need be from the server requests resource; And it is presented in the browser window, the form of resource is HTML (HTML, Hypertext Markup Language) normally.The user specifies the position of institute's request resource with URI (Uniform Resource Identifier unified resource identifier).Be that the user imports URL in browser address bar, browser then generates web-page requests based on said URL, is sent to the URL corresponding server, downloaded resources, the i.e. info web of download request.
Step 120 is resolved the corresponding document object model tree of said info web;
After browser downloads obtains info web, then resolve the corresponding dom tree of said info web, in reality, dom tree is rendered as info webs such as html document the tree construction (node tree) that has element, attribute and text.
DOM is an interface a kind of and platform and language independent, its permission program and script dynamic access and content, structure and the type of revising document.It has defined a series of object and method the node of dom tree has been carried out various random operations:
● the Document object: as the high node of tree, Document to as if inlet that entire document is operated.
● Element and Attr object: these node objects all are a part of mappings of web document, and the deciding grade and level level of node has reflected the structure of document just.
● the Text object: as the child node of Element and Attr object, the Text object representation content of text of element or attribute.The Text node no longer comprises any child node.
All nodes in the dom tree are all inherited from node object; Node object has defined some the most basic attribute and methods; Utilize these methods can realize, simultaneously, can also learn title, the value of node and judge its type according to attribute to traversal of tree.
So the present invention then based on the resolution rules of dom tree with info web, info web is a source code in the reality, resolves to dom tree.
Step 130, the imperfect picture information of searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
Said in the present invention imperfect picture information comprises: at least a in porny, the violence picture.
After abovementioned steps obtains dom tree, from dom tree, search pictorial information, and judge whether pictorial information is bad image information.
Preferred said step of searching the imperfect picture information of each node in the said document object model tree comprises:
Step S11 begins from the root node of DOM Document Object Model, each node of traversal DOM Document Object Model;
Step S12 obtains pictorial information in each node, analyzes the content of this pictorial information, determines the imperfect picture information in the pictorial information of obtaining.
Dom tree is a tree structure, for heavy do not leak search all pictorial informations of dom tree, can begin from the root node of dom tree, carry out the recurrence traversal, obtain pictorial information in each node; Analyze the content of this pictorial information then, determine the imperfect picture information in the pictorial information of obtaining.
Wherein, there is root node A in the recurrence traversal method of dom tree such as dom tree, and root node A exists child node A1, A2; Node A1 exists child node A11, A12; Node A11 exists child node A111, A112.During traversal, for each child node of a node, generally child node travels through from left to right; Such as the child node A2 that has selected root node A; Traveled through A2 and found that there is not child node in A2, returned root node A so, according to corresponding relation traversal child node A1 root node A and child node; Travel through the child node A12 of node A1 then, find that A12 does not have child node, return A1, from A1 traversal child node A11, by that analogy.
Preferably, the content of said this pictorial information of analysis, the step that determines the imperfect picture information in the pictorial information of obtaining comprises:
Step S121 judges in the content of said pictorial information that whether the distribution proportion of specified pixel is greater than threshold value continuously;
Wherein (the rgb color pattern is a kind of color standard of industry member such as RGB; Red (R), green (G), blue (B) three Color Channels) be the interior pixel of human body skin color scope, whether the pixel distribution ratio of judging human body skin in the content of pictorial information is greater than threshold value.
Wherein, said specified pixel is at least a in yellowish pink type, color class pixel; Or said specified pixel is user configured.
Be that said specified pixel can be human body skin class pixel, the color class pixel of blood is perhaps by user configured pixel.
Step S122, if greater than, judge that then said pictorial information is an imperfect picture information.
If aforementioned human skin pixels distribution proportion, judges then that said pictorial information is an imperfect picture information greater than threshold value.
Wherein, said threshold value is user configured.Be that said threshold value can be disposed by the user.
Preferably, the content of said this pictorial information of analysis, the step that determines the imperfect picture information in the pictorial information of obtaining comprises:
Step S21 obtains the eigenwert of photo current information;
In the present invention, can imperfect picture information or its eigenwert that each user side is found be uploaded to the high in the clouds server, beyond the clouds the eigenwert of server stores imperfect picture information.Under the initial situation; Find that the user process of imperfect picture information can judge whether pictorial information is imperfect picture information by step S121 and step S122; If then its eigenwert is uploaded to the high in the clouds server; So that direct use characteristic value was judged when follow-up other users used, reduce the time of picture pixel analysis.Acquisition collected and analyzed to the imperfect picture information of high in the clouds server stores also can to imperfect picture information by high in the clouds server itself.Preferred situation is, the high in the clouds server combines each user side to implement to upgrade the characteristic information storehouse in the server of high in the clouds, to new appearance of user side and the eigenwert of the imperfect picture information that does not store in high in the clouds is uploaded to the high in the clouds server and stores.
So, this step can be obtained the eigenwert of photo current information, such as MD5 value etc.
Step S22 is sent to the high in the clouds server with said eigenwert, and carries out matching ratio with the eigenwert of the imperfect picture information of high in the clouds server stores;
After the eigenwert that gets access to photo current information, eigenwert is sent to the high in the clouds server, carry out matching ratio with the eigenwert that obtains and be stored to high in the clouds through aforementioned process.
Step S23 when mating last time, judges that then photo current information is imperfect picture information.
When mating last time, explain that photo current information is imperfect picture information, then can get into replacement or overwrite procedure.
When mating last time, then continue to judge through other modes whether photo current information is imperfect picture information, such as passing through step S121 and step S122.
Preferably, the content of said this pictorial information of analysis, the step that determines the imperfect picture information in the pictorial information of obtaining comprises:
Step S31 according to the content of said pictorial information, obtains the eigenwert of this pictorial information;
Step S32 carries out matching ratio with the eigenwert of the imperfect picture information of said eigenwert and browser side storage;
Step S33 when mating last time, judges that then photo current information is imperfect picture information.
The content of this preferred said this pictorial information of analysis; Determine obtain in the step of the imperfect picture information in the pictorial information; Can be with the eigenwert of the imperfect picture information of high in the clouds server stores synchronously to the browser side, the pictorial information that obtains for the browser side then then carries out matching ratio with its eigenwert and local characteristic information; When mating last time, judge that then photo current information is imperfect picture information; When not mating last time, also can judge whether photo current information is imperfect picture information through step S121 and step S122.
Preferably, the step of the said definite positional information of said imperfect picture information in document object model tree comprises:
Step S41 according to the imperfect picture information that finds, confirms the ID of this picture in document object model tree;
Step S42 confirms the node of this imperfect picture information in document object model tree according to said Image ID.
In embodiments of the present invention; After can each the imperfect picture information in the dom tree being extracted, judge again whether it is imperfect picture information, so when extracting; Then can be this picture distribute its corresponding in dom tree the ID of relevant position, this ID carries out corresponding with the node of dom tree.When judging that certain picture is imperfect picture information, then, confirm the ID of this picture in document object model tree so, confirm the node of this imperfect picture information in document object model tree according to said Image ID again according to the imperfect picture information that finds.
Processing is replaced or covered to step 140 according to said positional information with said imperfect picture information;
In confirming dom tree, after imperfect picture information and the positional information thereof, can processing replaced or covered to said imperfect picture information according to said positional information.
Step 150, the document object model tree after perhaps covering is handled with said replacement is played up and is shown.
Then can be with said replacement or the dom tree after cover handling play up and show.
With reference to Fig. 2, the schematic flow sheet that it shows imperfect picture information processing method embodiment two in the preferred a kind of webpage of the present invention specifically can comprise:
Step 210 is sent web-page requests to server, and obtains info web from said server;
Step 220 is resolved the corresponding document object model tree of said info web;
Step 230, the imperfect picture information of searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
Step 240 generates piece level element according to said positional information and covers said imperfect picture information;
Step 250 is played up and is shown the piece level element of said generation and said document object model tree.
Wherein step 110 is similar with step 130 among step 210 to step 230 and Fig. 1, does not add detailed description at this.
For step 240, generate piece level element according to said positional information and cover said imperfect picture information;
This step can generate piece level element in the relevant position and cover said imperfect picture information after knowing the position of imperfect picture information in dom tree.Such as generating a mask layer that is covered in the corresponding BODY structure of dom tree; Node location in the corresponding imperfect picture information of mask layer generates at least one phase piece level element; Mosaic such as heterogeneous level element composition; Be covered on the said imperfect picture information the then conductively-closed of then said imperfect picture information.
Preferably, the said positional information of said foundation generates the step that piece level element covers said imperfect picture information and comprises:
Step S51 generates at least one piece level element of arranging with respect to the node at said imperfect picture information place;
Step S52, this piece level element cover the zone of continuous specified pixel in the said imperfect picture information content.
If such as the piece level element that generates white phase; Can adopt a plurality of white blocks level elements to cover the zone of continuous specified pixel in the said imperfect picture information content so; Be that the zone that bad pixel exists in the imperfect picture information is covered by white blocks level element, its effect that has covered is that coated region is a white.When using heterogeneous level element, its effect that has covered can be mosaic effect.
Preferably, at least one piece level element of arranging with respect to the node at said imperfect picture information place of said generation, the step that this piece level element covers the zone of continuous specified pixel in the said imperfect picture information content comprises:
Step S61 obtains the Pixel Dimensions of said imperfect picture information;
At first obtain the Pixel Dimensions in the corresponding display structure of imperfect picture information in the dom tree, promptly whole picture is at the display position and the wide height of display page.
Step S62 obtains the size at least one continuous specified pixel zone in the said imperfect picture information;
Can begin from the picture upper left corner then, obtain the size at least one continuous specified pixel zone in the said imperfect picture information.Pixel such as the pixel region of specifying the 5*5 size.
Step S63 confirms the relative position information with respect to imperfect picture information that said specified pixel is regional according to the size in specified pixel zone and the Pixel Dimensions of imperfect picture information;
Then according to the size in the size of source imperfect picture and specified pixel zone with it position when selected, confirm the relative position information with respect to imperfect picture information in said specified pixel zone; Such as being initial point with the former imperfect picture lower left corner; From initial point upwards be the ordinate forward; From initial point is to the right the horizontal ordinate forward; The corresponding point of each pixel so can be when obtaining the size at least one continuous specified pixel zone in the said imperfect picture information, and the position that obtains the specified pixel zone and size confirm cun to confirm the relative position information with respect to imperfect picture information that said specified pixel is regional.
Step S64 according to said relative position information, generates at least one piece level element of arranging with respect to the node at said imperfect picture information place, and its height, wide parameter are corresponding height, the wide parameter in said continuous specified pixel zone.
Again according to the regional relative position information of each specified pixel; Generate at least one piece level element of arranging with respect to the node at said imperfect picture information place; Piece level element such as the mosaic form is covered on the said specified pixel zone, can avoid bad pixel to be revealed.Piece level element wherein, its height, wide parameter are corresponding height, the wide parameter in said continuous specified pixel zone.
Step S61 can cover to the bad pixel in the imperfect picture information to step S64, does not cover the normal pixel part, such as covering bloody part.
For step 250, the piece level element of said generation and said document object model tree are played up and shown.The step 150 of its corresponding diagram 1.
Cover on the said imperfect picture information because generated aforesaid level element, can play up the piece level element and the said document object model tree of said generation so, show again after playing up.
With reference to Fig. 3, the schematic flow sheet that it shows imperfect picture information processing method embodiment three in the preferred a kind of webpage of the present invention specifically can comprise:
Step 310 is sent web-page requests to server, and obtains info web from said server;
Step 320 is resolved the corresponding document object model tree of said info web;
Step 330, the imperfect picture information of searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
Step 340 according to individualized content and the said positional information that the user presets, replaces with the imperfect picture information of relevant position in the document object model tree said user's individualized content;
Step 350, the document object model tree after said replacement handled is played up and is shown.
Wherein step 110 does not add detailed description with step 130 is similar at this among step 310 to step 330 and Fig. 1.
For step 340,, the imperfect picture information of relevant position in the document object model tree is replaced with said user's individualized content according to individualized content and the said positional information that the user presets;
This step then is the picture that imperfect picture information is replaced with the health of user's setting in dom tree.This step can replace with the user individual content according to user's request, such as imperfect picture information is replaced with the aircraft picture.
Preferably, comprise step D11, obtain said imperfect picture information font size in the corresponding display structure in former document object model tree;
The respective attributes that each node all exists in the former dom tree also comprises the size in its corresponding display structure; Such as position, wide, the high equidimension in the display interface of place; So in order not change the display structure of former info web; Need the individualized content (than the figure picture) of replacement be adjusted into and the identical size of former imperfect picture information size so, when playing up, not change the rendering result of dom tree.
The corresponding display structure of dom tree is by the control of corresponding C SS layout architecture body in reality, and present embodiment can extract corresponding imperfect picture information size from the position the corresponding CSS layout architecture body of target text information place node so.
Step D12 is the font size of said imperfect picture information with the adjusted size of said individualized content.
For step 350, the document object model tree after said replacement handled is played up and is shown.The step 150 of its corresponding diagram 1.
According to the size of the aforementioned imperfect picture information that obtains, be the font size of said imperfect picture information with the adjusted size of said individualized content.Can guarantee to play up the result and the former dom tree that obtain and play up coming to the same thing of obtaining, promptly not change the display structure of former info web.
With reference to Fig. 4, the structural representation that it shows imperfect picture information processing device embodiment one in a kind of webpage of the present invention comprises:
Info web acquisition module 410 is suitable for sending web-page requests to server, and obtains info web from said server;
Parsing module 420 is suitable for resolving the corresponding document object model tree of said info web;
Imperfect picture information analysis module 430, the imperfect picture information that is suitable for searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
Imperfect picture message processing module 440 is suitable for according to said positional information processing is replaced or covered to said imperfect picture information;
Rendering module 450 is suitable for said replacement or the document object model tree after cover handling is played up and shown.
Wherein, preferred, with reference to Fig. 5, said imperfect picture information analysis module comprises:
Spider module S411 is suitable for beginning from the root node of DOM Document Object Model, each node of traversal DOM Document Object Model;
Obtain analysis module S412, be suitable for obtaining pictorial information in each node, analyze the content of this pictorial information, determine the imperfect picture information in the pictorial information of obtaining.
Preferably, with reference to Fig. 6, said imperfect picture information analysis module comprises:
ID determination module S421 is suitable for confirming the ID of this picture in document object model tree according to the imperfect picture information that finds;
Node determination module S422 is suitable for confirming the node of this imperfect picture information in document object model tree according to said Image ID.
Preferably, with reference to Fig. 7, said imperfect picture information analysis module comprises:
The first judge module S431 is suitable for judging in the content of said pictorial information that whether the distribution proportion of specified pixel is greater than threshold value continuously;
If greater than, judge that then said pictorial information is an imperfect picture information.
Preferably, with reference to Fig. 8, said imperfect picture information analysis module comprises:
The first eigenwert acquisition module S441 is suitable for obtaining the eigenwert of photo current information;
Eigenwert sending module S442 is suitable for said eigenwert is sent to the high in the clouds server, and carries out matching ratio with the eigenwert of the imperfect picture information of high in the clouds server stores;
The second judge module S443 is suitable for judging then that when mating last time photo current information is imperfect picture information.
Preferably, with reference to Fig. 9, said imperfect picture information analysis module comprises:
The second eigenwert acquisition module S451 is suitable for the content according to said pictorial information, obtains the eigenwert of this pictorial information;
The second eigenwert comparison module S452,, be suitable for the eigenwert of the imperfect picture information of said eigenwert and browser side or server side storage is carried out matching ratio;
The 3rd judge module S453 when mating last time, judges that then photo current information is imperfect picture information.
Wherein, said imperfect picture information comprises: at least a in porny, the violence picture.
Wherein, said specified pixel is at least a in yellowish pink type, color class pixel; Or said specified pixel is user configured.
Wherein, said threshold value is user configured.
With reference to Figure 10, the structural representation that it shows imperfect picture information processing device embodiment two in a kind of webpage of the present invention comprises:
Info web acquisition module 510 is suitable for sending web-page requests to server, and obtains info web from said server;
Parsing module 520 is suitable for resolving the corresponding document object model tree of said info web;
Imperfect picture information analysis module 530, the imperfect picture information that is suitable for searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
Piece level element generation module 540 is suitable for generating piece level element according to said positional information and covers said imperfect picture information;
First rendering module 550 is suitable for the piece level element of said generation and said document object model tree are played up and shown.
Preferably, with reference to Figure 11, said level element generation module comprises:
First level element generation module S511 is suitable for generating at least one piece level element of arranging with respect to the node at said imperfect picture information place;
This piece level element covers the zone of continuous specified pixel in the said imperfect picture information content.
Wherein, with reference to Figure 12, said first level element generation module comprises:
First size acquisition module S521 is suitable for obtaining the Pixel Dimensions of said imperfect picture information;
The second size acquisition module S522 is suitable for obtaining the size at least one continuous specified pixel zone in the said imperfect picture information;
Relative position information determination module S523 is suitable for confirming the relative position information with respect to imperfect picture information that said specified pixel is regional according to the size in specified pixel zone and the Pixel Dimensions of imperfect picture information;
The 3rd level element generation module S524; Be suitable for according to said relative position information; Generate at least one piece level element of arranging with respect to the node at said imperfect picture information place, its height, wide parameter are corresponding height, the wide parameter in said continuous specified pixel zone.
With reference to Figure 13, the structural representation that it shows imperfect picture information processing device embodiment three in a kind of webpage of the present invention comprises:
Info web acquisition module 610 is suitable for sending web-page requests to server, and obtains info web from said server;
Parsing module 620 is suitable for resolving the corresponding document object model tree of said info web;
Imperfect picture information analysis module 630, the imperfect picture information that is suitable for searching each node in the said document object model tree, and confirm the positional information of said imperfect picture information in document object model tree;
Replacement module 640 is suitable for the individualized content and the said positional information that preset according to the user, the imperfect picture information of relevant position in the document object model tree is replaced with said user's individualized content.
Second rendering module 550, the document object model tree after being suitable for said replacement handled is played up and is shown.
For aforesaid each method embodiment; For simple description; So it all is expressed as a series of combination of actions, but those skilled in the art should know that the embodiment of the invention does not receive the restriction of described sequence of movement; Because according to the embodiment of the invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the embodiment of the invention is necessary.
For device embodiment, because it is similar basically with method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.
At last; Also need to prove; In this article; Relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint relation or the order that has any this reality between these entities or the operation.
Those skilled in the art should understand that embodiments of the invention can be provided as method, device or computer program.Therefore, the present invention can adopt the form of the embodiment of complete hardware embodiment, complete software implementation example or combination software and hardware aspect.And the present invention can be employed in the form that one or more computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) that wherein include computer usable program code go up the computer program of implementing.
Method among the invention described above embodiment, device are suitable in diverse network or the client environment; For example can be implemented in the computer equipment such as PC device, perhaps can be implemented in such as in other portable electric appts such as mobile phone, mobile communication equipment, PDA(Personal Digital Assistant) or the non-portable electric appts.What therefore those skilled in the art will be clear and definite is; Protection scope of the present invention is not limited to PC and goes up replacement function and covering function in the running browser, only is that replacement function and covering function that adopted PC to go up in the running browser are in embodiments of the present invention described from the succinct and convenient of description.
The present invention is that reference is described according to the process flow diagram and/or the block scheme of method, equipment (device) and the computer program of the embodiment of the invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block scheme and/or square frame and process flow diagram and/or the block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out through the processor of computing machine or other programmable data processing device produce to be used for the device of the function that is implemented in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in ability vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work; Make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device; Make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby the instruction of on computing machine or other programmable devices, carrying out is provided for being implemented in the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic inventive concept could of cicada, then can make other change and modification to these embodiment.So accompanying claims is intended to be interpreted as all changes and the modification that comprises preferred embodiment and fall into the scope of the invention.
More than to imperfect picture information processing method and apparatus in a kind of webpage provided by the present invention; Carried out detailed introduction; Used concrete example among this paper principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.