CN115730162A - Webpage information display method, device, equipment and storage medium - Google Patents

Webpage information display method, device, equipment and storage medium Download PDF

Info

Publication number
CN115730162A
CN115730162A CN202111015125.8A CN202111015125A CN115730162A CN 115730162 A CN115730162 A CN 115730162A CN 202111015125 A CN202111015125 A CN 202111015125A CN 115730162 A CN115730162 A CN 115730162A
Authority
CN
China
Prior art keywords
webpage
information
advertisement
target
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111015125.8A
Other languages
Chinese (zh)
Inventor
余禄宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111015125.8A priority Critical patent/CN115730162A/en
Publication of CN115730162A publication Critical patent/CN115730162A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application discloses a method, a device, equipment and a storage medium for displaying and displaying webpage information, and is applicable to the technical field of computers. The method comprises the following steps: responding to the webpage access request, acquiring a webpage corresponding to the webpage access request, and creating a target webpage node in the webpage; acquiring a webpage information loading request aiming at a target area of a webpage and a style attribute of a target webpage node; if the advertisement shielding plug-in is determined to exist based on the style attribute and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in, the advertisement shielding prompt information is displayed in the target area after the advertisement shielding plug-in shields the advertisement information. By adopting the embodiment of the application, the advertisement shielding plug-in can be prompted to the user to shield the advertisement information in the webpage and shield the position, and the applicability is high.

Description

