CN108063781A - The apparatus and method that customized information is popped up in browser - Google Patents

The apparatus and method that customized information is popped up in browser Download PDF

Info

Publication number
CN108063781A
CN108063781A CN201610976798.2A CN201610976798A CN108063781A CN 108063781 A CN108063781 A CN 108063781A CN 201610976798 A CN201610976798 A CN 201610976798A CN 108063781 A CN108063781 A CN 108063781A
Authority
CN
China
Prior art keywords
message
information
customized information
module
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.)
Granted
Application number
CN201610976798.2A
Other languages
Chinese (zh)
Other versions
CN108063781B (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610976798.2A priority Critical patent/CN108063781B/en
Publication of CN108063781A publication Critical patent/CN108063781A/en
Application granted granted Critical
Publication of CN108063781B publication Critical patent/CN108063781B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Abstract

The present invention provides the apparatus and method that customized information is popped up in a kind of browser, has the features such as process performance is good, and transplantability is strong, and scalability is high.The device includes:Customized information acquisition module, operates in User space, for obtaining customized information, and the customized information is sent to customized information preserving module;Customized information preserving module, operates in kernel state, for receiving the customized information that the customized information acquisition module is sent, and preserves the customized information;Processing module operates in kernel state, for handling message, including:Message is intercepted, is forwarded after changing the partial content of the message, to be inserted into the customized information into the message for returning to browser;Study module operates in kernel state, for being interacted with the processing module, the message information of message to be treated and the processing procedure of the message is recorded, so that the processing module quickly handles follow-up association message.

Description

The apparatus and method that customized information is popped up in browser
Technical field
The present invention relates to the devices that customized information is popped up in computer technology and software field more particularly to a kind of browser And method.
Background technology
With growth of the people to various information requirements, it is also more and more to customize the dispensing mode of advertisement, it is most common just It is the information that customized push is popped up when user's using terminal equipment is surfed the Internet.Realizing this function, there are mainly two types of schemes: A kind of is the application program for installing on the terminal device customization, that is, opens pop-up push content after the application program;It is another It is to be pushed based on the intrinsic application program of standard on terminal device, i.e., when user is surfed the Internet using browser in pop-up push Hold.
The popularization of the first scheme is more difficult, and cost is higher, and main cause is as follows:Firstly, it is necessary to the application journey that user installation is additional Sequence more dislikes this user;Secondly, safe antivirus software on the market is easy to judge by accident the application program as virus, so as to Cause install failure;It is last, it is necessary to the resources such as man power and material of input it is more and return it is less, especially to no user base Software publishing side for cost performance it is not high.
Second scheme with respect to for the first, then having the characteristics that realize that simple, deployment is convenient, business model is clear, Developer can realize with operator or network device manufacturers cooperation.But since workable ready-made tool software has respectively The limitation of kind various kinds, as rate are higher, configuration is complicated, autgmentability is not strong, need replacement user's message, performance more low scarce It falls into, the program is caused not popularized.Such as Squid softwares, which is to be operated in User space, and to the spy of specific http protocol Property has dependence.Http protocol itself is extremely complex, and characteristic is more, and the processing to some webpages can so be caused not meet the association View.For example many forums' logins can return to Set-Cookie head responses, and it is abnormal to may result in login.
The content of the invention
In view of this, the present invention provides the apparatus and method that customized information is popped up in a kind of browser, has process performance It is good, the features such as transplantability is strong, and scalability is high, can realize that customized information intelligently pulls, HTTP message interception, modification, update, Forwarding and HTTP message stream tracking stream mechanism.
To achieve the above object, according to an aspect of the invention, there is provided popping up customized information in a kind of browser Device.
The device of customized information is popped up in a kind of browser of the present invention to be included:Customized information acquisition module, operates in use The customized information for obtaining customized information, and is sent to customized information preserving module by family state;Customized information preserves mould Block operates in kernel state, for receiving the customized information that the customized information acquisition module is sent, and preserves the customization letter Breath;Processing module operates in kernel state, for handling message, including:Message is intercepted, after the partial content for changing the message Forwarding, to be inserted into the customized information into the message for returning to browser;Study module operates in kernel state, for it is described Processing module interacts, and the message information of message to be treated and the processing procedure of the message is recorded, so as to the processing Module quickly handles follow-up association message.
Optionally, processing module is additionally operable to:Message is handled using SKB mechanism, and updates and reports after changing every time message Literary length and checksum field.
Optionally, described device is additionally operable to:The upstream request message of the processing module interception http protocol, obtains message Information, the study module create stream node to record the message information and cochain, and then the processing module is by described in The type of coding field of the upstream request header of http protocol forwards after deleting, and the message information includes:Source IP, purpose IP, source port, destination interface and message URL information;And the downstream response message of the processing module interception http protocol, Obtain message information, according to the message information judge on the chain of the study module whether existing corresponding stream node, if In the presence of, then be inserted into customized information into the downstream response message of the http protocol, then the study module by it is described stream save The lower chain of point.
Optionally, processing module is additionally operable to:Customized information is configured to corresponding with the downstream response message of http protocol Form, to realize being successively inserted into for customized information.
Optionally, study module is additionally operable to:After stream node is created to record the message information and cochain, start stream Node aging mechanism, if the cochain time of the stream node is more than preset duration threshold value, by chain under the stream node.
Optionally, study module is additionally operable to:Judge the http protocol upstream request message that the processing module is truncated to Whether URL suffix names are index.html, if so, creating stream node to record the message information and cochain, are otherwise refused Cochain.
Optionally, described device is additionally operable to:If desired customized information repeatedly is inserted into the message in same message flow, then institute Study module is stated not descend to flow section described in chain after the processing module for the first time the message insertion customized information into the message flow Point and the study module record the process of the message in message flow described in the processing module first treated, so as to described It is quick to change message and forwarding in the processing module processing message flow during subsequent message.
To achieve the above object, according to another aspect of the present invention, provide and customized information is popped up in a kind of browser Method.
The method of customized information is popped up in a kind of browser of the present invention to be included:Customized information is obtained, and by the customization Information is sent in kernel state from User space and preserves;Message is handled in kernel state, including:Message is intercepted, changes the message Partial content after forward, with to return browser message in be inserted into the customized information;Wherein, report is handled in kernel state In the process of text, the message information of message to be treated and the processing procedure of the message are recorded, so as to follow-up related Message is quickly handled.
Optionally, message is handled in kernel state to further include:Message is handled using SKB mechanism, and message is changed every time Message length and checksum field are updated afterwards.
Optionally, the method further includes:The upstream request message of http protocol is intercepted, obtains message information, creates stream Node is to record the message information and cochain, then by the type of coding word of the upstream request header of the http protocol Section forwards after deleting, and the message information includes:Source IP, destination IP, source port, destination interface and message URL information;And Intercept the downstream response message of http protocol, obtain message information, according to the message information judge on chain whether existing phase The stream node answered, if in the presence of, be inserted into customized information into the downstream response message of the http protocol, then by it is described stream save The lower chain of point.
Optionally, message is handled in kernel state to further include:Customized information is configured to the downstream response with http protocol The corresponding form of message, so as to being successively inserted into for customized information.
Optionally, the method further includes:After stream node is created to record the message information and cochain, start stream Node aging mechanism, if the cochain time of the stream node is more than preset duration threshold value, by chain under the stream node.
Optionally, the method further includes:Whether the URL suffix names for the http protocol upstream request message that judgement is truncated to For index.html, if so, create stream node to record the message information and cochain, otherwise not cochain.
Optionally, the method further includes:If desired customized information repeatedly is inserted into the message in same message flow, then existed Report described in node and record first treated is not descended to flow described in chain after the message insertion customized information into the message flow for the first time The process of the message of Wen Liuzhong, it is quick to change message and forwarding during to handle subsequent message in the message flow.
Technique according to the invention scheme, by being connected in User space and customized information service server length, so as to Intelligence pulls customized information, by the way that customized information is stored in kernel state, consequently facilitating subsequently in kernel state into message It is inserted into customized information;By handling message in kernel state, customized information is inserted into, so as on the one hand save in Message processing On the other hand number of communications between kernel state and User space can realize through patch installing the easy way non-fully replaced Message is quickly changed and forwarded;By using SKB mechanism, so as to realize in the case where not copying original message data Efficiently easily processing target message, and can utilize the verifying function of SKB mechanism, ensures the accuracy of message modification;It is logical Cross and customized information be configured to form corresponding with the downstream response message of http protocol, so as to ensure customized information into Work(is inserted into;Node aging mechanism is flowed by setting, so as to which while customized information insertion is ensured as far as possible, guarantee is handled The stabilization of performance reduces the occupancy to resource and waste;By needing repeatedly to be inserted into customization to the message in same message flow During information, the process of the message in first treated message flow is recorded, it is follow-up in the message flow is handled so as to realize It is quick to change message and forwarding during message.
Description of the drawings
Attached drawing does not form inappropriate limitation of the present invention for more fully understanding the present invention.Wherein:
Fig. 1 is the schematic diagram of the main modular for the device that customized information is popped up in browser according to embodiments of the present invention;
Fig. 2 is the general frame schematic diagram for the device that customized information is popped up in browser according to embodiments of the present invention;
Fig. 3 is that the processing module for the device that customized information is popped up in browser according to embodiments of the present invention is directed to uplink report The schematic diagram of the treatment mechanism of text;
Fig. 4 is that the processing module for the device that customized information is popped up in browser according to embodiments of the present invention is directed to downlink report The schematic diagram of the treatment mechanism of text;
Fig. 5 is the cochain logic of the study module for the device that customized information is popped up in browser according to embodiments of the present invention Flow chart;
Fig. 6 is the lower chain logic of the study module for the device that customized information is popped up in browser according to embodiments of the present invention Flow chart;
Fig. 7 is that the stream node of the study module for the device that customized information is popped up in browser according to embodiments of the present invention is old The schematic diagram of change mechanism;
Fig. 8 is the schematic diagram of the key step for the method that customized information is popped up in browser according to embodiments of the present invention.
Specific embodiment
It explains below in conjunction with attached drawing to the exemplary embodiment of the present invention, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.Together For clarity and conciseness, the description to known function and structure is omitted in sample in following description.
The embodiment of the present invention provides the device that customized information is popped up in a kind of browser and utilizes the device in a browser The method for popping up customized information, can realize customized information intelligently pull, message intercept and modification and message flow tracking stream etc. Mechanism.The technical solution has the characteristics that process performance is good, transplantability is strong, scalability is high.
In order to accurately illustrate the embodiment of the present invention, the basic noun of some in the embodiment of the present invention is defined first:
Http protocol:A kind of procotol being most widely used on internet;
Study module:Four-tuple (source IP, destination IP, source port, destination interface) information and the URL letter of recorded message stream Breath;
header:Http protocol head;
payload:The data payload of http protocol;
Netlink mechanism:To realize a kind of special interprocess communication that consumer process communicates with kernel process (IPC) and the most common interface of web application and kernel communication;
SKB mechanism:A series of interface functions of the primary Message processing of linux kernel.
Fig. 1 is the schematic diagram of the main modular for the device that customized information is popped up in browser according to embodiments of the present invention.
As shown in Figure 1, the device 10 of customized information is popped up in the browser of the embodiment of the present invention mainly includes following module: Customized information acquisition module 101, customized information preserving module 102, processing module 103 and study module 104, wherein,
Customized information acquisition module 101, operates in User space, for obtaining customized information, and the customized information is sent out It send to customized information preserving module;Customized information preserving module 102, operates in kernel state, is obtained for receiving the customized information The customized information that modulus block is sent, and preserve the customized information;Processing module 103, operates in kernel state, is reported for handling Text, including:Message is intercepted, is forwarded after changing the partial content of the message, with described in the insertion into the message for returning to browser Customized information;Study module 104, operates in kernel state, for being interacted with the processing module 103, records report to be treated The message information of text and the processing procedure of the message, so that the processing module 103 carries out quickly follow-up association message Processing.
Processing module 103 can be additionally used in:Message is handled using SKB mechanism, and message is updated after changing every time message Length and checksum field.
Specifically, device 10 can be additionally used in:Processing module 103 intercepts the upstream request message of http protocol, obtains report Literary information, study module 104 create stream node to record the message information and cochain, and then processing module 103 is by described in The type of coding field of the upstream request header of http protocol forwards after deleting, and the message information includes:Source IP, purpose IP, source port, destination interface and message URL information;And processing module 103 intercepts the downstream response message of http protocol, Obtain message information, according to the message information judge on the chain of the study module 104 whether existing corresponding stream node, If in the presence of, be inserted into customized information into the downstream response message of the http protocol, then study module 104 by it is described stream save The lower chain of point.
Wherein, processing module 103 can be additionally used in:Customized information is configured to corresponding to the downstream response message of http protocol Form, to realize being successively inserted into for customized information.
Study module 104 can be additionally used in:After stream node is created to record the message information and cochain, start stream section Point aging mechanism, if the cochain time of the stream node is more than preset duration threshold value, by chain under the stream node.
Study module 104 can be additionally used in:Judge the http protocol upstream request message that the processing module 103 is truncated to Whether URL suffix names are index.html, if so, creating stream node to record the message information and cochain, are otherwise refused Cochain.
In addition, device 10 can be additionally used in:If desired customized information repeatedly is inserted into the message in same message flow, then it is described Study module 104 is not descended after the processing module 103 for the first time the message insertion customized information into the message flow described in chain Stream node and the study module 104 record the mistake of the message in message flow described in 103 first treated of processing module Journey, it is quick to change message and forwarding when handling subsequent message in the message flow so as to the processing module 103.
Fig. 2 is the general frame schematic diagram for the device that customized information is popped up in browser according to embodiments of the present invention.
As shown in Fig. 2, as a whole, the substantially original of the device of customized information is popped up in the browser of the embodiment of the present invention Reason is as follows:Customized information acquisition module 101 keeps long connection with service server, and it is newest fixed that service server can periodically push Information processed.Customized information is sent to by kernel from User space by Netlink passages after the reception of customized information acquisition module 101 State, and preserved by customized information preserving module 102.Processing module 103 is mainly responsible for the uplink and downlink report of interception screening http protocol Text, and change to replace in message and be forwarded again after partial content.Study module 104 mainly causes the program to have learning functionality, right It records as long as being generated after each message flow is learnt by first message, turns after subsequently the message of the stream can be handled quickly Hair, so as to improve the processing capacity of the program and forwarding performance.
Fig. 3 is the processing module 103 for the device that customized information is popped up in browser according to embodiments of the present invention for upper The schematic diagram of the treatment mechanism of row message;Fig. 4 is the device that customized information is popped up in browser according to embodiments of the present invention Processing module 103 is for the schematic diagram of the treatment mechanism of downlink message.Below in conjunction with processing of the Fig. 3 and Fig. 4 to processing module 103 Principle is described in detail.
103 treatment mechanism of processing module:
Compared with the message processing module (MPM) of Squid softwares in the prior art is in User space realization mechanism, the embodiment of the present invention In the nucleus module of processing message be to be completed in kernel state, which reduces passing twice through for kernel state and User space The communication of Netlink is sent to User space from kernel state by untreated message, then from User space by the report after having handled Text is sent to kernel state;And SKB mechanism can be used when kernel state is handled in the case where not copying original message data SKB various functions functions are called, the efficient easily processing target message, and SKB mechanism can be enjoyed by way of offset pointer The verifying function carried, so as to ensure that the robustness of overall plan and fault-tolerance.Processing module 103 handles message and can be subdivided into Uplink message treatment mechanism and downlink message treatment mechanism.
A, uplink message treatment mechanism:
After it is the upstream request message of http protocol to judge the message that is truncated to, study module 104 create one it is new Node is flowed, partial information is preserved in message in node such as:Source IP, destination IP, source port, destination interface and request message The information such as URL need to handle the message in which message flow with mark.
If there is type of coding Accept-Encoding fields in HTTP request header, by processing module 103 by its It deletes.The type of coding that type of coding Accept-Encoding field declarations browser is supported, if the field exists and has Value before then Web server sends response data, can be sent out data clear text again after the encryption algorithm is processed into coding ciphertext Send, this can result in processing module 103 under treatment row response message when can not correctly parse data, so as to needed for can not obtaining Zone bit information.Since message length change needs to recalculate the verification of all protocol headers and the value of CheckSum fields.
B, downlink message treatment mechanism:
Since different Web servers are inconsistent to the response message processing format of upstream request, Chunk is broadly divided into With non-two kinds of structures of Chunk.In Chunk structures, there is no Content-Length fields in http response header, Data in payload are then made of " Chunk units ", and message has apparent end mark position in the position of end.Non- There are Content-Length fields in Chunk structures, in header, the data in payload are then by " iframe units " group Into.In order to realize conveniently, pushed information is respectively configured to " Chunk units " and " iframe units ".
When being truncated to the downstream response message of HTTP, then need to judge that response message is by the mode of search key It is also non-Chunk to belong to Chunk, is inserted into messages after then reconstructing corresponding pushed information unit.Final updating message Parameter forwarding.
It should be noted that:When changing the modification looked into message progress additions and deletions, SKB mechanism must be used to provide offset function Operation, and change is required to update length and checksum field every time, otherwise message recipient is not after the receipt because of verification and Unanimously packet loss.
Fig. 5 is the cochain of the study module 104 for the device that customized information is popped up in browser according to embodiments of the present invention The flow chart of logic;Fig. 6 is the study module 104 for the device that customized information is popped up in browser according to embodiments of the present invention The flow chart of lower chain logic;Fig. 7 is the study module for the device that customized information is popped up in browser according to embodiments of the present invention The schematic diagram of 104 stream node aging mechanism.The Learning Principle of study module 104 is carried out below in conjunction with Fig. 5, Fig. 6 and Fig. 7 detailed It describes in detail bright.
104 working mechanism of study module:
The mechanism of study module 104 is similar with nf_conn mechanism in the prior art, is considered as cutting the nf_ of customization version Conn, in order to monitor the attribute of uplink and downlink HTTP connections, targetedly change HTTP message.The module continues to use nf_ The storage mode of the ltsh chain table of conn, index is source IP, destination IP, source port, (nl_conn is the four-tuple of destination interface Five-tuple, more protocol numbers, since we are just for http protocol, so the element is not required).
Study module 104 can realize two kinds of functions:First, which can provide the customized information of precisely insertion push Function.The HTTP downlink messages purpose of selection insertion advertisement is not very strong in the scheme used before, and study module 104 Advertisement can be targetedly then inserted into according to the characteristic of HTTP message, it is successfully general so as to significantly promote customized information pushing Rate, avoids some and need not handle and save system resource;Secondly, which can improve forwarding performance in some conditions. For example, can quickly reconstruct message according to the information of stream nodes records when needs repeatedly push customized messages and forward, save The flow processing of conventional resolution HTTP message is saved.The working mechanism of study module 104 mainly includes cochain mechanism and lower chain machine Two kinds of system.
A, cochain mechanism:
The upstream request message of HTTP is being truncated to, is getting quaternary group information and other information (such as URL of request Information), determine whether to construct ltsh chain table node (i.e. foregoing " stream node ") and then cochain after judgement, while cochain simultaneously Start lower chain timer, the type of coding Accept- in HTTP upstream request headings is finally eliminated by processing module 103 It is forwarded the packet away after Encoding fields.
Wherein, in the embodiment of the present invention, in order to provide the function of the precisely customized information of insertion push, customized information is improved The probability of success of push, after the URL of upstream request message is got, can also detect URL suffix names whether be Index.html etc. represents the homepage that the request is directed to website acquiescence, if then cochain, if not then letting pass.
B, lower chain mechanism:
The downstream response message of HTTP is being truncated to, quaternary group information is being got and searched after source is overturned with purpose and learn The ltsh chain table of module 104 is practised, is forwarded if related streams node is not found, is judged if finding into trial insertion advertisement, Then chain under the stream node after being successively inserted into.So as to ensure that user only can see push in the situation for first switching on related web page Customized information.
In addition, flowing node aging mechanism according to foregoing set, i.e., chain timer expiry (presets duration threshold instantly Value, such as can be, but not limited to as 30 seconds) afterwards chain under stream node.The purpose so done is that flowing node can account in storage chains More than 200 request is might have with memory space, such as a homepage, creates more than 200 stream nodes, if stream node response is super When, then these stream nodes can occupy larger memory space, therefore, do not influence browser performance to ensure, should start in time Exception handling after judging certain stream node aging, carries out deleting following chain to the stream node.
The device that customized information is popped up in browser according to embodiments of the present invention can be seen that by User space and calmly Information service server length connection processed, customized information is pulled so as to intelligence, by the way that customized information is stored in kernel state, Consequently facilitating customized information is subsequently inserted into message in kernel state;By handling message, insertion customization letter in kernel state Breath so as on the one hand save the number of communications in Message processing between kernel state and User space, on the other hand can be realized The easy way non-fully replaced by patch installing is quickly changed and forwarded to message;By using SKB mechanism, so as to It realizes the efficient easily processing target message in the case where not copying original message data, and SKB mechanism can be utilized Verifying function ensures the accuracy of message modification;By the way that customized information to be configured to the downstream response message phase with http protocol The form answered, so as to ensure being successively inserted into for customized information;Node aging mechanism is flowed by setting, so as to the greatest extent may be used While can ensure that customized information insertion, ensure the stabilization of process performance, reduce the occupancy to resource and waste;By needing When being repeatedly inserted into customized information to the message in same message flow, the process of the message in first treated message flow is recorded, so as to It can realize in the subsequent packet in handling the message flow, it is quick to change message and forwarding.
Fig. 8 is the schematic diagram of the key step for the method that customized information is popped up in browser according to embodiments of the present invention.
As shown in figure 8, information is customized using the device that customized information is popped up in browser in the embodiment of the present invention The method of push mainly includes the following steps:
Step S81:Customized information is obtained, and the customized information is sent to from User space in kernel state and is preserved;
Step S82:Message is handled in kernel state, including:Message is intercepted, is turned after changing the partial content of the message Hair, to be inserted into the customized information into the message for returning to browser;
Step S83:Wherein, during handling message in kernel state, the message information of message to be treated is recorded And the processing procedure of the message, quickly to be handled follow-up association message.
Wherein, in the embodiment of the present invention, processing message further includes in kernel state:Message is handled using SKB mechanism, and it is every Message length and checksum field are updated after the secondary modification to message.
In addition, the method that customized information is popped up in the browser of the embodiment of the present invention may also include:Intercept http protocol Upstream request message obtains message information, creates stream node to record the message information and cochain, then assists the HTTP The type of coding field of the upstream request header of view forwards after deleting, and the message information includes:Source IP, destination IP, source Port, destination interface and message URL information;And the downstream response message of interception http protocol, message information is obtained, according to The message information judge on chain whether existing corresponding stream node, if in the presence of to the downstream response of the http protocol Customized information is inserted into message, then by chain under the stream node.
It may also include in addition, handling message in kernel state:Customized information is configured to the downstream response with http protocol The corresponding form of message, so as to being successively inserted into for customized information.
The method that customized information is popped up in the browser of the embodiment of the present invention may also include stream node aging mechanism and message URL Filtering systems:After stream node is created to record the message information and cochain, start stream node aging mechanism, if institute The cochain time for stating stream node is more than preset duration threshold value, then by chain under the stream node;Judge on the http protocol being truncated to Whether the URL suffix names of row request message are index.html, if so, create stream node with record the message information and on Chain, otherwise not cochain.
In addition, in the embodiment of the present invention, customized information repeatedly if desired is inserted into the message in same message flow, then in head It does not descend to flow node described in chain after the secondary message insertion customized information into the message flow and records described in the first treated The process of message in message flow, it is quick to change message and forwarding during to handle subsequent message in the message flow.
From the above, it can be seen that by being connected in User space and customized information service server length, so as to intelligence Energy pulls customized information, by the way that customized information is stored in kernel state, consequently facilitating being inserted subsequently in kernel state into message Enter customized information;By handling message in kernel state, customized information is inserted into, so as on the one hand save in Message processing On the other hand number of communications between core state and User space can realize through patch installing the easy way pair non-fully replaced Message quickly modification and forwarding;It is high in the case where not copying original message data so as to realize by using SKB mechanism Effect easily processing target message, and can utilize the verifying function of SKB mechanism, ensures the accuracy of message modification;Pass through Customized information is configured to form corresponding with the downstream response message of http protocol, so as to ensure the success of customized information Insertion;Node aging mechanism is flowed by setting, so as to while customized information insertion is ensured as far as possible, ensure treatability The stabilization of energy, reduces the occupancy to resource and waste;By needing repeatedly to the message insertion customization letter in same message flow During breath, the process of the message in first treated message flow is recorded, so as to realize the follow-up report in the message flow is handled Wen Shi, it is quick to change message and forwarding.
Above-mentioned specific embodiment, does not form limiting the scope of the invention.Those skilled in the art should be bright It is white, depending on design requirement and other factors, various modifications, combination, sub-portfolio and replacement can occur.It is any Modifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the scope of the present invention Within.

Claims (14)

1. the device of customized information is popped up in a kind of browser, which is characterized in that including:
Customized information acquisition module, operates in User space, for obtaining customized information, and the customized information is sent to customization Information preserving module;
Customized information preserving module, operates in kernel state, for receiving the customized information that the customized information acquisition module is sent, And preserve the customized information;
Processing module operates in kernel state, for handling message, including:Message is intercepted, after the partial content for changing the message Forwarding, to be inserted into the customized information into the message for returning to browser;
Study module operates in kernel state, for being interacted with the processing module, records the message information of message to be treated And the processing procedure of the message, so that the processing module quickly handles follow-up association message.
2. the apparatus according to claim 1, which is characterized in that the processing module is additionally operable to:It is handled and reported using SKB mechanism Text, and update message length and checksum field after changing every time message.
3. the apparatus according to claim 1, which is characterized in that described device is additionally operable to:
The upstream request message of the processing module interception http protocol, obtains message information, and the study module creates stream section Point is to record the message information and cochain, and then the processing module is by the upstream request header of the http protocol Type of coding field forwards after deleting, and the message information includes:Source IP, destination IP, source port, destination interface and message URL information;And
The downstream response message of the processing module interception http protocol, obtains message information, is judged according to the message information On the chain of the study module whether existing corresponding stream node, if in the presence of to the downstream response report of the http protocol Customized information is inserted into text, then the study module flows chain under node by described.
4. device according to claim 3, which is characterized in that the processing module is additionally operable to:Customized information is configured to Form corresponding with the downstream response message of http protocol, to realize being successively inserted into for customized information.
5. device according to claim 3, which is characterized in that the study module is additionally operable to:Node is flowed in establishment to remember After recording the message information and cochain, start stream node aging mechanism, if the cochain time of the stream node is more than default Long threshold value, then by chain under the stream node.
6. device according to claim 3, which is characterized in that the study module is additionally operable to:Judge the processing module Whether the URL suffix names for the http protocol upstream request message being truncated to are index.html, if so, creating stream node to remember The message information and cochain are recorded, otherwise not cochain.
7. device according to claim 3, which is characterized in that described device is additionally operable to:
If desired customized information repeatedly is inserted into the message in same message flow, then the study module is first in the processing module It is secondary into the message flow message insertion customized information after do not descend to flow described in chain node and
The study module records the process of the message in message flow described in the processing module first treated, so as to the processing It is quick to change message and forwarding in message flow described in resume module during subsequent message.
8. the method for customized information is popped up in a kind of browser, which is characterized in that including:
Customized information is obtained, and the customized information is sent to from User space in kernel state and is preserved;
Message is handled in kernel state, including:Message is intercepted, is forwarded after changing the partial content of the message, with clear to returning Look at device message in be inserted into the customized information;
Wherein, during handling message in kernel state, the message information of message to be treated and the message are recorded Processing procedure, quickly to be handled follow-up association message.
9. it according to the method described in claim 8, is further included it is characterized in that, handling message in kernel state:Use SKB mechanism Message is handled, and message length and checksum field are updated after changing every time message.
10. according to the method described in claim 8, it is characterized in that, the method further includes:
Intercept http protocol upstream request message, obtain message information, create stream node with record the message information and on Chain forwards, the message information after then the type of coding field of the upstream request header of the http protocol is deleted Including:Source IP, destination IP, source port, destination interface and message URL information;And
The downstream response message of http protocol is intercepted, message information is obtained, judges whether deposited on chain according to the message information Accordingly stream node, if in the presence of, be inserted into customized information into the downstream response message of the http protocol, then will described in Flow chain under node.
11. it according to the method described in claim 10, is further included it is characterized in that, handling message in kernel state:Customization is believed Breath is configured to form corresponding with the downstream response message of http protocol, so as to being successively inserted into for customized information.
12. according to the method described in claim 10, it is characterized in that, the method further includes:Node is flowed in establishment to record After the message information and cochain, start stream node aging mechanism, if the cochain time of the stream node is more than preset duration Threshold value, then by chain under the stream node.
13. according to the method described in claim 10, it is characterized in that, the method further includes:Judge the HTTP being truncated to associations Whether the URL suffix names for discussing upstream request message are index.html, if so, creating stream node to record the message information And cochain, otherwise not cochain.
14. according to the method described in claim 10, it is characterized in that, the method further includes:
If desired customized information repeatedly is inserted into the message in same message flow, is then inserted in the message for the first time into the message flow Can not entering to flow described in chain after customized information node and
The process of the message described in first treated in message flow is recorded, during to handle subsequent message in the message flow, soon Speed modification message and forwarding.
CN201610976798.2A 2016-11-07 2016-11-07 Apparatus and method for popping out customized information in browser Active CN108063781B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610976798.2A CN108063781B (en) 2016-11-07 2016-11-07 Apparatus and method for popping out customized information in browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610976798.2A CN108063781B (en) 2016-11-07 2016-11-07 Apparatus and method for popping out customized information in browser

Publications (2)

Publication Number Publication Date
CN108063781A true CN108063781A (en) 2018-05-22
CN108063781B CN108063781B (en) 2021-01-26

Family

ID=62136547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610976798.2A Active CN108063781B (en) 2016-11-07 2016-11-07 Apparatus and method for popping out customized information in browser

Country Status (1)

Country Link
CN (1) CN108063781B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010047406A1 (en) * 2000-04-13 2001-11-29 Netilla Networks Inc. Apparatus and accompanying methods for providing, through a centralized server site, an integrated virtual office environment, remotely accessible via a network-connected web browser, with remote network monitoring and management capabilities
CN102968578A (en) * 2012-10-30 2013-03-13 山东中创软件商用中间件股份有限公司 Injection prevention method and system
CN103873712A (en) * 2014-04-14 2014-06-18 中国人民解放军信息工程大学 VoIP gateway detection method and multi-core processing device
CN104123229A (en) * 2014-07-21 2014-10-29 上海斐讯数据通信技术有限公司 Method and system capable of making message efficiently submitted to user mode from kernel mode
CN104796337A (en) * 2015-04-10 2015-07-22 京信通信系统(广州)有限公司 Method and device for forwarding message
US20160127322A1 (en) * 2014-10-29 2016-05-05 International Business Machines Corporation Masking data within json-type documents

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010047406A1 (en) * 2000-04-13 2001-11-29 Netilla Networks Inc. Apparatus and accompanying methods for providing, through a centralized server site, an integrated virtual office environment, remotely accessible via a network-connected web browser, with remote network monitoring and management capabilities
CN102968578A (en) * 2012-10-30 2013-03-13 山东中创软件商用中间件股份有限公司 Injection prevention method and system
CN103873712A (en) * 2014-04-14 2014-06-18 中国人民解放军信息工程大学 VoIP gateway detection method and multi-core processing device
CN104123229A (en) * 2014-07-21 2014-10-29 上海斐讯数据通信技术有限公司 Method and system capable of making message efficiently submitted to user mode from kernel mode
US20160127322A1 (en) * 2014-10-29 2016-05-05 International Business Machines Corporation Masking data within json-type documents
CN104796337A (en) * 2015-04-10 2015-07-22 京信通信系统(广州)有限公司 Method and device for forwarding message

Also Published As

Publication number Publication date
CN108063781B (en) 2021-01-26

Similar Documents

Publication Publication Date Title
Paolucci et al. P4 edge node enabling stateful traffic engineering and cyber security
CA2892471C (en) Systems and methods for detecting and mitigating threats to a structured data storage system
CN107026821B (en) Message processing method and device
Fielding et al. Hypertext transfer protocol (HTTP/1.1): Semantics and content
EP2770697B1 (en) Application identification method, and data mining method, device and system
US8539224B2 (en) Obscuring form data through obfuscation
Fielding et al. RFC 7231: Hypertext Transfer Protocol (HTTP/1.1): semantics and content
US7647404B2 (en) Method of authentication processing during a single sign on transaction via a content transform proxy service
US20070136279A1 (en) URL shortening and authentication with reverse hash lookup
US20060123425A1 (en) Method and apparatus for high-speed processing of structured application messages in a network device
US20150095359A1 (en) Volume Reducing Classifier
CN107181804B (en) The method for down loading and device of resource
US10887661B2 (en) System and method for content monitoring and filtering to improve network efficiency
EP3379771A1 (en) Message processing method, device and system
US20060155852A1 (en) Representation of boolean expressions for specifying filters using xml
Fielding et al. RFC 9110: HTTP Semantics
CN101257461A (en) Method and apparatus for filtering content based on classification
JP2018531466A6 (en) Real-time validation of JSON data applying tree graph properties
Jabiyev et al. {FRAMESHIFTER}: Security implications of {HTTP/2-to-HTTP/1} conversion anomalies
CN108063781A (en) The apparatus and method that customized information is popped up in browser
US20050246545A1 (en) Screening for illegitimate requests to a computer application
CN104270431B (en) A kind of method and device of con current control
WO2005065020A2 (en) A method for speeding up the pass time of an executable through a checkpoint
CN116015889A (en) Data stream forwarding method, device, network equipment and storage medium
CN106506572B (en) The method of router and router push local information

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
GR01 Patent grant
GR01 Patent grant