Method and device for detecting page anomaly

By counting the number of cached requests and exceptions for user and page identifiers on the server side and calculating the page exception rate, the problem of over-reliance on client information in existing technologies is solved, and comprehensive detection of page exceptions and compatibility with user accidental clicks are achieved.

CN113722193BActive Publication Date: 2025-01-14BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010479108.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-29
Publication Date
2025-01-14
Estimated Expiration
2040-05-29

AI Technical Summary

Technical Problem

Existing technologies rely excessively on client-side anomaly information for page anomaly detection and are incompatible with normal access requests from the server, resulting in incomplete detection and incompatibility with user accidental clicks.

Method used

On the server side, the number of requests and exceptions for keys generated from user identifiers and page identifiers within a preset time interval are counted in the cache. The page exception rate is calculated and compared with a preset exception benchmark to determine whether the page is abnormal.

Benefits of technology

It enables the detection of page anomalies without relying on the client to actively report data, and is compatible with situations such as accidental user clicks, thus improving the comprehensiveness and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722193B_ABST
    Figure CN113722193B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for detecting page anomalies, and relates to the field of computer technology. A specific implementation of the method includes: determining the number of requests and the number of anomalies for querying a key generated by a user identifier and a page identifier in a cache within a preset time interval; calculating the page anomaly rate according to the ratio of the number of anomalies to the number of requests; comparing the page anomaly rate with a preset anomaly benchmark to determine that the page is in an abnormal state. This implementation avoids the technical defects of the prior art that excessive reliance on abnormal information from the client to detect page anomalies, and is not compatible with the normal access request issued by the server, thereby achieving the detection of whether there is an anomaly on the page without relying on data actively reported by the client, and the technical means of detecting by the server can achieve a technical effect of compatibility with situations such as user mistaken clicks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for detecting page anomalies. Background Art

[0002] In the prior art, when detecting page anomalies, the client mainly sends information data of website anomalies, and the server analyzes the information data to determine whether there is an anomaly on the page.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] 1. Over-reliance on abnormal information from the client;

[0005] 2. There is no quantification of the judgment of abnormal pages. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a method for detecting page anomalies, which can avoid the technical defects of the prior art that over-rely on the abnormal information of the client to detect page anomalies, and is not compatible with the normal access request issued by the server, thereby achieving the detection of whether there is an abnormality on the page without relying on the data actively reported by the client, and the technical means of detecting by the server can achieve a technical effect that is compatible with situations such as user accidental clicks.

[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for detecting page anomalies is provided, comprising:

[0008] Count the number of requests and exceptions for searching the cache using the key generated by the user ID and the page ID within a preset time interval;

[0009] Calculate the page exception rate according to the ratio of the number of exceptions to the number of requests;

[0010] The page abnormality rate is compared with a preset abnormality benchmark to determine that the page is in an abnormal state.

[0011] Optionally, determining the number of requests and the number of exceptions for querying the cache using the key generated by the user identifier and the page identifier within the preset statistical time interval includes:

[0012] According to the user identifier and the page identifier in the queue, determining whether there is a key generated by the user identifier and the page identifier in the cache;

[0013] If yes, then the number of requests within the preset time period is accumulated, and the number of exceptions within the preset time period is accumulated;

[0014] If not, the number of requests within the preset time period is accumulated;

[0015] The preset time period, the number of requests and the number of exceptions are counted.

[0016] Optionally, before comparing the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state, the method includes:

[0017] Obtain the number of historical requests and the number of historical exceptions queried in the cache using the key generated by the user identifier and the page identifier;

[0018] A preset abnormality benchmark is determined according to a ratio of the historical abnormality number to the historical request number.

[0019] Optionally, before determining whether there is a key generated with the user identifier and the page identifier in the cache according to the user identifier and the page identifier in the queue, the method further comprises:

[0020] Receive the page tail request;

[0021] According to the page tail request, a key consisting of the user identifier and the page identifier is deleted from the cache.

[0022] Optionally, according to the page tail request, before deleting the key consisting of the user identifier and the page identifier from the cache, the method includes:

[0023] receiving a page uniform resource locator request;

[0024] The information corresponding to the user identifier and the page identifier corresponding to the page uniform resource locator request is stored in a queue; a key corresponding to the user identifier and the page identifier corresponding to the page uniform resource locator request is generated; the key is stored in a cache, and an expiration time of the key is set in the cache.

[0025] Optionally, after comparing the page abnormality rate with a preset abnormality benchmark and determining that the page is in an abnormal state, the method further includes:

[0026] Generate an alarm message according to the page in an abnormal state;

[0027] An alarm is issued according to the alarm information.

[0028] According to another aspect of an embodiment of the present invention, there is provided a device for detecting page anomalies, characterized in that it includes:

[0029] A statistics module is used to count the number of requests and the number of exceptions in the cache for keys generated by the user ID and the page ID within a preset time interval;

[0030] A calculation module, used to calculate the page exception rate according to the ratio of the number of exceptions to the number of requests;

[0031] The determination module is used to compare the page abnormality rate with a preset abnormality benchmark to determine whether the page is in an abnormal state.

[0032] Optionally, determining the number of requests and the number of exceptions for querying the cache using the key generated by the user identifier and the page identifier within the preset statistical time interval includes:

[0033] According to the user identifier and the page identifier in the queue, determining whether there is a key generated by the user identifier and the page identifier in the cache;

[0034] If yes, then the number of requests within the preset time period is accumulated, and the number of exceptions within the preset time period is accumulated;

[0035] If not, the number of requests within the preset time period is accumulated;

[0036] The preset time period, the number of requests and the number of exceptions are counted.

[0037] Optionally, the method further comprises: a benchmark determination module, which is used to compare the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state before:

[0038] Obtain the number of historical requests and the number of historical exceptions queried in the cache using the key generated by the user identifier and the page identifier;

[0039] A preset abnormality benchmark is determined according to a ratio of the historical abnormality number to the historical request number.

[0040] According to another aspect of an embodiment of the present invention, there is provided an electronic device for detecting page abnormality, comprising:

[0041] one or more processors;

[0042] a storage device for storing one or more programs,

[0043] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting page anomalies provided by the present invention.

[0044] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for detecting page anomalies provided by the present invention is implemented.

[0045] One embodiment of the above invention has the following advantages or beneficial effects:

[0046] The optional embodiments of the present application adopt technical means to detect page anomalies on the server side, thereby avoiding the technical defects of the prior art that over-rely on the client's abnormal information to detect page anomalies, and is not compatible with the normal access requests issued by the server. It can thus achieve the detection of whether there are abnormalities on the page without relying on the data actively reported by the client, and the technical means of detecting by the server can achieve a technical effect that is compatible with situations such as user accidental clicks.

[0047] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0049] Figure 1 is a schematic diagram of the main process of a method for detecting page anomalies according to an embodiment of the present invention;

[0050] Figure 2 is a flowchart of a specific embodiment according to an embodiment of the present invention;

[0051] Figure 3 is a schematic diagram of main modules of a device for detecting page anomalies according to an embodiment of the present invention;

[0052] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0053] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0055] Figure 1 FIG. 1 is a schematic diagram of the main process of a method for detecting page anomalies according to an embodiment of the present invention. Figure 1 As shown, including:

[0056] Step S101, within a preset time interval, determine the number of requests and the number of exceptions in the cache for a key generated by a user identifier (user ID) and a page identifier (page ID);

[0057] Step S102, calculating the page exception rate according to the ratio of the number of exceptions to the number of requests;

[0058] Step S103: Compare the page abnormality rate with a preset abnormality benchmark to determine whether the page is in an abnormal state.

[0059] The preset time interval is set according to actual needs, for example, one minute, that is, the number of requests and the number of exceptions within one minute are counted.

