WO2015109831A1 - 一种网页广告过滤方法及装置 - Google Patents

一种网页广告过滤方法及装置 Download PDF

Info

Publication number
WO2015109831A1
WO2015109831A1 PCT/CN2014/084782 CN2014084782W WO2015109831A1 WO 2015109831 A1 WO2015109831 A1 WO 2015109831A1 CN 2014084782 W CN2014084782 W CN 2014084782W WO 2015109831 A1 WO2015109831 A1 WO 2015109831A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
url information
advertising
module
web page
Prior art date
Application number
PCT/CN2014/084782
Other languages
English (en)
French (fr)
Inventor
刘阳
关翔
焦文超
Original Assignee
贝壳网际(北京)安全技术有限公司
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 贝壳网际(北京)安全技术有限公司 filed Critical 贝壳网际(北京)安全技术有限公司
Publication of WO2015109831A1 publication Critical patent/WO2015109831A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a webpage advertisement filtering method and apparatus. Background technique
  • the webpage data is usually downloaded to the user's client, and the downloaded webpage data is accessed through JavaScript, and it is determined whether the element information such as the data identifier in the downloaded webpage data conforms to the preset. If it is met, it is determined to be a webpage advertisement.
  • the webpage advertisement is not displayed on the client screen, thereby achieving the purpose of filtering the webpage advertisement.
  • the webpage advertisement is filtered by the above method, although the webpage advertisement is not displayed on the client screen, the client still downloads the webpage advertisement data, which causes the user's network traffic to be wasted. Summary of the invention
  • the embodiment of the invention discloses a webpage advertisement filtering method and device, which saves user network traffic while filtering webpage advertisements.
  • the embodiment of the present invention discloses a method for filtering a webpage advertisement, the method comprising: receiving a target webpage access request input by a user, where the target webpage access request carries a uniform resource location of the target webpage URL information;
  • the download request of the target webpage is not sent to the network side; if not, sending a download request of the target webpage to the network side, and obtaining a source code of the target webpage.
  • the method further includes:
  • the method further includes:
  • the resource corresponding to the URL information included in the source code of the target webpage is loaded according to a preset rule, and includes:
  • the method further includes: replacing the nth URL information included in the source code of the target webpage with the preset and the nth Resources with the same resource type corresponding to the URL information;
  • the resource corresponding to the URL information included in the source code of the target webpage is loaded according to a preset rule, and includes:
  • the method further includes:
  • Embodiments of the present invention also provide a computer readable storage medium.
  • the computer readable storage medium is for storing a computer program for executing the web page advertisement filtering method described above at runtime.
  • an embodiment of the present invention discloses a webpage advertisement filtering apparatus, where the apparatus includes: an access request receiving module, configured to receive a target webpage access request input by a user, where the target webpage access request is Carrying the Uniform Resource Locator URL information of the target webpage;
  • a URL information determining module configured to determine whether the URL information of the target webpage meets the first preset advertisement feature
  • the advertisement resource determining module is configured to: when the determination result of the URL information determining module is YES, determine that the target webpage is an advertisement resource, and not send the download request of the target webpage to the network side;
  • a source code obtaining module configured to send a download request of the target webpage to the network side when the judgment result of the URL information determining module is negative, to obtain a source code of the target webpage.
  • the webpage advertisement filtering device further includes:
  • a resource type determining module configured to determine, according to URL information of the target webpage, a type of an advertisement resource corresponding to the target webpage, after the advertisement resource determining module determines that the target webpage is an advertisement resource;
  • a preset resource loading module configured to load a preset resource type of the resource type corresponding to the target webpage.
  • the webpage advertisement filtering device further includes:
  • the URL information corresponding to the resource loading module is configured to: after the source code obtaining module obtains the source code of the target webpage, load the resource corresponding to the URL information included in the source code of the target webpage according to a preset rule;
  • the non-URL information loading module is configured to load non-URL information in the source code of the target webpage.
  • the URL information corresponding to the resource loading module includes: a URL information determining submodule and a first advertising resource determining submodule;
  • the URL information determining sub-module is configured to determine whether the n-th URL information meets the second preset advertisement feature before loading the resource corresponding to the n-th URL information included in the source code of the target webpage;
  • the first advertisement resource determining submodule is configured to determine, when the determination result of the URL information determining submodule is YES, that the resource corresponding to the nth URL information is an advertisement resource, and not sending the nth URL a download request of a resource corresponding to the information; wherein, the number of URL information included in the source code of the target webpage.
  • the URL information corresponding to the resource loading module further includes: a first advertisement resource replacement submodule and a first resource loading submodule;
  • the first advertisement resource replacement submodule configured to: after the first advertisement resource determining submodule determines that the resource corresponding to the nth URL information is an advertisement resource, the first content included in the source code of the target webpage The n URL information is replaced with a preset resource that is consistent with the resource type corresponding to the nth URL information;
  • the first resource loading submodule is configured to load the replaced resource.
  • the URL information corresponding to the resource loading module includes: an advertisement resource determining submodule, a second advertising resource determining submodule, and a second resource loading submodule;
  • the advertisement resource determining sub-module is configured to determine all URL information in the source code of the target webpage that meets the second preset advertisement feature
  • the second advertisement resource determining sub-module is configured to determine that the resource corresponding to the URL information that meets the second preset advertisement feature is an advertisement resource, and does not send the download request of the advertisement resource;
  • the second resource loading sub-module is configured to load a resource corresponding to the URL information of the source code of the target webpage that does not meet the second preset advertisement feature.
  • the URL information corresponding to the resource loading module further includes: a second advertisement resource replacement submodule and a third resource loading submodule;
  • the second advertisement replacement sub-module configured to: after the advertisement resource determination sub-module determines that the resource corresponding to the URL information that meets the second preset advertisement feature is an advertisement resource, the second preset advertisement is met The advertisement corresponding to the URL information of the feature is replaced with a preset resource that is consistent with the type of the advertisement resource;
  • the third resource loading submodule is configured to load the replaced resource.
  • FIG. 1 is a schematic diagram of a first flow chart of a method for filtering a webpage advertisement according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a second method for filtering a webpage advertisement according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a third process of a webpage advertisement filtering method according to an embodiment of the present invention.
  • FIG. 4 is a fourth schematic flowchart of a method for filtering a webpage advertisement according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a fifth method for filtering a webpage advertisement according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a first structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a second structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a third structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a fourth structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a fifth structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention. detailed description
  • FIG. 1 is a first schematic flowchart of a method for filtering a webpage advertisement according to an embodiment of the present invention, where the method includes:
  • S101 Receive a user-entered request for a target webpage access.
  • the user when a user accesses a webpage through a browser or a browser-enabled application, the user first needs to receive an access request for the user to access the target webpage, where the target webpage access request needs to carry the uniform resource locator URL information of the target webpage.
  • the URL information may be directly input by the user in the address bar of the browser or the browser-enabled application, or may be after the user clicks on a certain link information in the opened webpage, the browser or the browser-enabled application from the The information obtained in the source code corresponding to the webpage is obtained.
  • the application is only described by way of example. In actual application, the manner of obtaining the URL information is not limited.
  • S102 Determine whether the URL information of the target webpage meets the first preset advertisement feature, and if yes, perform S103, and if not, perform S104.
  • the specific expression of the first preset advertisement feature may be a keyword, a wildcard matching expression, a string matching expression, or a regular expression.
  • the present application does not limit the specific expression of the first preset advertisement feature.
  • the wildcard matching expression refers to a special statement with an asterisk (*) and a question mark (?). It is used to perform fuzzy search. You can use an asterisk instead of 0 or more characters, and replace the question with a question mark. character. For example: 2100book.com/themes/v2/images/top_* .jpg A acookie.*.gif? , baidu.com/ ⁇ /egg* . swf and so on.
  • a regular expression is a logical formula for string operations, that is, a combination of specific characters defined in advance and combinations of these specific characters to form a "rule string", which is used to express Pair of characters A filtering logic for strings.
  • the first preset advertisement feature may include one or more keywords or expressions described above, and when the browser or the browser-enabled application obtains the URL information of the target webpage, the URL information of the target webpage and the first preset advertisement The keyword or the expression in the feature is matched one by one. If the match hits, the URL information of the target webpage is determined to meet the first preset advertisement feature. If none of the hits are matched, the URL information of the target webpage is determined not to meet the first preset advertisement. feature.
  • S103 determining that the target webpage is an advertisement resource, and not downloading the download request of the target webpage to the network side.
  • the target webpage does not need to be sent to the user from the perspective of filtering the webpage advertisement. Therefore, the browser or the browser-enabled application does not need to send a download request of the target webpage to the network side, so as to filter the webpage advertisement and save user traffic.
  • the browser or the browser-enabled application can also provide the user with prompt information, remind the user that the target webpage is an advertisement resource, and the user can manually select whether to further Send a target web page download request to the network side.
  • S104 Send a download request of the target webpage to the network side, and obtain a source code of the target webpage.
  • the server side of the network side parses the download request of the received target webpage, obtains the URL information of the target webpage, and the server determines according to the URL information of the target webpage. Corresponding source code and provide the source code to a browser or browser-enabled application.
  • FIG. 2 is a second schematic flowchart of a method for filtering a webpage advertisement according to an embodiment of the present invention.
  • the embodiment further includes:
  • the resource type corresponding to the URL information of the target webpage may be an HTML type, a CSS (Cascading Style Sheets) type, a JS (JavaScript) type, an IMAGE type, an XML type, or the like.
  • the resource type corresponding to hiip://inig.adbox.sinaxom n/siatic/css/base.css is CSS type; b tip ://d I . sinaxom. cn/j /inde / 14/s nc .
  • the resource type corresponding to js is JS type;
  • the resource type corresponding to xml is XML type.
  • the advertisement resource corresponding to the target webpage may be replaced with a preset non-advertising resource of the same type.
  • the CSS type of inventory is replaced with: an empty string;
  • the IMAGE type of inventory is replaced with: a 1x1 transparent image
  • the resource used to replace the advertisement resource corresponding to the target webpage for the specific application environment may also be a resource whose type of the advertisement resource corresponding to the target webpage is inconsistent.
  • the advertisement resource type corresponding to the target webpage is
  • Resources of type VIDEO can be replaced with an IMAGE type of non-advertising resources, etc. when replacing.
  • FIG. 3 is a third schematic flowchart of a method for filtering a webpage advertisement according to an embodiment of the present invention. On the basis of the embodiment shown in FIG. 1, the embodiment further includes:
  • S107 Load the resource corresponding to the URL information included in the source code of the target webpage according to a preset rule.
  • the source code of the landing page contains URL information and non-URL information.
  • the resource corresponding to the URL information is loaded, the corresponding resource download request information needs to be sent to the network side, and the corresponding resource can be loaded after receiving the resource data fed back by the network side.
  • the resource corresponding to the URL information included in the source code of the target webpage is loaded ( S 107 ), which may include:
  • the second preset advertisement feature may be exactly the same as the first preset advertisement feature in the embodiment shown in FIG. 1, and is not repeated here.
  • the target webpage may also be The nth URL information included in the source code is replaced by a preset resource type corresponding to the nth URL information. Resources, and load the replaced resources.
  • the resource corresponding to the URL information included in the source code of the target webpage is loaded ( S 107 ) , which may include:
  • S107C Determine all the URL information in the source code of the target webpage that meets the second preset advertisement feature.
  • S107D determining that the resource corresponding to the URL information that meets the second preset advertisement feature is an advertisement resource, and does not send the download request of the advertisement resource.
  • the resource corresponding to the URL information corresponding to the second preset advertisement feature is an advertisement resource
  • the The inventory is replaced with a preset resource that is consistent with the type of inventory, and the replaced resource is loaded.
  • S 107 and S108 have no strict execution time limit, and S 107 may be executed before S 108 or after S 108 , or both.
  • Embodiments of the present invention also provide a computer readable storage medium.
  • the computer readable storage medium is for storing a computer program for executing the web page advertisement filtering method described above at runtime.
  • FIG. 6 is a schematic diagram of a first structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • the apparatus includes: an access request receiving module 601, a URL information determining module 602, an advertisement resource determining module 603, and a source code obtaining module 604.
  • the access request receiving module 601 is configured to receive a target webpage access request input by the user, where the target webpage access request carries the uniform resource locator URL information of the target webpage;
  • the URL information determining module 602 is configured to determine whether the URL information of the target webpage meets the first preset advertisement feature
  • the advertisement determining module 603 is configured to: when the determination result of the URL information determining module is YES, determine that the target webpage is an advertisement resource, and not send the download request of the target webpage to the network side;
  • the source code obtaining module 604 is configured to: when the determination result of the URL information determining module is negative, to the network side Sending a download request of the target webpage to obtain a source code of the target webpage.
  • FIG. 7 is a schematic diagram of a second structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • the embodiment is after the advertisement resource determining module 603.
  • the method further includes: a resource type determining module 605 and a preset resource loading module 606.
  • the resource type determining module 605 is configured to determine, according to the URL information of the target webpage, the type of the advertising resource corresponding to the target webpage, after the advertisement resource determining module 603 determines that the target webpage is an advertisement resource;
  • the preset resource loading module 606 is configured to load a preset resource type resource corresponding to the advertisement resource corresponding to the target webpage.
  • FIG. 8 is a schematic diagram of a third structure of a webpage advertisement filtering apparatus according to an embodiment of the present invention.
  • the method further includes: a URL information corresponding resource loading module 607. And non-URL information loading module 608.
  • the URL information corresponding resource loading module 607 is configured to: after the source code obtaining module 604 obtains the source code of the target webpage, load the URL information included in the source code of the target webpage according to a preset rule.
  • the non-URL information loading module 608 is configured to load non-URL information in the source code of the target webpage.
  • the URL information corresponding resource loading module 607 may include: a URL information determining submodule 6071. And the first advertisement determination sub-module 6072.
  • the URL information determining sub-module 6071 is configured to determine whether the n-th URL information meets the second preset advertisement feature before loading the resource corresponding to the n-th URL information included in the source code of the target webpage;
  • the first advertisement resource determining sub-module 6072 is configured to determine, when the determination result of the URL information determining sub-module 6071 is YES, that the resource corresponding to the n-th URL information is an advertisement resource, and does not send the n-th URL. a download request of a resource corresponding to the information; wherein, the number of URL information included in the source code of the target webpage.
  • the URL information corresponding to the resource loading module 607 may further include: a first advertisement resource replacement submodule and a first resource loading submodule (not shown).
  • the first advertisement resource replacement submodule is configured to: after the advertisement resource determining submodule 6072 determines that the resource corresponding to the nth URL information is an advertisement resource, the nth included in the source code of the target webpage
  • the URL information is replaced with a preset resource that is consistent with the resource type corresponding to the nth URL information.
  • the first resource loading submodule is configured to load the replaced resource.
  • the URL information corresponding resource loading module 607 may include: an advertisement resource determining submodule 6073.
  • the advertisement resource determining sub-module 6073 is configured to determine all URL information in the source code of the target webpage that meets the second preset advertisement feature.
  • the second advertisement resource determining sub-module 6074 is configured to determine that the resource corresponding to the URL information that meets the second preset advertisement feature is an advertisement resource, and does not send the download request of the advertisement resource;
  • the second resource loading sub-module 6075 is configured to load a resource corresponding to the URL information of the source code of the target webpage that does not meet the second preset advertisement feature.
  • the URL information corresponding to the resource loading module 607 may further include: a second advertisement resource replacement submodule and a third resource loading submodule (not shown).
  • the second advertisement resource replacement sub-module is configured to: after the advertisement resource determination sub-module 6073 determines that the resource corresponding to the URL information corresponding to the second preset advertisement feature is an advertisement resource, the second preset is met The advertisement resource corresponding to the URL information of the advertisement feature is replaced with a preset resource that is consistent with the type of the advertisement resource; and the third resource loading sub-module is configured to load the replaced resource.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