Webpage information display method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for displaying web page information.
Background
With the popularization of the internet, the frequency of people using browsers to inquire about or read is higher. However, in the process of browsing a web page, a certain number of advertisements often exist in the web page, thereby bringing about a poor web page browsing experience.
In the prior art, advertisements in a webpage are often directly shielded through advertisement shielding plug-ins, but a user does not know whether the advertisement plug-ins shield the advertisements in the webpage or not, and cannot know which areas of the advertisements in the webpage are shielded, so that the applicability is poor.
Disclosure of Invention
The embodiment of the application provides a webpage information display method, a webpage information display device, a webpage information display equipment and a webpage information display storage medium, can prompt a user of an advertisement shielding plug-in to shield advertisement information in a webpage and shield positions, and is high in applicability.
On one hand, the embodiment of the application provides a webpage information display method, which comprises the following steps:
responding to a webpage access request, acquiring a webpage corresponding to the webpage access request, and creating a target webpage node in the webpage;
acquiring a webpage information loading request aiming at a target area of the webpage and the style attribute of the target webpage node;
and if the advertisement shielding plug-in is determined to exist based on the style attribute and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in, displaying advertisement shielding prompt information in the target area after the advertisement shielding plug-in shields the advertisement information.
On the other hand, the embodiment of the present application provides a web page information display device, and the training device includes:
the node creating module is used for responding to a webpage access request, acquiring a webpage corresponding to the webpage access request and creating a target webpage node in the webpage;
the information acquisition module is used for acquiring a webpage information loading request aiming at a target area of the webpage and the style attribute of the target webpage node;
and the information display module is used for displaying advertisement shielding prompt information in the target area after the advertisement shielding plugin shields the advertisement information if the advertisement shielding plugin is determined to exist based on the style attribute and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plugin.
In another aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the processor and the memory are connected to each other;
the memory is used for storing computer programs;
the processor is configured to execute the webpage information presentation method provided by the embodiment of the application when the computer program is called.
In another aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program is executed by a processor to implement the webpage information presentation method provided in the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the webpage information presentation method provided by the embodiment of the application.
In the embodiment of the application, the target webpage node is created in the webpage access request, so that whether the advertisement shielding plug-in exists can be determined without sending a network request, network resources are saved, and the application range is wide. And the advertisement shielding prompt information can be displayed in the corresponding area under the condition that the advertisement shielding plug-in shields the webpage information corresponding to any webpage information loading request, so that a user can determine that the advertisement information shielded by the advertisement plug-in exists in the webpage, and can also determine the position of the shielded advertisement information in the webpage, thereby improving the browsing experience of the user.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for displaying webpage information according to an embodiment of the present application;
FIG. 2a is a schematic diagram illustrating a scenario of advertisement information in a web page according to an embodiment of the present application;
FIG. 2b is a schematic diagram of a scenario of shielding advertisement information according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a scenario in which prompt information for a shielding plugin is shown according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a scenario in which an advertisement blocking prompt is displayed according to an embodiment of the present application;
FIG. 5a is a schematic diagram illustrating a scenario in which a network error prompt message is presented according to an embodiment of the present disclosure;
FIG. 5b is a schematic diagram illustrating a scenario of displaying a network error prompt message according to an embodiment of the present application;
FIG. 6 is a flowchart frame of a method for displaying web page information according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a scenario illustrating white list addition prompting information according to an embodiment of the application;
fig. 8 is a schematic structural diagram of a web page information display device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flowchart of a webpage information displaying method provided in the embodiment of the present application.
As shown in fig. 1, the method for displaying web page information provided in the embodiment of the present application may include the following steps:
step S11, responding to the webpage access request, acquiring a webpage corresponding to the webpage access request, and creating a target webpage node in the webpage.
In some possible embodiments, after detecting an access request of a user for any web page, a web page corresponding to the access request of the web page may be obtained. The webpage is a blank webpage which responds to a webpage access request and is before each item of webpage information of the webpage is displayed after a Transmission Control Protocol (TCP) connection is established on the basis of the webpage access request and a server corresponding to the webpage access request.
In some possible embodiments, after the webpage corresponding to the webpage access request is obtained, the target webpage node may be created in the webpage, that is, after the webpage corresponding to the webpage access request is obtained, the target webpage element may be created in the webpage.
Specifically, in order to enable the advertisement blocking plug-in to identify the target webpage node and block the target webpage node, when the target webpage node is created, the class name of the target webpage node is determined to be a preset class name which can be identified by various advertisement blocking plug-ins.
The target web page node is a hypertext Markup Language (HTML) tag, and the class name of the target web page node is a node name, and the class name of the target web page node may correspond to one or more class names.
For any advertisement shielding plug-in, the advertisement shielding plug-in shields the webpage nodes with preset class names, and the preset class names of the advertisement shielding plug-in comprise the class names of the target webpage nodes.
It should be noted that any web page node in the web page is any information, element, etc. in the web page, for example, a picture in the web page may become a web page node of the web page, and details are not described below.
For any advertisement shielding plugin, the class name, the keyword, and the like of the advertisement information in various webpages with preset class names corresponding to the advertisement shielding plugin, such as an ad-placement keyword, may be specifically determined based on the actual application scenario requirements, and is not limited herein. If the advertisement shielding plug-in identifies that the class name of any information in any webpage is a preset class name, the advertisement shielding plug-in can determine that the information is the advertisement information and shield the advertisement information.
Referring to fig. 2a, fig. 2a is a schematic view of a scene of advertisement information in a webpage according to an embodiment of the present disclosure. Fig. 2a shows a web page about "bud program" in a browser, which includes winning information for inducing a net friend to click, in addition to information about learning stationery provided to a desired elementary school and information about giving love to the net friend. And the winning information in the webpage is the advertisement information in the webpage.
With further reference to fig. 2b, fig. 2b is a schematic view of a scenario for shielding advertisement information according to an embodiment of the present application. If the advertisement shielding plug-in is operated in the browser, when the browser opens the webpage about the "spring bud plan" in fig. 2a, the browser can shield the winning information in fig. 2a, so that the winning information is not displayed in the webpage.
Based on the method, after the class name of the target webpage node is determined to be the preset class name which can be identified by the advertisement shielding plug-in, the advertisement shielding plug-in can identify the target webpage node and shield the target webpage node. If the target webpage node is a picture, the advertisement shielding plug-in can shield the picture, so that the picture is not displayed in the webpage.
It should be particularly noted that the advertisement blocking plug-in the embodiment of the present application includes, but is not limited to, a plug-in running in a browser for blocking advertisement information in a web page, and an application running independently from the browser and capable of detecting and blocking advertisement information in a web page in the browser, and the application may be specifically determined based on an actual application scenario requirement, and is not limited herein.
As an example, the advertisement shielding plug-in the embodiment of the present application may be an AdBlock plug-in, an AdBlock Plus plug-in, an AdBlock plug-in, and the like.
Further, in order to avoid that the browsing experience of the user is affected when the target webpage node is displayed in the webpage, when the target webpage node is created, in addition to determining the class name of the target webpage node as the preset class name that can be recognized by various advertisement shielding plugins, the display area of the target webpage node corresponding to the webpage needs to be set to an area that is not overlapped with other information in the webpage, such as the leftmost edge and the uppermost edge of the webpage.
Specifically, for any webpage, the display area of other information in the webpage can be determined through the position attribute in the style attribute of the other information in the webpage, and then the position attribute in the style attribute of the target webpage node is determined based on the display area of the other information in the webpage.
If the position attribute of the target webpage node is determined to be fixed, the target webpage node does not move along with the movement of the scroll bar in the webpage browsing process of the user, and the position attribute of the target webpage node can also be determined to be approximately absolute so that the target webpage node moves along with the scroll bar in the webpage browsing process of the user. And the left value corresponding to the position attribute can be determined as a negative value so as to hide the target webpage node at the leftmost side of the webpage, or the top value corresponding to the position attribute can be determined as a negative value so as to hide the target node at the top of the webpage.
The position attribute of the target webpage node may be any attribute value that does not affect user browsing or original webpage layout, and may be specifically determined based on the actual application scene requirements, which is not limited herein.
The node type, height, width, and the like of the target webpage node may be determined based on actual application scenario requirements, for example, the node type may be determined as div, and the height and width may be determined as 1 pixel, which is not limited herein.
The related information of the target webpage node can be directly written into a body tag of HTML, or can be written into the HTML based on a node.
When the target webpage node is written into the non-body tag of the HTML, any previous-level node of the target webpage node cannot be removed by other components before the advertisement shielding plugin runs, so that the target webpage node always exists in the webpage before the advertisement shielding plugin runs.
And S12, acquiring a webpage information loading request aiming at a target area of a webpage and the style attribute of a target webpage node.
In some possible embodiments, after obtaining the web page corresponding to the web page access request, a web page information loading request for a target area of the web page may be obtained.
For any webpage, the webpage corresponds to at least one webpage information loading request, each webpage information loading request may be a hypertext Transfer Protocol (HTTP) request, and each webpage information loading request is used to obtain media information corresponding to the request from a corresponding server.
After a webpage corresponding to the webpage access request is obtained, all webpage information loading requests corresponding to the webpage are obtained, corresponding webpage information is obtained based on the webpage information loading requests, and the obtained webpage information is displayed in the webpage.
In the embodiment of the application, a webpage information loading request for a target area of a webpage may be any webpage information loading request in the webpage, and the target area is a display area of target webpage information in the webpage corresponding to the webpage information loading request.
For example, the web page information loading request for the target area of the web page is a media HTTP request for requesting to acquire picture information, and the target area is a corresponding display area of the picture information in the web page.
In some possible embodiments, when a webpage information loading request for a target area of a webpage is obtained, a style attribute of a target webpage node may also be obtained, where the style attribute is used to determine a display state of the target webpage node in the webpage, such as whether the target webpage node is hidden, a color, a size, and the like of the target webpage node in the webpage.
The presence of the advertisement blocking plugin can be determined based on the style attribute of the target webpage node, that is, whether the webpage displayed by the browser is detected by the advertisement blocking plugin can be determined based on the style attribute of the target webpage node, which is specifically referred to the following step S13 and will not be described herein.
And S13, if the advertisement shielding plug-in is determined to exist based on the reference information and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in, displaying advertisement shielding prompt information in a target area after the advertisement shielding plug-in shields the advertisement information.
In some possible embodiments, further, based on the style attribute of the target web page node, whether the target web page node is hidden may be determined, and if the target web page node is hidden, it may be determined that the target web page node is shielded by the advertisement plug-in, that is, the advertisement information in the web page may be shielded by the advertisement shielding plug-in. If the target webpage node is not hidden, it may be determined that the target webpage node is not shielded by the advertisement plug-in, i.e., the advertisement information in the webpage is not shielded.
Specifically, a display attribute in the style attribute of the target webpage node can be determined, if the display attribute corresponding to the target webpage node is the first attribute, the target webpage node is determined to be hidden, and the advertisement shielding plug-in performs shielding processing on the target webpage node.
The first attribute is any attribute value that can be used for representing that the target webpage node is hidden, and the first attribute may be a none, and may be determined specifically based on requirements of an actual application scenario, which is not limited herein.
Wherein, the reference information of the target webpage node can be obtained by a document. Querysector method of a JavaScript script, and the style attribute of the target webpage node can be obtained by a window. GetcomputedStyle method based on the JavaScript script with better compatibility,
further, if it is determined that the advertisement shielding plug-in exists based on the style attribute of the target webpage node, a shielding plug-in prompt message may be presented in the webpage to prompt the user that the advertisement message in the webpage will be shielded by the advertisement shielding plug-in.
The method comprises the steps that the prompt information of the shielding plug-in is displayed in the webpage when the webpage corresponding to the webpage access request is acquired, the prompt information is prompted to a user before the webpage information is displayed in the webpage together with the webpage information loading request, and the advertisement information in the webpage can be shielded by the advertisement shielding plug-in.
As shown in fig. 3, fig. 3 is a schematic view of a scene for displaying prompt information of a shielding plugin according to an embodiment of the present disclosure. Fig. 3 shows that after the web page corresponding to the web page access request is obtained and the web page before the web page information is loaded and requested to be displayed based on the web page information, after it is determined that the advertisement blocking plugin exists based on the display attribute of the target web page node, "your advertisement blocking plugin has blocked the advertisement information" may be displayed in the web page to perform advertisement blocking prompt for the user.
Optionally, after it is determined that the advertisement shielding plugin exists based on the style attribute of the target webpage node, prompt information of the shielding plugin is started to be displayed to a user before each webpage is displayed on the webpage based on the webpage information loading request, and the prompt information of the shielding plugin is stopped to be displayed after a preset time. Or the display of the prompt information of the shielding plugin can be stopped after a confirmation instruction of the user for the prompt information of the shielding plugin is received, and the confirmation can be specifically determined based on the requirements of the actual application scene, which is not limited herein.
The display area of the prompt information of the shielding plug-in the webpage can be determined based on the requirements of the actual application scene, and is not limited herein.
In some possible embodiments, for a webpage information loading request for a target area of a webpage, if it is determined that an advertisement blocking plugin exists based on a style attribute of a target webpage node, it is determined whether target webpage information corresponding to the webpage information loading request is advertisement information based on the advertisement blocking plugin. And if the target webpage information corresponding to the webpage information loading request is the advertisement information, shielding the advertisement information based on the advertisement shielding plug-in, and further displaying advertisement shielding prompt information in a target area corresponding to the advertisement information.
The advertisement shielding prompt information is used for prompting that the webpage information corresponding to the target area is the advertisement information, the advertisement information is shielded by the advertisement shielding plug-in, and the advertisement shielding prompt information can be prompt information such as characters, preset pictures and symbols, can be specifically determined based on actual application scene requirements, and is not limited herein.
When determining whether the target webpage information corresponding to the webpage information loading request is advertisement information, determining whether the target webpage information (node) corresponding to the webpage information loading request is a preset class name of the advertisement shielding plug-in. If the class name of the target webpage information corresponding to the webpage information loading request is the preset class name of the advertisement shielding plug-in, the target webpage information corresponding to the webpage information loading request can be determined to be the advertisement information.
If the class name of the target webpage information corresponding to the webpage information loading request is not the preset class name of the advertisement shielding plug-in, determining that the target webpage information corresponding to the webpage information loading request is not the advertisement information, or further forwarding the webpage information loading request to a detection server, and determining whether the target webpage information corresponding to the webpage information loading request is the advertisement information through the detection server.
The webpage information loading request can be forwarded to an independent detection server, the detection server detects the request information of the webpage information loading request to determine whether the target webpage information corresponding to the webpage information loading request is the advertisement information or not, or the target webpage information corresponding to the webpage information loading request is obtained, and whether the target webpage information is the advertisement information or not is determined based on a graph neural network, a prediction model and the like. Or, the webpage information loading request may be forwarded to the block chain, and whether the target webpage information corresponding to the webpage information loading request is advertisement information is determined through a consensus mechanism of the block chain.
The implementation manner of determining whether the target webpage information corresponding to the webpage information loading request is the advertisement information is only an example, and may be determined based on the actual application scene requirements, which is not limited herein.
Referring to fig. 4, fig. 4 is a schematic view of a scene displaying advertisement blocking prompting information according to an embodiment of the present application. Assume that FIG. 4 is a web page in a browser shown in FIG. 2a that is related to the "spring bud program" and does not fully display information on each web page before the target web page node is created in the web page. If the webpage information loading request aiming at the target area of the webpage is used for requesting the winning information in the figure 2a, the advertising shielding plug-in is determined to exist according to the style attribute of the target webpage node, and after the winning information is determined to be the advertising information according to the advertising shielding plug-in, the winning information can be shielded based on the advertising shielding plug-in, and the advertising shielding prompt information is displayed in the target area to prompt a user that the advertising information exists in the area and is shielded.
In some possible embodiments, for a webpage information loading request for a target area of the webpage, if it is determined that an advertisement blocking plug-in exists based on the style attribute and it is determined that target webpage information corresponding to the webpage information loading request is not advertisement information based on the advertisement blocking plug-in, the advertisement blocking plug-in does not block the target webpage information.
And further determining a server corresponding to the target webpage information loading request, and acquiring the target webpage information corresponding to the webpage information loading request from the server. If the target webpage information is successfully acquired from the server corresponding to the target webpage information, the target webpage information can be displayed in the target area corresponding to the target webpage information.
If the target webpage information is failed to be acquired from the server corresponding to the target webpage information, it indicates that the target webpage information is failed to be acquired due to a network error, and in this case, the network error prompt information can be displayed in the target area corresponding to the target webpage information to prompt the user that the webpage information corresponding to the target area cannot be displayed due to the network error.
The network error includes, but is not limited to, a current browser network condition being poor, the web page information loading request being an invalid request, a destination Internet Protocol (IP) address error corresponding to the web page information loading request, a server fault corresponding to the web page information loading request, and target web page information corresponding to the web page information loading request not existing, and may be determined based on actual application scenario requirements, and is not limited herein.
The network error prompt information is used for prompting the user that the webpage information corresponding to the target area cannot be displayed due to a network error, specifically, the network error prompt information may be prompt information such as characters, preset pictures, symbols and the like, and specifically, the network error prompt information may be determined based on requirements of an actual application scene, and is not limited herein.
Optionally, when the network error prompt information is displayed in the target area corresponding to the target webpage information, an error type of a network error which causes failure in acquiring the target webpage information may be determined, and then the network error prompt information corresponding to the error type is displayed in the target area based on the error type corresponding to the target webpage information. Based on the method, different network error prompt messages are displayed by determining the error type of the network error which causes failure in acquiring the target webpage information, so that the user can take corresponding countermeasures based on the network error prompt messages displayed by the browser.
Referring to fig. 5a, fig. 5a is a schematic view of a scene for displaying a network error prompt message according to an embodiment of the present disclosure. Also assume that FIG. 5a is a web page of the browser shown in FIG. 2a for "bud planning" and a web page information load request for the target area of the web page is used to request the picture of the love heart call in FIG. 2 a. If the advertisement shielding plug-in is determined to exist according to the style attribute of the target webpage node, and the image is determined not to be the advertisement information according to the advertisement shielding plug-in, or the image is determined not to exist according to the style attribute of the target webpage node, the image can be obtained based on the webpage information loading request.
If the picture is failed to be obtained due to poor network conditions, displaying network error prompt information for prompting the obtaining failure caused by the poor network conditions in a target area corresponding to the picture.
Referring to fig. 5b, fig. 5b is a schematic view of a scene for displaying network error prompt information according to an embodiment of the present disclosure. Also assume that FIG. 5b is a web page for "spring bud planning" in a browser as shown in FIG. 2a, and a web page information load request for a target area of the web page is used to request the text information of the call for love in FIG. 2 a. If the advertisement shielding plug-in is determined to exist according to the style attribute of the target webpage node, and the character information is determined not to be the advertisement information according to the advertisement shielding plug-in, or the character information is determined not to exist according to the style attribute of the target webpage node, the character information can be obtained based on the webpage information loading request.
If the text information fails to be acquired because the webpage information loading request is an invalid request, network error prompt information (404) for prompting that the webpage information loading request is invalid and fails to be acquired is displayed in a target area corresponding to the text information, namely, a user can know that the webpage information corresponding to the target area cannot be acquired currently based on the network error information.
In some possible embodiments, if it is determined that the presentation attribute in the style attribute of the target web page node is not the first attribute, it is determined that the target web page node is not hidden, i.e., there is no advertisement blocking plug-in. In this case, a server corresponding to the target webpage information loading request may be further determined, and the target webpage information corresponding to the webpage information loading request may be obtained from the server. If the target webpage information is successfully acquired from the server corresponding to the target webpage information, the target webpage information can be displayed in the target area corresponding to the target webpage information. If the target webpage information is failed to be acquired from the server corresponding to the target webpage information, network error prompt information can be displayed in a target area corresponding to the target webpage information so as to prompt a user that the webpage information corresponding to the target area cannot be displayed due to network errors.
Based on the implementation manner, for any webpage information loading request in any webpage, under the condition that the advertisement shielding plug-in exists and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in, the advertisement information can be shielded and advertisement shielding prompt information can be displayed in a corresponding area. And under the condition that the advertisement shielding plug-in exists and the target webpage information corresponding to the webpage information loading request is determined not to be the advertisement information based on the advertisement shielding plug-in, or under the condition that the advertisement shielding plug-in does not exist, the target webpage information corresponding to the webpage information loading request can be obtained. And when the target webpage information is successfully acquired, displaying the target webpage information in the corresponding area, and when the target webpage information is failed to be acquired, displaying the network error prompt information in the corresponding area.
Based on the webpage information loading request, corresponding webpage information, advertisement shielding prompt information or network error prompt information can be displayed in each area, and therefore the process of displaying complete webpage information to a user is completed.
In some possible embodiments, for any web page, after the corresponding web page information, advertisement blocking prompt information or network error prompt information is displayed in each area of the web page, the target web page node can be removed.
And when the target webpage node is removed, removing the target webpage node by adopting a node. It should be particularly noted that the method for removing the target webpage node is only an example, and may be determined based on the actual application scenario requirement, and is not limited herein.
The method for displaying web page information provided in the embodiment of the present application is further described below with reference to fig. 6. Fig. 6 is a flowchart of a web page information displaying method provided in an embodiment of the present application, and as shown in fig. 6, after receiving a web page access request, a web page corresponding to the access request may be opened, and a target web page node may be created in the web page, at this time, if an advertisement blocking plugin exists, the advertisement blocking plugin starts to run at this stage.
When a user browses a webpage, any media HTTP request (webpage information loading request) in the webpage is subjected to advertisement shielding plug-in, if the webpage information corresponding to the media HTTP request is determined to be advertisement information, the advertisement information is shielded, and advertisement shielding prompt information is displayed in a corresponding area. If the webpage information corresponding to the media HTTP request is not determined to be the advertisement information, whether the media HTTP request is successful is determined (namely whether the corresponding webpage information is acquired successfully is determined). If the request is successful, displaying corresponding webpage information in the corresponding area, and if the request is failed, displaying network error prompt information on the corresponding area.
In some possible embodiments, after the target webpage information corresponding to any webpage access request is shielded, the addition instruction for the webpage information loading request may be further responded, and the webpage information loading request is added to the white list. Therefore, after any webpage information loading request is acquired from any webpage next time (for convenience of description, hereinafter referred to as a first webpage information loading request), whether the white list comprises the first webpage information loading request or not can be determined.
If the white list includes the first webpage information loading request, it is not necessary to determine whether an advertisement shielding plug-in exists or not, and it is not necessary to determine whether webpage information corresponding to the first webpage information loading request is advertisement information or not based on the advertisement shielding plug-in, and webpage information corresponding to the first webpage information loading request can be directly obtained. And displaying the webpage information in the corresponding area after the webpage information corresponding to the first webpage information loading request is successfully acquired, and displaying the network error prompt information in the corresponding area after the webpage information corresponding to the first webpage information loading request is unsuccessfully acquired.
Optionally, after an adding instruction for the web page information loading request is received and the web page information loading request is added to the white list, the web page information corresponding to the web page information loading request may also be displayed in a corresponding area.
In some possible embodiments, if the web page information corresponding to at least one web page information loading request in any web page access request is masked, the web page access request may be further added to the white list in response to an add instruction for the web page access request. So that, after any web page access request is detected next time (hereinafter referred to as a first web page access request for convenience of description), it can be determined whether the white list includes the first web page access request.
If the white list includes the first webpage access request, whether an advertisement shielding plug-in exists or not is not required to be determined, whether each webpage information loading request in the webpage corresponding to the first webpage access request corresponds to the advertisement information is not required to be determined based on the advertisement shielding plug-in, each webpage information loading request in the webpage corresponding to the first webpage access request can be directly obtained, and webpage information corresponding to each webpage information loading request is obtained. And when the webpage information corresponding to any webpage information loading request fails to be acquired, displaying the network error prompt information in the corresponding area, and when the webpage information corresponding to any webpage information loading request succeeds in being acquired, displaying the webpage information in the corresponding area.
Optionally, if the web page information corresponding to at least one web page information loading request in any web page access request is masked, after receiving an addition instruction for the web page access request and adding the web page access request to a white list, all the masked web page information corresponding to the web page access request may also be displayed in a corresponding area.
Referring to fig. 7, fig. 7 is a schematic view of a scene for displaying a white list adding prompt message according to an embodiment of the present application. Fig. 7 shows a web page after a web page access request is responded, and partial web page information corresponding to each web page information loading request in the web page corresponding to the web page access request is shielded based on an advertisement shielding plugin, at this time, white list prompt information may be displayed in the web page, if it is detected that the advertisement shielding plugin shields partial content of a web site, and if a complete content is to be displayed, the web site is requested to be added to a white list, so as to prompt a user to add the web page access request to the white list.
The white list may be a white list of the advertisement shielding plugin, and the advertisement shielding plugin may determine whether to shield advertisement information in the webpage based on the white list. Or the white list may be a white list of the browser, and the browser may indicate, based on the white list, the advertisement shielding plug-in to determine whether to shield the advertisement information in the web page, and may specifically be determined based on the actual application scenario requirement, which is not limited herein.
In some possible embodiments, for any piece of advertisement information, the shielding amount of each webpage for the advertisement information may also be determined, and then based on the shielding amount of each webpage for the advertisement information, the preference degree of the user for the advertisement information and the shielding rate of different types of webpages are determined, so as to provide a more reasonable advertisement delivery strategy for advertisement delivery parties.
Optionally, the shielding amount of the advertisement information of different types of websites may also be determined, and then different advertisement shielding policies may be specified for different types of websites based on the shielding amount of the advertisement information corresponding to different types of websites.
In the embodiment of the application, whether the advertisement shielding plug-in is operated in the browser can be determined by creating the target webpage node in the webpage access request, so that the advertisement shielding prompt information can be displayed in a corresponding area under the condition that the advertisement shielding plug-in shields webpage information corresponding to any webpage information loading request. And under the condition that the webpage information loading request is not shielded, the webpage information can be displayed in the corresponding area when the webpage information is successfully acquired, and the network error prompt information can be displayed in the corresponding area when the target webpage information is unsuccessfully acquired. Based on the method, the user can determine which webpage information in the webpage is shielded by the advertisement plug-in, and which webpage information cannot be displayed due to network errors, so that the browsing experience of the user is improved.
And by creating the target webpage node, whether the advertisement shielding plug-in exists can be determined without sending a network request, so that the network resource is saved, and the method is applicable to various browsers and has high applicability.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a web page information display device according to an embodiment of the present application. The webpage information display device provided by the embodiment of the application comprises:
a node creating module 81, configured to respond to a web page access request, acquire a web page corresponding to the web page access request, and create a target web page node in the web page;
an information obtaining module 82, configured to obtain a webpage information loading request for a target area of the webpage and a style attribute of the target webpage node;
and an information display module 83, configured to, if it is determined that an advertisement blocking plugin exists based on the style attribute, and it is determined that target webpage information corresponding to the webpage information loading request is advertisement information based on the advertisement blocking plugin, display advertisement blocking prompt information in the target area after the advertisement blocking plugin blocks the advertisement information.
In some possible embodiments, the information display module 83 is further configured to:
if the advertising shielding plug-in is determined to be absent based on the style attribute or the target webpage information is determined not to be the advertising information based on the advertising shielding plug-in, acquiring the target webpage information corresponding to the webpage information loading request;
and if the target webpage information is failed to be acquired, displaying network error prompt information in the target area.
In some possible embodiments, the information display module 83 is further configured to:
and if the target webpage information is successfully acquired, displaying the target webpage information in the target area.
In some possible embodiments, the information displaying module 83 is configured to:
and if the display attribute in the style attributes is the first attribute, determining that the advertisement shielding plug-in exists.
In some possible embodiments, the advertisement blocking plug-in blocks the webpage node with a preset class name, where the preset class name includes the class name of the target webpage node.
In some possible embodiments, the apparatus further includes a request adding module 84, and the request adding module 84 is further configured to:
and in response to an adding instruction for the webpage information loading request, adding the webpage information loading request to a request white list so as to obtain the target webpage information corresponding to the webpage information loading request after the webpage information loading request is obtained next time.
In some possible embodiments, the node creating module 81 is further configured to:
and removing the target webpage node after displaying corresponding webpage information, advertisement shielding prompt information or network error prompt information in each area of the webpage.
In a specific implementation, the web page information display apparatus may execute the implementation manners provided in the steps in fig. 1 through the built-in function modules, which may specifically refer to the implementation manners provided in the steps, and are not described herein again.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 9, the electronic device 1000 in the present embodiment may include: the processor 1001, the network interface 1004, and the memory 1005, and the electronic device 1000 may further include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1004 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 1005 may alternatively be at least one memory device located remotely from the processor 1001. As shown in fig. 9, the memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the electronic device 1000 shown in fig. 9, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
responding to a webpage access request, acquiring a webpage corresponding to the webpage access request, and creating a target webpage node in the webpage;
acquiring a webpage information loading request aiming at a target area of the webpage and the style attribute of the target webpage node;
and if the advertisement shielding plug-in is determined to exist based on the style attribute and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in, displaying advertisement shielding prompt information in the target area after the advertisement shielding plug-in shields the advertisement information.
In some possible embodiments, the processor 1001 is further configured to:
if it is determined that the advertisement shielding plug-in does not exist based on the style attribute or it is determined that the target webpage information is not the advertisement information based on the advertisement shielding plug-in, target webpage information corresponding to the webpage information loading request is acquired;
and if the target webpage information is failed to be acquired, displaying network error prompt information in the target area.
In some possible embodiments, the processor 1001 is further configured to:
and if the target webpage information is successfully acquired, displaying the target webpage information in the target area.
In some possible embodiments, the processor 1001 is configured to:
and if the display attribute in the style attributes is the first attribute, determining that the advertisement shielding plug-in exists.
In some possible embodiments, the advertisement blocking plug-in blocks a web page node having a preset class name, where the preset class name includes the class name of the target web page node.
In some possible embodiments, the processor 1001 is further configured to:
and in response to an adding instruction for the webpage information loading request, adding the webpage information loading request to a request white list so as to acquire the target webpage information corresponding to the webpage information loading request after the webpage information loading request is acquired next time.
In some possible embodiments, the processor 1001 is further configured to:
and removing the target webpage node after displaying corresponding webpage information, advertisement shielding prompt information or network error prompt information in each area of the webpage.
It should be understood that in some possible embodiments, the processor 1001 may be a Central Processing Unit (CPU), and the processor may be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The portion of memory may also include non-volatile random access memory. For example, the memory may also store device type information.
In a specific implementation, the electronic device 1000 may execute the implementation manners provided in the steps in fig. 1 through the built-in functional modules, which may specifically refer to the implementation manners provided in the steps, and are not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to implement the method provided in each step in fig. 1, which may specifically refer to the implementation manner provided in each step, and is not described herein again.
The computer-readable storage medium may be the web page information presentation apparatus provided in any of the foregoing embodiments or an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash memory card (flash card), and the like, provided on the electronic device. The computer readable storage medium may further include a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), and the like. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the electronic device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided by the steps of fig. 1.
The terms "first", "second", and the like in the claims and in the description and drawings of the present application are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or electronic device that comprises a list of steps or elements is not limited to only those steps or elements recited, but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or electronic device. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Those of ordinary skill in the art will appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, which is therefore intended to be covered by the present application with all equivalent modifications made to the claims of the present application.

