CN108280014A - A kind of method, apparatus and computer equipment for monitoring browser page - Google Patents

A kind of method, apparatus and computer equipment for monitoring browser page Download PDF

Info

Publication number
CN108280014A
CN108280014A CN201810119600.8A CN201810119600A CN108280014A CN 108280014 A CN108280014 A CN 108280014A CN 201810119600 A CN201810119600 A CN 201810119600A CN 108280014 A CN108280014 A CN 108280014A
Authority
CN
China
Prior art keywords
page
key
monitored
url
current time
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
CN201810119600.8A
Other languages
Chinese (zh)
Other versions
CN108280014B (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810119600.8A priority Critical patent/CN108280014B/en
Priority to PCT/CN2018/082160 priority patent/WO2019153479A1/en
Publication of CN108280014A publication Critical patent/CN108280014A/en
Application granted granted Critical
Publication of CN108280014B publication Critical patent/CN108280014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

An embodiment of the present invention provides a kind of method, apparatus and computer equipment for monitoring browser page, including:According to preset first time interval, URL based on the page to be monitored and current time generate key-value pair, and key-value pair write-in is locally stored;When needing to monitor the click event for intercepting the page to be monitored when monitoring the page, the URL of the page to be monitored is obtained according to click event;Key is generated according to the URL, is based on key and key-value pair, middle corresponding value is searched from being locally stored according to preset second time interval;Whether the difference for judging current time and searching between the moment is more than preset time threshold, if more than, it is determined that the page to be monitored has been switched off;In this way, if current time and the difference searched between the moment are more than preset time threshold, it can determine that the page to be monitored has been switched off.

Description

A kind of method, apparatus and computer equipment for monitoring browser page
Technical field
The invention belongs to page monitoring technique field more particularly to a kind of method, apparatus and meter for monitoring browser page Calculate machine equipment.
Background technology
In browsing pages, user clicks a link on a page A and opens same area another page B under one's name, when When page B end operations are turned off, server wishes that page A can be notified to carry out subsequent place when page B turns off Manage flow.
It is to be utilized after intercepting click request by intercepting the click request of page B in the prior art Window.open () method opens a new window, and the loading page B in new window;Window.open () method can To obtain the object of new window, then page A can monitor the onclose events of the object.When new window is closed, Onclose events can be triggered, and page A can be notified.
But using window.open () method come open the operation of a new window can be by browser or counteradvertising plug-in unit It is prevented from as malicious act, can not be opened so as to cause new window, in this case can not just monitors new window object Onclose events cause page A that cannot notify.
Invention content
In view of the problems of the existing technology, an embodiment of the present invention provides a kind of method for monitoring browser page, dresses It sets and computer equipment, the whether pent technical problem of browser page can not be monitored in the prior art for solving.
The present invention provides a kind of method for monitoring browser page, the method includes:
According to preset first time interval, the uniform resource position mark URL based on the page to be monitored and current time life Be locally stored at key-value pair, and by key-value pair write-in, the current time be the key-value pair is written every time it is local At the time of correspondence when storage;
When need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, according to the click The URL of the page to be monitored described in event acquisition;
According to the URL generate key, based on the key and it is described be locally stored in key-value pair, when according to preset second Between interval from it is described be locally stored it is middle search corresponding value, described value is the current time;
Whether the difference for judging the current time and searching between the moment is more than preset time threshold, if more than then The page to be monitored described in determination has been switched off.
It is described according to preset first time interval in said program, the uniform resource locator based on the page to be monitored URL and current time generate key-value pair, including:
Based on the URL, the URL is generated into the key according to preset hash function;
The current time is updated according to preset first time interval;The current time is the corresponding value of the key, The key and the correspondence of the current time are the key-value pair.
In said program, the click event of the page to be monitored described in the interception, obtained according to the click event described in The URL of the page to be monitored, including:
The link of the page to be monitored described in acquisition, obtains the DOM objects of the link;
By the DOM objects, the page to be monitored click event and be preassigned time of the click event Letter of transfer number is bound;
When intercepting the click event, the call back function is triggered, waits supervising using described in call back function acquisition Listen the URL of the page.
In said program, the preset time threshold is determined according to the first time interval.
The present invention also provides a kind of device for monitoring browser page, described device includes:
Generation unit is used for according to preset first time interval, the uniform resource position mark URL based on the page to be monitored And current time generates key-value pair, and key-value pair write-in is locally stored, the current time is every time by the key At the time of value corresponds to when write-in is locally stored;
Interception unit, for when need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, According to the URL of the page to be monitored described in click event acquisition;
Searching unit, for according to the URL generate key, based on the key and it is described be locally stored in key-value pair, press The corresponding value of middle lookup is locally stored from described according to preset second time interval, described value is the current time;
Judging unit, for judging the current time and searching whether the difference between the moment is more than preset time threshold Value, if more than, it is determined that the page to be monitored has been switched off.
In said program, the generation unit is specifically used for:
Based on the URL, the URL is generated into the key according to preset hash function;
The current time is updated according to preset first time interval;The current time is the corresponding value of the key, The key and the correspondence of the current time are the key-value pair.
In said program, the interception unit is specifically used for:
The link of the page to be monitored described in acquisition, obtains the DOM objects of the link;
By the DOM objects, the page to be monitored click event and be preassigned time of the click event Letter of transfer number is bound;
When intercepting the click event, the call back function is triggered, waits supervising using described in call back function acquisition Listen the URL of the page.
In said program, the preset time threshold is determined according to the first time interval.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, which is handled It realizes and is able to carry out such as any of the above-described method when device executes.
The present invention also provides a kind of computer equipments for monitoring browser page, including:
At least one processor;And
At least one processor being connect with the processor communication, wherein
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to Order is able to carry out such as any of the above-described method.
An embodiment of the present invention provides a kind of method, apparatus and computer equipment for monitoring browser page, the methods Including:According to preset first time interval, uniform resource position mark URL and current time based on the page to be monitored generate key Value pair, and key-value pair write-in is locally stored, the current time are when key-value pair write-in is locally stored pair At the time of answering;When need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, according to the click The URL of the page to be monitored described in event acquisition;According to the URL generate key, based on the key and it is described be locally stored in key The corresponding value of middle lookup is locally stored from described according to preset second time interval in value pair, and described value is the current time; Whether the difference for judging the current time and searching between the moment is more than preset time threshold, if more than, it is determined that it is described The page to be monitored has been switched off;In this way, when corresponding current time can be found from being locally stored, then it can determine and wait for It is in the open state to monitor the page;When the current time and search the moment between difference be more than preset time threshold, then It can determine that the page to be monitored has been switched off, thus can easily judge whether the page to be monitored is closed.
Description of the drawings
Fig. 1 is the method flow schematic diagram for the monitoring browser page that the embodiment of the present invention one provides;
Fig. 2 is the apparatus structure schematic diagram provided by Embodiment 2 of the present invention for monitoring browser page;
Fig. 3 is the computer equipment overall structure diagram for the monitoring browser page that the embodiment of the present invention three provides.
Specific implementation mode
In order to solve not monitoring the whether pent technical problem of browser page in the prior art, the present invention provides A kind of method, apparatus and computer equipment for monitoring browser page, the method includes:According between preset first time Every uniform resource position mark URL and current time based on the page to be monitored generate key-value pair, and this is written in the key-value pair In ground storage, the current time is at the time of correspondence when key-value pair write-in is locally stored;It is waited for described in being monitored when needs When monitoring the page, the click event of the page to be monitored described in interception, according to the page to be monitored described in click event acquisition URL;According to the URL generate key, based on the key and it is described be locally stored in key-value pair, according between preset second time Every the corresponding value of middle lookup is locally stored from described, described value is the current time;When judging the current time with searching Whether the difference between quarter is more than preset time threshold, if more than, it is determined that the page to be monitored has been switched off.
Technical scheme of the present invention is described in further detail below by drawings and the specific embodiments.
Embodiment one
The present embodiment provides a kind of methods for monitoring browser page, as shown in Figure 1, the method includes:
S111, according to preset first time interval, the URL of the uniform resource locator based on the page to be monitored and current Time generates key-value pair, and key-value pair write-in is locally stored;
In this step, the Resource Locator URL of the page to be monitored, first foot are obtained first with the first shell script This program is arranged in the page to be monitored, and the first shell script can be javascript scripts.
It gets after the URL for monitoring the page, is based on the URL, the URL is generated into institute according to preset hash function State key;The hash function may include:Md5 hash functions, crc32 hash functions etc..
For example, when the URL is generated the key using md5 hash functions, URL is /shop/trade_listshop_ When id=12, it is implemented as follows:
F (x)=substr (md5 (x), -9) (1)
X in formula (1) is URL, and F (x) is calculate md5 values last 9, is c19d7b148;The length of certain F (x) Degree can arbitrarily be set.
After generating the key based on the URL, according to preset first time interval, current time is determined;Current time For the corresponding value of the key, the correspondence of the key and current time is the key-value pair.Here, the current time is every It is secondary by the key-value pair write-in be locally stored when correspond at the time of, the first time interval may be set according to actual conditions, 1s is set as in the present embodiment.
For example, first current time is 11:11, first time interval 1s, then second current time is just 11: 12, third current time is 11:13 etc., such current time is at the state of continuous renewal.
Then the page to be monitored in the open state, the first shell script can be continuous according to first time interval always The correspondence of write-in current time, such key and current time is formed key-value pair, and current time is just the corresponding value of key, The value is time value, then stores key-value pair into being locally stored.
When the monitoring page is closed, the corresponding value of middle key, which is locally stored, will stop updating, which is to wait for The current time that last time is written before monitoring page close.
S112, when need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, according to described The URL of the page to be monitored described in the acquisition of click event;
When monitoring the page, monitoring and block using the second shell script described in the same area monitoring page under one's name needs to monitor The click event of the page to be monitored is cut, the second shell script, which is provided in, to be monitored in the page, and the second shell script can be Javascript scripts.It should be noted that the monitored page is the page opened on the basis of monitoring the page.
Specifically, the link of the page to be monitored described in the acquisition of the second shell script, obtains the DOM objects of the link;It will It the DOM objects, the click event of the page to be monitored and is carried out for the preassigned call back function of the click event Binding;When intercepting the click event, the call back function will be triggered, the call back function will be performed, in this way The URL of the page to be monitored can be obtained using the call back function.
For example, the page to be monitored is linked as<A href=" http://www.sample.com/path/to/page- B " id=" test-link " target=" _ _ blank ">, then passing through function var dom_link= document.querySelector("a#test-link");The DOM objects of the link can be got, and by DOM objects It is assigned to variable dom_link;
Then addition is to clicking the monitoring parameter EventListener of event on DOM objects, and by watch_page_ Close_call_back functions are implemented as follows as call back function:
dom_link.addEventListener("click",watch_page_close_call_back);
Thus by DOM objects, the page to be monitored click event and for the click event it is preassigned Call back function is bundled with, wherein click is click event.
S113, according to the URL generate key, based on the key and it is described be locally stored in key-value pair, according to preset The corresponding value of middle lookup is locally stored from described in second time interval;
It gets after the URL for monitoring the page, key is generated according to the URL, generate the method and the first script of key here The method of Program Generating key is identical, and details are not described herein.
After generating key, the corresponding current time of middle lookup is locally stored from described according to preset second time interval. Second time interval can be that first time interval is identical, can also be different, and can set according to specific circumstances.
For example, in 1s, the corresponding value of key is 11:11;When 2s, the corresponding value of key is 11:12;, when 3s, key pair The value answered is 11:13;When 4s, the corresponding value of key is 11:14;So according to the corresponding value of the second time interval key for searching When, the value that 2s is found is 11:12, the value that 4s is found is 11:14.Here, value is to constantly update, and a key is only right Answer a value.Described value is current time.
S114, whether the difference for judging the current time and searching between the moment is more than preset time threshold, if greatly In, it is determined that the page to be monitored has been switched off.
After finding current time for the first time, then it can determine that the page to be monitored is in the open state.
Whether the difference for then judging the current time and searching between the moment is more than preset time threshold, if greatly In, it is determined that the page to be monitored has been switched off.
Here, the preset time threshold is determined according to the first time interval, and usually time threshold is arranged It is 2 times of first time interval.The second time interval is 2s in the present embodiment.
For example, the current time found is 11:11, it is 11 to search the moment:14, between current time and lookup moment Difference is 3s, is more than preset time threshold, then determining that the page to be monitored has been switched off at this time.
Further, it monitors the page and judges that the response time whether page to be monitored closes can be according to first time interval Determine that specific range is (first time interval, the+the second time interval of first time interval) with the second time interval.Namely The range of response time is (1s, 3s) in the present embodiment, that is monitors the page and can determine whether out that the monitored page is in 1~3s It is no to be closed.
Embodiment two
Corresponding to embodiment one, the present embodiment also provides a kind of device for monitoring browser page, as shown in Fig. 2, described Device includes:Acquiring unit 21, generation unit 22, interception unit 23, searching unit 24 and judging unit 25;Wherein,
Acquiring unit 21 is used to obtain the uniform resource position mark URL of the page to be monitored using the first shell script;It is described First shell script is arranged in the page to be monitored, and the first shell script can be javascript scripts.
It gets after the URL for monitoring the page, generation unit 22 is used for according to preset first time interval, based on described URL and current time generate key-value pair, and key-value pair write-in is locally stored, and the current time is every time will be described At the time of key-value pair write-in corresponds to when being locally stored.
Specifically, generation unit 22 is based on the URL, and the URL is generated the key according to preset hash function;Institute Hash function is stated to may include:Md5 hash functions, crc32 hash functions etc..
For example, when the URL is generated the key using md5 hash functions, URL is /shop/trade_listshop_ When id=12, it is implemented as follows:
F (x)=substr (md5 (x), -9) (1)
X in formula (1) is URL, and F (x) is calculate md5 values last 9, is c19d7b148;The length of certain F (x) Degree can arbitrarily be set.
After generating the key based on the URL, according to preset first time interval, current time is determined;Current time For the corresponding value of the key, the correspondence of the key and current time is the key-value pair.Here, the current time is to incite somebody to action At the time of the key-value pair write-in corresponds to when being locally stored, the first time interval may be set according to actual conditions, this reality It applies and is set as 1s in example.
For example, first current time is 11:11, first time interval 1s, then second current time is just 11: 12, third current time is 11:13 etc., such current time is at the state of continuous renewal.
Then the page to be monitored in the open state, the first shell script can be continuous according to first time interval always The correspondence of write-in current time, such key and current time is formed key-value pair, and current time is just the corresponding value of key, The value is time value, then stores key-value pair into being locally stored.
When the monitoring page is closed, the corresponding value of middle key, which is locally stored, will stop updating, which is to wait for The current time that last time is written before monitoring page close.
When the monitoring page of same area under one's name needs described in monitoring when monitoring the page, interception unit 23 is used to utilize crus secunda The click event of the page to be monitored is monitored and intercepted to this program, according to the page to be monitored described in click event acquisition URL;Second shell script, which is provided in, to be monitored in the page, and the second shell script can be javascript scripts.It needs Bright, the monitored page is the page opened on the basis of monitoring the page.
Specifically, interception unit 23 obtains the chain using the link of the page to be monitored described in the acquisition of the second shell script The DOM objects connect;It is preassigned by the DOM objects, the click event of the page to be monitored and for the click event Call back function bound;When intercepting the click event, the call back function will be triggered, the call back function is just It can be performed, the URL of the page to be monitored can be obtained using the call back function in this way.
For example, the page to be monitored is linked as<A href=" http://www.sample.com/path/to/page- B " id=" test-link " target=" _ _ blank ">, then passing through function var dom_link= document.querySelector("a#test-link");The DOM objects of the link can be got, and by DOM objects It is assigned to variable dom_link;
Then addition is to clicking the monitoring parameter EventListener of event on DOM objects, and by watch_page_ Close_call_back functions are implemented as follows as call back function:
dom_link.addEventListener("click",watch_page_close_call_back);
Thus by DOM objects, the page to be monitored click event and for the click event it is preassigned Call back function is bundled with, wherein click is click event.
It gets after the URL for monitoring the page, searching unit 24 is used to generate key according to the URL, generates key here Method is identical with the first shell script generation method of key, and details are not described herein.
After generating key, searching unit 24 based on the key and it is described be locally stored in key-value pair, according to preset the The corresponding value of middle lookup is locally stored from described in two time intervals, and described value is the current time;Second time interval It can be that first time interval is identical, can also be different, can set according to specific circumstances.
For example, in 1s, the corresponding value of key is 11:11;When 2s, the corresponding value of key is 11:12;, when 3s, key pair The value answered is 11:13;When 4s, the corresponding value of key is 11:14;So searching unit 24 is according to the second time interval key for searching When corresponding value, the value that 2s is found is 11:12, the value that 4s is found is 11:14.Here, value is to constantly update, one A key only corresponds to a value.
After finding current time for the first time, judging unit 25 can then determine that the page to be monitored is in the open state.
Whether the difference that then judging unit 25 judges the current time and searches between the moment is more than the preset time Threshold value, if more than, it is determined that the page to be monitored has been switched off.
Here, the preset time threshold is determined according to the first time interval, and usually time threshold is arranged It is 2 times of first time interval.The second time interval is 2s in the present embodiment.
For example, the current time found is 11:11, it is 11 to search the moment:14, between current time and lookup moment Difference is 3s, is more than preset time threshold, then judging unit 25 determines that the page to be monitored has been switched off at this time.
Further, it monitors the page and judges that the response time whether page to be monitored closes can be according to first time interval Determine that specific range is (first time interval, the+the second time interval of first time interval) with the second time interval.Namely The range of response time is (1s, 3s) in the present embodiment, that is judging unit 25 can determine whether out the monitored page in 1~3s Whether it is closed.
Embodiment three
The present embodiment also provides a kind of computer equipment for detecting subscriber identity information, as shown in figure 3, the calculating Machine equipment includes:Radio frequency (Radio Frequency, RF) circuit 310, memory 320, input unit 330, display unit 340, The components such as voicefrequency circuit 350, WiFi module 360, processor 370 and power supply 380.It will be understood by those skilled in the art that figure Computer equipment structure shown in 3 does not constitute the restriction to computer equipment, may include more more or fewer than illustrating Component either combines certain components or different components arrangement.
Each component parts of computer equipment is specifically introduced with reference to Fig. 3:
RF circuits 310 can be used for sending and receiving for signal, particularly, after the downlink information of base station is received, to processing The processing of device 370.In general, RF circuits 310 include but not limited at least one amplifier, transceiver, coupler, low noise amplification Device (Low Noise Amplifier, LNA), duplexer etc..
Memory 320 can be used for storing software program and module, and processor 370 is stored in memory 320 by operation Software program and module, to execute various function application and the data processing of computer equipment.Memory 320 can be led To include storing program area and storage data field, wherein storing program area can storage program area, needed at least one function Application program etc.;Storage data field can be stored uses created data etc. according to computer equipment.In addition, memory 320 May include high-speed random access memory, can also include nonvolatile memory, a for example, at least disk memory, Flush memory device or other volatile solid-state parts.
Input unit 330 can be used for receiving the number or character information of input, and generate the user with computer equipment Setting and the related key signals input of function control.Specifically, input unit 330 may include keyboard 331 and other inputs Equipment 332.Keyboard 331 collects the input operation of user on it, and drives corresponding connection according to preset formula Device.Keyboard 331 gives processor 370 again after collecting output information.In addition to keyboard 331, input unit 330 can also include Other input equipments 332.Specifically, other input equipments 332 can include but is not limited to touch panel, function key (such as sound Measure control button, switch key etc.), it is trace ball, mouse, one or more in operating lever etc..
Display unit 340 can be used for showing information input by user or the information and computer equipment that are supplied to user Various menus.Display unit 340 may include display panel 341, optionally, liquid crystal display (Liquid may be used Crystal Display, LCD), the forms such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) To configure display panel 341.Further, keyboard 331 can cover display panel 341, when keyboard 331 detect it is on it or attached After close touch operation, processor 370 is sent to determine the type of touch event, is followed by subsequent processing device 370 according to incoming event Type corresponding visual output is provided on display panel 341.Although keyboard 331 and display panel 341 are conducts in figure 3 Two independent components realize input and the input function of computer equipment, but in some embodiments it is possible to by keyboard 331 is integrated with display panel 341 and that realizes computer equipment output and input function.
Voicefrequency circuit 350, loud speaker 351, microphone 352 can provide the audio interface between user and computer equipment. The transformed electric signal of the audio data received can be transferred to loud speaker 351, is converted by loud speaker 351 by voicefrequency circuit 350 It is exported for voice signal;
WiFi belongs to short range wireless transmission technology, and computer equipment can help user to receive and dispatch by WiFi module 360 Email, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 3 Show WiFi module 360, but it is understood that, and it is not belonging to must be configured into for computer equipment, it completely can root It is omitted in the range for the essence for not changing invention according to needs.
Processor 370 is the control centre of computer equipment, utilizes various interfaces and the entire computer equipment of connection Various pieces, by running or execute the software program and/or module that are stored in memory 320, and call and be stored in Data in memory 320 execute the various functions and processing data of computer equipment, whole to be carried out to computer equipment Monitoring.Optionally, processor 370 may include one or more processing units;Preferably, processor 370 can be integrated using processing Device, wherein the main processing operation system of application processor, user interface and application program etc..
Computer equipment further includes the power supply 380 (such as power supply adaptor) powered to all parts, it is preferred that power supply can With logically contiguous by power-supply management system and processor 370.
What method, server and the computer equipment provided in an embodiment of the present invention for monitoring browser page can be brought Advantageous effect is at least:
An embodiment of the present invention provides a kind of method, apparatus and computer equipment for monitoring browser page, the methods Including:Obtain the uniform resource position mark URL of the page to be monitored;According to preset first time interval, based on the URL and work as Preceding time generates key-value pair, and key-value pair write-in is locally stored, and the current time is that the key-value pair is written At the time of correspondence when being locally stored;When need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, According to the URL of the page to be monitored described in click event acquisition;Key is generated according to the URL, is based on the key and described The corresponding value of middle lookup is locally stored from described according to preset second time interval in key-value pair in ground storage, and described value is The current time;Whether the difference for judging the current time and searching between the moment is more than preset time threshold, if greatly In, it is determined that the page to be monitored has been switched off;In this way, when corresponding current time can be found from being locally stored When, then it can determine that the page to be monitored is in the open state;When the difference between the current time and lookup moment is more than in advance If time threshold, then can determine that the page to be monitored has been switched off, thus can easily judge page to be monitored Whether face is closed.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with teaching based on this.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, 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 without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of 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:It is i.e. required to protect Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in the one or more equipment different from the embodiment.It 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.Other than such feature and/or at least some of process or unit exclude each other, it may be used any Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached 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, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
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 certain features rather than other feature, but the combination of the feature of different embodiment 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 arbitrary it One mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP, Digital Signal Processing) are implemented to realize according to the present invention The gateway of example, some or all functions of proxy server, some or all components in system.It is of the invention acceptable real It is now for executing some or all equipment or program of device of method as described herein (for example, computer journey Sequence and computer program product).It is such to realize that the program of the present invention be stored on computer readable storage medium, or It can be with the form of one or more signal.Such signal can be downloaded from internet website and be obtained, or carried It provides on body signal, or provides in any other forms.
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 mark 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 several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame Claim.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention, it is all All any modification, equivalent and improvement made by within the spirit and principles in the present invention etc. should be included in the protection of the present invention Within the scope of.