公开了一种网页广告过滤方法及装置,所述方法包括:接收用户输入的针对目标网页访问请求,其中,所述目标网页访问请求中,携带目标网页的统一资源定位符URL信息;判断所述目标网页的URL信息是否符合第一预设广告特征;如果是,判定所述目标网页为广告资源,不向网络侧发送所述目标网页的下载请求;如果否,向网络侧发送所述目标网页的下载请求,获得所述目标网页的源代码。提供的网页广告过滤方法及装置进行网页广告过滤时,在过滤网页广告的同时可以节省用户流量。

Description

一种网页广告过滤方法及装置
技术领域
本发明涉及网络通信技术领域, 特别涉及一种网页广告过滤方法及装置。 背景技术
随着网络用户数量的逐年上升, 广告商开始在网页上大量投放广告, 广告给用户提 供信息的同时也给大多数用户带来干扰, 因此, 从用户的角度看, 有必要对网页中的广 告进行过滤。
现有技术中, 过滤网页广告时, 通常先将网页数据下载到用户的客户端, 再通过 JavaScript 访问已下载的网页数据, 并判断已下载的网页数据中的数据标识等元素信息 是否符合预设的规贝 lj,若符合,则判定为网页广告,通过修改 CSS( Cascading Style Sheets, 层叠样式表单) 的方式, 使得网页广告不在客户端屏幕上显示, 从而达到过滤网页广告 的目的。然而,通过上述方式过滤网页广告时, 虽然网页广告没有在客户端屏幕上显示, 但是客户端依然下载了网页广告数据, 造成了用户网络流量浪费。 发明内容
本发明实施例公开了一种网页广告过滤方法及装置, 在过滤网页广告的同时节省用 户网络流量。
为达到上述目的, 本发明实施例公开了一种网页广告过滤方法, 所述方法包括: 接收用户输入的针对目标网页访问请求, 其中, 所述目标网页访问请求中, 携带目 标网页的统一资源定位符 URL信息;
判断所述目标网页的 URL信息是否符合第一预设广告特征;
如果是,判定所述目标网页为广告资源,不向网络侧发送所述目标网页的下载请求; 如果否, 向网络侧发送所述目标网页的下载请求, 获得所述目标网页的源代码。 较佳的, 在所述判定所述目标网页为广告资源之后, 还包括:
根据所述目标网页的 URL信息确定所述目标网页对应的广告资源的类型; 加载预设的与所述目标网页对应的广告资源的资源类型一致的资源。
较佳的, 获得所述目标网页的源代码之后, 还包括:
按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应的资源; 加载所述目标网页的源代码中的非 URL信息。
较佳的, 所述按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应 的资源, 包括:
在加载所述目标网页的源代码中包含的第 n个 URL信息对应的资源之前, 判断所 述第 n个 URL信息是否符合第二预设广告特征;
如果是,判定所述第 n个 URL信息对应的资源为广告资源,不发送所述第 n个 URL 信息对应的资源的下载请求; 其中, 所述目标网页的源代码中包含的 URL信息 的数量。
较佳的, 在判定所述第 η个 URL信息对应的资源为广告资源之后, 还包括: 将所述目标网页的源代码中包含的第 η 个 URL 信息替换为预设的与所述第 η个 URL信息对应的资源类型一致的资源;
加载替换后的资源。
较佳的, 所述按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应 的资源, 包括:
确定所述目标网页的源代码中所有符合第二预设广告特征的 URL信息; 判定所述符合第二预设广告特征的 URL信息对应的资源为广告资源, 不发送所述 广告资源的下载请求;
加载所述目标网页的源代码中不符合第二预设广告特征的 URL信息对应的资源。 较佳的, 在判定所述符合第二预设广告特征的 URL信息对应的资源为广告资源之 后, 还包括:
将所述符合第二预设广告特征的 URL信息对应的广告资源替换为预设的与所述广 告资源类型一致的资源;
加载替换后的资源。
本发明的实施例还提供了一种计算机可读存储介质。该计算机可读存储介质用于存 储计算机程序, 该计算机程序在运行时用于执行上述网页广告过滤方法。
为达到上述目的, 本发明实施例公开了一种网页广告过滤装置, 所述装置包括: 访问请求接收模块, 用于接收用户输入的针对目标网页访问请求, 其中, 所述目标 网页访问请求中, 携带目标网页的统一资源定位符 URL信息;
URL信息判断模块, 用于判断所述目标网页的 URL信息是否符合第一预设广告特 征;
广告资源判定模块, 用于在所述 URL信息判断模块的判断结果为是时, 判定所述 目标网页为广告资源, 不向网络侧发送所述目标网页的下载请求;
源代码获得模块, 用于在所述 URL信息判断模块的判断结果为否时, 向网络侧发 送所述目标网页的下载请求, 获得所述目标网页的源代码。
较佳的, 所述网页广告过滤装置还包括:
资源类型确定模块, 用于在所述广告资源判定模块判定所述目标网页为广告资源 后, 根据所述目标网页的 URL信息确定所述目标网页对应的广告资源的类型;
预设资源加载模块, 用于加载预设的与所述目标网页对应的广告资源的资源类型一 致的资源。
较佳的, 所述网页广告过滤装置还包括:
URL信息对应资源加载模块,用于在所述源代码获得模块获得所述目标网页的源代 码之后, 按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应的资源; 非 URL信息加载模块, 用于加载所述目标网页的源代码中的非 URL信息。
较佳的, 所述 URL信息对应资源加载模块, 包括: URL信息判断子模块和第一广 告资源判定子模块;
所述 URL信息判断子模块,用于在加载所述目标网页的源代码中包含的第 n个 URL 信息对应的资源之前, 判断所述第 n个 URL信息是否符合第二预设广告特征;
所述第一广告资源判定子模块, 用于在所述 URL信息判断子模块的判断结果为是 时, 判定所述第 n个 URL信息对应的资源为广告资源, 不发送所述第 n个 URL信息对 应的资源的下载请求; 其中, 所述目标网页的源代码中包含的 URL信息的数量。
较佳的, 所述 URL信息对应资源加载模块, 还包括: 第一广告资源替换子模块和 第一资源加载子模块;
所述第一广告资源替换子模块, 用于在所述第一广告资源判定子模块判定所述第 η 个 URL信息对应的资源为广告资源之后,将所述目标网页的源代码中包含的第 η个 URL 信息替换为预设的与所述第 n个 URL信息对应的资源类型一致的资源;
所述第一资源加载子模块, 用于加载替换后的资源。
较佳的, 所述 URL信息对应资源加载模块, 包括: 广告资源确定子模块、 第二广 告资源判定子模块和第二资源加载子模块;
所述广告资源确定子模块, 用于确定所述目标网页的源代码中所有符合第二预设广 告特征的 URL信息;
所述第二广告资源判定子模块, 用于判定所述符合第二预设广告特征的 URL信息 对应的资源为广告资源, 不发送所述广告资源的下载请求;
所述第二资源加载子模块, 用于加载所述目标网页的源代码中不符合第二预设广告 特征的 URL信息对应的资源。
较佳的, 所述 URL信息对应资源加载模块, 还包括: 第二广告资源替换子模块和 第三资源加载子模块;
所述第二广告资源替换子模块, 用于在所述广告资源确定子模块判定所述符合第二 预设广告特征的 URL信息对应的资源为广告资源之后, 将所述符合第二预设广告特征 的 URL信息对应的广告资源替换为预设的与所述广告资源类型一致的资源;
所述第三资源加载子模块, 用于加载替换后的资源。
由以上可见, 本方案中在下载网页源代码之前, 通过判断目标网页的 URL信息是 否符合第一预设广告特征的方式, 判定目标网页是否为广告资源。 当判断得目标网页为 广告资源时, 不向网络侧发送目标网页的下载请求信息, 因此, 与现有技术相比, 在过 滤网页广告的同时可以节省用户流量。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例或现有 技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还 可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的网页广告过滤方法的第一种流程示意图;
图 2为本发明实施例提供的网页广告过滤方法的第二种流程示意图;
图 3为本发明实施例提供的网页广告过滤方法的第三种流程示意图;
图 4为本发明实施例提供的网页广告过滤方法的第四种流程示意图;
图 5为本发明实施例提供的网页广告过滤方法的第五种流程示意图;
图 6为本发明实施例提供的网页广告过滤装置的第一种结构示意图;
图 7为本发明实施例提供的网页广告过滤装置的第二种结构示意图;
图 8为本发明实施例提供的网页广告过滤装置的第三种结构示意图;
图 9为本发明实施例提供的网页广告过滤装置的第四种结构示意图;
图 10为本发明实施例提供的网页广告过滤装置的第五种结构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整 地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基 于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获得的所有 其他实施例, 都属于本发明保护的范围。
图 1为本发明实施例提供的网页广告过滤方法的第一种流程示意图, 该方法包括:
S 101: 接收用户输入的针对目标网页访问请求。
实际应用中, 用户通过浏览器或者具有浏览器功能的应用访问网页时, 首先要接收 用户访问目标网页的访问请求, 其中, 目标网页访问请求中, 需携带目标网页的统一资 源定位符 URL信息。 URL信息可以是用户在浏览器或者具有浏览器功能的应用的地址 栏直接输入的, 也可以是用户点击已打开网页中的某一链接信息后, 浏览器或者具有浏 览器功能的应用从该已打开网页对应的源代码中获得的, 当然本申请只是以上述为例进 行说明, 实际应用中, 并不对 URL信息的获得方式进行限定。
S 102: 判断所述目标网页的 URL信息是否符合第一预设广告特征, 如果是, 进行 S 103 , 如果否, 进行 S 104。
其中, 第一预设广告特征的具体表现形式可以是关键字、 通配符匹配表达式、 字符 串匹配表达式或正则表达式等等, 本申请不对第一预设广告特征的具体表现形式进行限 定。
具体的, 通配符匹配表达式, 是指主要有星号 (* ) 和问号 (? ) 的一种特殊语句, 用来进行模糊搜索, 可以使用星号代替 0个或多个字符, 用问号代替一个字符。 例如: 2100book.com/themes/v2/images/top_* .jpg A acookie.*.gif?、 baidu.com/^/egg* . swf等等。
正则表达式,是指对字符串操作的一种逻辑公式,即用事先定义好的一些特定字符、 及这些特定字符的组合, 组成一个 "规则字符串" , 该 "规则字符串"用来表达对字符 串的一种过滤逻辑。 例如:
/:\/\/([Λ\/]+\.)? amazon\.com[A-\.%a-zA-Z0-9].*\/getaanad\?
/:\/\/([Λ\/]+\.)? bergen\.com[A-\.%a-zA-Z0-9] .*\/sponsoredby-/
/:\/\/([A\/]+\.)?boago\.com[A-\.%a-zA-Z0-9].*_Takeover_/等等。
第一预设广告特征可以包括上述的一个或多个关键字或表达式, 当浏览器或者具有 浏览器功能的应用获得目标网页的 URL信息后, 将目标网页的 URL信息与第一预设广 告特征中的关键字或者表达式逐个匹配, 若匹配命中, 则判定目标网页的 URL信息符 合第一预设广告特征, 若均未匹配命中, 则判定目标网页的 URL信息不符合第一预设 广告特征。
S 103 : 判定所述目标网页为广告资源, 不向网络侧发送所述目标网页的下载请求。 本实施例中, 在 S 102判断得目标网页的 URL信息不符合第一预设广告特征后, 则 判定该目标网页为广告资源,从过滤网页广告的角度来看,该目标网页不需向用户展示, 因此, 浏览器或者具有浏览器功能的应用不需向网络侧发送目标网页的下载请求, 以达 到过滤网页广告且节省用户流量的目的。 实际应用中, 考虑到为用户提供更佳的体验效 果, 浏览器或者具有浏览器功能的应用还可以为用户提供提示信息, 提醒用户该目标网 页为广告资源, 并且可以由用户来手动选择是否进一步向网络侧发送目标网页下载请 求。
S 104: 向网络侧发送所述目标网页的下载请求, 获得所述目标网页的源代码。 浏览器或者具有浏览器功能的应用向网络侧发送目标网页的下载请求后, 网络侧的 服务器端解析接收到的目标网页的下载请求, 获得目标网页的 URL信息, 服务器根据 目标网页的 URL信息确定相应的源代码, 并将该源代码提供给浏览器或者具有浏览器 功能的应用。
由以上可见, 本方案中在下载目标网页源代码之前, 通过判断目标网页的 URL信 息是否符合第一预设广告特征的方式, 判定目标网页是否为广告资源。 当判断得目标网 页为广告资源时, 不向网络侧发送目标网页的下载请求信息, 因此, 与现有技术相比, 在过滤网页广告的同时可以节省用户流量。
应用本发明实施例提供的网页广告过滤方法进行网页广告过滤时, 还可以用预设的 资源代替网页中的广告资源, 以便为用户提供较佳的体验效果, 为此, 本发明实施例提 供了另一种具体实现方式, 图 2为本发明实施例提供的网页广告过滤方法的第二种流程 示意图, 在图 1所示实施例的基础之上, 本实施例在 S 103之后, 还包括:
S 105 : 根据所述目标网页的 URL信息确定所述目标网页对应的广告资源的类型。 实际应用中, 目标网页的 URL 信息对应的资源类型可以是 HTML 类型、 CSS ( Cascading Style Sheets ) 类型、 JS ( JavaScript ) 类型、 IMAGE类型、 XML类型等等。
具体的, 例如:
http://rn.sina.com.cn/rn/finance.html对应的资源类型为 HTML类型;
hiip://inig.adbox.sinaxom n/siatic/css/base.css对应的资源类型为 CSS类型; b tip ://d I . sinaxom. cn/j /inde / 14/s nc . j s对应的资源类型为 JS类型;
hiip ://13 , sinaimg .cn/home/2013/0331/U586P30DT20130331093840,png 对应的资源类 型为 IMAGE类型;
hi ίρ ://w w w . china61.org/jo bs . xml对应的资源类型为 XML类型。
S 106: 加载预设的与所述目标网页对应的广告资源的资源类型一致的资源。
应用本实施例提供的方法进行网页广告过滤时, 可以将目标网页对应的广告资源替 换为预设的同类型的非广告资源。 例如:
HTML类型的广告资源替换为: <html><body></body></html>;
JS类型的广告资源替换为: (functionOU) ;
CSS类型的广告资源替换为: 一个空的字符串;
IMAGE类型的广告资源替换为: 一个 1x1的透明图片;
XML类型的广告资源替换为: <?xml version="1.0"?><root></root>等等。
当然, 针对具体的应用环境用于替换目标网页对应的广告资源的资源也可以是与目 标网页对应的广告资源的类型不一致的资源, 例如, 目标网页对应的广告资源类型为
VIDEO类型的资源, 在替换时可以用一个 IMAGE类型的非广告资源替换等等。
由以上可见, 本方案中用预设的与目标网页对应的广告资源类型一致的资源替换目 标网页对应的广告资源, 保持了替换前后目标网页中资源类型的一致性, 不易引起展示 网页时的格式错误, 能够为用户提供较佳的体验效果。
图 3为本发明实施例提供的网页广告过滤方法的第三种流程示意图, 在图 1所示实 施例的基础之上, 本实施例在 S 104之后, 还包括:
S 107 : 按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应的资源。 目标网页的源代码中包含 URL信息和非 URL信息。 其中, 在加载 URL信息对应 的资源时, 需先向网络侧发送相应资源下载请求信息, 在接收到网络侧反馈的资源数据 之后才能够加载相应资源。
可选的, 如图 4提供的网页广告过滤方法的第四种流程示意图所示, 在本发明的另 一种具体实现中, 加载所述目标网页的源代码中包含的 URL信息对应的资源 (S 107 ), 可以包括:
S 107A: 在加载所述目标网页的源代码中包含的第 n个 URL信息对应的资源之前, 判断所述第 n个 URL信息是否符合第二预设广告特征, 如果是, 判定所述第 n个 URL 信息对应的资源为广告资源, 不发送所述第 n个 URL信息对应的资源的下载请求, 其 中, 所述目标网页的源代码中包含的 URL信息的数量。
本实施例中, 第二预设广告特征可以与图 1所示实施例中的第一预设广告特征完全 相同, 这里不再重复。
依据图 2所示实施例提供的方法, 本领域内的技术人员可以理解的是,在 S 107A中 判定所述第 η个 URL信息对应的资源为广告资源之后, 还可以将所述目标网页的源代 码中包含的第 η个 URL信息替换为预设的与所述第 η个 URL信息对应的资源类型一致 的资源, 并加载替换后的资源。
S 107B : 在加载所述目标网页的源代码中包含的第 n个 URL信息对应的资源之前, 判断所述第 n个 URL信息是否符合第二预设广告特征, 如果否, 判定所述第 n个 URL 信息对应的资源为非广告资源, 发送所述第 n个 URL信息对应的资源下载请求, 并加 载所述第 n个 URL信息对应的资源,其中, 所述目标网页的源代码中包含的 URL 信息的数量。
可选的, 如图 5提供的网页广告过滤方法的第五种流程示意图所示, 在本发明的另 一种具体实现中, 加载所述目标网页的源代码中包含的 URL信息对应的资源 (S 107 ) , 可以包括:
S 107C: 确定所述目标网页的源代码中所有符合第二预设广告特征的 URL信息。
S 107D: 判定所述符合第二预设广告特征的 URL信息对应的资源为广告资源, 不发 送所述广告资源的下载请求。
依据图 2所示实施例提供的方法, 本领域内的技术人员可以理解的是, 在判定所述 符合第二预设广告特征的 URL信息对应的资源为广告资源之后, 还可以将将所述广告 资源替换为预设的与所述广告资源类型一致的资源, 并加载替换后的资源。
S 107E:加载所述目标网页的源代码中不符合第二预设广告特征的 URL信息对应的 资源。
S 108: 加载所述目标网页的源代码中的非 URL信息。
需要说明的是, 实际应用中 S 107和 S108没有严格的执行时间限制, S 107可以在 S 108之前执行, 也可以在 S 108之后执行, 还可以两者同时执行。
由以上可见, 本方案中在下载目标网页源代码之前, 通过判断目标网页的 URL信 息是否符合第一预设广告特征的方式, 判定目标网页是否为广告资源。 当判断得目标网 页为广告资源时, 不向网络侧发送目标网页的下载请求信息, 因此, 与现有技术相比, 在过滤网页广告的同时可以节省用户流量。
本发明的实施例还提供了一种计算机可读存储介质。该计算机可读存储介质用于存 储计算机程序, 该计算机程序在运行时用于执行上述网页广告过滤方法。
图 6为本发明实施例提供的网页广告过滤装置的第一种结构示意图, 该装置包括: 访问请求接收模块 601、 URL信息判断模块 602、 广告资源判定模块 603和源代码获得 模块 604。
其中, 访问请求接收模块 601, 用于接收用户输入的针对目标网页访问请求, 其中, 所述目标网页访问请求中, 携带目标网页的统一资源定位符 URL信息;
URL信息判断模块 602, 用于判断所述目标网页的 URL信息是否符合第一预设广 告特征;
广告资源判定模块 603, 用于在所述 URL信息判断模块的判断结果为是时, 判定所 述目标网页为广告资源, 不向网络侧发送所述目标网页的下载请求;
源代码获得模块 604, 用于在所述 URL信息判断模块的判断结果为否时, 向网络侧 发送所述目标网页的下载请求, 获得所述目标网页的源代码。
由以上可见, 本方案中在下载目标网页源代码之前, 通过判断目标网页的 URL信 息是否符合第一预设广告特征的方式, 判定目标网页是否为广告资源。 当判断得目标网 页为广告资源时, 不向网络侧发送目标网页的下载请求信息, 因此, 与现有技术相比, 在过滤网页广告的同时可以节省用户流量。
应用本发明实施例提供的网页广告过滤装置进行网页广告过滤时, 还可以用预设的 资源代替网页中的广告资源, 以便为用户提供较佳的体验效果, 为此, 本发明实施例提 供了另一种具体实现方式, 图 7为本发明实施例提供的网页广告过滤装置的第二种结构 示意图, 在图 6所示实施例的基础之上, 本实施例在广告资源判定模块 603之后, 还包 括: 资源类型确定模块 605和预设资源加载模块 606。
其中, 资源类型确定模块 605, 用于在所述广告资源判定模块 603判定所述目标网 页为广告资源后, 根据所述目标网页的 URL信息确定所述目标网页对应的广告资源的 类型;
预设资源加载模块 606, 用于加载预设的与所述目标网页对应的广告资源的资源类 型一致的资源。
由以上可见, 本方案中用预设的与目标网页对应的广告资源类型一致的资源替换目 标网页对应的广告资源, 保持了替换前后目标网页中资源类型的一致性, 不易引起展示 网页时的格式错误, 能够为用户提供较佳的体验效果。
图 8为本发明实施例提供的网页广告过滤装置的第三种结构示意图, 在图 6所示实 施例的基础之上, 在源代码获得模块 604之后, 还包括: URL信息对应资源加载模块 607和非 URL信息加载模块 608。
其中, URL信息对应资源加载模块 607, 用于在所述源代码获得模块 604获得所述 目标网页的源代码之后, 按照预设规则, 加载所述目标网页的源代码中包含的 URL信 息对应的资源;
非 URL信息加载模块 608, 用于加载所述目标网页的源代码中的非 URL信息。 可选的, 如图 9提供的网页广告过滤装置的第四种结构示意图所示, 在本发明的另 一种具体实现中, URL信息对应资源加载模块 607, 可以包括: URL信息判断子模块 6071和第一广告资源判定子模块 6072。
其中, URL信息判断子模块 6071, 用于在加载所述目标网页的源代码中包含的第 n 个 URL信息对应的资源之前, 判断所述第 n个 URL信息是否符合第二预设广告特征; 第一广告资源判定子模块 6072,用于在所述 URL信息判断子模块 6071的判断结果 为是时, 判定所述第 n个 URL信息对应的资源为广告资源, 不发送所述第 n个 URL信 息对应的资源的下载请求; 其中, 所述目标网页的源代码中包含的 URL信息的 数量。
在本发明的另一具体实现方式中, URL信息对应资源加载模块 607, 还可以包括: 第一广告资源替换子模块和第一资源加载子模块 (图中未示出) 。 所述第一广告资源替换子模块,用于在所述广告资源判定子模块 6072判定所述第 n 个 URL信息对应的资源为广告资源之后,将所述目标网页的源代码中包含的第 n个 URL 信息替换为预设的与所述第 n个 URL信息对应的资源类型一致的资源; 所述第一资源 加载子模块, 用于加载替换后的资源。
可选的, 如图 10提供的网页广告过滤装置的第五种结构示意图所示, 在本发明的 另一种具体实现中, URL信息对应资源加载模块 607, 可以包括: 广告资源确定子模块 6073、 第二广告资源判定子模块 6074和第二资源加载子模块 6075。
其中,所述广告资源确定子模块 6073,用于确定所述目标网页的源代码中所有符合 第二预设广告特征的 URL信息;
所述第二广告资源判定子模块 6074, 用于判定所述符合第二预设广告特征的 URL 信息对应的资源为广告资源, 不发送所述广告资源的下载请求;
所述第二资源加载子模块 6075,用于加载所述目标网页的源代码中不符合第二预设 广告特征的 URL信息对应的资源。
在本发明的另一种具体实现方式中, URL信息对应资源加载模块 607,还可以包括: 第二广告资源替换子模块和第三资源加载子模块 (图中未示出) 。
所述第二广告资源替换子模块, 用于在所述广告资源确定子模块 6073 判定所述符 合第二预设广告特征的 URL信息对应的资源为广告资源之后, 将所述符合第二预设广 告特征的 URL信息对应的广告资源替换为预设的与所述广告资源类型一致的资源; 所 述第三资源加载子模块, 用于加载替换后的资源。
由以上可见, 本方案中在下载目标网页源代码之前, 通过判断目标网页的 URL信 息是否符合第一预设广告特征的方式, 判定目标网页是否为广告资源。 当判断得目标网 页为广告资源时, 不向网络侧发送目标网页的下载请求信息, 因此, 与现有技术相比, 在过滤网页广告的同时可以节省用户流量。
对于装置实施例而言, 由于其基本相似于方法实施例, 所以描述的比较简单, 相关 之处参见方法实施例的部分说明即可。
需要说明的是, 在本文中, 诸如第一和第二等之类的关系术语仅仅用来将一个实体 或者操作与另一个实体或操作区分开来, 而不一定要求或者暗示这些实体或操作之间存 在任何这种实际的关系或者顺序。 而且, 术语"包括"、 "包含 "或者其任何其他变体意在 涵盖非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者设备不仅包括 那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这种过程、 方法、 物 品或者设备所固有的要素。 在没有更多限制的情况下, 由语句 "包括一个 ... ... "限定的要 素, 并不排除在包括所述要素的过程、 方法、 物品或者设备中还存在另外的相同要素。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以 通过程序来指令相关的硬件来完成, 所述的程序可以存储于计算机可读取存储介质中, 这里所称得的存储介质, 如: ROM/RAM, 磁碟、 光盘等。
以上所述仅为本发明的较佳实施例而已, 并非用于限定本发明的保护范围。 凡在本 发明的精神和原则之内所作的任何修改、 等同替换、 改进等, 均包含在本发明的保护范 围内。