[0060] The data is stored in the cache in the form of key-value pairs. In this application, the key generated by the page identifier (page ID) is mainly stored to facilitate the subsequent determination of whether the key exists in the cache, that is, to determine whether the key has been consumed or whether the key has expired.

[0061] Since the detection of a page can allow a certain abnormality rate, the present application compares the abnormality rate of the page with a preset abnormality benchmark, thereby facilitating the technical effect of determining that the page is in an abnormal state.

[0062] The existing technology has the technical defects of over-reliance on abnormal information from the client to detect page anomalies and being incompatible with normal access requests from the server. Since the steps S101-S103 are all implemented in the server, the above technical defects are avoided, and the detection of whether there is an abnormality on the page can be completed without relying on data actively reported by the client, and the technical means of detection by the server can achieve the technical effect of compatibility with situations such as user mistaken clicks.

[0063] The optional embodiment of the present application places the detection subject of page anomalies on the server side, does not rely on the client's anomaly information, and can be compatible with situations where requests do not reach the server due to operations such as user misclicks.

[0064] In this application, the key value generated by the user ID and the page ID is stored in the cache, and the key addition, query, deletion and expiration operations can be implemented. Among them, the expiration operation is to prevent the cache space from being full; the query is to satisfy the state of the query key to determine whether the request at the end of the page reaches the server; the addition operation is used to add a key to identify the page being accessed; the deletion operation is used to delete the key corresponding to the page that has been successfully opened.

[0065] The request at the end of the page refers to the last request sent from the browser. The request at the end of the page can assist in determining whether the request sent by the browser has reached the server.

[0066] Optionally, determining the number of requests and the number of exceptions for querying the cache using the key generated by the user identifier and the page identifier within the preset statistical time interval includes:

[0067] According to the user identifier and the page identifier in the queue, determining whether there is a key generated by the user identifier and the page identifier in the cache;

[0068] If yes, then the number of requests within the preset time period is accumulated, and the number of exceptions within the preset time period is accumulated;

[0069] If not, the number of requests within the preset time period is accumulated;

[0070] The preset time period, the number of requests and the number of exceptions are counted.

[0071] The queue is a channel between producers and consumers. In this application, the producer is the page web service and the consumer is the consumption computing service.

[0072] The user ID and page ID are obtained through the queue, and then the cache is searched for the key generated by the user ID and page ID, and then it is determined whether the key in the cache has been consumed. Specifically, after the cache queue receives the page tail request, it will delete the key corresponding to the page tail request in the cache, and then when the cache is queried again, the key will not be found, and the number of exceptions will not be accumulated. On the contrary, if the key is found to exist, it means that the key exists in the cache, and the cache has not received the page tail request normally, which means that the page has not completed loading and rendering, and there is an exception in the page to be detected, and the number of exceptions is accumulated.

[0073] An optional embodiment of the present application uses delayed consumption of queue messages in appropriate combination with the cache validity period to confirm whether a request for the end of a page has been issued.

[0074] In actual applications, a page web service can be used to provide normal web services. Specifically, for page type requests, the current page ID and the current user ID are obtained, and the page ID and the user ID are sent to the queue and cache. For asynchronous requests, which are the last requests of the page in this application, after obtaining the current user ID and the page ID, the key consisting of the user ID and the page ID in the cache is deleted.

[0075] Optionally, before comparing the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state, the method includes:

[0076] Obtain the number of historical requests and the number of historical exceptions queried in the cache using the key generated by the user identifier and the page identifier;

[0077] A preset abnormality benchmark is determined according to a ratio of the historical abnormality number to the historical request number.

[0078] By quantifying historical data to form a preset abnormality benchmark, a standard for judging whether a page has an abnormality is generated, thereby providing a theoretical basis for determining whether a page is abnormal. In addition, the technical solution described in this application can also be used for page abnormalities caused by the inability to load static resources.

[0079] The abnormal benchmarks may be sorted, classified and calculated at predetermined time intervals, so that the abnormal benchmarks may be updated according to actual conditions.