Claims (10)

1. a kind of method for monitoring browser page, which is characterized in that the method includes:
According to preset first time interval, uniform resource position mark URL and current time based on the page to be monitored generate key Value pair, and key-value pair write-in is locally stored, the current time is that key-value pair write-in is locally stored every time When at the time of correspond to;
When need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, according to the click event The URL of the page to be monitored described in acquisition;
According to the URL generate key, based on the key and it is described be locally stored in key-value pair, according between preset second time Every the corresponding value of middle lookup is locally stored from described, described value is the current time;
Whether the difference for judging the current time and searching between the moment is more than preset time threshold, if more than, it is determined that The page to be monitored has been switched off.
2. the method as described in claim 1, which is characterized in that it is described according to preset first time interval, based on waiting monitoring The uniform resource position mark URL and current time of the page generate key-value pair, including:
Based on the URL, the URL is generated into the key according to preset hash function;
The current time is updated according to preset first time interval;The current time is the corresponding value of the key, described Key and the correspondence of the current time are the key-value pair.
3. the method as described in claim 1, which is characterized in that the click event of the page to be monitored described in the interception, according to The URL of the page to be monitored described in the click event acquisition, including:
The link of the page to be monitored described in acquisition, obtains the DOM objects of the link;
By the DOM objects, the page to be monitored click event and be the preassigned readjustment letter of the click event Number is bound;
When intercepting the click event, the call back function is triggered, utilizes page to be monitored described in call back function acquisition The URL in face.
4. the method as described in claim 1, which is characterized in that the preset time threshold is according to the first time interval It determines.
5. a kind of device for monitoring browser page, which is characterized in that described device includes:
Generation unit uniform resource position mark URL based on the page to be monitored and is worked as according to preset first time interval Preceding time generates key-value pair, and key-value pair write-in is locally stored, and the current time is every time by the key-value pair At the time of write-in corresponds to when being locally stored;
Interception unit, for when need monitor described in when monitoring the page, the click event of the page to be monitored described in interception, according to The URL of the page to be monitored described in the click event acquisition;
Searching unit, for according to the URL generate key, based on the key and it is described be locally stored in key-value pair, according to pre- If the second time interval from it is described be locally stored it is middle search corresponding value, described value is the current time;
Judging unit, for judging the current time and searching whether the difference between the moment is more than preset time threshold, If more than, it is determined that the page to be monitored has been switched off.
6. device as claimed in claim 5, which is characterized in that the generation unit is specifically used for:
Based on the URL, the URL is generated into the key according to preset hash function;
The current time is updated according to preset first time interval;The current time is the corresponding value of the key, described Key and the correspondence of the current time are the key-value pair.
7. device as claimed in claim 5, which is characterized in that the interception unit is specifically used for:
The link of the page to be monitored described in acquisition, obtains the DOM objects of the link;
By the DOM objects, the page to be monitored click event and be the preassigned readjustment letter of the click event Number is bound;
When intercepting the click event, the call back function is triggered, utilizes page to be monitored described in call back function acquisition The URL in face.
8. device as claimed in claim 5, which is characterized in that the preset time threshold is according to the first time interval It determines.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The method being able to carry out as described in Claims 1-4 is any is realized when row.
10. a kind of computer equipment for monitoring browser page, which is characterized in that including:
At least one processor;And
At least one processor being connect with the processor communication, wherein
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy Enough methods executed as described in Claims 1-4 is any.
CN201810119600.8A 2018-02-06 2018-02-06 Method and device for monitoring browser page and computer equipment Active CN108280014B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810119600.8A CN108280014B (en) 2018-02-06 2018-02-06 Method and device for monitoring browser page and computer equipment
PCT/CN2018/082160 WO2019153479A1 (en) 2018-02-06 2018-04-08 Browser page monitoring method and apparatus, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810119600.8A CN108280014B (en) 2018-02-06 2018-02-06 Method and device for monitoring browser page and computer equipment