Claims

权利要求书
1、 一种网页广告过滤方法, 其特征在于, 所述方法包括:
接收用户输入的针对目标网页访问请求, 其中, 所述目标网页访问请求中, 携带目 标网页的统一资源定位符 URL信息;
判断所述目标网页的 URL信息是否符合第一预设广告特征;
如果是,判定所述目标网页为广告资源,不向网络侧发送所述目标网页的下载请求; 如果否, 向网络侧发送所述目标网页的下载请求, 获得所述目标网页的源代码。
2、 根据权利要求 1 所述的方法, 其特征在于, 在所述判定所述目标网页为广告资 源之后, 还包括:
根据所述目标网页的 URL信息确定所述目标网页对应的广告资源的类型; 加载预设的与所述目标网页对应的广告资源的资源类型一致的资源。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 获得所述目标网页的源代码之 后, 还包括:
按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应的资源; 加载所述目标网页的源代码中的非 URL信息。
4、 根据权利要求 3所述的方法, 其特征在于, 所述按照预设规则, 加载所述目标 网页的源代码中包含的 URL信息对应的资源, 包括:
在加载所述目标网页的源代码中包含的第 n个 URL信息对应的资源之前, 判断所 述第 n个 URL信息是否符合第二预设广告特征;
如果是,判定所述第 n个 URL信息对应的资源为广告资源,不发送所述第 n个 URL 信息对应的资源的下载请求; 其中, 所述目标网页的源代码中包含的 URL信息 的数量。
5、 根据权利要求 4所述的方法, 其特征在于, 在判定所述第 η个 URL信息对应的 资源为广告资源之后, 还包括:
将所述目标网页的源代码中包含的第 η 个 URL 信息替换为预设的与所述第 η个 URL信息对应的资源类型一致的资源;
加载替换后的资源。
6、 根据权利要求 3所述的方法, 其特征在于, 所述按照预设规则, 加载所述目标 网页的源代码中包含的 URL信息对应的资源, 包括:
确定所述目标网页的源代码中所有符合第二预设广告特征的 URL信息;
判定所述符合第二预设广告特征的 URL信息对应的资源为广告资源, 不发送所述 广告资源的下载请求;
加载所述目标网页的源代码中不符合第二预设广告特征的 URL信息对应的资源。
7、 根据权利要求 6所述的方法, 其特征在于, 在判定所述符合第二预设广告特征 的 URL信息对应的资源为广告资源之后, 还包括: 将所述符合第二预设广告特征的 URL信息对应的广告资源替换为预设的与所述广 告资源类型一致的资源;
加载替换后的资源。
8、 一种网页广告过滤装置, 其特征在于, 所述装置包括:
访问请求接收模块, 用于接收用户输入的针对目标网页访问请求, 其中, 所述目标 网页访问请求中, 携带目标网页的统一资源定位符 URL信息;
URL信息判断模块, 用于判断所述目标网页的 URL信息是否符合第一预设广告特 征;
广告资源判定模块, 用于在所述 URL信息判断模块的判断结果为是时, 判定所述 目标网页为广告资源, 不向网络侧发送所述目标网页的下载请求;
源代码获得模块, 用于在所述 URL信息判断模块的判断结果为否时, 向网络侧发 送所述目标网页的下载请求, 获得所述目标网页的源代码。
9、 根据权利要求 8所述的装置, 其特征在于, 所述装置还包括:
资源类型确定模块, 用于在所述广告资源判定模块判定所述目标网页为广告资源 后, 根据所述目标网页的 URL信息确定所述目标网页对应的广告资源的类型;
预设资源加载模块, 用于加载预设的与所述目标网页对应的广告资源的资源类型一 致的资源。
10、 根据权利要求 8或 9所述的装置, 其特征在于, 所述装置还包括:
URL信息对应资源加载模块,用于在所述源代码获得模块获得所述目标网页的源代 码之后, 按照预设规则, 加载所述目标网页的源代码中包含的 URL信息对应的资源; 非 URL信息加载模块, 用于加载所述目标网页的源代码中的非 URL信息。
11、根据权利要求 10所述的装置,其特征在于, 所述 URL信息对应资源加载模块, 包括: URL信息判断子模块和第一广告资源判定子模块;
所述 URL信息判断子模块,用于在加载所述目标网页的源代码中包含的第 n个 URL 信息对应的资源之前, 判断所述第 n个 URL信息是否符合第二预设广告特征;
所述第一广告资源判定子模块, 用于在所述 URL信息判断子模块的判断结果为是 时, 判定所述第 n个 URL信息对应的资源为广告资源, 不发送所述第 n个 URL信息对 应的资源的下载请求; 其中, 所述目标网页的源代码中包含的 URL信息的数量。
12、根据权利要求 11所述的装置,其特征在于, 所述 URL信息对应资源加载模块, 还包括: 第一广告资源替换子模块和第一资源加载子模块;
所述第一广告资源替换子模块, 用于在所述第一广告资源判定子模块判定所述第 η 个 URL信息对应的资源为广告资源之后,将所述目标网页的源代码中包含的第 η个 URL 信息替换为预设的与所述第 n个 URL信息对应的资源类型一致的资源;
所述第一资源加载子模块, 用于加载替换后的资源。
13、根据权利要求 10所述的装置,其特征在于, 所述 URL信息对应资源加载模块, 包括: 广告资源确定子模块、 第二广告资源判定子模块和第二资源加载子模块; 所述广告资源确定子模块, 用于确定所述目标网页的源代码中所有符合第二预设广 告特征的 URL信息;
所述第二广告资源判定子模块, 用于判定所述符合第二预设广告特征的 URL信息 对应的资源为广告资源, 不发送所述广告资源的下载请求;
所述第二资源加载子模块, 用于加载所述目标网页的源代码中不符合第二预设广告 特征的 URL信息对应的资源。
14、根据权利要求 13所述的装置,其特征在于, 所述 URL信息对应资源加载模块, 还包括: 第二广告资源替换子模块和第三资源加载子模块;
所述第二广告资源替换子模块, 用于在所述广告资源确定子模块判定所述符合第二 预设广告特征的 URL信息对应的资源为广告资源之后, 将所述符合第二预设广告特征 的 URL信息对应的广告资源替换为预设的与所述广告资源类型一致的资源;
所述第三资源加载子模块, 用于加载替换后的资源。
15、 一种计算机可读存储介质, 其特征在于, 用于存储计算机程序, 所述计算机程 序在运行时用于执行权利要求 1-7中任一项所述的网页广告过滤方法。
PCT/CN2014/084782 2014-01-24 2014-08-20 一种网页广告过滤方法及装置 WO2015109831A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410036481.1A CN104809119A (zh) 2014-01-24 2014-01-24 一种网页广告过滤方法及装置
CN201410036481.1 2014-01-24

Publications (1)

Publication Number Publication Date
WO2015109831A1 true WO2015109831A1 (zh) 2015-07-30

Family

ID=53680761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084782 WO2015109831A1 (zh) 2014-01-24 2014-08-20 一种网页广告过滤方法及装置

Country Status (2)

Country Link
CN (1) CN104809119A (zh)
WO (1) WO2015109831A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009232A (zh) * 2017-11-29 2018-05-08 北京小米移动软件有限公司 广告屏蔽方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893428A (zh) * 2015-12-07 2016-08-24 乐视移动智能信息技术(北京)有限公司 广告过滤方法、装置及移动终端
CN105897900A (zh) * 2016-04-22 2016-08-24 北京小米移动软件有限公司 资源获取方法及装置
CN106126678A (zh) * 2016-06-28 2016-11-16 乐视控股(北京)有限公司 一种数据处理方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017490A (zh) * 2006-02-10 2007-08-15 鸿富锦精密工业(深圳)有限公司 自动下载和过滤网页的系统及方法
US20120016744A1 (en) * 2002-07-25 2012-01-19 Google Inc. Method and System for Providing Filtered and/or Masked Advertisements Over the Internet
CN103530560A (zh) * 2013-09-29 2014-01-22 北京金山网络科技有限公司 广告拦截的方法、装置和客户端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6449636B1 (en) * 1999-09-08 2002-09-10 Nortel Networks Limited System and method for creating a dynamic data file from collected and filtered web pages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120016744A1 (en) * 2002-07-25 2012-01-19 Google Inc. Method and System for Providing Filtered and/or Masked Advertisements Over the Internet
CN101017490A (zh) * 2006-02-10 2007-08-15 鸿富锦精密工业(深圳)有限公司 自动下载和过滤网页的系统及方法
CN103530560A (zh) * 2013-09-29 2014-01-22 北京金山网络科技有限公司 广告拦截的方法、装置和客户端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009232A (zh) * 2017-11-29 2018-05-08 北京小米移动软件有限公司 广告屏蔽方法及装置

