CN110119334A - A kind of page script monitoring method and device - Google Patents

A kind of page script monitoring method and device Download PDF

Info

Publication number
CN110119334A
CN110119334A CN201810119484.XA CN201810119484A CN110119334A CN 110119334 A CN110119334 A CN 110119334A CN 201810119484 A CN201810119484 A CN 201810119484A CN 110119334 A CN110119334 A CN 110119334A
Authority
CN
China
Prior art keywords
page
script
status message
message
client
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
CN201810119484.XA
Other languages
Chinese (zh)
Other versions
CN110119334B (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.)
Hangzhou Taotian E Commerce Technology Co ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810119484.XA priority Critical patent/CN110119334B/en
Publication of CN110119334A publication Critical patent/CN110119334A/en
Application granted granted Critical
Publication of CN110119334B publication Critical patent/CN110119334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

This application provides a kind of page script monitoring method and devices, are related to field of communication technology.For the application by receiving the page status message in the page implementation procedure that client is sent, which includes script execution status information, according to the page status message for belonging to the same page, determines page stability parameter.In page implementation procedure, it include script execution status information in the page status message received, as long as have script error generation, a script error status information is recorded, when there is no script error, with regard to recording a script normal state information, therefore, the page status message reported and the user's equity for reporting script execution status information, determine page script stability parameter according to script execution status information, accuracy is higher, more objective, can reduce the probability of accidentally alarm.

Description