Publications (2)

Publication Number Publication Date
CN108280014A true CN108280014A (en) 2018-07-13
CN108280014B CN108280014B (en) 2021-03-16

Family

ID=62807727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810119600.8A Active CN108280014B (en) 2018-02-06 2018-02-06 Method and device for monitoring browser page and computer equipment

Country Status (2)

Country Link
CN (1) CN108280014B (en)
WO (1) WO2019153479A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445796A (en) * 2018-10-16 2019-03-08 厦门美图移动科技有限公司 Program editing method and device
CN109710354A (en) * 2018-12-13 2019-05-03 平安普惠企业管理有限公司 Page monitor method, page restoring method, device, equipment and medium
CN109815429A (en) * 2019-01-31 2019-05-28 天津字节跳动科技有限公司 Browser page closes treating method and apparatus
CN109857420A (en) * 2018-12-13 2019-06-07 平安普惠企业管理有限公司 Method for updating pages, device, computer equipment and storage medium
CN109934014A (en) * 2019-02-15 2019-06-25 福建天泉教育科技有限公司 A kind of method and terminal detecting resource file correctness
CN113609412A (en) * 2021-06-28 2021-11-05 北京华云安信息技术有限公司 Method for acquiring URL (Uniform resource locator) through Hook key function and event
CN115033455A (en) * 2022-06-18 2022-09-09 珠海市鸿瑞信息技术股份有限公司 Equipment risk monitoring system and method based on TCP state data

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061606A (en) * 2019-11-04 2020-04-24 深圳震有科技股份有限公司 Monitoring and early warning method based on browser, terminal and storage medium
CN111061607A (en) * 2019-11-25 2020-04-24 贝壳技术有限公司 Monitoring method and monitoring device for white screen of page
CN111460350B (en) * 2020-04-07 2023-06-09 上海熙菱信息技术有限公司 Anti-shake and throttling packaging method and system
CN113496003A (en) * 2020-04-08 2021-10-12 北京沃东天骏信息技术有限公司 Method and device for determining page stay time
CN114915837B (en) * 2021-02-10 2023-08-25 武汉斗鱼网络科技有限公司 Triggering method and device for video rendering, electronic equipment and storage medium
CN113987318B (en) * 2021-11-01 2024-03-12 盐城天眼察微科技有限公司 Page monitoring method, device, equipment and computer storage medium
CN116628654B (en) * 2023-07-26 2023-11-07 之江实验室 Front-end page authority control method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812718A (en) * 2012-11-07 2014-05-21 江苏仕德伟网络科技股份有限公司 Newest method for obtaining webpage closure time
CN105335404A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 Page information loading method and device
CN106294648A (en) * 2016-08-03 2017-01-04 腾讯科技(深圳)有限公司 A kind of processing method and processing device for page access path
JP2017062725A (en) * 2015-09-25 2017-03-30 株式会社ノーリツ Remote monitoring system
CN106919636A (en) * 2016-07-04 2017-07-04 阿里巴巴集团控股有限公司 link jump method and device
CN107391115A (en) * 2017-06-28 2017-11-24 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer equipment for realizing pop-up alternative events

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309588B (en) * 2013-06-19 2015-12-23 广东欧珀移动通信有限公司 A kind of method, Apparatus and system preventing mobile terminal maloperation
CN107295050B (en) * 2016-04-01 2021-05-11 阿里巴巴集团控股有限公司 Front-end user behavior statistical method and device
CN107368399A (en) * 2017-06-28 2017-11-21 武汉斗鱼网络科技有限公司 Webpage monitoring method and system on a kind of line
CN107609184A (en) * 2017-09-30 2018-01-19 北京奇虎科技有限公司 Data load method and device based on web page browsing behavior

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812718A (en) * 2012-11-07 2014-05-21 江苏仕德伟网络科技股份有限公司 Newest method for obtaining webpage closure time
CN105335404A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 Page information loading method and device
JP2017062725A (en) * 2015-09-25 2017-03-30 株式会社ノーリツ Remote monitoring system
CN106919636A (en) * 2016-07-04 2017-07-04 阿里巴巴集团控股有限公司 link jump method and device
CN106294648A (en) * 2016-08-03 2017-01-04 腾讯科技(深圳)有限公司 A kind of processing method and processing device for page access path
CN107391115A (en) * 2017-06-28 2017-11-24 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer equipment for realizing pop-up alternative events

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445796A (en) * 2018-10-16 2019-03-08 厦门美图移动科技有限公司 Program editing method and device
CN109710354A (en) * 2018-12-13 2019-05-03 平安普惠企业管理有限公司 Page monitor method, page restoring method, device, equipment and medium
CN109857420A (en) * 2018-12-13 2019-06-07 平安普惠企业管理有限公司 Method for updating pages, device, computer equipment and storage medium
CN109815429A (en) * 2019-01-31 2019-05-28 天津字节跳动科技有限公司 Browser page closes treating method and apparatus
CN109815429B (en) * 2019-01-31 2021-03-05 天津字节跳动科技有限公司 Browser page closing processing method and device
CN109934014A (en) * 2019-02-15 2019-06-25 福建天泉教育科技有限公司 A kind of method and terminal detecting resource file correctness
CN109934014B (en) * 2019-02-15 2021-06-25 福建天泉教育科技有限公司 Method and terminal for detecting correctness of resource file
CN113609412A (en) * 2021-06-28 2021-11-05 北京华云安信息技术有限公司 Method for acquiring URL (Uniform resource locator) through Hook key function and event
CN115033455A (en) * 2022-06-18 2022-09-09 珠海市鸿瑞信息技术股份有限公司 Equipment risk monitoring system and method based on TCP state data