Also Published As

Publication number Publication date
CN104809119A (zh) 2015-07-29

Similar Documents

Publication Publication Date Title
JP6410280B2 (ja) ウェブサイト・アクセス方法、装置、およびウェブサイト・システム
RU2604326C2 (ru) Метод просмотра web-страниц, платформа webapp, метод и устройство для исполнения javascript для мобильных терминалов
JP6051337B2 (ja) クライアント側ページ処理
US7865544B2 (en) Method and system for providing XML-based asynchronous and interactive feeds for web applications
US9684636B2 (en) Ad blocking page display method and device
CN104063460B (zh) 一种在浏览器中加载网页的方法和装置
AU2009262065B2 (en) Embedding macros in web pages with advertisements
CA2839006C (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
US20130227394A1 (en) Method, system and computer program product for replacing banners with widgets
WO2017071189A1 (zh) 网页的访问方法、装置、设备及非易失性计算机存储介质
CN106575298A (zh) 包含动态内容和陈旧内容的网站的快速呈现
US10496381B2 (en) Progressive web app auto-ingestion
US20220030052A1 (en) Cross-platform Module for Loading Across a Plurality of Device Types
US11677809B2 (en) Methods for transforming a server side template into a client side template and devices thereof
US20140281923A1 (en) Methods for processing cascading style sheets and devices thereof
WO2015109831A1 (zh) 一种网页广告过滤方法及装置
US10191971B2 (en) Computer-automated display adaptation of search results according to layout file
CN109144567A (zh) 跨平台的网页渲染方法、装置、服务器及存储介质
US10116726B2 (en) Methods for bundling images and devices thereof
CN101650713A (zh) 在浏览器中实现标签页的方法与装置
WO2017092455A1 (zh) 一种移动终端网页浏览方法及移动终端
CN109960765A (zh) 一种基于编程语言对网页进行跨域通信的方法、电子设备
US20100191761A1 (en) Apparatus and method for handling tasks over a computerized network
WO2019015326A1 (zh) 静态页面数据处理的方法及装置
US20210357465A1 (en) Method and System for High Speed Serving of Webpages

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14879619

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 30/09/2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14879619

Country of ref document: EP

Kind code of ref document: A1