A kind of page script monitoring method and device
Technical field
This application involves fields of communication technology, more particularly to a kind of page script monitoring method and device.
Background technique
With the rapid development of Internet technology, so that the use of internet is more and more frequent, when using internet, need Accession page is wanted to complete various activities, obtains required content, it will usually be embedded in JS (JavaScript, script) journey in the page Sequence can realize miscellaneous dynamic function by executing JS program, and page script stability will have a direct impact on the browsing of user Effect, therefore, it is necessary to the stability to page script implementation procedure to be monitored.
There are two types of the stability that mode can monitor page script implementation procedure at present, the first is to use Script error in window.onerror, try catch function capture webpage, the absolute value of script error frequency is sent out It send to log monitoring server;Second is the absolute value for the script error frequency for obtaining first way divided by the page PV (Page View, page browsing amount), obtains corresponding ratio, sends log monitoring server for ratio.
But first way can only obtain the absolute value of script error frequency, need artificially rule of thumb to set The alarm threshold of frequency, but the mode that alarm threshold is manually set is not objective, accuracy is not high;Pass through the second way Page script stability is measured, if certain once has a large amount of script error to report, can trigger and accidentally alert, and the same time The user of script error is reported in section and reports user's non-correspondence of page browsing amount, for example, there are 100 client access Page www.xxx.com, but 80 script errors are only captured in a wherein client, therefore, report page PV User have 100, report script error user only one, then the ratio being calculated be 0.8, error is larger, also can Triggering accidentally alerts.
Summary of the invention
In view of the above problems, the embodiment of the present application provides a kind of page script monitoring method, to be executed by the monitoring page Script execution state in the process determines that page stability is joined according to the page status message including script execution status information Number solves the problems, such as to measure page script stability inaccuracy in the prior art.
Correspondingly, the embodiment of the present application also provides a kind of page script monitoring devices, to guarantee the reality of the above method Existing and application.
To solve the above-mentioned problems, the embodiment of the present application discloses a kind of page script monitoring method, comprising:
Receive the page status message in the page implementation procedure that client is sent;The page status message includes script Execution state information;
According to the page status message for belonging to the same page, page stability parameter is determined.
The embodiment of the present application also discloses a kind of page script monitoring method, comprising:
Determine the script execution state in page implementation procedure;
Sent to server include script execution status information page status message, so that the server is according to belonging to The page status message of the same page, determines page stability parameter.
Correspondingly, the embodiment of the present application also discloses a kind of page script monitoring device, comprising:
Receiving module, the page status message in page implementation procedure for receiving client transmission;The page shape State message includes script execution status information;
Parameter determination module, for determining page stability parameter according to the page status message for belonging to the same page.
The embodiment of the present application also discloses a kind of page script monitoring device, comprising:
Script execution monitoring module, for determining the script execution state in page implementation procedure;
Sending module, for sending the page status message including script execution status information to server, for described Server determines page stability parameter according to the page status message for belonging to the same page.
Correspondingly, the embodiment of the present application also discloses a kind of device, comprising:
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, are executed when by one or more of processors When, so that described device executes a kind of page script monitoring method.
Correspondingly, the embodiment of the present application also discloses one or more machine readable medias, be stored thereon with instruction, when by When one or more processors execute, so that device executes a kind of page script monitoring method.
The embodiment of the present application includes the following advantages:
The embodiment of the present application is by receiving the page status message in the page implementation procedure that client is sent, the page shape State message includes script execution status information, according to the page status message for belonging to the same page, determines page stability parameter. It include script execution status information in the page status message that receives, without considering foot in the page in page implementation procedure As long as the specific frequency of this mistake records a script error status information, when not having foot have script error generation When this mistake occurs, a script normal state information is just recorded, therefore, the page status message that reports and reports script execution User's equity of status information, and page script stability parameter is determined according to script execution status information, so that measuring the page The accuracy of script stability is higher, more objective, can reduce the probability of accidentally alarm.
Detailed description of the invention
Fig. 1 is a kind of processing framework schematic diagram of page script monitoring method of the embodiment of the present application;
Fig. 2 is the processing framework schematic diagram of another page script monitoring method of the embodiment of the present application;
Fig. 3 is a kind of interaction figure of page script monitoring method of the embodiment of the present application;
Fig. 4 is a kind of flow chart of page script monitoring method embodiment of the embodiment of the present application;
Fig. 5 is a kind of specific flow chart of page script monitoring method embodiment of the embodiment of the present application;
Fig. 6 is a kind of transmission schematic diagram of page status message of the embodiment of the present application;
Fig. 7 is the flow chart of another page script monitoring method embodiment of the embodiment of the present application;
Fig. 8 is a kind of structure chart of page script monitoring device embodiment of the embodiment of the present application;
Fig. 9 is the structure chart of another page script monitoring device embodiment of the embodiment of the present application;
Figure 10 is a kind of structural schematic diagram of server provided by the embodiments of the present application.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real Applying mode, the present application will be further described in detail.
The technical solution of the application is mainly used in Internet scene, to realize the monitoring to page script stability. Client in the embodiment of the present application that is to say the browser in browser or mobile phone in browser, such as computer, certainly It can be the application that other include the page of JS script, the embodiment of the present application does not limit it.
Referring to Fig.1, a kind of processing framework schematic diagram of page script monitoring method of the embodiment of the present application is shown.
For example, being directed to the same page www.xxxxx.com, the corresponding application server of page www.xxxxx.com Such as application server B, therefore, when user needs accession page www.xxxxx.com in a browser, it is necessary first to Xiang Yingyong Server B sends a page request, and application server B returns to corresponding page info, visitor according to the page request received Family end receives the page info that application server B is returned, and renders, is shown in the webpage of client to page info.
In certain time length, shares N number of user and access the same page, corresponding N number of visitor in respective client respectively Family end sends page request to application server respectively, and N number of client executes step S1 respectively: sending the page to application server Request.
Application server is according to the N number of page request received, to corresponding client back page information, N number of client End executes step S2 respectively: receiving the page info that application server returns.Client should in the load page info and operation During page info, script error may be led to due to a variety of causes such as code error, syntax errors, in the client It can be using the script error in the functions capture page implementation procedure such as window.onerror, when being caught in the page in client When receiving script error, Xiang Zhi monitoring server sends the page status message in page implementation procedure, which disappears Breath includes script error status information;When not capturing script error in the page in client, Xiang Zhi monitoring server The page status message in page implementation procedure is sent, which includes script normal state information.Log monitoring Server executes step S3: receiving the page status message in the page implementation procedure that client is sent.
Log monitoring server determines that the page is steady according to the script execution status information in the page status message received Qualitative parameter.
Referring to Fig. 2, the processing framework schematic diagram of another page script monitoring method of the embodiment of the present application is shown.
When capturing script error in the page in client, can also be sent in page implementation procedure to application server Page status message, which includes script error status information;When not captured in the page in client When script error, the page status message in page implementation procedure is sent to application server, which includes foot This normal state information.Application server executes step S3: receiving the page status in the page implementation procedure that client is sent Message.
Application server determines page stability according to the script execution status information in the page status message received Parameter.
Such as the description of Fig. 1 and Fig. 2, in the embodiment of the present application, the reception of provider and page status message for the page Side, the two can be laid in respectively in different servers, can also lay in a server, the embodiment of the present application is not right It is limited.Than application server as shown in figure 1 to can client page info is provided, and log monitoring server is for executing The process for receiving page status message, determining page stability parameter;And in Fig. 2 application server both to can client provide page Face information, and the process for also executing day and receiving page status message, determine page stability parameter.
Referring to Fig. 3, a kind of interaction figure of page script monitoring method of the embodiment of the present application is shown.
For one of client, it is described in detail the interactive process of page script monitoring method, which can be with As Fig. 1 is completed with client, application server and log monitoring server.
User in the client accession page when, step A1 is first carried out: to application server send page request.Using Server executes step A2: to corresponding client back page information after receiving the page request of client.Client After the page info for receiving application server return, the page info is loaded and run, step A3 is executed: determining that the page is held Script execution state during row.Using the script error in window.onerror capture page implementation procedure, executing After step A3, executes A4: Xiang Zhi monitoring server of step and send the page status message including script execution status information. Then it executes step A5: receiving the page status message in the page implementation procedure that client is sent.Log monitoring server exists After receiving page status message, step A6 is executed: according to the page status message for belonging to the same page, determining that the page is stablized Property parameter.
Certainly, above-mentioned interactive process can also be as Fig. 2 be completed with client, application server, then above-mentioned step The server of rapid A4, A5, A6 then can be the application server of Fig. 2.
In the embodiment of the present application, it by monitoring the script execution state in page implementation procedure, will be held including script The page status information reporting of row status information is to server, the page status message that server statistics report, without considering page As long as the specific frequency of script error in face records a script error status information have script error generation, when When not having script error, a script normal state information is just recorded, therefore, the page status message that reports and reports foot User's equity of this execution state information, and page script stability parameter is determined according to script execution status information, so that weighing apparatus The accuracy for measuring page script stability is higher, more objective, can reduce the probability of accidentally alarm.
Embodiment one
The embodiment of the present application is described from server side.The server than as shown in figure 1 log monitoring server or Application server in Fig. 2.
Referring to Fig. 4, a kind of flow chart of page script monitoring method embodiment of the embodiment of the present application is shown, specifically may be used To include the following steps:
Step 401, the page status message in the page implementation procedure that client is sent is received;The page status message Including script execution status information.
In the embodiment of the present application, the page info got from application server is adopted during client executing With the script error in window.onerror function capture page implementation procedure, when capturing script in the page in client When mistake, the log monitoring server into Fig. 1 or the application server in Fig. 2 send the page shape in page implementation procedure State message, the page status message include script error status information;When script error is not captured in the page in client When, the page status that the log monitoring server into Fig. 1 or the application server in Fig. 2 are sent in page implementation procedure disappears Breath, which includes script normal state information.Log monitoring server in Fig. 1 or the application clothes in Fig. 2 The page status message that device reception client of being engaged in is sent.
Wherein, page implementation procedure includes page loading procedure and/or page operational process;Script error status information and Script normal state information can be regards an identification information as respectively, by the identification information in detection page status message, really Surely the page status message received be include script error status information, or including script normal state information.
Client can be based on HTTP (Hyper Text Transfer Protocol, hypertext transfer protocol) agreement to figure Log monitoring server in 1 or the application server in Fig. 2 send page status message, which includes foot This execution state information, and script execution status information includes: script error status information or script normal state information.
Step 402, according to the page status message for belonging to the same page, page stability parameter is determined.
In the embodiment of the present application, the log monitoring server in Fig. 1 or the statistics of the application server in Fig. 2 are certain The page status message for belonging to the same page in duration calculates the page and stablizes according to the page status message for belonging to the same page Property parameter.
Specifically, the script execution status information for including in the detection page status message, believes according to script execution state Breath, determines page stability parameter, using page stability parameter as the index for measuring page script stability.
For the same page, the message number comprising script error status information and disappearing comprising script normal state information The sum for ceasing quantity, is also equal to belong to the total quantity of the page status message of the same page.
For example, it is directed to same page www.xxxxx.com, the application clothes in the log monitoring server or Fig. 2 in Fig. 1 Business device receives the page status message of 100 clients transmission, and the page status message that each client is sent is 1 A, then the page status message that the log monitoring server in Fig. 1 or the application server in Fig. 2 receive is 100, system The number for counting the script error status information in 100 page status message is 1, the script in 100 page status message The number of normal state information is 99;According to 1 script error status information and 99 script normal state informations, page is determined Face stability parameter, using page stability parameter as the index for measuring page stability.
The embodiment of the present application is by receiving the page status message in the page implementation procedure that client is sent, the page shape State message includes script execution status information, according to the page status message for belonging to the same page, determines page stability parameter. It include script execution status information in the page status message that receives, without considering foot in the page in page implementation procedure As long as the specific frequency of this mistake records a script error status information, when not having foot have script error generation When this mistake occurs, a script normal state information is just recorded, therefore, the page status message that reports and reports script execution User's equity of status information, and page script stability parameter is determined according to script execution status information, so that measuring the page The accuracy of script stability is higher, more objective, can reduce the probability of accidentally alarm.
Embodiment two
The embodiment of the present application is described from server side.
Referring to Fig. 5, a kind of specific flow chart of page script monitoring method embodiment of the embodiment of the present application is shown, is had Body may include steps of:
Step 501, the page status being directed in page loading procedure that client is sent when the page is loaded and completed is received Message.
In the embodiment of the present application, client to corresponding application server send page request, application server according to It receives page request and returns to corresponding page info, client loads the page after receiving page info in webpage The script error in window.onerror function capture page loading procedure can be used in page loading procedure in information.
Referring to Fig. 6, a kind of transmission schematic diagram of page status message of the embodiment of the present application is shown.
It, i.e., will be for the page shape in page loading procedure in window.onload opportunity point when the page, which loads, to be completed State message is sent to the log monitoring server in Fig. 1 or the application server in Fig. 2, the log monitoring server in Fig. 1 Or the application server in Fig. 2 receives the page status message being directed in page loading procedure that client is sent;The page It include script execution status information in status message, which includes: script error status information or script Normal state information.
The page status message that completion event is sent is loaded by window specifically, receiving client.
In practical applications, window.onload is an event, when in the page have element all load completion when, just Window.onload event can be triggered.
When triggering window.onload event, i.e., when window loads completion event, client will be loaded for the page Page status message in journey is sent to the log monitoring server in Fig. 1 or the application server in Fig. 2, the day in Fig. 1 Application server in will monitoring server or Fig. 2 receive client by window load that completion event sends for the page Page status message in loading procedure;Wherein, which includes script execution status information.
It should be noted that no matter using the tool of the script error of window.onerror capture in page loading procedure Body number is one or multiple, the page load complete when, trigger window.onload event, the log monitoring into Fig. 1 The quantity for the script error status information for including in server or the page status message of the application server transmission in Fig. 2 can Think one;It is of course also possible to including the specific number of script error in page status message, but in subsequent statistical page shape When script error status information in state message, a script error status information is recorded.
Step 502, the page status message being directed in page operational process that client is sent when the page exits is received.
It in the embodiment of the present application, can also be using window.onerror capture page fortune in page operational process Script error during row.
As shown in fig. 6, that is, in window.beforeunload opportunity point, will be run for the page when the page exits Page status message in journey is sent to the log monitoring server in Fig. 1 or the application server in Fig. 2, the day in Fig. 1 Will monitoring server or the page status of the application server reception client transmission in Fig. 2 being directed in page operational process Message;It include script execution status information in the page status message, which includes: script error state Information or script normal state information.
Specifically, receiving the page status message that client is sent by close event.
In practical applications, window.beforeunload is an event, is triggered when in page close or refreshing Window.beforeunload event, when triggering window.beforeunload event, one can be popped up in the page has really Dialog box that is fixed and cancelling leaves the page, i.e., the page is out of service, when choosing, which is selected, to disappear, after continuation of insurance when selecting to determine Stay in current page.
When triggering window.beforeunload event, i.e., close event when, client will for the page run Page status message in the process is sent to the log monitoring server in Fig. 1 or the application server in Fig. 2, in Fig. 1 Application server in log monitoring server or Fig. 2 receive client by close event send for page fortune Page status message during row;Wherein, which includes script execution status information.
It should be noted that no matter using the tool of the script error of window.onerror capture in page operational process Body number is one or multiple, when the page exits, triggers window.beforeunload event, the log prison into Fig. 1 The quantity for the script error status information for including in control server or the page status message of the application server transmission in Fig. 2 Only one;It is of course also possible to including the specific number of script error in page status message, but in subsequent statistical page shape When script error status information in state message, a script error status information is only recorded.
The embodiment of the present application can execute step 501 and step 502, can also only carry out in step 501 and step 502 Any one.
When executing step 501 and step 502, the application server in log monitoring server or Fig. 2 in Fig. 1 is connect The page status message for receiving client transmission includes transporting for the page status message in page loading procedure and for the page Page status message during row;When only carrying out step 501, the log monitoring server in Fig. 1 or the application in Fig. 2 Server is received for the page status message in page loading procedure;Log prison when only carrying out step 502, in Fig. 1 The application server controlled in server or Fig. 2 is received for the page status message in page operational process.
Step 503, according to the page status message for belonging to the same page, page stability parameter is determined.
In the embodiment of the present application, the log monitoring server in Fig. 1 or the statistics of the application server in Fig. 2 are certain The page status message for belonging to the same page in duration calculates the page and stablizes according to the page status message for belonging to the same page Property parameter.
Specifically, the log monitoring server in Fig. 1 or the application server in Fig. 2 receive the page of client transmission Surface state message further includes page iden-tity, according to the page status message for belonging to same page iden-tity is determined, determines that the page is stablized Property parameter.
In practical applications, the log monitoring server in Fig. 1 or the application server in Fig. 2 can receive client The page status message of each page sent, carries the page iden-tity of corresponding page in page status message, in Fig. 1 Application server in log monitoring server or Fig. 2 distinguishes each page according to page iden-tity, and statistics belongs to the same page The page status message of mark determines the page stability parameter of the corresponding page of the page iden-tity.
For example, in 1 minute, the page that the log monitoring server in Fig. 1 or the application server in Fig. 2 receive Status message includes C1, C2, C3, C4, D1, D2, D3, E1 and E2, the page iden-tity in page status message C1, C2, C3 and C4 It is C, the page iden-tity in page status message D1, D2 and D3 is D, and the page iden-tity in page status message E1 and E2 is E;The script execution status information for including in statistics page status message C1, C2, C3 and C4, determines the corresponding page of page iden-tity C The page stability parameter in face counts the script execution status information for including in page status message D1, D2 and D3, determines the page The page stability parameter of the corresponding page of D is identified, the script execution state letter for including in page status message E1 and E2 is counted Breath, determines the page stability parameter of the corresponding page of page iden-tity E.
In a kind of embodiment of the application, to the page status message for belonging to the same page, determine to include script error The message number of status information accounts for the ratio of page status message number, obtains the page stability parameter.
In certain time length, to the page status message for belonging to the same page, the foot for including in page status message is counted The message number of this wrong status information, correspondingly, also needing the quantity of statistics page status message.
The ratio that the message number comprising script error status information accounts for page status message number is calculated, the page is obtained Page stability parameter, corresponding calculation formula are as follows:
M=failCount/ (successCount+failCount) × 100%; (1)
In formula (1), M representation page stability parameter, failCount indicates disappearing comprising script error status information Quantity is ceased, successCount indicates the message number comprising script normal state information, includes script error status information The sum of message number and the message number comprising script normal state information is equal to page status message number.
For example, receiving the page status message 100 of page F altogether comprising script error shape at nearest 5 minutes The message number of state information is 10, then the page stability parameter M of page F is 10%.
In another embodiment of the application, to the page status message for belonging to the same page, determine wrong comprising script The accidentally ratio of the message number of status information and the message number comprising script normal state information, obtains the page stability Parameter.
In certain time length, to the page status message for belonging to the same page, the foot for including in page status message is counted The message number of this wrong status information, correspondingly, the script normal state information for including in statistics page status message disappears Cease quantity.
Calculate the message number comprising script error status information and the message number comprising script normal state information Ratio obtains the page stability parameter of the page, corresponding calculation formula are as follows:
M=failCount/successCount; (2)
In formula (2), M representation page stability parameter, failCount indicates disappearing comprising script error status information Quantity is ceased, successCount indicates the message number comprising script normal state information.
It is, of course, also possible in the message number comprising script error status information and disappearing comprising script normal state information It ceases on the ratio of quantity multiplied by percentage, converts percentage for the page stability parameter M in formula (2) and show.
For example, receiving the page status message 50 of page G comprising script error state at nearest 3 minutes The message number of information is 10, and the message number comprising script normal state information is 40, then the page stability of page G Parameter M is 0.25.
Step 504, when the page stability parameter is greater than given threshold, warning information is generated.
In the embodiment of the present application, a given threshold can be set, when the page stability parameter being calculated is greater than When given threshold, warning information is generated.
Warning information can be sent in given client end or the corresponding application server of the page, it is convenient to the page Script error is analyzed and is handled.
Certainly, when bigger due to the page stability parameter being calculated in formula (1) and formula (2), the page is more unstable It is fixed, therefore, when page stability parameter is greater than given threshold, generate warning information;If converting formula (1) to comprising script The message number of normal state information accounts for the ratio of page status message number, obtains the page stability parameter of the page, when When page stability parameter is less than given threshold, warning information is just generated.
The embodiment of the present application is directed in page loading procedure by what reception client was sent when the page is loaded and completed Page status message, and/or receive the page status being directed in page operational process that client is sent when the page exits and disappear Breath, according to the page status message for belonging to the same page, determines page stability parameter, when page stability parameter is greater than setting When threshold value, warning information is generated.It include that script error state is believed in page implementation procedure, in the page status message that receives Breath or script normal state information, without considering the specific frequency of script error in the page, as long as there is script error When, a script error status information is just recorded, when not having script error, just one script normal condition of record is believed Breath, therefore, the page status message that reports and the user for reporting script execution status information equity, and according to including script error The message number of status information and message number comprising script normal state information, determine page stability parameter, so that weighing apparatus The accuracy for measuring page script stability is higher, more objective, can reduce the probability of accidentally alarm;One given threshold is set simultaneously, When page stability parameter is greater than given threshold, warning information is generated, it is convenient that script error is analyzed and handled in time.
Embodiment three
The embodiment of the present application is described from client-side.
Referring to Fig. 7, the flow chart of another page script monitoring method embodiment of the embodiment of the present application is shown, specifically It may include steps of:
Step 701, the script execution state in page implementation procedure is determined.
In the embodiment of the present application, when user needs when client accesses a certain page, client can be answered to corresponding Page request is sent with server, application server returns to corresponding page info according to page request is received, and client exists It after receiving page info, loaded in the webpage of client, run the page;Pass through the window.onerror in client Function captures the script error in page implementation procedure, in page implementation procedure, as long as soon as when capturing script error, Generation script error can be determined, when not capturing script error, it is determined that script error does not occur, according to Whether window.onerror function captures script error, determines the script execution state in page implementation procedure.
In a preferred embodiment of the present application, the script execution state in page loading procedure is determined;And/or really Determine the script execution state in page operational process.
Can only monitoring script executes state in page loading procedure, only in page operational process can also monitor foot This execution state can also execute state by equal monitoring script in page loading procedure and page operational process.
Step 702, the page status message including script execution status information is sent to server, for the server According to the page status message for belonging to the same page, page stability parameter is determined.
In the embodiment of the present application, user end to server sends the page status including script execution status information and disappears Breath, server receive the page status message that client is sent, and server is according to the page status message for belonging to the same page, really Determine page stability parameter.
Wherein, which can be the log monitoring server in Fig. 1 or the application server in Fig. 2.Specifically, It is to detect the script execution status information for including in page status message, which includes: script error shape State information or script normal state information determine that the page is stablized according to script error status information and script normal state information Property parameter.
In a preferred embodiment of the present application, it when the page loads completion, sends to server and is loaded for the page Page status message in the process;And/or when the page exits, send to server for the page in page operational process Status message.
When in page loading procedure monitoring script execution state is triggered when the page loads completion When window.onload event, send to server for the page status message in page loading procedure, server is according to page Page status message in the loading procedure of face calculates page stability parameter.
When in page operational process monitoring script execution state is triggered when the page exits When window.beforeunload event, send to server for the page status message in page operational process, server According to the page status message in page operational process, page stability parameter is calculated.
When monitoring script equal in page loading procedure and page operational process executes state, when the page loads completion, It sends to server for the page status message in page loading procedure, when the page exits, is sent to server and be directed to page Page status message in the operational process of face, server according in page loading procedure page status message and the page ran Page status message in journey calculates page stability parameter.
The embodiment of the present application passes through the script execution state determined in page implementation procedure, and sending to server includes script The page status message of execution state information determines so that the server is according to the page status message for belonging to the same page Page stability parameter.It include script error status information or foot in the page status message of transmission in page implementation procedure This normal state information, without considering the specific frequency of script error in the page, as long as have script error generation, note A script error status information is recorded, when not having script error, just records a script normal state information, therefore, The page status message that reports and the user for reporting script execution status information equity, and according to including script error status information Message number and message number comprising script normal state information, page script stability parameter is determined, so that measuring page The accuracy of face script stability is higher, more objective, can reduce the probability of accidentally alarm.
Example IV
Referring to Fig. 8, a kind of structure chart of page script monitoring device embodiment of the embodiment of the present application is shown, is mainly answered For server 800, which can be the log monitoring server in Fig. 1 or the application server in Fig. 2, tool Body may include following module:
Receiving module 801, the page status message in page implementation procedure for receiving client transmission;The page Status message includes script execution status information.
Parameter determination module 802, for determining that page stability is joined according to the page status message for belonging to the same page Number.
Optionally, the script execution status information includes: script error status information or script normal state information.
Optionally, the receiving module 801, comprising:
First receiving submodule, for receiving that client sends when the page is loaded and completed in page loading procedure Page status message;
And/or second receiving submodule, for receiving that client sends when the page exits for page operational process In page status message.
Optionally, the parameter determination module 802, comprising:
First parameter determination submodule, for determining to include script error to the page status message for belonging to the same page The message number of status information accounts for the ratio of page status message number, obtains the page stability parameter.
Optionally, the parameter determination module 802, comprising:
Second parameter determination submodule, for determining to include script error to the page status message for belonging to the same page The ratio of the message number of status information and the message number comprising script normal state information obtains the page stability ginseng Number.
Optionally, first receiving submodule, comprising:
First receiving unit is disappeared for receiving client by the page status that window loads the transmission of completion event Breath;
Second receiving submodule, comprising:
Second receiving unit, the page status message sent for receiving client by close event.
Optionally, the page status message further includes page iden-tity, the parameter determination module 802, comprising:
Page stability parameter determines submodule, for belonging to the page status message of same page iden-tity according to determination, Determine page stability parameter.
Optionally, described device further include:
Generation module, for generating warning information when the page stability parameter is greater than given threshold.
The embodiment of the present application is by receiving the page status message in the page implementation procedure that client is sent, the page shape State message includes script execution status information, according to the page status message for belonging to the same page, determines page stability parameter. It include script execution status information in the page status message that receives, without considering foot in the page in page implementation procedure As long as the specific frequency of this mistake records a script error status information, when not having foot have script error generation When this mistake occurs, a script normal state information is just recorded, therefore, the page status message that reports and reports script execution User's equity of status information, and page script stability parameter is determined according to script execution status information, so that measuring the page The accuracy of script stability is higher, more objective, can reduce the probability of accidentally alarm.
Embodiment five
Referring to Fig. 9, the structure chart of another page script monitoring device embodiment of the embodiment of the present application is shown, mainly Applied to client 900, following module can specifically include:
Script execution monitoring module 901, for determining the script execution state in page implementation procedure.
Sending module 902, for sending the page status message including script execution status information to server, for institute Server is stated according to the page status message for belonging to the same page, determines page stability parameter.
Optionally, the script execution monitoring module 901, comprising:
First monitoring submodule, for determining the script execution state in page loading procedure;
And/or second monitoring submodule, for determining the script execution state in page operational process.
Optionally, the sending module 902, comprising:
First sending submodule, for being sent in page loading procedure to server when the page loads completion Page status message;
And/or second sending submodule, for being sent in page operational process to server when the page exits Page status message.
The embodiment of the present application passes through the script execution state determined in page implementation procedure, and sending to server includes script The page status message of execution state information determines so that the server is according to the page status message for belonging to the same page Page stability parameter.It include script error status information or foot in the page status message of transmission in page implementation procedure This normal state information, without considering the specific frequency of script error in the page, as long as have script error generation, note A script error status information is recorded, when not having script error, just records a script normal state information, therefore, The page status message that reports and the user for reporting script execution status information equity, and according to including script error status information Message number and message number comprising script normal state information, page script stability parameter is determined, so that measuring page The accuracy of face script stability is higher, more objective, can reduce the probability of accidentally alarm.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
Figure 10 is a kind of structural schematic diagram of server provided by the embodiments of the present application.Referring to Figure 10, server 800 can be with Page script monitoring method for implementing to provide in above-described embodiment one and embodiment two.The server 800 can because configuration or Performance is different and generates bigger difference, may include one or more central processing units (central Processing units, CPU) 822 (for example, one or more processors) and memory 832, one or more Store the storage medium 830 (such as one or more mass memory units) of application program 842 or data 844.Wherein, it deposits Reservoir 832 and storage medium 830 can be of short duration storage or persistent storage.The program for being stored in storage medium 830 can be with Including one or more modules (diagram does not mark), each module may include to the series of instructions behaviour in server Make.Further, central processing unit 822 can be set to communicate with storage medium 830, execute storage on server 800 Series of instructions operation in medium 830.
Server 800 can also include one or more power supplys 826, one or more wired or wireless networks Interface 850, one or more input/output interfaces 858, one or more keyboards 856, and/or, one or one The above operating system 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc.. Wherein, central processing unit 822 can execute the following instruction operated on server 800:
Receive the page status message in the page implementation procedure that client is sent;The page status message includes script Execution state information;
According to the page status message for belonging to the same page, page stability parameter is determined.
Optionally, the script execution status information includes: script error status information or script normal state information.
Optionally, the page status being directed in page loading procedure that client is sent when the page is loaded and completed is received to disappear Breath;
And/or receive the page status message being directed in page operational process that client is sent when the page exits.
Optionally, to the page status message for belonging to the same page, the message count comprising script error status information is determined Amount accounts for the ratio of page status message number, obtains the page stability parameter.
Optionally, to the page status message for belonging to the same page, the message count comprising script error status information is determined The ratio of amount and the message number comprising script normal state information, obtains the page stability parameter.
Optionally, it receives client and the page status message that completion event is sent is loaded by window;Receive client Hold the page status message sent by close event.
Optionally, the page status message further includes page iden-tity, according to the determining page for belonging to same page iden-tity Status message determines page stability parameter.
Optionally, when the page stability parameter is greater than given threshold, warning information is generated.
The embodiment of the present application also provides a kind of client 900, and client 900 can be used for implementing mentioning in above-described embodiment three The page script monitoring method of confession.
The specific structure of the client 900 can refer to the structural schematic diagram of server shown in Fig. 10, the difference of the two It is in the central processing unit of client 900 is different with the operational order that the central processing unit of server 800 executes, and executes The method of client-side.
The application provides a kind of device, one or more machine readable medias of instruction is stored thereon with, when by described one When a or multiple processors execute, so that described device executes a kind of page script monitoring method.
The application also provides one or more machine readable medias, is stored thereon with instruction, handles when by one or more When device executes, so that device executes a kind of page script monitoring method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of page script monitoring method provided herein and device, it is described in detail, herein Applying specific case, the principle and implementation of this application are described, and the explanation of above example is only intended to help Understand the present processes and its core concept;At the same time, for those skilled in the art, according to the thought of the application, There will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as to this The limitation of application.

Claims (24)

1. a kind of page script monitoring method characterized by comprising
Receive the page status message in the page implementation procedure that client is sent;The page status message includes script execution Status information;
According to the page status message for belonging to the same page, page stability parameter is determined.
2. the method according to claim 1, wherein the script execution status information includes: script error shape State information or script normal state information.
3. the method according to claim 1, wherein described receive in the page implementation procedure that client is sent The step of page status message, comprising:
Receive the page status message being directed in page loading procedure that client is sent when the page is loaded and completed;
And/or receive the page status message being directed in page operational process that client is sent when the page exits.
4. according to the method described in claim 2, it is characterized in that, the basis belongs to the page status message of the same page, The step of determining page stability parameter, comprising:
To the page status message for belonging to the same page, determine that the message number comprising script error status information accounts for page status The ratio of message number obtains the page stability parameter.
5. according to the method described in claim 2, it is characterized in that, the basis belongs to the page status message of the same page, The step of determining page stability parameter, comprising:
To the page status message for belonging to the same page, determines the message number comprising script error status information and include script The ratio of the message number of normal state information obtains the page stability parameter.
6. according to the method described in claim 3, it is characterized in that, described receive what client was sent when the page is loaded and completed The step of for page status message in page loading procedure, comprising:
It receives client and the page status message that completion event is sent is loaded by window;
Described the step of receiving the page status message being directed in page operational process that client is sent when the page exits, packet It includes:
Receive the page status message that client is sent by close event.
7. described the method according to claim 1, wherein the page status message further includes page iden-tity According to the page status message for belonging to the same page, the step of determining page stability parameter, comprising:
According to the page status message for belonging to same page iden-tity is determined, page stability parameter is determined.
8. method according to claim 4 or 5, which is characterized in that in the step for obtaining the page stability parameter After rapid, further includes:
When the page stability parameter is greater than given threshold, warning information is generated.
9. a kind of page script monitoring method characterized by comprising
Determine the script execution state in page implementation procedure;
The page status message including script execution status information is sent to server, so that the server is same according to belonging to The page status message of the page, determines page stability parameter.
10. according to the method described in claim 9, it is characterized in that, script execution shape in the determining page implementation procedure The step of state, comprising:
Determine the script execution state in page loading procedure;
And/or determine script execution state in page operational process.
11. according to the method described in claim 10, it is characterized in that, described send to server includes that script execution state is believed The step of page status message of breath, comprising:
When the page loads completion, send to server for the page status message in page loading procedure;
And/or when the page exits, send to server for the page status message in page operational process.
12. a kind of page script monitoring device characterized by comprising
Receiving module, the page status message in page implementation procedure for receiving client transmission;The page status disappears Breath includes script execution status information;
Parameter determination module, for determining page stability parameter according to the page status message for belonging to the same page.
13. device according to claim 12, which is characterized in that the script execution status information includes: script error Status information or script normal state information.
14. device according to claim 12, which is characterized in that the receiving module, comprising:
First receiving submodule, the page being directed in page loading procedure sent for receiving client when the page is loaded and completed Surface state message;
And/or second receiving submodule, for receiving that client sends when the page exits in page operational process Page status message.
15. device according to claim 13, which is characterized in that the parameter determination module, comprising:
First parameter determination submodule, for determining to include script error state to the page status message for belonging to the same page The message number of information accounts for the ratio of page status message number, obtains the page stability parameter.
16. device according to claim 13, which is characterized in that the parameter determination module, comprising:
Second parameter determination submodule, for determining to include script error state to the page status message for belonging to the same page The ratio of the message number of information and the message number comprising script normal state information obtains the page stability parameter.
17. device according to claim 14, which is characterized in that first receiving submodule, comprising:
First receiving unit loads the page status message that completion event is sent by window for receiving client;
Second receiving submodule, comprising:
Second receiving unit, the page status message sent for receiving client by close event.
18. device according to claim 12, which is characterized in that the page status message further includes page iden-tity, institute State parameter determination module, comprising:
Page stability parameter determines submodule, for determining according to the page status message for belonging to same page iden-tity is determined Page stability parameter.
19. device according to claim 15 or 16, which is characterized in that further include:
Generation module, for generating warning information when the page stability parameter is greater than given threshold.
20. a kind of page script monitoring device characterized by comprising
Script execution monitoring module, for determining the script execution state in page implementation procedure;
Sending module, for sending the page status message including script execution status information to server, for the service Device determines page stability parameter according to the page status message for belonging to the same page.
21. device according to claim 20, which is characterized in that the script execution monitoring module, comprising:
First monitoring submodule, for determining the script execution state in page loading procedure;
And/or second monitoring submodule, for determining the script execution state in page operational process.
22. device according to claim 21, which is characterized in that the sending module, comprising:
First sending submodule, for being sent for the page in page loading procedure to server when the page loads completion Status message;
And/or second sending submodule, for being sent for the page in page operational process to server when the page exits Surface state message.
23. a kind of device characterized by comprising
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, when being executed by one or more of processors, are made Obtain the method that described device executes such as claim 1-11 one or more.
24. one or more machine readable medias, are stored thereon with instruction, when executed by one or more processors, so that Device executes the method such as claim 1-11 one or more.
CN201810119484.XA 2018-02-06 2018-02-06 Page script monitoring method and device Active CN110119334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810119484.XA CN110119334B (en) 2018-02-06 2018-02-06 Page script monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810119484.XA CN110119334B (en) 2018-02-06 2018-02-06 Page script monitoring method and device

Publications (2)

Publication Number Publication Date
CN110119334A true CN110119334A (en) 2019-08-13
CN110119334B CN110119334B (en) 2023-10-20

Family

ID=67519496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810119484.XA Active CN110119334B (en) 2018-02-06 2018-02-06 Page script monitoring method and device

Country Status (1)

Country Link
CN (1) CN110119334B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569167A (en) * 2019-08-20 2019-12-13 腾讯科技(深圳)有限公司 webpage alarm monitoring method, script error reporting method, device and computer equipment
CN111722904A (en) * 2020-06-22 2020-09-29 深圳前海微众银行股份有限公司 Page alarm script generation method, device, equipment and readable storage medium
CN113364602A (en) * 2020-03-03 2021-09-07 阿里巴巴集团控股有限公司 Method, device and storage medium for triggering page fault alarm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635655A (en) * 2008-07-25 2010-01-27 阿里巴巴集团控股有限公司 Method, device and system for page performance test
CN101739277A (en) * 2009-12-08 2010-06-16 南京联创科技集团股份有限公司 Self-defined script mode-based method for managing service monitoring system
CN107168850A (en) * 2017-05-05 2017-09-15 中国银联股份有限公司 A kind of URL pages monitoring method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635655A (en) * 2008-07-25 2010-01-27 阿里巴巴集团控股有限公司 Method, device and system for page performance test
CN101739277A (en) * 2009-12-08 2010-06-16 南京联创科技集团股份有限公司 Self-defined script mode-based method for managing service monitoring system
CN107168850A (en) * 2017-05-05 2017-09-15 中国银联股份有限公司 A kind of URL pages monitoring method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569167A (en) * 2019-08-20 2019-12-13 腾讯科技(深圳)有限公司 webpage alarm monitoring method, script error reporting method, device and computer equipment
CN110569167B (en) * 2019-08-20 2022-05-27 腾讯科技(深圳)有限公司 Webpage alarm monitoring method, script error reporting method, device and computer equipment
CN113364602A (en) * 2020-03-03 2021-09-07 阿里巴巴集团控股有限公司 Method, device and storage medium for triggering page fault alarm
CN113364602B (en) * 2020-03-03 2024-08-13 阿里巴巴集团控股有限公司 Method, device and storage medium for triggering page fault alarm
CN111722904A (en) * 2020-06-22 2020-09-29 深圳前海微众银行股份有限公司 Page alarm script generation method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN110119334B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
KR102076862B1 (en) Network performance indicator visualization method and apparatus, and system
US10459818B2 (en) Identifying the root cause of an issue observed during application execution
US9043317B2 (en) System and method for event-driven prioritization
US11144376B2 (en) Veto-based model for measuring product health
CN107704387B (en) Method, device, electronic equipment and computer readable medium for system early warning
CN105471932B (en) Monitoring method, device and system for front-end application
US11635985B2 (en) Using degree of completeness of real-time data to maximize product revenue
CN113495820B (en) Anomaly information collecting and processing method and device and anomaly monitoring system
US9479414B1 (en) System and method for analyzing computing performance
US10536505B2 (en) Intelligent data transmission by network device agent
CN110119334A (en) A kind of page script monitoring method and device
CN110765189A (en) Exception management method and system for Internet products
CN109542786A (en) Visual testing method and device
US10346281B2 (en) Obtaining and analyzing a reduced metric data set
CN116781563A (en) Evaluation device, evaluation method and evaluation system for webpage service fine granularity
CN117221148A (en) System and method for evaluating service quality of multi-type network application
US20180121329A1 (en) Uninstrumented code discovery
CN115705190A (en) Method and device for determining dependence degree
CN117931589A (en) Operation and maintenance fault identification method and device
US9645877B2 (en) Monitoring apparatus, monitoring method, and recording medium
US10706108B2 (en) Field name recommendation
US10644971B2 (en) Graph search in structured query language style query
CN110888811B (en) Code coverage rate information processing method and device, electronic equipment and medium
US10616306B2 (en) System and method for large-scale capture and tracking of web-based application parameters
CN115277355A (en) Method, device, equipment and medium for processing state code data of monitoring system

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40012239

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230914

Address after: Room 241, 2nd Floor, Building 5, No. 699 Wangshang Road, Changhe Street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Taotian E-commerce Technology Co.,Ltd.

Address before: Box 847, four, Grand Cayman capital, Cayman Islands, UK

Applicant before: ALIBABA GROUP HOLDING Ltd.

GR01 Patent grant
GR01 Patent grant