[0080] Optionally, before determining whether there is a key generated with the user identifier and the page identifier in the cache according to the user identifier and the page identifier in the queue, the method further comprises:

[0081] Receive the page tail request;

[0082] According to the page tail request, a key consisting of the user identifier and the page identifier is deleted from the cache.

[0083] The page tail request is an asynchronous request data, which can be processed with delay, that is, the key corresponding to the page tail request is deleted from the cache after a certain delay time.

[0084] Optionally, according to the page tail request, before deleting the key consisting of the user identifier and the page identifier from the cache, the method includes:

[0085] Receive a page uniform resource locator (URL) request;

[0086] The information corresponding to the user identifier and the page identifier corresponding to the page uniform resource locator request is stored in a queue; a key corresponding to the user identifier and the page identifier corresponding to the page uniform resource locator request is generated; the key is stored in a cache, and an expiration time of the key is set in the cache.

[0087] Optionally, after comparing the page abnormality rate with a preset abnormality benchmark and determining that the page is in an abnormal state, the method further includes:

[0088] Generate an alarm message according to the page in an abnormal state;

[0089] An alarm is issued according to the alarm information.

[0090] Specifically, when the page exception rate is significantly different from the preset exception benchmark, the alarm service can be called to issue an alarm.

[0091] A method for detecting page anomalies of the present application is described in detail below with a specific embodiment.

[0092] Figure 2 is a flowchart of a specific embodiment according to an embodiment of the present invention; Figure 2 As shown, including:

[0093] Step S201, the browser sends a page URL request to the page web service;

[0094] Step S202: After receiving the page URL request, the page web service stores the request in the cache using the user ID and the page ID as keys, and sets an expiration time for the key in the cache;

[0095] Step S203, storing the message containing the user ID and the page ID in a queue;

[0096] Step S204: The message computing service asynchronously obtains the message about the user ID and the page ID stored in the queue;

[0097] Step S205, the page web service receives the page tail request from the browser;

[0098] Step S206: Send the page tail request to the cache, and delete the key generated by the user ID and the page ID;

[0099] Step S207: The consumption calculation service uses the information of the user ID and the page ID to query whether there is a key storing the user ID and the page ID in the cache;

[0100] If yes, execute step S208, accumulate the number of requests within the preset time period, and accumulate the number of exceptions within the preset time period;

[0101] If not, executing step S209, accumulating the number of requests within the preset time period;

[0102] Step S210: Count the number of requests and the number of exceptions in the preset time period, and calculate the exception rate.

[0103] Step S211, compare the page abnormality rate with a preset abnormality benchmark to determine whether the page is in an abnormal state; if so, execute step S212, generate alarm information according to the page in the abnormal state, and issue an alarm.

[0104] Figure 3 is a schematic diagram of main modules of a device for detecting page anomalies according to an embodiment of the present invention; Figure 3 As shown, a device 300 for detecting page anomalies is provided, comprising:

[0105] The statistics module 301 is used to count the number of requests and the number of exceptions in the cache for searching the key generated by the user identifier and the page identifier within a preset time interval;

[0106] A calculation module 302, used to calculate a page exception rate according to a ratio of the number of exceptions to the number of requests;

[0107] The determination module 303 is used to compare the page abnormality rate with a preset abnormality benchmark to determine whether the page is in an abnormal state.

[0108] Figure 4 An exemplary system architecture 400 to which the method or apparatus for detecting page anomaly according to the embodiment of the present invention may be applied is shown.

[0109] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0110] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0111] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0112] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0113] It should be noted that the method for detecting page anomalies provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the device for detecting page anomalies is generally disposed in the server 405 .

[0114] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0115] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0116] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0117] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0118] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0119] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."

[0122] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0123] Count the number of requests and exceptions for searching the cache using the key generated by the user ID and the page ID within a preset time interval;

[0124] Calculate the page exception rate according to the ratio of the number of exceptions to the number of requests;

[0125] The page abnormality rate is compared with a preset abnormality benchmark to determine that the page is in an abnormal state.

[0126] According to the technical solution of the embodiment of the present invention, the following beneficial effects can be achieved:

[0127] The optional embodiments of the present application adopt technical means to detect page anomalies on the server side, thereby avoiding the technical defects of the prior art that over-rely on the client's abnormal information to detect page anomalies, and is not compatible with the normal access requests issued by the server. It can thus achieve the detection of whether there are abnormalities on the page without relying on the data actively reported by the client, and the technical means of detecting by the server can achieve a technical effect that is compatible with situations such as user accidental clicks.

[0128] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting page anomalies, characterized in that: include: Receiving a page uniform resource locator request; storing information corresponding to a user identifier and a page identifier corresponding to the page uniform resource locator request in a queue; Generate a key corresponding to the user identifier and the page identifier corresponding to the page uniform resource locator request; store the key in a cache, and set an expiration time of the key in the cache; receiving a page tail request, wherein the page tail request refers to the last request sent from the browser; and deleting a key consisting of a user identifier and a page identifier from a cache according to the page tail request; Determining the number of requests and the number of exceptions for searching the cache using the key generated by the user identifier and the page identifier within a preset time interval by counting the number of requests and the number of exceptions, including: judging whether the key generated by the user identifier and the page identifier exists in the cache according to the user identifier and the page identifier in the queue; if so, accumulating the number of requests within the preset time interval and accumulating the number of exceptions within the preset time interval; if not, accumulating the number of requests within the preset time interval; counting the preset time interval, the number of requests and the number of exceptions; Calculate the page exception rate according to the ratio of the number of exceptions to the number of requests; The page abnormality rate is compared with a preset abnormality benchmark to determine that the page is in an abnormal state.

2. The method according to claim 1, characterized in that Before comparing the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state, the method includes: Obtain the number of historical requests and the number of historical exceptions queried in the cache using the key generated by the user identifier and the page identifier; A preset abnormality benchmark is determined according to a ratio of the historical abnormality number to the historical request number.

3. The method according to claim 1, characterized in that After comparing the page abnormality rate with a preset abnormality benchmark and determining that the page is in an abnormal state, the method includes: Generate an alarm message according to the page in an abnormal state; An alarm is issued according to the alarm information.

4. A device for detecting page anomalies, characterized in that: include: Used to receive a page uniform resource locator request; store information corresponding to the user identifier and the page identifier corresponding to the page uniform resource locator request in a queue; A module for generating a key corresponding to a user identifier and a page identifier corresponding to the page uniform resource locator request; storing the key in a cache, and setting an expiration time of the key in the cache; A module for receiving a page tail request, wherein the page tail request refers to the last request sent from the browser; and deleting a key consisting of a user identifier and a page identifier from a cache according to the page tail request; A statistical module is used to determine the number of requests and the number of exceptions for querying a key generated by a user identifier and a page identifier in a cache within a preset time interval, including: judging whether a key generated by a user identifier and a page identifier exists in the cache according to the user identifier and the page identifier in the queue; if so, accumulating the number of requests within the preset time interval and accumulating the number of exceptions within the preset time interval; if not, accumulating the number of requests within the preset time interval; and counting the preset time interval, the number of requests and the number of exceptions; A calculation module, used for calculating the page exception rate according to the ratio of the number of exceptions to the number of requests; The determination module is used to compare the page abnormality rate with a preset abnormality benchmark to determine whether the page is in an abnormal state.

5. The device according to claim 4, characterized in that Also includes: The benchmark determination module is used to compare the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state before: Obtain the number of historical requests and the number of historical exceptions queried in the cache using the key generated by the user identifier and the page identifier; A preset abnormality benchmark is determined according to a ratio of the historical abnormality number to the historical request number.

6. An electronic device for detecting page anomalies, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.

7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Method and device for management of cache pages

    CN104731722A

  • Processing method of page access data in application, client, server and system

    CN106953740A

  • Web front-end exception monitoring method, monitoring server and monitoring system

    CN107896156A