CN105260384A - Method and device for recognizing visible picture in webpage - Google Patents
Method and device for recognizing visible picture in webpage Download PDFInfo
- Publication number
- CN105260384A CN105260384A CN201510572012.6A CN201510572012A CN105260384A CN 105260384 A CN105260384 A CN 105260384A CN 201510572012 A CN201510572012 A CN 201510572012A CN 105260384 A CN105260384 A CN 105260384A
- Authority
- CN
- China
- Prior art keywords
- picture
- webpage
- mouse pointer
- positional information
- page elements
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method for recognizing a visible picture in a webpage. The method comprises the following steps of obtaining position information of a mouse pointer on a webpage and a page element, corresponding to the position information of the mouse pointer, in the webpage; when the page element is a picture label and a first picture corresponding to the page element is the visible picture, determining the first picture to be the visible picture, corresponding to the position information of the mouse pointer, in the webpage; when the page element is a first type of label, traversing all elements included by ancestral elements of the page element layer by layer; when one element which is the picture label is found and the position information of the mouse pointer is positioned in the visible region range of the element, determining a second picture corresponding to the element to be the visible picture, corresponding to the position information of the mouse pointer, in the webpage; and recognizing the real picture operated by a user in such a way.
Description
Technical field
The present invention relates to Internet technical field, being specifically related to a kind of method for identifying visible picture in webpage and device.
Background technology
Network information resource refers to the summation by the utilizable various information resources of computer network, is the resource information of the various ways such as text, picture, audio frequency, video shown by modes such as network service, computing machine or terminals with spreadsheet format.The network user can mutual transport network information at any time and any place, realizes network information resouces' sharing.
Picture is as can the network information resource of presenting information intuitively, be used in more and more widely in webpage, and derive the network application much utilizing picture, but inventor finds because structure of web page is complicated, such as picture may be coated with hyaline layer, picture such as, there is A label, cause computing machine to be sometimes difficult to accurately identify the picture of specified location display.Therefore, the picture how accurately identifying specified location display is a technical matters in the urgent need to address, only has the picture accurately identifying specified location display, follow-uply could carry out related application based on this picture.
Summary of the invention
In view of the above problems, propose the present invention in case provide a kind of overcome the problems referred to above or solve the problem at least in part for identifying the device of visible picture in webpage and corresponding for identifying the method for visible picture in webpage.
According to one aspect of the present invention, providing a kind of method for identifying visible picture in webpage, comprising:
The page elements of positional information correspondence in webpage of the positional information and mouse pointer that obtain the mouse pointer on webpage;
When page elements is picture tag and the first picture of its correspondence is visible picture, then determine that the first picture is the visible picture of positional information correspondence on webpage of mouse pointer;
When page elements is first kind label, each element that the ancestors' element then successively traveling through page elements comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer.
In the present embodiment, each element that the ancestors' element successively traveling through page elements comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer, specifically comprise:
Step a1: judge whether page elements corresponding in webpage exists last layer element, is obtain the last layer element of page elements, it can be used as ancestors' element of page elements, obtain each element in ancestors' element of page elements, perform step a2; Otherwise terminate ancestors' element of traversal page elements;
Step a2: judge whether each element in ancestors' element of page elements has at least one to be picture tag, is perform step a4; Otherwise perform step a3;
Step a3: the last layer element obtaining ancestors' element of page elements, with ancestors' element of its refresh page surface element, obtains each element in ancestors' element of the page elements after upgrading, performs step a2;
Step a4: the visibility region scope obtaining each picture tag in ancestors' element of page elements, until the visibility region scope finding the positional information of mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
In the present embodiment, successively travel through and specifically successively travel through according to the tree structure in web page source code.
Optionally, in the present embodiment, also comprise:
When each element that the ancestors' element successively traveling through page elements comprises, can not find an element be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element time, the visibility region scope of each picture tag on traversal webpage, find the visibility region scope that the positional information of mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
Optionally, in the present embodiment, the executive agent of the method provided is browser.
Optionally, in the present embodiment, also comprise: the attribute information obtaining picture tag, the attribute information of picture tag comprises: the positional information of the URL(uniform resource locator) of picture, the dimension information of picture, picture.
Optionally, also comprise in the present embodiment: the attribute information of picture tag is sent to server, the picture relevant information that reception server returns;
When the visible picture that the positional information recognizing mouse pointer is corresponding on webpage, by picture correlated information exhibition on visible picture.
Accordingly, in the present embodiment, also comprise: when mouse pointer shifts out visible picture, hide picture relevant information.
Optionally, the form of first kind label with hyaline layer in webpage is superimposed upon above picture.
On the other hand, the invention provides a kind of device for identifying visible picture in webpage, comprising:
Obtaining information module, the page elements that the positional information for the positional information and mouse pointer that obtain the mouse pointer on webpage is corresponding in webpage;
Identify the first picture module, for be picture tag when page elements and the first picture of its correspondence is visible picture time, determine that the first picture is the visible picture corresponding on webpage of the positional information of mouse pointer;
Identify second picture module, during for being first kind label when page elements, each element that the ancestors' element successively traveling through page elements comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer.
Wherein, first kind label, is superimposed upon above picture specifically for the form with hyaline layer in webpage.
Optionally, identify second picture module, specifically comprise:
First judges submodule, for judging whether page elements corresponding in webpage exists last layer element;
First obtains submodule, for obtaining the last layer element of page elements, it can be used as ancestors' element of page elements;
Second obtains submodule, for obtaining each element in ancestors' element of page elements;
Second judges submodule, for judging whether each element in ancestors' element of page elements has at least one to be picture tag;
3rd obtains submodule, when not being picture tag for each element in ancestors' element of page elements, obtains the last layer element of ancestors' element of page elements, with ancestors' element of its refresh page surface element;
4th obtains submodule, when having at least one to be picture tag for each element in ancestors' element of page elements, obtain the visibility region scope of each picture tag in ancestors' element of page elements, until the visibility region scope finding the positional information of mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
In the present embodiment, identify second picture module, during specifically for being first kind label when page elements, each element that the ancestors' element successively traveling through page elements according to the tree structure in web page source code comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is that the positional information of mouse pointer is corresponding visible on webpage.
Optionally, this device also comprises:
Search picture tag module, for each element that ancestors' element that successively ought travel through page elements comprises, can not find an element be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element time, the visibility region scope of each picture tag on traversal webpage, find the visibility region scope that the positional information of mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
Optionally, this device is specially browser.
Optionally, this device also comprises:
Obtain picture tag attribute information module, for obtaining the attribute information of picture tag, the attribute information of picture tag comprises: the positional information of the URL(uniform resource locator) of picture, the dimension information of picture, picture.
In this device, also comprise:
Sending module, for being sent to server by the attribute information of picture tag;
Receiver module, for the picture relevant information that reception server returns;
Display module, when the visible picture corresponding on webpage when the positional information recognizing mouse pointer, by picture correlated information exhibition on visible picture.
This device also comprises: hide Info module, for when mouse pointer shifts out visible picture, hides picture relevant information.
According to method for identifying visible picture in webpage of the present invention and device, the page elements that the positional information of the positional information and mouse pointer that obtain the mouse pointer on webpage is corresponding in webpage; When page elements is picture tag and the first picture of its correspondence is visible picture, then determine that the first picture is the visible picture of positional information correspondence on webpage of mouse pointer; When page elements is first kind label, each element that the ancestors' element then successively traveling through page elements comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer, identify the real picture of user operation thus.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 is a kind of method flow diagram for identifying visible picture in webpage of one embodiment of the invention;
Fig. 2 is the refinement process flow diagram of the step 103 of one embodiment of the invention;
Fig. 3 is a kind of device block diagram for identifying visible picture in webpage of one embodiment of the invention;
Fig. 4 is the schematic diagram identifying second picture module in Fig. 3.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
A kind of method for identifying visible picture in webpage being provided in the embodiment of the present invention, as shown in Figure 1, specifically comprising:
Step 101: the page elements of positional information correspondence in webpage of the positional information and mouse pointer that obtain the mouse pointer on webpage, page elements is judged, when page elements is picture tag and the first picture of correspondence is visible picture, then perform step 102; When page elements is first kind label, then perform step 103;
In the present embodiment, the page elements of the positional information of mouse pointer and its correspondence is that the notice sent in real time according to browser renders engine obtains; When mouse pointer moves in webpage, browser renders engine can be real-time by the state notifying of mouse pointer to browser;
Concrete, when mouse pointer moves into an element in webpage, browser renders engine by the positional information of current mouse pointer and in the page corresponding page elements inform to browser, browser obtains page elements corresponding to the positional information of the positional information of mouse pointer and mouse pointer.
Step 102: determine that the first picture is the visible picture of positional information correspondence on webpage of mouse pointer;
In the present embodiment, picture tag is <img>; Picture tag comprises the attribute information of picture tag, and wherein, the attribute information of picture tag comprises: the URL(uniform resource locator) of the dimension information of picture, the positional information of picture and picture; The dimension information that visible picture is specially picture is not 0 and the visibility region of picture is not 0.Wherein, the visibility region of picture is specially, and picture and his father's container is done and occurs simultaneously, and obtains the visibility region that common factor part is picture.
Particularly, the visibility region obtaining picture specifically comprises: obtain the picture tag positional information of picture corresponding in webpage and the dimension information of picture, the position of picture in webpage and the regional extent occupied is obtained according to the positional information of picture and the dimension information of picture, obtain the positional information of father's container corresponding to picture tag and the dimension information of father's container, the position of father's container in webpage and the regional extent occupied is obtained according to the positional information of father's container and the dimension information of father's container, the position that the position of picture in webpage and father's container occupy in webpage is done and occurs simultaneously, obtain intersection location, the scope that the regional extent occupied in webpage by picture and father's container occupy in webpage is done and is occured simultaneously, obtain intersecting area, intersecting area and intersection location are judged, if there is intersecting area and intersection location simultaneously, then determine the visibility region that there is picture, the visibility region of picture is the regional extent determined according to intersection location and intersecting area.
Step 103: each element that the ancestors' element successively traveling through page elements comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer;
In the present embodiment, first kind label comprises <div>, <span>, <a>.Successively travel through and specifically successively travel through according to the tree structure in web page source code, specifically successively travel through on DOM (DocumentObjectModel, the DOM Document Object Model) tree of webpage; When page elements is first kind label, as shown in Figure 2, specifically comprise:
Step 1031: judge whether page elements corresponding in webpage exists last layer element, is perform step 1032; Otherwise terminate ancestors' element of traversal page elements;
Step 1032: the last layer element obtaining page elements, it can be used as ancestors' element of page elements, obtains each element in ancestors' element of page elements, performs step 1033; Wherein, last layer element refers to the father node of page elements in dom tree.
Step 1033: judge whether each element in ancestors' element of page elements has at least one to be picture tag, is perform step 1035; Otherwise perform step 1034;
Step 1034: the last layer element obtaining ancestors' element of page elements, with ancestors' element of its refresh page surface element, obtains each element in ancestors' element of the page elements after upgrading, performs step 1033;
Step 1035: the visibility region scope obtaining each picture tag in ancestors' element of page elements, until the visibility region scope finding the positional information of mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
In specific implementation process, illustrate with the page that HTML (Hypertext Markup Language) makes, each element on the page is as follows:
When the page elements that the position of the cursor of mouse is corresponding is A label, i.e. corresponding <ahref=" next picture .jpg " >, now obtain the last layer element of this A label, namely ancestors' element div label of A label is obtained, obtain each picture tag comprised in div label and namely obtain all <img> comprised between <div> and </div>, namely <imgsrc=is got " http://i2.sinaimg.cn/dy/c/2015-06-26/U7939P1T1D31991153F21DT201 50626095913.jpg " width=" 40 " height=" 20 " >,
And obtain the visibility region scope of this img label in the page, and determine that visibility region scope that the position of cursor of mouse belongs to is to should img label, determine that second picture that this img label is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer, wherein, second picture is and is kept at:
Picture in http://i2.sinaimg.cn/dy/c/2015-06-26/U7939P1T1D31991153F21DT201 50626095913.jpg position.
Further, when each element that the ancestors' element successively traveling through page elements comprises, can not find an element be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element time, the visibility region scope of each picture tag on traversal webpage, find the visibility region scope that the positional information of mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
In the present embodiment, optionally, executive agent is browser.
Optionally, the attribute information of picture tag is obtained when the complete webpage of render engine renders, the attribute information of picture tag is sent to server, receive and preserve the picture relevant information that server returns, when the positional information of mouse pointer is on webpage during corresponding visible picture, obtain the picture relevant information that this visible picture is corresponding, by picture correlated information exhibition on this visible picture, when the positional information of mouse pointer shifts out this visible picture, hide the picture relevant information that this visible picture represents.
Optionally, when the visible picture that the positional information recognizing mouse pointer is corresponding on webpage, the attribute information obtaining picture tag can also be comprised, the attribute information of picture tag is sent to server, receive and preserve the picture relevant information that server returns, when the positional information of mouse pointer is on webpage during corresponding visible picture, obtain the picture relevant information that this visible picture is corresponding, by picture correlated information exhibition on this visible picture, when the positional information of mouse pointer shifts out this visible picture, hide the picture relevant information that this visible picture represents.
Optionally, also comprise in the present embodiment: when page elements neither picture tag neither the first kind label time, then determine the positional information of mouse pointer corresponding in webpage be not picture.
Optionally, the present embodiment can also be: the positional information obtaining the mouse pointer on webpage, the visibility region scope at each picture tag place in the traversal page, obtain and comprise picture tag corresponding to the visibility region scope of the positional information of this mouse pointer, determine that picture corresponding to this picture tag is the visible picture corresponding on webpage of the positional information of mouse pointer.
A kind of device for identifying visible picture in webpage being also provided in the present embodiment, as shown in Figure 3, comprising:
Obtaining information module 201, the page elements that the positional information for the positional information and mouse pointer that obtain the mouse pointer on webpage is corresponding in webpage;
Identify the first picture module 202, for be picture tag when page elements and the first picture of its correspondence is visible picture time, determine that the first picture is the visible picture corresponding on webpage of the positional information of mouse pointer;
Identify second picture module 203, during for being first kind label when page elements, each element that the ancestors' element successively traveling through page elements comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on webpage of the positional information of mouse pointer.
In the present embodiment, identify second picture module 203, as shown in Figure 4, specifically comprise:
First judges submodule 2031, for judging whether page elements corresponding in webpage exists last layer element;
First obtains submodule 2032, for obtaining the last layer element of page elements, it can be used as ancestors' element of page elements;
Second obtains submodule 2033, for obtaining each element in ancestors' element of page elements;
Second judges submodule 2034, for judging whether each element in ancestors' element of page elements has at least one to be picture tag;
3rd obtains submodule 2035, when not being picture tag for each element in ancestors' element of page elements, obtains the last layer element of ancestors' element of page elements, with ancestors' element of its refresh page surface element;
4th obtains submodule 2036, when having at least one to be picture tag for each element in ancestors' element of page elements, obtain the visibility region scope of each picture tag in ancestors' element of page elements, until the visibility region scope finding the positional information of mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
Concrete, in this device, identify second picture module 203, during specifically for being first kind label when page elements, each element that the ancestors' element successively traveling through page elements according to the tree structure in web page source code comprises, until find an element to be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is that the positional information of mouse pointer is corresponding visible on webpage.First kind label, is superimposed upon above picture specifically for the form with hyaline layer in webpage.
Optionally, this device also comprises:
Search picture tag module, for each element that ancestors' element that successively ought travel through page elements comprises, can not find an element be picture tag and the positional information of mouse pointer is within the scope of the visibility region of this element time, the visibility region scope of each picture tag on traversal webpage, find the visibility region scope that the positional information of mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on webpage of the positional information of mouse pointer.
Optionally, this device is specially browser.
Optionally, device also comprises:
Obtain picture tag attribute information module, for obtaining the attribute information of picture tag, the attribute information of picture tag comprises: the positional information of the URL(uniform resource locator) of picture, the dimension information of picture, picture.
Accordingly, this device also comprises:
Sending module, for being sent to server by the attribute information of picture tag;
Receiver module, for the picture relevant information that reception server returns;
Display module, when the visible picture corresponding on webpage when the positional information recognizing mouse pointer, by picture correlated information exhibition on visible picture.
Optionally, this device also comprises: hide Info module, for when mouse pointer shifts out visible picture, hides picture relevant information.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the device of a kind of picture for identifying user operation of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.
The invention provides, A1, a kind of method for identifying visible picture in webpage, is characterized in that, comprising:
The page elements of positional information correspondence in described webpage of the positional information and described mouse pointer that obtain the mouse pointer on webpage;
When described page elements is picture tag and the first picture of its correspondence is visible picture, then determine that described first picture is the visible picture of positional information correspondence on described webpage of described mouse pointer;
When described page elements is first kind label, each element that the ancestors' element then successively traveling through described page elements comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
A2, method as described in A1, it is characterized in that, described method, also comprises:
When each element that the ancestors' element successively traveling through described page elements comprises, can not find an element be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element time, travel through the visibility region scope of each picture tag on described webpage, find the visibility region scope that the positional information of described mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
A3, method as described in A1, it is characterized in that, each element that the described ancestors' element successively traveling through described page elements comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on described webpage of the positional information of described mouse pointer, specifically comprise:
Step a1: judge whether page elements corresponding in described webpage exists last layer element, obtain the last layer element of described page elements, it can be used as ancestors' element of described page elements, obtain each element in ancestors' element of described page elements, perform step a2; Otherwise terminate ancestors' element of the described page elements of traversal;
Step a2: judge whether each element in ancestors' element of described page elements has at least one to be picture tag, is perform step a4; Otherwise perform step a3;
Step a3: the last layer element obtaining ancestors' element of described page elements, upgrades ancestors' element of described page elements with it, obtain each element in ancestors' element of the page elements after upgrading, and performs step a2;
Step a4: the visibility region scope obtaining each picture tag in ancestors' element of described page elements, until the visibility region scope finding the positional information of described mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of described visibility region scope is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
A4, method as described in A1, it is characterized in that, described successively traversal specifically successively travels through according to the tree structure in web page source code.
A5, method as described in A1, it is characterized in that, the executive agent of described method is browser.
A6, method as described in A1, it is characterized in that, described method also comprises: the attribute information obtaining described picture tag, and the attribute information of described picture tag comprises: the positional information of the URL(uniform resource locator) of picture, the dimension information of picture, picture.
A7, method as described in A6, it is characterized in that, described method also comprises: the attribute information of described picture tag is sent to server, receives the picture relevant information that described server returns;
When the visible picture that the positional information recognizing described mouse pointer is corresponding on described webpage, by described picture correlated information exhibition on described visible picture.
A8, method as described in A7, it is characterized in that, described method also comprises: when described mouse pointer shifts out described visible picture, hides described picture relevant information.
A9, method as described in A1, it is characterized in that, the form of described first kind label with hyaline layer in described webpage is superimposed upon above picture.
B10, a kind of device for identifying visible picture in webpage, is characterized in that, comprising:
Obtaining information module, the page elements that the positional information for the positional information and described mouse pointer that obtain the mouse pointer on webpage is corresponding in webpage;
Identify the first picture module, for when described page elements is picture tag and the first picture of its correspondence is visible picture, determine that described first picture is the visible picture of positional information correspondence on described webpage of described mouse pointer;
Identify second picture module, for when described page elements is first kind label, each element that the ancestors' element successively traveling through described page elements comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
B11, device as described in B10, it is characterized in that, described device also comprises:
Search picture tag module, for each element that ancestors' element that successively ought travel through described page elements comprises, can not find an element be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element time, travel through the visibility region scope of each picture tag on described webpage, find the visibility region scope that the positional information of described mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
B12, device as described in B10, it is characterized in that, described identification second picture module, specifically comprises:
First judges submodule, for judging whether page elements corresponding in described webpage exists last layer element;
First obtains submodule, for obtaining the last layer element of described page elements, it can be used as ancestors' element of described page elements;
Second obtains submodule, for obtaining each element in ancestors' element of described page elements;
Second judges submodule, for judging whether each element in ancestors' element of described page elements has at least one to be picture tag;
3rd obtains submodule, when not being picture tag for each element in ancestors' element of described page elements, obtains the last layer element of ancestors' element of described page elements, upgrades ancestors' element of described page elements with it;
4th obtains submodule, when having at least one to be picture tag for each element in ancestors' element of described page elements, obtain the visibility region scope of each picture tag in ancestors' element of described page elements, until the visibility region scope finding the positional information of described mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of described visibility region scope is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
B13, device as described in B10, it is characterized in that, described identification second picture module, specifically for when described page elements is first kind label, each element that the ancestors' element successively traveling through described page elements according to the tree structure in web page source code comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is that the positional information of described mouse pointer is corresponding visible on described webpage.
B14, device as described in B10, it is characterized in that, described device is specially browser.
B15, device as described in B10, it is characterized in that, described device also comprises:
Obtain picture tag attribute information module, for obtaining the attribute information of described picture tag, the attribute information of described picture tag comprises: the positional information of the URL(uniform resource locator) of picture, the dimension information of picture, picture.
B16, device as described in B15, it is characterized in that, described device also comprises:
Sending module, for being sent to server by the attribute information of described picture tag;
Receiver module, for receiving the picture relevant information that described server returns;
Display module, when the visible picture corresponding on described webpage when the positional information recognizing described mouse pointer, by described picture correlated information exhibition on described visible picture.
B17, device as described in B16, it is characterized in that, described device also comprises: hide Info module, for when described mouse pointer shifts out described visible picture, hides described picture relevant information.
B18, device as described in B10, it is characterized in that, described first kind label, is superimposed upon above picture specifically for the form with hyaline layer in described webpage.
Claims (10)
1., for identifying a method for visible picture in webpage, it is characterized in that, comprise:
The page elements of positional information correspondence in described webpage of the positional information and described mouse pointer that obtain the mouse pointer on webpage;
When described page elements is picture tag and the first picture of its correspondence is visible picture, then determine that described first picture is the visible picture of positional information correspondence on described webpage of described mouse pointer;
When described page elements is first kind label, each element that the ancestors' element then successively traveling through described page elements comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
2. the method for claim 1, is characterized in that, described method, also comprises:
When each element that the ancestors' element successively traveling through described page elements comprises, can not find an element be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element time, travel through the visibility region scope of each picture tag on described webpage, find the visibility region scope that the positional information of described mouse pointer is in, then determining to belong to the 3rd picture corresponding to the picture tag of this visibility region scope is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
3. the method for claim 1, it is characterized in that, each element that the described ancestors' element successively traveling through described page elements comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on described webpage of the positional information of described mouse pointer, specifically comprise:
Step a1: judge whether page elements corresponding in described webpage exists last layer element, obtain the last layer element of described page elements, it can be used as ancestors' element of described page elements, obtain each element in ancestors' element of described page elements, perform step a2; Otherwise terminate ancestors' element of the described page elements of traversal;
Step a2: judge whether each element in ancestors' element of described page elements has at least one to be picture tag, is perform step a4; Otherwise perform step a3;
Step a3: the last layer element obtaining ancestors' element of described page elements, upgrades ancestors' element of described page elements with it, obtain each element in ancestors' element of the page elements after upgrading, and performs step a2;
Step a4: the visibility region scope obtaining each picture tag in ancestors' element of described page elements, until the visibility region scope finding the positional information of described mouse pointer to be in, determining to belong to second picture corresponding to the picture tag of described visibility region scope is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
4. the method for claim 1, is characterized in that, described successively traversal specifically successively travels through according to the tree structure in web page source code.
5. the method for claim 1, is characterized in that, the executive agent of described method is browser.
6. the method for claim 1, it is characterized in that, described method also comprises: the attribute information obtaining described picture tag, and the attribute information of described picture tag comprises: the positional information of the URL(uniform resource locator) of picture, the dimension information of picture, picture.
7. method as claimed in claim 6, it is characterized in that, described method also comprises: the attribute information of described picture tag is sent to server, receives the picture relevant information that described server returns;
When the visible picture that the positional information recognizing described mouse pointer is corresponding on described webpage, by described picture correlated information exhibition on described visible picture.
8. method as claimed in claim 7, it is characterized in that, described method also comprises: when described mouse pointer shifts out described visible picture, hides described picture relevant information.
9. the method for claim 1, is characterized in that, the form of described first kind label with hyaline layer in described webpage is superimposed upon above picture.
10., for identifying a device for visible picture in webpage, it is characterized in that, comprise:
Obtaining information module, the page elements that the positional information for the positional information and described mouse pointer that obtain the mouse pointer on webpage is corresponding in webpage;
Identify the first picture module, for when described page elements is picture tag and the first picture of its correspondence is visible picture, determine that described first picture is the visible picture of positional information correspondence on described webpage of described mouse pointer;
Identify second picture module, for when described page elements is first kind label, each element that the ancestors' element successively traveling through described page elements comprises, until find an element to be picture tag and the positional information of described mouse pointer is within the scope of the visibility region of this element, then determine that second picture that this element is corresponding is the visible picture corresponding on described webpage of the positional information of described mouse pointer.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510572012.6A CN105260384B (en) | 2015-09-09 | 2015-09-09 | The method and device of visible picture in a kind of webpage for identification |
CN201811628895.8A CN109522502B (en) | 2015-09-09 | 2015-09-09 | Method and device for identifying visible pictures in webpage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510572012.6A CN105260384B (en) | 2015-09-09 | 2015-09-09 | The method and device of visible picture in a kind of webpage for identification |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811628895.8A Division CN109522502B (en) | 2015-09-09 | 2015-09-09 | Method and device for identifying visible pictures in webpage |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105260384A true CN105260384A (en) | 2016-01-20 |
CN105260384B CN105260384B (en) | 2019-02-12 |
Family
ID=55100077
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510572012.6A Expired - Fee Related CN105260384B (en) | 2015-09-09 | 2015-09-09 | The method and device of visible picture in a kind of webpage for identification |
CN201811628895.8A Expired - Fee Related CN109522502B (en) | 2015-09-09 | 2015-09-09 | Method and device for identifying visible pictures in webpage |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811628895.8A Expired - Fee Related CN109522502B (en) | 2015-09-09 | 2015-09-09 | Method and device for identifying visible pictures in webpage |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN105260384B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110928628A (en) * | 2019-11-22 | 2020-03-27 | 网易(杭州)网络有限公司 | Game element processing method and device, storage medium and processor |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090276413A1 (en) * | 2008-04-30 | 2009-11-05 | Ricoh Company, Ltd | Managing electronic data with index data corresponding to said electronic data |
US20120303700A1 (en) * | 2001-02-28 | 2012-11-29 | International Business Machines Corporation | Translation of documents |
CN102981876A (en) * | 2012-11-28 | 2013-03-20 | 北京奇虎科技有限公司 | Method and device for loading picture toolbar window |
CN103034686A (en) * | 2012-11-28 | 2013-04-10 | 北京奇虎科技有限公司 | Method and device for loading picture toolbar window |
CN104077387A (en) * | 2014-06-27 | 2014-10-01 | 北京奇虎科技有限公司 | Webpage content display method and browser device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8010624B2 (en) * | 2008-03-27 | 2011-08-30 | Amazon Technologies, Inc. | Dynamic composition for image transmission |
CN103365859B (en) * | 2012-03-28 | 2017-03-08 | 上海商派网络科技有限公司 | The method processing webpage mouse click event |
WO2014174369A2 (en) * | 2013-03-29 | 2014-10-30 | Mcgushion Kevin D | Mapping of defined regions within a webpage |
-
2015
- 2015-09-09 CN CN201510572012.6A patent/CN105260384B/en not_active Expired - Fee Related
- 2015-09-09 CN CN201811628895.8A patent/CN109522502B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120303700A1 (en) * | 2001-02-28 | 2012-11-29 | International Business Machines Corporation | Translation of documents |
US20090276413A1 (en) * | 2008-04-30 | 2009-11-05 | Ricoh Company, Ltd | Managing electronic data with index data corresponding to said electronic data |
CN102981876A (en) * | 2012-11-28 | 2013-03-20 | 北京奇虎科技有限公司 | Method and device for loading picture toolbar window |
CN103034686A (en) * | 2012-11-28 | 2013-04-10 | 北京奇虎科技有限公司 | Method and device for loading picture toolbar window |
CN104077387A (en) * | 2014-06-27 | 2014-10-01 | 北京奇虎科技有限公司 | Webpage content display method and browser device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110928628A (en) * | 2019-11-22 | 2020-03-27 | 网易(杭州)网络有限公司 | Game element processing method and device, storage medium and processor |
CN110928628B (en) * | 2019-11-22 | 2022-12-27 | 网易(杭州)网络有限公司 | Game element processing method and device, storage medium and processor |
Also Published As
Publication number | Publication date |
---|---|
CN105260384B (en) | 2019-02-12 |
CN109522502B (en) | 2021-03-09 |
CN109522502A (en) | 2019-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104036011A (en) | Webpage element display method and browser device. | |
CN103078945B (en) | To the method and system that browser crash data processes | |
CN104462074A (en) | Method and device for conducting webpage data translation and browser client side | |
CN104536973A (en) | Picture identification method and browser client | |
CN103577552A (en) | Webpage picture processing method and device | |
CN104317931A (en) | Webpage title determining method and device | |
CN104462471A (en) | Method and device for providing segmentation search results | |
CN103593406A (en) | Static resource identifier processing method and device | |
US10606935B2 (en) | Transforming a website for dynamic web content management | |
CN104331438A (en) | Method and device for selectively extracting content of novel webpage | |
CN105630927A (en) | Link generation method and apparatus | |
CN102902784A (en) | Web page classification storage system and method | |
CN105630310A (en) | Method and device for displaying titles during graph group switching | |
CN103544271B (en) | Load Image in a kind of browser the method and apparatus for processing window | |
CN106156291A (en) | The caching method of static resource and system thereof based on Localstroage | |
CN103248627A (en) | Method, forward proxy server and system for visiting website resources | |
CN105260383A (en) | Processing method for showing webpage image information and electronic equipment for showing webpage image information | |
CN105183887A (en) | Data processing method based on browser and browser device | |
CN105260384A (en) | Method and device for recognizing visible picture in webpage | |
CN103646105A (en) | Method for pushing message in browser and browser device | |
CN102882982A (en) | Browser message sending equipment, browser message receiving equipment, communication method and communication system | |
CN105574140A (en) | Method and system for recommending contents to user | |
CN104331458A (en) | Method and device using anchor text as webpage title | |
CN103200266B (en) | To method, network applications manager and system that network application manages | |
CN104899338A (en) | Method for pushing APP in search promotion result, device and browser |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190212 Termination date: 20210909 |
|
CF01 | Termination of patent right due to non-payment of annual fee |