Claims (10)

1. A webpage information display method is characterized by comprising the following steps:
responding to a webpage access request, acquiring a webpage corresponding to the webpage access request, and creating a target webpage node in the webpage;
acquiring a webpage information loading request aiming at a target area of the webpage and a style attribute of a target webpage node;
and if the advertisement shielding plug-in is determined to exist based on the style attribute and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in, displaying advertisement shielding prompt information in the target area after the advertisement shielding plug-in shields the advertisement information.
2. The method of claim 1, further comprising:
if the advertising shielding plug-in is determined to be absent based on the style attribute or the target webpage information is determined not to be the advertising information based on the advertising shielding plug-in, acquiring the target webpage information corresponding to the webpage information loading request;
and if the target webpage information is failed to be acquired, displaying network error prompt information in the target area.
3. The method of claim 2, further comprising:
and if the target webpage information is successfully acquired, displaying the target webpage information in the target area.
4. The method of claim 1, wherein determining that an advertising masker is present based on the style attribute comprises:
and if the display attribute in the style attributes is the first attribute, determining that the advertisement shielding plug-in exists.
5. The method of claim 4, wherein the advertisement blocking plugin blocks web page nodes with a preset class name, wherein the preset class name comprises a class name of the target web page node.
6. The method of claim 1, wherein after the advertising screening plugin screens the advertising information, the method further comprises:
responding to an adding instruction aiming at the webpage information loading request, and adding the webpage information loading request to a request white list so as to obtain the target webpage information corresponding to the webpage information loading request after the webpage information loading request is obtained next time.
7. The method of claim 3, further comprising:
and removing the target webpage node after displaying corresponding webpage information, advertisement shielding prompt information or network error prompt information in each area of the webpage.
8. An apparatus for displaying web page information, the apparatus comprising:
the node creating module is used for responding to a webpage access request, acquiring a webpage corresponding to the webpage access request and creating a target webpage node in the webpage;
the information acquisition module is used for acquiring a webpage information loading request aiming at a target area of the webpage and the style attribute of the target webpage node;
and the information display module is used for displaying advertisement shielding prompt information in the target area after the advertisement shielding plug-in shields the advertisement information if the advertisement shielding plug-in is determined to exist based on the style attribute and the target webpage information corresponding to the webpage information loading request is determined to be the advertisement information based on the advertisement shielding plug-in.
9. An electronic device comprising a processor and a memory, the processor and the memory being interconnected;
the memory is used for storing a computer program;
the processor is configured to perform the method of any of claims 1 to 7 when the computer program is invoked.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1 to 7.
CN202111015125.8A 2021-08-31 2021-08-31 Webpage information display method, device, equipment and storage medium Pending CN115730162A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111015125.8A CN115730162A (en) 2021-08-31 2021-08-31 Webpage information display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111015125.8A CN115730162A (en) 2021-08-31 2021-08-31 Webpage information display method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115730162A true CN115730162A (en) 2023-03-03

Family

ID=85291516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111015125.8A Pending CN115730162A (en) 2021-08-31 2021-08-31 Webpage information display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115730162A (en)

Similar Documents

Publication Publication Date Title
US9026902B2 (en) Handling unexpected responses to script executing in client-side application
US9697188B2 (en) Method to enable cross-origin resource sharing from a webpage inside a private network
CN103412928B (en) Method and device for realizing browser page intelligent response-type layout on mobile terminal
US10049168B2 (en) Systems and methods for modifying webpage data
US10542123B2 (en) System and method for generating and monitoring feedback of a published webpage as implemented on a remote client
US20140317482A1 (en) Client side page processing
US20170154013A9 (en) Ad blocking page display method and device
US9519661B2 (en) Method and system for updating a background picture of a web search results page for different search queries
US20100205523A1 (en) Web Widget for Enabling Screen Reader Accessibility for a Web Application
US20130031628A1 (en) Preventing Phishing Attacks
CN104035753A (en) Double-WebView customized page display method and system
CN104820589B (en) A kind of method and its device of dynamic adaptation webpage
CN110533464B (en) Advertisement monitoring method, device and system and computing equipment
EP2867795A1 (en) Methods and systems for secure in-network insertion of web content and web services
US20170371888A1 (en) Method for advertisement interception in dual-kernel browser and browser apparatus
CN112948035A (en) Method and device for controlling micro front-end page, terminal equipment and storage medium
CN106874271A (en) A kind of method and system that PC webpages are converted to mobile terminal webpage
CN111339456B (en) Preloading method and device
CN103559097B (en) The method of interprocess communication, device and browser in a kind of browser
CN111124564A (en) Method and device for displaying user interface
US20140006932A1 (en) Web page update notification device and web page update notification method
CN109325192A (en) A kind of method and apparatus of the anti-shielding of advertisement
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN115730162A (en) Webpage information display method, device, equipment and storage medium
CN114385124A (en) Independent page jumping method, device and equipment based on Vue framework

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination