Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and system for intercepting web page data

A web page data and data packet technology, applied in the field of communication, can solve the problems of high development and maintenance cost, incompatibility, stuck and other problems, and achieve the effect of low development and maintenance cost and good compatibility.

Active Publication Date: 2018-05-04
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] According to the prior art, the methods for intercepting webpage advertisements include: 1) using browser plug-ins, but this method needs to develop, install and update plug-ins for each browser, so the development and maintenance costs are high; 2) injecting into the browser process, installing hook, but this method has problems such as browser crashes, freezing, incompatibility, and low stability; 3) setting a proxy, but this method will reduce the browser's access speed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for intercepting web page data
  • Method and system for intercepting web page data
  • Method and system for intercepting web page data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] In Embodiment 1, the method for intercepting web page data includes the above-mentioned figure 1 All steps of the processing method shown, wherein, such as figure 2 As shown, step S120 specifically includes the following steps:

[0033] S121: Parsing out a key field for identifying the HTTP request from the protocol header of the HTTP request.

[0034] Wherein, the key fields include: a URL (Uniform Resource Locator, Uniform Resource Locator) field and a submitter (Referer) field.

[0035] S122: Determine whether the HTTP request needs to be intercepted according to the key field.

[0036] Among them, the key field can be used to query the interception rule base. If the rule in the interception rule base is hit, it is judged that the HTTP request needs to be intercepted. If the rule in the interception rule base is not hit, it is judged that the HTTP request does not need to be intercepted. ask.

[0037] Optionally, in order to improve the efficiency of querying th...

Embodiment 2

[0039] In embodiment 2, the method for intercepting webpage data includes the above-mentioned figure 1 All steps of the processing method shown, wherein, such as image 3 As shown, step S130 specifically includes the following steps:

[0040] S131: According to the Ethernet data packet structure, the interception return packet containing the HTTP response with a content length of 0 is set, wherein the interception return packet is provided with a notification TCP / IP (Transmission Control Protocol / Internet Protocol, Transmission Control Protocol / Internet Protocol ) protocol closes the first marker of the TCP (Transmission Control Protocol, Transmission Control Protocol) connection corresponding to the HTTP request and the second marker indicating that the TCP / IP protocol is notified to upload data to the application layer.

[0041] Wherein, the data refers to data transmitted from the TCP layer to the application layer in a general sense.

[0042] S132: Send the interception ...

Embodiment 3

[0045] In Embodiment 3, taking the web page data to be intercepted as a web page advertisement as an example, the method for intercepting web page data is described, as Figure 4 , the method specifically includes the following steps:

[0046] S210: Initialize the WinPcap driver module. This step does not need to be performed every interception, for example, it may be performed once when the method for intercepting web page data is started for the first time.

[0047] Specifically, the WinPcap protocol layer network card driver is installed and initialized, the working mode of the WinPcap driver is set, and an interface is provided for subsequent sending and receiving of data packets.

[0048] S220: Load an ad blocking rule base.

[0049] Wherein, the advertisement blocking rule base defines a set of advertisement URL rules. In order to improve the efficiency of subsequently querying the rule base, the advertisement blocking rule base may be loaded into the memory first, an...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and system for intercepting webpage data. The method comprises: grabbing Ethernet data packet from the intermediate layer of an NDIS; according to the protocol head of the HTTP request of the Ethernet data packet, determining whether the HTTP request needs to be intercepted; and when it is determined that the HTTP needs to be intercepted, intercepting the HTTP request through forging response data of the HTTP request. By using the method provided by the invention, various limitations brought by such modes as application of browser a plug-in, injection of a browser process, installation of a HOOK, arrangement of an agent and the like in the prior art can be effectively solved.

Description

technical field [0001] The present invention relates to the communication field, and more specifically, relates to a method and system for intercepting web page data. Background technique [0002] In daily life, users are often troubled by web advertisements that appear during web browsing. The so-called webpage advertisements refer to resources such as webpage windows, pictures, and scripts embedded in webpages. Web advertisements not only interfere with users' normal web browsing, but also occupy users' network bandwidth and slow down the speed at which browsers display web pages. Therefore, users have a strong demand for ad blocking. [0003] According to the prior art, the methods for intercepting webpage advertisements include: 1) using browser plug-ins, but this method needs to develop, install and update plug-ins for each browser, so the development and maintenance costs are high; 2) injecting into the browser process, installing hook, but this method has problems ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/06
CPCH04L63/1466H04L67/02
Inventor 赵中树
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD