CN105468587A - Webpage anomaly monitoring method and apparatus - Google Patents

Webpage anomaly monitoring method and apparatus Download PDF

Info

Publication number
CN105468587A
CN105468587A CN201410240298.3A CN201410240298A CN105468587A CN 105468587 A CN105468587 A CN 105468587A CN 201410240298 A CN201410240298 A CN 201410240298A CN 105468587 A CN105468587 A CN 105468587A
Authority
CN
China
Prior art keywords
described
webpage
static file
information
mistake
Prior art date
Application number
CN201410240298.3A
Other languages
Chinese (zh)
Other versions
CN105468587B (en
Inventor
刘卿
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Priority to CN201410240298.3A priority Critical patent/CN105468587B/en
Publication of CN105468587A publication Critical patent/CN105468587A/en
Application granted granted Critical
Publication of CN105468587B publication Critical patent/CN105468587B/en

Links

Abstract

The invention provides a webpage anomaly monitoring method and apparatus. The method comprises: monitoring whether an error static file exists in a webpage or not; when the error static file is monitored, capturing error static file information; splicing the error static file information and webpage attribute information; collecting a current uniform resource locator of the webpage; and sending error request information of the webpage to a server to perform webpage anomaly monitoring, wherein the error request information comprises the current uniform resource locator, the spliced error static file information and webpage attribute information. According to the monitoring method and apparatus, comprehensive and effective webpage anomaly monitoring is realized, webpage anomaly monitoring methods are enriched, internet resources including the front-end webpage and the rear-end server are fully utilized, and whether the static file is abnormal or not can be accurately judged.

Description

A kind of webpage method for monitoring abnormality and device

Technical field

The present invention relates to Internet technical field, particularly relate to a kind of webpage method for monitoring abnormality and device.

Background technology

Webpage method for monitoring abnormality normally by inserting JS (JavaScript) script in the page, the service of webpage exception monitoring is provided, when discovery " running nakedly ", " partly running nakedly " Webpage or the Webpage having JS exception throws, provide the alert service of the modes such as mail can to the responsible official of Website front-end.

Can say, webpage abnormal monitoring mainly solves two large abnormal conditions: a. Webpage has JS abnormal; B. the pattern of Webpage that various factors causes is lost.

But, current web traffic becomes increasingly complex, in webpage, insert JS script monitor, it is only single webpage exception monitoring form, this monitoring form is comparatively single, can undetected webpage abnormal, such as cannot monitor the exception of some resource files, include but not limited to that CSS (cascading style sheet) is abnormal, the compression of JS script is abnormal, JS script does not find mistake etc.

Summary of the invention

The invention provides a kind of webpage method for monitoring abnormality and device, single to solve existing webpage method for monitoring abnormality, the undetected webpage of meeting is abnormal, and the exception such as cannot monitoring some resource files cannot realize the problem of webpage exception monitoring comprehensively and effectively.

In order to solve the problem, the invention discloses a kind of webpage method for monitoring abnormality, comprising:

The static file of mistake whether is there is in monitoring webpage;

When monitoring the static file of mistake, catch the static file information of mistake;

Splice the static file information of described mistake and the attribute information of described webpage;

Collect the current uniform resource finger URL of described webpage;

False request information to the service end sending described webpage carries out described webpage exception monitoring;

Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.

Preferably, whether there is the static file of mistake in described monitoring webpage, comprising:

Load universal front end monitoring and gather script, call the static file that whether there is mistake in detection function monitoring webpage.

Preferably, described in catch mistake static file information, comprising:

The static file information of invoking web page onerror event capturing mistake.

Preferably, the static file information of the described mistake of described splicing and the attribute information of described webpage, comprising:

Call error refresh function splices the static file information of described mistake and the attribute information of described webpage.

Preferably, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

Preferably: described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

The invention also discloses a kind of webpage method for monitoring abnormality, comprising:

Resolve the solicited message of the webpage transmission received, determine described request information be whether the false request information of instruction static file exception wherein, described false request information comprises the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage;

If described request information is the false request information of instruction static file exception, collects and present static file abnormal information;

If described request information is not the false request information of instruction static file exception, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language);

When request content failure, generate and present false alarm.

Preferably, also comprise:

When request content success, whether the static file in the successful path of analysis request content compresses.

Preferably, the solicited message that the webpage that described parsing receives sends, determines whether described request information is the false request information indicating static file exception, comprising: described false request information also comprises request address and parameter;

Resolve described request address and parameter, return analysis result;

Judge whether described request information is the false request information indicating static file exception according to described analysis result.

Preferably, the solicited message that the webpage that described parsing receives sends, after determining whether described request information is the false request information of instruction static file exception, described method also comprises:

Resolve the attribute information of described webpage, obtain type and the version of described webpage.

Preferably, described to the every paths request content in described HTML (Hypertext Markup Language), comprising:

Resolve the link in described HTML (Hypertext Markup Language) and script, capture every paths and request content by handling module.

Preferably, described when request content success, after whether the static file in the successful path of analysis request content compresses, described method also comprises:

If the static file compression in the successful path of request content, then whether the static file of resolving in the successful path of next request content compresses;

If the static file in the successful path of request content is uncompressed, then generates and present false alarm.

Preferably, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

Preferably: described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

The invention also discloses a kind of webpage exception monitoring device, comprising:

Monitoring modular, for monitoring in webpage the static file that whether there is mistake;

Trapping module, for when monitoring the static file of mistake, catches the static file information of mistake;

Concatenation module, for the attribute information of the static file information and described webpage of splicing described mistake;

Collection module, for collecting the current uniform resource finger URL of described webpage;

Sending module, carries out described webpage exception monitoring for false request information to the service end sending described webpage;

Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.

Preferably, described monitoring modular loads universal front end monitoring and gathers script, calls the static file that whether there is mistake in detection function monitoring webpage.

Preferably, the static file information of described trapping module invoking web page onerror event capturing mistake.

Preferably, described concatenation module call error refresh function splices the static file information of described mistake and the attribute information of described webpage.

Preferably, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

Preferably: described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

The invention also discloses a kind of webpage exception monitoring device, comprising:

Resolving abnormal module, for resolving the solicited message of the webpage transmission received, determining whether described request information is the false request information indicating static file exception; Wherein, described false request information comprises the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage;

Collection presents module, if be the false request information of instruction static file exception for described request information, collect and presents static file abnormal information;

Capture request module, if be not the false request information of instruction static file exception for described request information, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language);

Warning generation module, for when request content is failed, generates and presents false alarm.

Preferably, also comprise:

Resolve compression module, for when request content is successful, whether the static file in the successful path of analysis request content compresses.

Preferably, described false request information also comprises request address and parameter;

Described parsing abnormal module, comprising:

Analyzing sub-module, for resolving described request address and parameter, returns analysis result;

Judge submodule, for judging according to described analysis result whether described request information is the false request information indicating static file exception.

Preferably, also comprise:

Web analysis module, for resolving the solicited message of the webpage transmission received in described parsing abnormal module, after determining whether described request information is the false request information of instruction static file exception, resolve the attribute information of described webpage, obtain type and the version of described webpage.

Preferably, described crawl request module, to the every paths request content in described HTML (Hypertext Markup Language), comprising:

Resolving and capture submodule, for resolving link in described HTML (Hypertext Markup Language) and script, capturing every paths and request content by handling module.

Preferably, described parsing compression module is also for when request content is successful, after whether the static file in the successful path of analysis request content compresses, when the static file in the successful path of request content compresses, whether the static file of resolving in the successful path of next request content compresses;

Described warning generation module also for when the static file in the successful path of request content is uncompressed, generates and presents false alarm.

Preferably, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

Preferably: described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

Compared with background technology, the present invention includes following advantage:

Technical scheme of the present invention monitors the static file that whether there is mistake in webpage, when monitoring the static file of mistake, the false request information of the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. being together sent to service end and carrying out webpage exception monitoring.

And service end is after the solicited message receiving webpage transmission, solicited message can be resolved, and then determine whether solicited message is the false request information indicating static file exception.Such as, if solicited message is the false request information of instruction static file exception, collects and present static file abnormal information; If solicited message is not the false request information of instruction static file exception, further to the every paths request content in the HTML (Hypertext Markup Language) of webpage Current resource finger URL.And then, carry out corresponding subsequent treatment according to judged result.

The present invention not only monitors the static file that whether there is mistake in webpage, but also the false request information comprising the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. is sent to service end carries out webpage exception monitoring.In depth judge that extremely whether webpage is that static file is abnormal by service end.

Thus, achieve webpage exception monitoring comprehensively and effectively, enriched webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage and back-end server, and can judge that whether static file is abnormal exactly.

Accompanying drawing explanation

Fig. 1 is a kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention;

Fig. 2 is another kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention;

Fig. 3 is another webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention;

Fig. 4 is the 4th kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention;

Fig. 5 is a kind of webpage exception monitoring structure drawing of device in the embodiment of the present invention;

Fig. 6 is another kind of webpage exception monitoring structure drawing of device in the embodiment of the present invention.

Embodiment

For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.

A kind of webpage method for monitoring abnormality provided by the invention and device is introduced in detail below by enumerating several specific embodiment.

Embodiment one

Introduce a kind of webpage method for monitoring abnormality that the embodiment of the present invention provides in detail.

With reference to Fig. 1, show a kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention.

Whether step 100, exist the static file of mistake in monitoring webpage.

Wherein, described static file can comprise JS script and CSS (cascading style sheet).

Described JS script is the case sensitive client-side scripting language of object-based regime type that a kind of prototype is inherited, and fundamental purpose is the speed issue left in order to settlement server end instruction, for client provides more smooth result of browse.

CSS (cascading style sheet) is a kind of computerese being used for the file patterns such as performance standard generalized markup language or standard generalized markup language.

Preferably, described step 100 can be:

Load universal front end monitoring and gather script, call the static file that whether there is mistake in detection function monitoring webpage.

Step 102, when monitoring the static file of mistake, catches the static file information of mistake.

Wherein, the static file information of described mistake can comprise the script file path of wrong content, mistake line number and mistake.

Preferably, described step 102 can be:

When monitoring the static file of mistake, the static file information of invoking web page onerror event capturing mistake.

Wherein, onerror event belongs to one of event in JS script.As long as there is script error in the page, onerror event will be produced.If need to utilize onerror event, the function of a process mistake just must be created.This function can be called onerror event handler (onerroreventhandler).This event handler uses three parameters to call: error message (msg), URL(uniform resource locator) (url), the code line (line) that makes a mistake of the page that make a mistake.

Step 104, splices the static file information of described mistake and the attribute information of described webpage.

Wherein, the attribute information of described webpage can comprise exclusive attribute and user agent's attribute.

Preferably, described step 104 can be:

Call error refresh function splices the static file information of described mistake and the attribute information of described webpage.

Step 106, collects the current uniform resource finger URL of described webpage.

Described URL(uniform resource locator) is a kind of expression succinctly of position to the webpage that can obtain from internet and access method, is the address of standard resource on internet.Each webpage on internet has a unique URL(uniform resource locator), and the information that it comprises points out how the position of webpage and browser should process it.

Performed before following step 108 as long as described step 106 meets, described step 106 can with above-mentioned steps 100 to step 104 out-of-order relation.

Step 108, false request information to the service end sending described webpage carries out described webpage exception monitoring.

Wherein, described false request information can comprise described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.

In sum, the technical scheme of the embodiment of the present invention monitors the static file that whether there is mistake in webpage, when monitoring the static file of mistake, the false request information of the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. being together sent to service end and carrying out webpage exception monitoring.

The embodiment of the present invention not only monitors the static file that whether there is mistake in webpage, but also the false request information comprising the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. is sent to service end carries out webpage exception monitoring.In depth judge that extremely whether webpage is that static file is abnormal by service end.

Thus, achieve webpage exception monitoring comprehensively and effectively, enriched webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage and back-end server, and can judge that whether static file is abnormal exactly.

Embodiment two

Introduce a kind of webpage method for monitoring abnormality that the embodiment of the present invention provides in detail.

With reference to Fig. 2, show a kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention.

Step 200, resolves the solicited message of the webpage transmission received, and determines whether described request information is the false request information indicating static file exception.

Wherein, described false request information can comprise the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage.

Described static file can comprise EvalError extremely usually, and (eval () function can calculate certain character string, and the JS code performed wherein, if illegally call eval () function, the EvalError that then dishes out is abnormal), (toFixed (num) function can be rounded to the numeral of specifying decimal digits num to RangeError, when num too little or too large time the RangeError that dishes out abnormal, usual num there will not be exception between 0 to 20), ReferenceError (misquotation), SyntaxError (grammar mistake), TypeError (type error) and URLError (universal resource identifier mistake) etc.

Step 202, if described request information is the false request information of instruction static file exception, collects and presents static file abnormal information.

If described request information is the false request information of instruction static file exception, the relevant abnormalities information of abnormal static file can be collected, as the static file position etc. of mistake, and abnormal information is presented.

Step 204, if described request information is not the false request information of instruction static file exception, captures the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language).

Described can be obtain the resource file in described HTML (Hypertext Markup Language) in every paths to the every paths request content in described HTML (Hypertext Markup Language), wherein, can comprise static file.

Step 206, judges that whether request content is successful.When request content failure, perform step 208.

Step 208, generates and presents false alarm.

When request content failure, generate the fault warning message comprising request path.

In sum, the technical scheme of the embodiment of the present invention, after service end receives the solicited message that webpage sends, can be resolved solicited message, and then determines that whether solicited message is the false request information of instruction static file exception.Such as, if solicited message is the false request information of instruction static file exception, collects and present static file abnormal information; If solicited message is not the false request information of instruction static file exception, further to the every paths request content in the HTML (Hypertext Markup Language) of webpage Current resource finger URL.And then, carry out corresponding subsequent treatment according to judged result.

The embodiment of the present invention not only monitors the static file that whether there is mistake in webpage, but also the false request information comprising the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. is sent to service end carries out webpage exception monitoring.In depth judge that extremely whether webpage is that static file is abnormal by service end.

Thus, achieve webpage exception monitoring comprehensively and effectively, enriched webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage and back-end server, and can judge that whether static file is abnormal exactly.

Embodiment three

Introduce a kind of webpage method for monitoring abnormality that the embodiment of the present invention provides in detail.

With reference to Fig. 3, show a kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention.

Step 300, resolves the solicited message of the webpage transmission received, and determines whether described request information is the false request information indicating static file exception.

Wherein, described static file can comprise JS script and CSS (cascading style sheet).

Described false request information can comprise the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage, and, request address and parameter.

The static file information of described mistake can comprise the script file path of wrong content, mistake line number and mistake.

The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

Preferably, described step 300 can comprise:

Sub-step 3001, resolves described request address and parameter, returns analysis result.

Described request address can be the URL(uniform resource locator) of webpage, and described parameter can be the parameter information that is associated corresponding with above-mentioned URL(uniform resource locator).

Described analysis result can comprise described parameter whether with described request addresses match etc.

According to described analysis result, sub-step 3002, judges whether described request information is the false request information indicating static file exception.

If the static file that described analysis result shows in described webpage is abnormal, then judge that described request information is the false request information of instruction static file exception.

Step 302, resolves the attribute information of described webpage, obtains type and the version of described webpage.

Exclusive attribute information and user agent's attribute information of described webpage can be resolved, obtain the information such as type and version of described webpage.

It should be noted that, in embodiment of the present invention Fig. 3, do not identify described step 302, because in the subsequent step of the embodiment of the present invention, do not use type and the version of described webpage, but do not represent described step 302 without effect.By performing described step 302, finally can add up dissimilar and occurring which webpage abnormal conditions with webpage that is version.

Step 304, if described request information is the false request information of instruction static file exception, collects and presents static file abnormal information.

Step 306, if described request information is not the false request information of instruction static file exception, captures the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language).

Preferably, in described step 306, to the every paths request content in described HTML (Hypertext Markup Language), Ke Yiwei:

Resolve the link in described HTML (Hypertext Markup Language) and script, capture every paths and request content by handling module.

Step 308, when request content success, whether the static file in the successful path of analysis request content compresses.

Whether the boil down to file content of static file eliminates unnecessary space, annotation.The compression of JS also comprises simplifying of variable.Static file compression can reduce the time of transmission and save flow.

Step 310, if the static file compression in the successful path of request content, then whether the static file of resolving in the successful path of next request content compresses.

Step 312, if the static file in the successful path of request content is uncompressed, then generates and presents false alarm.

Step 314, when request content failure, generates and presents false alarm.

In sum, the technical scheme of the embodiment of the present invention, after service end receives the solicited message that webpage sends, can be resolved solicited message, and then determines that whether solicited message is the false request information of instruction static file exception.Such as, if solicited message is the false request information of instruction static file exception, collects and present static file abnormal information; If solicited message is not the false request information of instruction static file exception, further to the every paths request content in the HTML (Hypertext Markup Language) of webpage Current resource finger URL, and judge whether the static file in the successful path of request content compresses.And then, carry out corresponding subsequent treatment according to judged result.

The embodiment of the present invention not only monitors the static file that whether there is mistake in webpage, but also the false request information comprising the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. is sent to service end carries out webpage exception monitoring.In depth judge that webpage is static file exception or static file compresses extremely by service end.

Thus, achieve webpage exception monitoring comprehensively and effectively, enriched webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage and back-end server, and can judge that whether static file is abnormal or whether compress exactly.

Embodiment four

Introduce a kind of webpage method for monitoring abnormality based on js and Node.js that the embodiment of the present invention provides in detail.Node.js is a platform set up when running based on ChromeJavaScript, is used for building easily fast and is easy to the network application expanded.

With reference to Fig. 4, show a kind of webpage method for monitoring abnormality process flow diagram in the embodiment of the present invention.

Method in the embodiment of the present invention can be divided into 2 parts to perform, and comprises fore-end and rear end part.Wherein, fore-end can perform in client (browser end), and rear end part can perform in service end (Node.js server).

Fore-end:

Step 400, open any browser, loads feMonitor.js and calls monitor function.

Step 402, calls browser APIwindow.onerror event, monitors the JS script error information made a mistake, mistake line number, the script file path of mistake, calls errNotice function to splice above-mentioned information and user agent's information, sends false request to server end.

Step 404, collects current url and sends false request to server end.

Rear end part:

Step 406, the request address in parse error request and parameter thereof, return data is by the monitor in parameter, and distinguishing current is that exception needing to detect.

Step 408, resolves user agent, obtains real browser information.

Step 410, if JS is abnormal, collects abnormal information, sends mail to relevant responsible official.

Step 412, if non-JS is abnormal, captures the html of current request address, resolves link and script wherein, capture each path and request content by cheerio module.

Whether step 414, if ask successfully, then resolve js/css file and compress.

If uncompressed, perform step 416; If compression, perform step 418.

Step 416, collects fileinfo, sends mail to relevant responsible official.

Whether step 418, resolve next js/css file and compress.

Step 420, if ask unsuccessfully, then to collect file path, sends lower level error to relevant responsible official.

In sum, the technical scheme of the embodiment of the present invention monitors the static file that whether there is mistake in webpage, when monitoring the static file of mistake, the false request information of the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. being together sent to service end and carrying out webpage exception monitoring.

And service end is after the solicited message receiving webpage transmission, solicited message can be resolved, and then determine whether solicited message is the false request information indicating static file exception.Such as, if solicited message is the false request information of instruction static file exception, collects and present static file abnormal information; If solicited message is not the false request information of instruction static file exception, further to the every paths request content in the HTML (Hypertext Markup Language) of webpage Current resource finger URL, and judge whether the static file in the successful path of request content compresses.And then, carry out corresponding subsequent treatment according to judged result.

The embodiment of the present invention not only monitors the static file that whether there is mistake in webpage, but also the false request information comprising the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. is sent to service end carries out webpage exception monitoring.In depth judge that webpage is static file exception or static file compresses extremely by service end.

Thus, achieve webpage exception monitoring comprehensively and effectively, enrich webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage (JS) and back-end server (Node.js), and can judge that whether static file is abnormal or whether compress exactly, when front end web traffic becomes increasingly complex, the how omnibearing as far as possible each aspect monitoring webpage, it is abnormal that fore-end catches JS by error event, and in real time webpage abnormal information is fed back to maintainer, improve webpage and extremely repair speed, solve static file in webpage and extremely cause bad Consumer's Experience, the flow waste brought because static file is uncompressed can also be reduced.

Embodiment five

Introduce a kind of webpage exception monitoring device that the embodiment of the present invention provides in detail.

With reference to Fig. 5, show a kind of webpage exception monitoring structure drawing of device in the embodiment of the present invention.

Described a kind of webpage exception monitoring device, can comprise:

Monitoring modular 500, trapping module 502, concatenation module 504, collection module 506, and, sending module 508.

Introduce the relation between the function of each module and each module below respectively in detail.

Monitoring modular 500, for monitoring in webpage the static file that whether there is mistake.

Preferably, described monitoring modular 500 can load universal front end monitoring and gather script, calls the static file that whether there is mistake in detection function monitoring webpage.

Wherein, described static file can comprise JS script and CSS (cascading style sheet).

Trapping module 502, for when monitoring the static file of mistake, catches the static file information of mistake.

Preferably, described trapping module 502 can the static file information of invoking web page onerror event capturing mistake.

Wherein, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

Concatenation module 504, for the attribute information of the static file information and described webpage of splicing described mistake.

Preferably, described concatenation module 504 can splice the static file information of described mistake and the attribute information of described webpage by call error refresh function.

Wherein, the attribute information of described webpage comprises exclusive attribute and user agent's attribute.

Collection module 506, for collecting the current uniform resource finger URL of described webpage.

Sending module 508, carries out described webpage exception monitoring for false request information to the service end sending described webpage.

Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.

In sum, the technical scheme of embodiment monitors the static file that whether there is mistake in webpage, when monitoring the static file of mistake, the false request information of the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. being together sent to service end and carrying out webpage exception monitoring.

Thus, achieve webpage exception monitoring comprehensively and effectively, enriched webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage and back-end server, and can judge that whether static file is abnormal or whether compress exactly.

Embodiment six

Introduce a kind of webpage exception monitoring device that the embodiment of the present invention provides in detail.

With reference to Fig. 6, show a kind of webpage exception monitoring structure drawing of device in the embodiment of the present invention.

Described a kind of webpage exception monitoring device, can comprise:

Resolve abnormal module 600, collect and present module 602, capture request module 604, resolve compression module 606, warning generation module 608, and, web analysis module 610.

Wherein, described parsing abnormal module 600 can comprise: analyzing sub-module 6001, judges submodule 6002.

Described crawl request module 604 can comprise: resolve and capture submodule 6041.

Introduce the relation between each module, the function of submodule and each module, submodule below respectively in detail.

Resolving abnormal module 600, for resolving the solicited message of the webpage transmission received, determining whether described request information is the false request information indicating static file exception.

Wherein, described false request information can comprise the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage, and request address and parameter.

Described static file can comprise JS script and CSS (cascading style sheet).

The static file information of described mistake can comprise the script file path of wrong content, mistake line number and mistake.

The attribute information of described webpage can comprise exclusive attribute and user agent's attribute.

Preferably, described parsing abnormal module 600 can comprise:

Analyzing sub-module 6001, for resolving described request address and parameter, returns analysis result.

Judge submodule 6002, for judging according to described analysis result whether described request information is the false request information indicating static file exception.

Collection presents module 602, if be the false request information of instruction static file exception for described request information, collect and presents static file abnormal information.

Capture request module 604, if be not the false request information of instruction static file exception for described request information, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language).

Preferably, described crawl request module 604 can comprise:

Resolving and capture submodule 6041, for resolving link in described HTML (Hypertext Markup Language) and script, capturing every paths and request content by handling module.

Resolve compression module 606, for when request content is successful, whether the static file in the successful path of analysis request content compresses.

Preferably, described parsing compression module 606 is also for when request content is successful, after whether the static file in the successful path of analysis request content compresses, when the static file in the successful path of request content compresses, whether the static file of resolving in the successful path of next request content compresses.

Warning generation module 608, for when request content is failed, generates and presents false alarm.

Preferably, described warning generation module 608 also for when the static file in the successful path of request content is uncompressed, generates and presents false alarm.

Web analysis module 610, for resolving the solicited message of the webpage transmission received in described parsing abnormal module 600, after determining whether described request information is the false request information of instruction static file exception, resolve the attribute information of described webpage, obtain type and the version of described webpage.

In sum, the technical scheme of the embodiment of the present invention, after service end receives the solicited message that webpage sends, can be resolved solicited message, and then determines that whether solicited message is the false request information of instruction static file exception.Such as, if solicited message is the false request information of instruction static file exception, collects and present static file abnormal information; If solicited message is not the false request information of instruction static file exception, further to the every paths request content in the HTML (Hypertext Markup Language) of webpage Current resource finger URL, and judge whether the static file in the successful path of request content compresses.And then, carry out corresponding subsequent treatment according to judged result.

The embodiment of the present invention not only monitors the static file that whether there is mistake in webpage, but also the false request information comprising the attribute information of the current uniform resource finger URL of webpage, the static file information of spliced mistake and webpage etc. is sent to service end carries out webpage exception monitoring.In depth judge that webpage is static file exception or static file compresses extremely by service end.

Thus, achieve webpage exception monitoring comprehensively and effectively, enriched webpage method for monitoring abnormality, take full advantage of the Internet resources comprising front end webpage and back-end server, and can judge that whether static file is abnormal or whether compress exactly.

For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.

Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.

A kind of webpage the method for monitoring abnormality above embodiment of the present invention provided and device, be described in detail, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

The embodiment of the invention discloses A1, a kind of webpage method for monitoring abnormality, comprising:

The static file of mistake whether is there is in monitoring webpage;

When monitoring the static file of mistake, catch the static file information of mistake;

Splice the static file information of described mistake and the attribute information of described webpage;

Collect the current uniform resource finger URL of described webpage;

False request information to the service end sending described webpage carries out described webpage exception monitoring;

Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.

Whether A2, method according to A1, exist the static file of mistake, comprising in described monitoring webpage:

Load universal front end monitoring and gather script, call the static file that whether there is mistake in detection function monitoring webpage.

A3, method according to A1, described in catch the static file information of mistake, comprising:

The static file information of invoking web page onerror event capturing mistake.

A4, method according to A1, the static file information of the described mistake of described splicing and the attribute information of described webpage, comprising:

Call error refresh function splices the static file information of described mistake and the attribute information of described webpage.

A5, according to described method arbitrary in A1-A4, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

A6, method according to A1, described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

The embodiment of the invention also discloses B7, a kind of webpage method for monitoring abnormality, comprising:

Resolve the solicited message of the webpage transmission received, determine described request information be whether the false request information of instruction static file exception wherein, described false request information comprises the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage;

If described request information is the false request information of instruction static file exception, collects and present static file abnormal information;

If described request information is not the false request information of instruction static file exception, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language);

When request content failure, generate and present false alarm.

B8, method according to B7, also comprise:

When request content success, whether the static file in the successful path of analysis request content compresses.

B9, method according to B7, the solicited message that the webpage that described parsing receives sends, determines that whether described request information be the false request information of instruction static file exception, comprising: described false request information also comprises request address and parameter;

Resolve described request address and parameter, return analysis result;

Judge whether described request information is the false request information indicating static file exception according to described analysis result.

B10, method according to B7, the solicited message that the webpage that described parsing receives sends, after determining whether described request information is the false request information of instruction static file exception, described method also comprises:

Resolve the attribute information of described webpage, obtain type and the version of described webpage.

B11, method according to B7, described to the every paths request content in described HTML (Hypertext Markup Language), comprising:

Resolve the link in described HTML (Hypertext Markup Language) and script, capture every paths and request content by handling module.

B12, method according to B8, described when request content success, after whether the static file in the successful path of analysis request content compresses, described method also comprises:

If the static file compression in the successful path of request content, then whether the static file of resolving in the successful path of next request content compresses;

If the static file in the successful path of request content is uncompressed, then generates and present false alarm.

B13, method according to B7, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

B14, method according to B7, described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

The embodiment of the invention also discloses C15, a kind of webpage exception monitoring device, comprising:

Monitoring modular, for monitoring in webpage the static file that whether there is mistake;

Trapping module, for when monitoring the static file of mistake, catches the static file information of mistake;

Concatenation module, for the attribute information of the static file information and described webpage of splicing described mistake;

Collection module, for collecting the current uniform resource finger URL of described webpage;

Sending module, carries out described webpage exception monitoring for false request information to the service end sending described webpage;

Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.

C16, device according to C15, described monitoring modular loads universal front end monitoring and gathers script, calls the static file that whether there is mistake in detection function monitoring webpage.

C17, device according to C15, the static file information of described trapping module invoking web page onerror event capturing mistake.

C18, device according to C15, described concatenation module call error refresh function splices the static file information of described mistake and the attribute information of described webpage.

C19, according to described device arbitrary in C15-18, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

C20, device according to C15: described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

The embodiment of the invention also discloses D21, a kind of webpage exception monitoring device, comprising:

Resolving abnormal module, for resolving the solicited message of the webpage transmission received, determining whether described request information is the false request information indicating static file exception; Wherein, described false request information comprises the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage;

Collection presents module, if be the false request information of instruction static file exception for described request information, collect and presents static file abnormal information;

Capture request module, if be not the false request information of instruction static file exception for described request information, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language);

Warning generation module, for when request content is failed, generates and presents false alarm.

D22, device according to D21, also comprise:

Resolve compression module, for when request content is successful, whether the static file in the successful path of analysis request content compresses.

D23, device according to D21, described false request information also comprises request address and parameter;

Described parsing abnormal module, comprising:

Analyzing sub-module, for resolving described request address and parameter, returns analysis result;

Judge submodule, for judging according to described analysis result whether described request information is the false request information indicating static file exception.

D24, device according to D21, also comprise:

Web analysis module, for resolving the solicited message of the webpage transmission received in described parsing abnormal module, after determining whether described request information is the false request information of instruction static file exception, resolve the attribute information of described webpage, obtain type and the version of described webpage.

D25, device according to D21, described crawl request module, to the every paths request content in described HTML (Hypertext Markup Language), comprising:

Resolving and capture submodule, for resolving link in described HTML (Hypertext Markup Language) and script, capturing every paths and request content by handling module.

D26, device according to D22, described parsing compression module is also for when request content is successful, after whether the static file in the successful path of analysis request content compresses, when the static file in the successful path of request content compresses, whether the static file of resolving in the successful path of next request content compresses;

Described warning generation module also for when the static file in the successful path of request content is uncompressed, generates and presents false alarm.

D27, device according to D21, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.

D28, device according to D21: described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.

Claims (10)

1. a webpage method for monitoring abnormality, is characterized in that, comprising:
The static file of mistake whether is there is in monitoring webpage;
When monitoring the static file of mistake, catch the static file information of mistake;
Splice the static file information of described mistake and the attribute information of described webpage;
Collect the current uniform resource finger URL of described webpage;
False request information to the service end sending described webpage carries out described webpage exception monitoring;
Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.
2. method according to claim 1, is characterized in that, whether there is the static file of mistake, comprising in described monitoring webpage:
Load universal front end monitoring and gather script, call the static file that whether there is mistake in detection function monitoring webpage.
3. method according to claim 1, is characterized in that, described in catch mistake static file information, comprising:
The static file information of invoking web page onerror event capturing mistake.
4. method according to claim 1, is characterized in that, the static file information of the described mistake of described splicing and the attribute information of described webpage, comprising:
Call error refresh function splices the static file information of described mistake and the attribute information of described webpage.
5. the method according to claim arbitrary in claim 1-4, is characterized in that, the static file information of described mistake comprises the script file path of wrong content, mistake line number and mistake.
6. method according to claim 1, is characterized in that:
Described static file comprises JS script and CSS (cascading style sheet); The attribute information of described webpage comprises exclusive attribute and user agent's attribute.
7. a webpage method for monitoring abnormality, is characterized in that, comprising:
Resolve the solicited message of the webpage transmission received, determine described request information be whether the false request information of instruction static file exception wherein, described false request information comprises the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage;
If described request information is the false request information of instruction static file exception, collects and present static file abnormal information;
If described request information is not the false request information of instruction static file exception, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language);
When request content failure, generate and present false alarm.
8. method according to claim 7, is characterized in that, also comprises:
When request content success, whether the static file in the successful path of analysis request content compresses.
9. a webpage exception monitoring device, is characterized in that, comprising:
Monitoring modular, for monitoring in webpage the static file that whether there is mistake;
Trapping module, for when monitoring the static file of mistake, catches the static file information of mistake;
Concatenation module, for the attribute information of the static file information and described webpage of splicing described mistake;
Collection module, for collecting the current uniform resource finger URL of described webpage;
Sending module, carries out described webpage exception monitoring for false request information to the service end sending described webpage;
Wherein, described false request information comprises described current uniform resource finger URL, the static file information of described spliced mistake and the attribute information of described webpage.
10. a webpage exception monitoring device, is characterized in that, comprising:
Resolving abnormal module, for resolving the solicited message of the webpage transmission received, determining whether described request information is the false request information indicating static file exception; Wherein, described false request information comprises the attribute information of the current uniform resource finger URL of described webpage, the static file information of spliced mistake and described webpage;
Collection presents module, if be the false request information of instruction static file exception for described request information, collect and presents static file abnormal information;
Capture request module, if be not the false request information of instruction static file exception for described request information, capture the HTML (Hypertext Markup Language) of described current uniform resource finger URL, and to the every paths request content in described HTML (Hypertext Markup Language);
Warning generation module, for when request content is failed, generates and presents false alarm.
CN201410240298.3A 2014-05-30 2014-05-30 A kind of webpage method for monitoring abnormality and device CN105468587B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410240298.3A CN105468587B (en) 2014-05-30 2014-05-30 A kind of webpage method for monitoring abnormality and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410240298.3A CN105468587B (en) 2014-05-30 2014-05-30 A kind of webpage method for monitoring abnormality and device