Also Published As

Publication number Publication date
CN108280014B (en) 2021-03-16
WO2019153479A1 (en) 2019-08-15

Similar Documents

Publication Publication Date Title
CN108280014A (en) A kind of method, apparatus and computer equipment for monitoring browser page
CN107391115B (en) A kind of method, apparatus and computer equipment for realizing pop-up alternative events
CN109739604B (en) Page rendering method, device, server and storage medium
CN106254436A (en) A kind of method of remote debugging, relevant device and system
CN103607498B (en) A kind of method and device showing Stranger Calls/de-electrifying number related information
CN106936793A (en) A kind of information intercepting processing method and terminal
CN107451852A (en) The live promotion method and server using APP of third party in a kind of live platform
CN108536594A (en) Page test method, device and storage device
CN105376335A (en) Method and device for collection data uploading
CN105740145B (en) The method and device of element in orient control
CN107908407A (en) Compilation Method, device and terminal device
US10621259B2 (en) URL error-correcting method, server, terminal and system
CN103823873B (en) Reading/writing method, device and system of browser setting item
CN106055480A (en) Webpage debugging method and terminal
CN110535901A (en) Service degradation method, apparatus, computer equipment and storage medium
CN109445917A (en) Application processing method and device, electronic equipment, computer readable storage medium
CN108184148B (en) A kind of method, apparatus and computer equipment of user for identification
CN108200180A (en) A kind of method, apparatus and computer equipment for being used to limit request frequency
CN107577712B (en) A kind of method, apparatus and computer equipment of loading page
US20230017318A1 (en) Method and system for tracking events in distributed high-throughput applications
CN105260421A (en) Webpage loading method and apparatus
CN110851324A (en) Log-based routing inspection processing method and device, electronic equipment and storage medium
CN106547800A (en) The method and device of striding equipment synchronization user behavior
CN107479985A (en) The method, apparatus and computer equipment of a kind of remote procedure call
CN106681884B (en) A kind of monitoring method and device of system calling

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