CN107562426A - Without the method and system for burying point type high in the clouds collection and analysis browser Trace - Google Patents

Without the method and system for burying point type high in the clouds collection and analysis browser Trace Download PDF

Info

Publication number
CN107562426A
CN107562426A CN201710787168.5A CN201710787168A CN107562426A CN 107562426 A CN107562426 A CN 107562426A CN 201710787168 A CN201710787168 A CN 201710787168A CN 107562426 A CN107562426 A CN 107562426A
Authority
CN
China
Prior art keywords
computer
code
webpage
function
analysis
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
CN201710787168.5A
Other languages
Chinese (zh)
Other versions
CN107562426B (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201710787168.5A priority Critical patent/CN107562426B/en
Publication of CN107562426A publication Critical patent/CN107562426A/en
Application granted granted Critical
Publication of CN107562426B publication Critical patent/CN107562426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses the method and system that a kind of nothing buries point type high in the clouds collection and analysis browser Trace, it is related to Internet technical field.The PAC configuration files that this method Computer a is provided using computer b configure browser agent rule.Computer a when accessing the legal webpage that computer c is provided, by computer b acted on behalf of by its request, and tracking code is injected in replies of the computer b to computer c and is forwarded back to computer a.When computer a runs webpage, tracking code will be established with computer d and communicated, and in webpage running, be specified the API Calls information of tracking to send to computer d developer and analyzed and processed.This method is made code without computer c on website and buried a little, bears analysis computing cost without computer a, there is provided there is webpage agency, Trace to collect the programming framework with Trace analytic functions, be adapted to the secondary development of following demand:Named web page all types of Trace caused by browser execution in arbitrary equipment are collected and surveyed beyond the clouds.

Description

Without the method and system for burying point type high in the clouds collection and analysis browser Trace
Technical field
The present embodiments relate to Internet technical field, and in particular to a kind of nothing buries point type high in the clouds and collects and surveys browser Trace method and system.
Background technology
Cloud native applications based on browser have become a general orientation of following application development.Cloud native applications possess nothing The characteristics of needing installation, at any time renewal, standard security.For the container of such application operation --- the exploitation of browser and tuning mistake Cheng Zhong, collecting turns into the entrance for finding performance bottleneck, security breaches and service condition with the Trace of analysis different web pages application.
During different browsers, the different Trace that different web pages are applied are collected, there is Railway Project to have a strong impact on The efficiency of developer:The web application for needing to test is not increased income generally, and traditional Trace collection methods are needed in source code In bury a little, quantities is difficult to estimate, be not suitable for this usage scenario;The up to number GB of some Trace caused by web application, it is difficult to Real-time Treatment Analysis is realized in the browser run on personal intellectual computing device;The Trace of web application generally by receiving by hand Collection, analysis and archive, efficiency are difficult to be lifted.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of be used for without the side for burying point type high in the clouds collection and analysis browser Trace Method and system.
In a first aspect, the embodiments of the invention provide a kind of nothing to bury the method that point type high in the clouds collects and surveys browser Trace, Including:
The PAC configuration files that computer a provides according to computer b set the agent rule of computer a browsers;
Computer a asks to carry out generation by computer b when accessing meeting of being provided of computer c regular webpage Manage, so that computer b is according to rule, the injection in the info web that computer c replys to computer a follows the trail of code and by described in Info web is forwarded to computer a;
Computer a will be communicated when running webpage by following the trail of code with computer d foundation, and in web analysis and fortune During row, the API Calls information of specified tracking is sent to computer d in batches, for computer d to webpage in computer a On each run generation analysis result.
Alternatively, the PAC configuration files provided according to computer b set the agent rule bag of computer a browsers Include:
The agent rule of configuration file only comes into force to the webpage of Html agreements transmission, picture resource file, video resource text Part, audio resource file, JavaScript code file and CSS code files will be filtered, and WebSocket connections will be by mistake Filter;Configuration file Computer b address is by according to the IP or domain name dynamic generation configured in computer b.
Alternatively, the computer b injects tracking according to rule in the info web that computer c replys to computer a The info web is simultaneously forwarded to computer a by code, is further comprised:
Path query inject words in the web page access HTTP/HTTPS requests that computer b is sent according to computer a Section value carrys out the tracking type of code of dynamic select injection, according to what is stated in the configuration file being pre-configured on computer b The tracking type of code follows the trail of code corresponding to obtaining;Computer b replys in the computer c HTTP/HTTPS webpages provided successively Body field header implantation tool code libraries and developer in information follow the trail of code.
Alternatively, the computer a will be communicated, further when running webpage by following the trail of code with computer d foundation Including:
Developer is first carried out when running webpage and follows the trail of code by computer a, and following the trail of code by the developer will be The calling of specified function is monitored inside browser;Wherein, the function that the instrumentation code storehouse being pre-configured on computer b provides is used WebSocket is established in the Analysis Service for specifying TCP port to provide with computer d to be connected;Computer d IP or domain name is by calculating Machine b specifies when code is followed the trail of in injection;
After the foundation of code and computer d completions WebSocket is followed the trail of, computer d initialization is pre-configured in calculating Analysis module on machine d, and enter the state for waiting analysis.
Alternatively, it is described in web analysis and running, the API Calls information of specified tracking is sent to meter in batches Calculation machine d, further comprises:
Computer a calls the primary function F of browser monitored function handle F ' using original program on webpage, based on chasing after Track code passes through the parameter list that F ' gets original program call function;
The original function handle F provided based on tracking code call browser, obtains function return value;
The function call record of the function signature comprising calling, parameter list and return value is carried out two based on tracking function Buffering area is temporarily stored in after system compressed encoding, and the return value is returned into webpage original program;
When the amount of storage of the buffering area reaches specified threshold, all functions in buffering area are adjusted based on tracking code With record copies to data transmission line journey, emptying buffer, and data transmission line journey is notified to send the letter after encoding to computer d Number calls record;
Computer d analyzes decoded call after function call record is received, using analysis module and records list.
Alternatively, progress binary system compression coding mode is recorded to the function call includes:
Divide three-level buffering area, the head of 8byte length is included per one-level, wherein 4byte indicates buffer level, value 1~3;Remaining 4byte indicates the byte number of buffering area;
First order buffering area records for function call, and each is recorded as 8byte;Wherein, preceding 2byte storage functions are compiled Number, 2byte storage function return values afterwards, last 4byte storages call the parameter list of record in the buffering area of the second level Address;
Second level buffering area is parameter list memory block;The record length of each parameter list is not fixed, each note Record is made up of such as lower part:2byte is used to store parameter list byte number, and 2byte is used to store parameter list length n, remaining Byte store n parameter;Each parameter length is variable, and the parameter is made up of such as lower part:1byte stores Primary parameter class Type, 3byte storage secondary parameters types, also include 4byte storage parameters in third level buffering area for the parameter of specified type In address, 4byte storage parameter byte number;
For array and character string type, its actual value is stored in third level buffering area.
Alternatively, it is described based on tracking code by all function call record copies in buffering area to data transmission line Journey, emptying buffer, further comprise:
The tracking code run in main thread is by the function call record copies stored in three buffering areas to sending line In the action scope of journey, then heavy label buffering area, so that original region of memory of buffering area can continue to use.
Alternatively, computer d analyzes decoded call using analysis module and records list, further comprises:
Computer d resolves to function signature, returned again by after three buffering areas checking of the binary format received Value, the form of parameter list;
Computer d calls the preparation counting function of analysis module, and the length for the calling record list that will be analyzed passes to Analysis module;
Computer d calls the analytic function of analysis module on several threads, and LSN and wall scroll will be called to record Entity passes to analysis module and finished until function call record all in this buffering area is all analyzed;
Computer d calls the transmission Recurrent Function of analysis module, gets analysis module and returns to tracking in computer a Code.
Alternatively, computer d generates analysis result to each run of the webpage on computer a, further comprises:
When computer a webpage process is closed or has reached analysis indexes, computer a and computer d's WebSocket ceased communications, the end function of computer d analysis modules will be called, and export this operation for webpage Analysis result.
Second aspect, the embodiments of the invention provide a kind of nothing to bury the system that point type high in the clouds collects and surveys browser Trace, Including:
Agent rule setup module, the PAC configuration files for being provided according to computer b set computer a browsers Agent rule;
Proxy module is asked, for when accessing meeting of being provided of computer c regular webpage, asking by calculating Machine b is acted on behalf of, and computer b according to rule, follow the trail of code and will by the injection in the info web that computer c replys to computer a The info web is forwarded to computer a;
Requirement analysis module, for when running webpage, will be communicated by following the trail of code with computer d foundation, and in net Page parsing is with running, the API Calls information of specified tracking being sent to computer d, computer d webpage being counted in batches Each run generation analysis result on calculation machine a.
, should the embodiments of the invention provide the method and system that a kind of nothing buries point type high in the clouds collection and analysis browser Trace The PAC configuration files that method Computer a is provided using computer b configure browser agent rule.Computer a is accessing calculating During the legal webpage that machine c is provided, its request is acted on behalf of by computer b, and computer b injects in the reply to computer c Tracking code is simultaneously forwarded back to computer a.When computer a runs webpage, tracking code will be established with computer d and communicated, and in net In page running, specify the API Calls information of tracking to send to computer d developer and analyze and process.This method is without meter Calculation machine c makees code on website and buried a little, bears analysis computing cost without computer a, there is provided have webpage agency, Trace The programming framework with Trace analytic functions is collected, is adapted to the secondary development of following demand:Named web page is collected and surveyed beyond the clouds to exist All types of Trace caused by browser execution in arbitrary equipment.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 is that a kind of nothing of the present invention buries the general flowchart that point type high in the clouds collects and surveys browser Trace;
Fig. 2 is that a kind of nothing of the present invention buries the detail flowchart that point type high in the clouds collects and surveys browser Trace;
Fig. 3 is the Life Cycle Process figure of browser Trace analysis modules in the present invention;
Fig. 4 is the binary data format schematic diagram of function call list after coding compression in the present invention;
Fig. 5 is that a kind of nothing provided by the invention buries the system embodiment structure that point type high in the clouds collects and surveys browser Trace Schematic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
In a first aspect, the embodiments of the invention provide a kind of nothing to bury the method that point type high in the clouds collects and surveys browser Trace, As shown in figure 1, comprise the following steps:
S101:The PAC that modification computer a System Agent or browser agent is configured to computer b offers is automatically configured, Computer a asks PAC to computer b, and rule described in PAC by computer a operating system or browser resolves and will perform, The HTTP/HTTPS requests (web access requests) of follow-up browser would be complying to rule execution described in PAC.
S102:For the request that target is computer c that met the requirements on computer a, by the browser transmission by computer a Onto the proxy server of computer b designated ports.
S103:After computer b proxy server gets request, it is computer c that parsing, which obtains actual target, and is led to Cross HTTP/HTTPS query fields subsidiary in request and get injection type;Computer b sends the request to meter first Calculation machine c, after computer c reply is obtained, inject phase to the HTTP/HTTPS Body field headers of reply according to injection type The tracking code answered, most amended reply is sent to computer a at last.
S104:Computer a is explained run the webpage immediately after amended reply is got;Wherein follow the trail of code by In in webpage stem, take the lead in being loaded operation;Java standard library that tracking code T is injected using the system (namely it is pre-configured in meter The function that instrumentation code storehouse on calculation machine b provides), establish and connect with the WebSocket servers of computer d designated ports;Chase after Track code monitors the calling record of specific API in computer a browsers, and is sent after calling recording compressed coding to computer d。
S105:Computer d receive coding after function call record after, call for analysis module analysis method Recalls information is handled one by one, and after analysis indexes or WebSocket connection closeds are reached, statistics exports all recalls informations Analysis result.
In the method that nothing provided in an embodiment of the present invention buries that point type high in the clouds collects and surveys browser Trace, computer a makes The PAC configuration files configuration browser agent rule provided with computer b.Computer a meets what access computer c was provided During the webpage of rule, its request is acted on behalf of by computer b, and tracking code is injected in replies of the computer b to computer c and is forwarded back to Computer a.When computer a runs webpage, tracking code will be established with computer d and communicated, and in webpage running, will be opened Originator is specified the API Calls information of tracking to send to computer d and analyzed and processed.This method does generation without computer c on website Code buries a little, bears analysis computing cost without computer a, there is provided there is webpage agency, Trace to collect and Trace analysis work( The programming framework of energy, it is adapted to the secondary development of following demand:Named web page browser in arbitrary equipment is collected and surveyed beyond the clouds All types of Trace caused by operation.
Wherein, computer a here can be understood as client, and computer b here can be to be interpreted as being configured with generation The server apparatus of server is managed, computer b is provided with other guide, such as instrumentation code storehouse etc. except proxy server, Computer c can be understood as web page server, and computer can be understood as Analysis server.
Fig. 2 shows that a kind of optionally nothing provided in an embodiment of the present invention buries point type high in the clouds and collects and surveys browser Trace Detail flowchart;Reference picture 2, methods described includes:
S201:The PAC that modification computer a System Agent or browser agent is configured to computer b offers is automatically configured, Computer a asks PAC to computer b, and rule described in PAC by computer a operating system or browser resolves and will perform, The HTTP/HTTPS requests of follow-up browser would be complying to rule execution described in PAC.
S202:For the request that undesirable or target on computer a is computer a, b, c, d, by by computer a's Browser directly sends request to the standard server of object-computer (namely computer b, c, d).For example, for calculating Target is computer b request on machine a, computer b is directly issued, without issuing the proxy server configured on computer b.
S203:For the request that target is computer c that met the requirements on computer a, by the browser transmission by computer a Onto the proxy server of computer b designated ports.
S204:After computer b proxy server gets the proxy requests from computer a, parsing obtains actual Target is computer c, and gets injection type by HTTP/HTTPS query fields subsidiary in request;Computer b is first Computer c server is first sent the request to, the HTTP/HTTPS Body according to reply of the injection type to computer c The corresponding tracking code of field header injection, most amended reply is sent to computer a at last.
S205:Computer a is explained run the webpage immediately after amended reply is got;Wherein follow the trail of code by In in webpage stem, take the lead in being loaded operation;The java standard library that code T uses the system to inject is followed the trail of, with computer d designated ports WebSocket servers establish connection;Tracking code specifies browser API handles and proxy call is actual browses by rewriting Device API mode, monitor former web page program and these API calling is recorded.
S206:For computer d after analysis indexes or WebSocket connection closeds are reached, statistics output is all to call letter The analysis result of breath.
S207:Code is followed the trail of when specific API during former web page program calls computer a browsers, is recorded correspondingly The calling return value of API function signature, parameter list and actual function, calling log buffer is temporarily stored in after coding compression In, and actual return value is returned into former web page program.
S208:When buffering area reaches threshold value, tracking code copies the buffer into transmission thread, emptying buffer, by Send the analysis module that thread will call record to be sent to computer d by WebSocket.
S209:The calling record that computer d parsings receive, and call the analytic function processing of analysis module to call note one by one Record.
S210:Computer d calls obtaining for analysis module after a collection of calling record list received every time is disposed Complex function is fetched, partial analysis result that developer specifies is sent to computer a tracking code by WebSocket.
Fig. 3 is the Life Cycle Process figure of browser Trace analysis modules in the present invention;Reference picture 3, methods described bag Include:
S301:Analysis module enters original state after being instantiated.Wherein here analysis module is to be pre-configured in meter Calculation machine d performs the analysis module of analysis operation finally.
S302:Analysis module is called to prepare function, initialization process type, output format, Local work space address etc. Parameter, into wait state;Or called by single-wheel analysis completion status and send Recurrent Function, get and be sent to tracking function Partial analysis result, subsequently enter next round wait state.
S303:Computer d is first after the calling record of the binary format of thread transmission is sent in receiving computer a The Format Object of standard is first resolved to, analysis module is then called and prepares counting function, now analysis module initialization epicycle The local variable of analysis, into readiness.
S304:Analysis module is called by object analysis function until calling every recorded in list to record all by multithreading Analysis is completed, and now each function call all only analyzes one and calls record, and the internal memory that analysis result is stored in analysis module becomes In amount, single-wheel analysis completion status is subsequently entered.
S305:After analysis indexes or WebSocket connection closeds are reached, analysis module is called to be terminated computer d The analysis result of function, now all recalls informations of analysis module statistics output, into the state of destruction.
Fig. 4 is the binary data format schematic diagram of function call list after coding compression in the present invention;Reference picture 4, institute The method of stating includes:
S401:First order buffering area records for function call;Head is 8byte length, and wherein 4byte indicates buffering area level Not, value 1~3,4byte indicate the byte number of buffering area, facilitate analysis program to parse binary format;Each record length For 8byte, 2byte storage functions numbering, 2byte storage function return values are followed successively by, the parameter row of record are called in 4byte storages Address of the table in the buffering area of the second level, i.e. array index offset.
S402:Second level buffering area is parameter list memory block;Head is consistent with first order buffering area;Each parameter row The record length of table is not fixed, and each record is made up of such as lower part:2byte stores parameter list byte number, 2byte storages Parameter list length n, n parameter is stored afterwards;Each parameter length is variable, wherein 1byte storage parameter types, 3byte storages Secondary parameters type, optionally parameter can also be stored in third level buffering area including 4byte for the parameter of specified type Address, 4byte storage parameter byte number;Array and character string type actual value are stored in third level buffering area.
Second aspect, what the embodiment of the present invention additionally provided that a kind of nothing buries that point type high in the clouds collects and surveys browser Trace is System, as shown in figure 5, including:
Agent rule setup module 501, the PAC configuration files for being provided according to computer b set computer a browsers Agent rule;
Ask proxy module 502, for when accessing meeting of being provided of computer c regular webpage, ask by Computer b is acted on behalf of, computer b injection tracking codes in the info web that computer c replys to computer a according to rule And the info web is forwarded to computer a;
Requirement analysis module 503, for when running webpage, will be communicated by following the trail of code with computer d foundation, and Web analysis is with running, the API Calls information of specified tracking being sent to computer d, computer d webpage being existed in batches Each run generation analysis result on computer a.
By the device that the nothing that the present embodiment is introduced buries point type high in the clouds collection and analysis browser Trace is that can perform sheet Nothing in inventive embodiments buries the device that point type high in the clouds collects and surveys browser Trace method, so implemented based on the present invention Nothing described in example buries the method that point type high in the clouds collects and surveys browser Trace, and those skilled in the art can be much of that The nothing of solution the present embodiment buries the embodiment and its various change that point type high in the clouds collects and surveys browser Trace device Form, so how the device for burying point type high in the clouds collection and analysis browser Trace for the nothing herein realizes the embodiment of the present invention In nothing bury point type high in the clouds and collect and survey browser Trace method and be no longer discussed in detail.As long as those skilled in the art Implement to belong to this without device used by the method for burying point type high in the clouds collection and analysis browser Trace in the embodiment of the present invention Apply for the scope to be protected.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments in this include institute in other embodiments Including some features rather than further feature, but the combination of the feature of different embodiments means to be in the scope of the present invention Within and form different embodiments.For example, in the following claims, embodiment claimed it is any it One mode can use in any combination.
Some unit embodiments of the present invention can be realized with hardware, or to be run on one or more processor Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice Microprocessor or digital signal processor (DSP) are realized in gateway according to embodiments of the present invention, proxy server, system Some or all parts some or all functions.The present invention is also implemented as being used to perform side as described herein The some or all equipment or system program (for example, computer program and computer program product) of method.It is such Realizing the program of the present invention can store on a computer-readable medium, or can have the shape of one or more signal Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal Formula provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real It is existing.In if the unit claim of dry systems is listed, several in these systems can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.

Claims (10)

1. a kind of nothing buries the method that point type high in the clouds collects and surveys browser Trace, it is characterised in that comprises the following steps:
The PAC configuration files that computer a provides according to computer b set the agent rule of computer a browsers;
Computer a asks to be acted on behalf of by computer b when accessing meeting of being provided of computer c regular webpage, with Making computer b, the injection in the info web that computer c replys to computer a follows the trail of code and believes the webpage according to rule Breath is forwarded to computer a;
Computer a will be communicated, and in web analysis and ran when running webpage by following the trail of code with computer d foundation Cheng Zhong, the API Calls information of specified tracking is sent to computer d in batches, for computer d to webpage on computer a Each run generates analysis result.
2. according to the method for claim 1, it is characterised in that the PAC configuration files provided according to computer b are set The agent rule of computer a browsers includes:
The agent rule of configuration file only comes into force to the webpage of Html agreements transmission, picture resource file, video resource file, sound Frequency resource file, JavaScript code file and CSS code files will be filtered, and WebSocket connections will be filtered;Match somebody with somebody File Computer b address is put by according to the IP or domain name dynamic generation configured in computer b.
3. according to the method for claim 1, it is characterised in that the computer b is according to rule in computer c to computer Injection follows the trail of code and the info web is forwarded into computer a in the info web that a is replied, and further comprises:
Path query inject fields take in the web page access HTTP/HTTPS requests that computer b is sent according to computer a Value carrys out the tracking type of code of dynamic select injection, and this stated in the configuration file that foundation is pre-configured on computer b chases after Track type of code follows the trail of code corresponding to obtaining;The HTTP/HTTPS webpage return informations that computer b provides in computer c successively In body field header implantation tool code libraries and developer follow the trail of code.
4. according to the method for claim 1, it is characterised in that the computer a is when running webpage, by following the trail of code It will establish and communicate with computer d, further comprise:
Developer is first carried out when running webpage and follows the trail of code by computer a, and following the trail of code by the developer will browse The calling of specified function is monitored inside device;Wherein, be pre-configured in the function that instrumentation code storehouse on computer b provides be used for The Analysis Service that computer d specifies TCP port to provide establishes WebSocket connections;Computer d IP or domain name is by computer b Specified when code is followed the trail of in injection;
After the foundation of code and computer d completions WebSocket is followed the trail of, computer d initialization is pre-configured on computer d Analysis module, and enter wait analysis state.
5. according to the method for claim 4, it is characterised in that it is described in web analysis and running, chased after specifying The API Calls information of track is sent to computer d in batches, is further comprised:
Computer a calls the primary function F of browser monitored function handle F ' using original program on webpage, based on tracking generation Code passes through the parameter list that F ' gets original program call function;
The original function handle F provided based on tracking code call browser, obtains function return value;
The function call record of function signature comprising calling, parameter list and return value is carried out by binary system based on tracking function Buffering area is temporarily stored in after compressed encoding, and the return value is returned into webpage original program;
When the amount of storage of the buffering area reaches specified threshold, all function calls in buffering area are remembered based on tracking code Record is copied to data transmission line journey, emptying buffer, and notifies data transmission line journey to send the function after encoding to computer d and adjust With record;
Computer d analyzes decoded call after function call record is received, using analysis module and records list.
6. according to the method for claim 5, it is characterised in that the function call is recorded and carries out binary system compressed encoding Mode includes:
Point three-level buffering area, includes the head of 8byte length per one-level, and wherein 4byte indicates buffer level, and value 1~ 3;Remaining 4byte indicates the byte number of buffering area;
First order buffering area records for function call, and each is recorded as 8byte;Wherein, preceding 2byte storage functions numbering, it Ground of the parameter list of record in the buffering area of the second level is called in 2byte storage function return values afterwards, last 4byte storages Location;
Second level buffering area is parameter list memory block;The record length of each parameter list is not fixed, each record by As lower part forms:2byte is used to store parameter list byte number, and 2byte is used to storing parameter list length n, remaining Byte stores n parameter;Each parameter length is variable, and the parameter is made up of such as lower part:1byte stores Primary parameter class Type, 3byte storage secondary parameters types, also include 4byte storage parameters in third level buffering area for the parameter of specified type In address, 4byte storage parameter byte number;
For array and character string type, its actual value is stored in third level buffering area.
7. according to the method for claim 5, it is characterised in that it is described based on tracking code by all functions in buffering area Record copies are called emptying buffer, to further comprise to data transmission line journey:
The function call record copies stored in three buffering areas are extremely sent thread by the tracking code run in main thread In action scope, then heavy label buffering area, so that original region of memory of buffering area can continue to use.
8. according to the method for claim 5, it is characterised in that computer d analyzes decoded calling using analysis module List is recorded, is further comprised:
Computer d will the binary format that received three buffering areas checking after, resolve to again function signature, return value, The form of parameter list;
Computer d calls the preparation counting function of analysis module, and the length for the calling record list that will be analyzed passes to analysis Module;
Computer d calls the analytic function of analysis module on several threads, and LSN and wall scroll will be called to record entity Analysis module is passed to finish until function call record all in this buffering area is all analyzed;
Computer d calls the transmission Recurrent Function of analysis module, gets analysis module and returns to tracking generation in computer a Code.
9. according to the method for claim 5, it is characterised in that computer d gives birth to each run of the webpage on computer a Into analysis result, further comprise:
When computer a webpage process is closed or has reached analysis indexes, computer a and computer d WebSocket Ceased communication, the end function of computer d analysis modules will be called, and export the analysis knot of this operation for webpage Fruit.
10. a kind of nothing buries the system that point type high in the clouds collects and surveys browser Trace, it is characterised in that including:
Agent rule setup module, the PAC configuration files for being provided according to computer b set the agency of computer a browsers Rule;
Proxy module is asked, for when accessing meeting of being provided of computer c regular webpage, asking by computer b Acted on behalf of, computer b according to rule, follow the trail of code and by institute by the injection in the info web that computer c replys to computer a State info web and be forwarded to computer a;
Requirement analysis module, for when running webpage, will be communicated by following the trail of code with computer d foundation, and in webpage solution Analysis is with running, the API Calls information of specified tracking being sent to computer d, computer d is to webpage in computer in batches Each run generation analysis result on a.
CN201710787168.5A 2017-09-04 2017-09-04 Method and system for collecting and analyzing Trace of browser in non-embedded cloud Active CN107562426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710787168.5A CN107562426B (en) 2017-09-04 2017-09-04 Method and system for collecting and analyzing Trace of browser in non-embedded cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710787168.5A CN107562426B (en) 2017-09-04 2017-09-04 Method and system for collecting and analyzing Trace of browser in non-embedded cloud

Publications (2)

Publication Number Publication Date
CN107562426A true CN107562426A (en) 2018-01-09
CN107562426B CN107562426B (en) 2020-01-10

Family

ID=60979145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710787168.5A Active CN107562426B (en) 2017-09-04 2017-09-04 Method and system for collecting and analyzing Trace of browser in non-embedded cloud

Country Status (1)

Country Link
CN (1) CN107562426B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845918A (en) * 2018-04-28 2018-11-20 努比亚技术有限公司 A kind of information collecting method, terminal and computer readable storage medium
CN110245046A (en) * 2019-05-29 2019-09-17 吉旗(成都)科技有限公司 It is a kind of for Android App without the data statistical approach and device buried a little
CN114157647A (en) * 2021-11-11 2022-03-08 众安信息技术服务有限公司 Method and device for tracking webpage browsed by user, electronic equipment and storage medium
CN114363204A (en) * 2021-12-09 2022-04-15 网宿科技股份有限公司 Request monitoring method, network device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098359A1 (en) * 2006-09-29 2008-04-24 Ventsislav Ivanov Manipulation of trace sessions based on address parameters
CN102053906A (en) * 2009-10-30 2011-05-11 国际商业机器公司 System and method for collecting program runtime information
CN105808417A (en) * 2014-12-29 2016-07-27 平安科技(深圳)有限公司 Automated testing method and proxy server
CN106445484A (en) * 2015-08-12 2017-02-22 北京高绎信息技术有限公司 Method and system for realizing data tracking through software development kit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098359A1 (en) * 2006-09-29 2008-04-24 Ventsislav Ivanov Manipulation of trace sessions based on address parameters
CN102053906A (en) * 2009-10-30 2011-05-11 国际商业机器公司 System and method for collecting program runtime information
CN105808417A (en) * 2014-12-29 2016-07-27 平安科技(深圳)有限公司 Automated testing method and proxy server
CN106445484A (en) * 2015-08-12 2017-02-22 北京高绎信息技术有限公司 Method and system for realizing data tracking through software development kit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845918A (en) * 2018-04-28 2018-11-20 努比亚技术有限公司 A kind of information collecting method, terminal and computer readable storage medium
CN110245046A (en) * 2019-05-29 2019-09-17 吉旗(成都)科技有限公司 It is a kind of for Android App without the data statistical approach and device buried a little
CN110245046B (en) * 2019-05-29 2023-05-02 吉旗(成都)科技有限公司 Data statistics method and device for Android App without buried points
CN114157647A (en) * 2021-11-11 2022-03-08 众安信息技术服务有限公司 Method and device for tracking webpage browsed by user, electronic equipment and storage medium
CN114363204A (en) * 2021-12-09 2022-04-15 网宿科技股份有限公司 Request monitoring method, network device and storage medium

Also Published As

Publication number Publication date
CN107562426B (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN107562426A (en) Without the method and system for burying point type high in the clouds collection and analysis browser Trace
CN108197200A (en) Daily record method for tracing, device, computer equipment and storage medium
US8880509B2 (en) System and method for caching database reports
CN106603296A (en) Log processing method and device
CN110489315B (en) Operation request tracking method, operation request tracking device and server
US20210385251A1 (en) System and methods for integrating datasets and automating transformation workflows using a distributed computational graph
CN112486708B (en) Page operation data processing method and processing system
CN110263070B (en) Event reporting method and device
US9654580B2 (en) Proxy-based web application monitoring through script instrumentation
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
US11546380B2 (en) System and method for creation and implementation of data processing workflows using a distributed computational graph
CN109271359A (en) Log information processing method, device, electronic equipment and readable storage medium storing program for executing
CN103152391A (en) Journal output method and device
CN106126551A (en) A kind of generation method of Hbase database access daily record, Apparatus and system
CN109359231A (en) A kind of information crawler method, server and the storage medium of distributed network crawler
CN104468790A (en) Method for processing cookie data and client side
CN106210032A (en) The method and device reported based on terminal data batch
CN106649342A (en) Data processing method and apparatus in data acquisition platform
CN104935601A (en) Cloud-based method, device and system for analyzing website log safety
CN107154968A (en) A kind of data processing method and equipment
CN106126419A (en) The adjustment method of a kind of application program and device
CN107391528A (en) Front end assemblies Dependency Specification searching method and equipment
Brunelle et al. Archival crawlers and JavaScript: discover more stuff but crawl more slowly
US7849183B1 (en) Method of monitoring network and application performance by analyzing web clients and web servers
CN103618761B (en) Method and browser for processing cookie 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