Publications (2)

Publication Number Publication Date
CN105468587A true CN105468587A (en) 2016-04-06
CN105468587B CN105468587B (en) 2019-10-22

Family

ID=55606302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410240298.3A CN105468587B (en) 2014-05-30 2014-05-30 A kind of webpage method for monitoring abnormality and device

Country Status (1)

Country Link
CN (1) CN105468587B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268332A (en) * 2017-08-10 2018-07-10 广州神马移动信息科技有限公司 Webpage abnormality monitoring method, equipment and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798052A (en) * 2004-12-29 2006-07-05 鸿富锦精密工业(深圳)有限公司 System and method for hinting abnormal states
CN101964026A (en) * 2009-07-23 2011-02-02 中联绿盟信息技术(北京)有限公司 Method and system for detecting web page horse hanging
CN102109989A (en) * 2009-12-29 2011-06-29 阿里巴巴集团控股有限公司 Method, device and system for controlling browser cache
CN103577755A (en) * 2013-11-01 2014-02-12 浙江工业大学 Malicious script static detection method based on SVM (support vector machine)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1798052A (en) * 2004-12-29 2006-07-05 鸿富锦精密工业(深圳)有限公司 System and method for hinting abnormal states
CN101964026A (en) * 2009-07-23 2011-02-02 中联绿盟信息技术(北京)有限公司 Method and system for detecting web page horse hanging
CN102109989A (en) * 2009-12-29 2011-06-29 阿里巴巴集团控股有限公司 Method, device and system for controlling browser cache
CN103577755A (en) * 2013-11-01 2014-02-12 浙江工业大学 Malicious script static detection method based on SVM (support vector machine)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268332A (en) * 2017-08-10 2018-07-10 广州神马移动信息科技有限公司 Webpage abnormality monitoring method, equipment and system

Also Published As

Publication number Publication date
CN105468587B (en) 2019-10-22

Similar Documents

Publication Publication Date Title
US8650292B2 (en) Synthetic transactions to test blindness in a network system
US9300683B2 (en) Identifying bots
CN101242279B (en) Automatic penetration testing system and method for WEB system
US8656006B2 (en) Integrating traffic monitoring data and application runtime data
US8402131B2 (en) Hierarchy for characterizing interactions with an application
JP4878627B2 (en) Initial server-side content rendering for client script web pages
DE60114999T2 (en) Monitoring and interaction with network services
US8578017B2 (en) Automatic correlation of service level agreement and operating level agreement
US20080235163A1 (en) System and method for online duplicate detection and elimination in a web crawler
US8443074B2 (en) Constructing an inference graph for a network
US6665634B2 (en) Test system for testing dynamic information returned by a web server
Kung et al. An object-oriented web test model for testing web applications
US6892231B2 (en) Method and apparatus for verifying the contents of a global configuration file
CN101515300B (en) Method and system for grabbing Ajax webpage content
US9235640B2 (en) Logging browser data
US20060288256A1 (en) Stress testing a website having a backend application
US20120198558A1 (en) Xss detection method and device
Alalfi et al. Modelling methods for web application verification and testing: state of the art
US20110066585A1 (en) Extracting information from unstructured data and mapping the information to a structured schema using the naïve bayesian probability model
CN102597993B (en) Managing application state information by means of uniform resource identifier (URI)
CN101217425A (en) Web testing method and device
US9374278B2 (en) Graphic user interface based network management system to define and execute troubleshooting procedure
US9215247B2 (en) Application security testing
CN1688979A (en) Method and system for transaction pipeline decomposition
Potharaju et al. Juggling the jigsaw: Towards automated problem inference from network trouble tickets

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20190912

Address after: 100080 Beijing, Suzhou Street, No., building on the ground floor, Building 29, No. 035, No. 12

Applicant after: BEIJING QIHU CETENG TECHNOLOGY CO., LTD.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: Beijing Qihu Technology Co., Ltd.

Applicant before: Qizhi Software (Beijing) Co., Ltd.

TA01 Transfer of patent application right
CB02 Change of applicant information

Address after: 100015 Beijing Chaoyang District Jiuxianqiao Road 6 Courtyard 2 Building 1 to 4 Floor 103, Inner 3 Floor 304

Applicant after: BEIJING QIHU CETENG TECHNOLOGY CO., LTD.

Address before: 100080 Beijing, Suzhou Street, No., building on the ground floor, Building 29, No. 035, No. 12

Applicant before: BEIJING QIHU CETENG TECHNOLOGY CO., LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant