CN107894888A - A kind of web page contents replacement method and system based on js injections - Google Patents
A kind of web page contents replacement method and system based on js injections Download PDFInfo
- Publication number
- CN107894888A CN107894888A CN201710969017.1A CN201710969017A CN107894888A CN 107894888 A CN107894888 A CN 107894888A CN 201710969017 A CN201710969017 A CN 201710969017A CN 107894888 A CN107894888 A CN 107894888A
- Authority
- CN
- China
- Prior art keywords
- webpage
- user
- request
- web page
- page contents
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Abstract
The invention discloses a kind of web page contents replacement method and system based on js injections, perceives user's surfing flow first with deep packet inspection technical, identification user accesses junk information and webpage js request flows in webpage;Then the junk information in webpage is accessed using user, generates new picture resource request code and be injected into the js that user is accessed in webpage and ask flow;Then after asking the injection js received the request of the js in flow to redirect, request is re-started to js, get the request code that new picture resource is performed after former web page contents, and load and present in former webpage junk information position and webpage is formed by new picture resource, finally realize that webpage junk information is replaced.The present invention improves the diversity of advertisement pushing mode by way of web page contents replacement, and the reachable rate and validity of advertisement pushing are improved using the js modes injected, and reduces the cost of advertiser distributor.
Description
Technical field
The present invention relates to a kind of web page contents replacement method and system, belongs to the technical field that internet information pushes.
Background technology
In recent years, the development of internet greatly promoted the exchange and conmmunication of information, and people can find respectively online
Kind of the panoramic information of various kinds, many information pollutions are also flooded among this.How before user's online experience is not influenceed
Put, replace webpage on rubbish contents information realization user green internet turn into now with it is to be solved the problem of.
Nowadays the information push mode of main flow, is directed to a kind of method that html codes nested based on iframe is replaced,
Mainly completed by three steps:First, perceive the resource identifier of the rubbish contents in user's access webpage and appear in webpage
In position, have been manually done writing for the nested html codes of push iframe;Second, the iframe write based on the first step is embedding
The html codes of set, it is nested in the content returned data bag of web page server and issues user;3rd, user performs the new of return
Nested code, new content covering is got in rubbish contents particular location, realizes the replacement of web page contents.
The information push mode of above-mentioned main flow, need to write to each nested code of being customized of webpage, can not be pervasive
A series of generic web pages, code quantities are big;Html codes nested iframe are easy to destroy original page layout, once
Layout is destroyed, the page influences Consumer's Experience there may be deformation;Once invalid code occurs to replace, push is also led to
Content and original content can not load, and influence Consumer's Experience, and make the arrival rate step-down of push;Html nested iframe
Code can only defer to the loading sequence of original web page event, and the event sequence that can not be independently customized performs replacing for content
Change.
The content of the invention
The technical problems to be solved by the invention are overcome the deficiencies in the prior art, there is provided a kind of net based on js injections
Page method of content substitution and system, solving existing method need to write to each nested code of being customized of webpage, Wu Fapu
A series of generic web pages are fitted, code quantities is big;And be easy to destroy original page layout, replaced once invalid code occurs
Change, the content and original content for also leading to push can not load, the problem of making the arrival rate step-down of push.
It is of the invention specifically to solve above-mentioned technical problem using following technical scheme:
A kind of web page contents replacement method based on js injections, comprises the following steps:
Step 1: using deep packet inspection technical perceive user's surfing flow, identification user access webpage in junk information with
And webpage js request flows;
Step 2: obtaining the junk information in user's access webpage using step 1, new picture resource request code is generated simultaneously
It is injected into the js that user is accessed in webpage and asks flow;
Step 3: after user redirects to the request for receiving the js in step 2 injection js request flows, js is re-started
Request, the request code for the new picture resource that step 2 injection is performed after former web page contents is got, and in former webpage rubbish
Information position loads and presented forms webpage by new picture resource, finally realizes that webpage junk information is replaced.
Further, as a preferred technical solution of the present invention:Automatically generated in the step 2 and replace rubbish letter
The code picture of breath.
The present invention also proposes a kind of web page contents replacement system based on js injections, including:
Information identification module, for perceiving user's surfing flow, identification user accesses junk information and webpage js in webpage
Ask flow;
Code generation module, for obtaining the junk information in user's access webpage according to information identification module, generate new figure
Piece resource request code and the js request flows being injected into user's access webpage;
Information replacement module, after being redirected to the request for receiving the js in injection js request flows, js is re-started
Request, the request code for the new picture resource that code generation module injection is performed after former web page contents is got, and in former net
The loading of page junk information position and presentation form webpage by new picture resource, finally realize that webpage junk information is replaced.
Further, the web page contents replacement system of the invention based on js injections, information identification module is to utilize depth
Packet inspection technical perceives user's surfing flow.
The present invention uses above-mentioned technical proposal, can produce following technique effect:
The present invention provides a kind of web page contents replacement method and system based on js injections, realizes user's green internet, and enhancing is used
Family online experience, and the diversity of advertisement pushing mode is improved by way of web page contents replacement, utilize js injections
Mode improves the reachable rate and validity of advertisement pushing, reduces the cost of advertiser distributor.Pass through DPI deep packet inspection technicals
User behavior is excavated, identifies that user accesses the junk information in webpage, content is then replaced into pin using the js modes injected
The data of this injection user access server are returned in bag, are realized that web page contents are replaced, are finally realized user's green internet, for fortune
Seek approach and a kind of new push mode of advertising channel business that business provides a realization.
Brief description of the drawings
Fig. 1 is the principle schematic of web page contents replacement method of the present invention based on js injections.
Embodiment
Embodiments of the present invention are described with reference to Figure of description.
As shown in figure 1, the present invention devises a kind of web page contents replacement method based on js injections, this method specifically includes
Following steps:
Step 1: using deep packet inspection technical perceive user's surfing flow, identification user access webpage in junk information with
And webpage js request flows.
Step 2: obtaining the junk information in user's access webpage using step 1, new picture resource request generation is generated
Code and the js request flows being injected into user's access webpage.Preferably, this method can be automatically generated by system replaces rubbish letter
The picture of breath.
Step 3: after user redirects to the request for receiving the js in step 2 injection js request flows, to js again
Make requests on, get the request code for the new picture resource that step 2 injection is performed after former web page contents, and in former webpage
Junk information position loads and presented forms webpage by new picture resource, finally realizes that webpage junk information is replaced, realizes
User's green internet.
Thus, the reachable rate and validity of advertisement pushing are improved using the js modes injected, reduces advertiser distributor's
Cost.User behavior is excavated by DPI deep packet inspection technicals, identifies that user accesses the junk information in webpage, Ran Houli
The data that content is replaced to script injection user access server with the mode of js injections are returned in bag, realize that web page contents replace
Change, finally realize user's green internet, an approach cashed and a kind of new push of advertising channel business are provided for operator
Mode.
In order to verify that the method for the present invention can quickly realize that web page contents are replaced, the present invention enumerates an experimental example.
As shown in figure 1, this method is used in internet system, including client, DPI sensory perceptual systems, service end, it is used
The web page contents replacement method process of the present invention is as follows:
Process 1. in, during the data-bag interacting of client, supplying system perceives web service end and returns to 200 OK data
Junk information in bag, system automatically generate the picture for replacing junk information;
Process 2. in, during the data-bag interacting of client, generate new picture resource request code and be injected into user
The js request flows in webpage are accessed, perceive the js request data packages in user's web-page requests, and it is generated before injection
Content replaces code;
Process 3. in, during the data-bag interacting of client, client where user was again to injecting the new of code
Js makes requests on, and after server returns to new js requests, subscription client perform script code, finally realizes webpage junk information
Replace, realize user's green internet.
To sum up, the present invention provides a kind of web page contents replacement method based on js injections, using the mode of js injections by
Hold in the data return bag for replacing script injection user access server, realize that web page contents are replaced, finally realize user's green
Online, the approach and a kind of new push mode of advertising channel business of a realization are provided for operator.Replaced by web page contents
The mode changed improves the diversity of advertisement pushing mode, and reachable the rate of advertisement pushing and effective is improved using the js modes injected
Property, the cost of reduction advertiser distributor.
Based on the above method, the present invention also proposes a kind of web page contents replacement system based on js injections, including:
Information identification module, for perceiving user's surfing flow using deep packet inspection technical, identification user is accessed in webpage
Junk information and webpage js request flows;
Code generation module, for obtaining the junk information in user's access webpage according to information identification module, generate new figure
Piece resource request code and the js request flows being injected into user's access webpage;
Information replacement module, after being redirected to the request for receiving the js in injection js request flows, js is re-started
Request, the request code for the new picture resource that code generation module injection is performed after former web page contents is got, and in former net
The loading of page junk information position and presentation form webpage by new picture resource, finally realize that webpage junk information is replaced.
Embodiments of the present invention are explained in detail above in conjunction with accompanying drawing, but the present invention is not limited to above-mentioned implementation
Mode, can also be on the premise of present inventive concept not be departed from those of ordinary skill in the art's possessed knowledge
Make a variety of changes.
Claims (5)
1. a kind of web page contents replacement method based on js injections, it is characterised in that comprise the following steps:
Step 1: perceiving user's surfing flow, identification user accesses junk information and webpage js request flows in webpage;
Step 2: obtaining the junk information in user's access webpage using step 1, new picture resource request code is generated simultaneously
It is injected into the js that user is accessed in webpage and asks flow;
Step 3: after user redirects to the request for receiving the js in step 2 injection js request flows, js is re-started
Request, the request code for the new picture resource that step 2 injection is performed after former web page contents is got, and in former webpage rubbish
Information position loads and presented forms webpage by new picture resource, finally realizes that webpage junk information is replaced.
2. the web page contents replacement method according to claim 1 based on js injections, it is characterised in that be to utilize in step 1
Deep packet inspection technical perceives user's surfing flow.
3. the web page contents replacement method according to claim 1 based on js injections, it is characterised in that in the step 2 certainly
The picture of junk information is replaced in dynamic generation.
A kind of 4. web page contents replacement system based on js injections, it is characterised in that including:
Information identification module, for perceiving user's surfing flow, identification user accesses junk information and webpage js in webpage
Ask flow;
Code generation module, for obtaining the junk information in user's access webpage according to information identification module, generate new figure
Piece resource request code and the js request flows being injected into user's access webpage;
Information replacement module, after being redirected to the request for receiving the js in injection js request flows, js is re-started
Request, the request code for the new picture resource that code generation module injection is performed after former web page contents is got, and in former net
The loading of page junk information position and presentation form webpage by new picture resource, finally realize that webpage junk information is replaced.
5. a kind of web page contents replacement system based on js injections according to claim 4, it is characterised in that information identifies
Module is to perceive user's surfing flow using deep packet inspection technical.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710969017.1A CN107894888A (en) | 2017-10-18 | 2017-10-18 | A kind of web page contents replacement method and system based on js injections |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710969017.1A CN107894888A (en) | 2017-10-18 | 2017-10-18 | A kind of web page contents replacement method and system based on js injections |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107894888A true CN107894888A (en) | 2018-04-10 |
Family
ID=61803718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710969017.1A Pending CN107894888A (en) | 2017-10-18 | 2017-10-18 | A kind of web page contents replacement method and system based on js injections |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107894888A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110781367A (en) * | 2019-09-25 | 2020-02-11 | 中国科学院计算技术研究所 | Internet data acquisition method and system based on man-in-the-middle |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103400283A (en) * | 2013-07-22 | 2013-11-20 | 烽火通信科技股份有限公司 | Advertisement pushing system and method based on home gateway |
US20130311301A1 (en) * | 2012-05-17 | 2013-11-21 | Ad-Vantage Networks, Inc. | Content easement and management system for internet access providers and premise operators |
CN105657046A (en) * | 2016-02-24 | 2016-06-08 | 中国科学技术大学 | Method for injecting advertisements based on Openwrt router |
CN105787750A (en) * | 2014-12-25 | 2016-07-20 | 杭州迪普科技有限公司 | Information pushing method and information pushing device |
-
2017
- 2017-10-18 CN CN201710969017.1A patent/CN107894888A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130311301A1 (en) * | 2012-05-17 | 2013-11-21 | Ad-Vantage Networks, Inc. | Content easement and management system for internet access providers and premise operators |
CN103400283A (en) * | 2013-07-22 | 2013-11-20 | 烽火通信科技股份有限公司 | Advertisement pushing system and method based on home gateway |
CN105787750A (en) * | 2014-12-25 | 2016-07-20 | 杭州迪普科技有限公司 | Information pushing method and information pushing device |
CN105657046A (en) * | 2016-02-24 | 2016-06-08 | 中国科学技术大学 | Method for injecting advertisements based on Openwrt router |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110781367A (en) * | 2019-09-25 | 2020-02-11 | 中国科学院计算技术研究所 | Internet data acquisition method and system based on man-in-the-middle |
CN110781367B (en) * | 2019-09-25 | 2023-10-20 | 中国科学院计算技术研究所 | Internet data acquisition method and system based on middleman |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102779167B (en) | The method and system of display web page in the terminal | |
CN101369272A (en) | Auto-filling system and method for auto-filling registration or login information | |
CN102789470B (en) | The method and apparatus of the picture in loading webpage | |
CN102737067B (en) | Method and system for outputting webpage | |
US10740795B2 (en) | Systems, methods, and devices for decreasing latency and/or preventing data leakage due to advertisement insertion | |
CN104679906A (en) | Method and system for generating links by utilizing pictures | |
CN102724586B (en) | Page caching method and page caching system based on internet protocol television (IPTV) | |
WO2009089750A1 (en) | Method, system and apparatus for implanting advertisement | |
JP2010027086A (en) | Advertisement matching system based on viewing history, program, server, and advertisement providing method | |
US11386180B2 (en) | Resource locator remarketing | |
CN105117469A (en) | Method and apparatus for personalized replacement of webpage theme | |
CN101311922A (en) | Advertisement formwork style matching method and system | |
CN101951441A (en) | Mobile telephone advertisement delivery method and equipment | |
CN103034722A (en) | Network video comment gathering device and network video comment gathering method | |
CN103338236B (en) | A kind of concurrent data acquisition methods and system | |
EP2556484A2 (en) | Content distribution using embeddable widgets | |
CN106127535A (en) | Advertisement push system based on mobile terminal and method | |
CN105808587A (en) | Method and system for embedding information into webpage and gateway device | |
CN103761257B (en) | Web page processing method and system based on mobile browser | |
CN107894888A (en) | A kind of web page contents replacement method and system based on js injections | |
CN104144151B (en) | Content distributing network dispatching method and system and native object management server | |
US20140195894A1 (en) | Method and system for continuous rendering of web content | |
CN102004726A (en) | Advertisement alliance-based advertising method | |
US20200356609A1 (en) | Server side content page re-rendering | |
KR101102851B1 (en) | Method, system and computer-readable recording medium for providing additional content in blank of web page caused by difference of a resolution of user terminal from a reference resolution provided by contents providing server |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180410 |