CN113722193A - Method and device for detecting page abnormity - Google Patents

Method and device for detecting page abnormity Download PDF

Info

Publication number
CN113722193A
CN113722193A CN202010479108.9A CN202010479108A CN113722193A CN 113722193 A CN113722193 A CN 113722193A CN 202010479108 A CN202010479108 A CN 202010479108A CN 113722193 A CN113722193 A CN 113722193A
Authority
CN
China
Prior art keywords
page
user
cache
abnormal
requests
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
CN202010479108.9A
Other languages
Chinese (zh)
Other versions
CN113722193B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010479108.9A priority Critical patent/CN113722193B/en
Publication of CN113722193A publication Critical patent/CN113722193A/en
Application granted granted Critical
Publication of CN113722193B publication Critical patent/CN113722193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3604Analysis of software for verifying properties of programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了检测页面异常的方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:统计预设时间间隔内,确定以用户标识和页面标识生成的键在缓存中查询的请求次数以及异常次数;根据所述异常次数与请求次数的比值,计算页面异常率;将所述页面异常率与预设异常基准进行比较,确定所述页面处于异常状态。该实施方式避免了现有技术中存在的过度依赖客户端的异常信息才能检测页面异常的情况,并且不能兼容服务器正常发出访问请求的技术缺陷,进而达到不依赖客户端主动上报的数据即可完成对页面是否存在异常的检测,并且通过服务器进行检测的技术手段,可以实现对用户误点击等情况具有兼容性的技术效果。

Figure 202010479108

The invention discloses a method and a device for detecting page abnormality, and relates to the technical field of computers. A specific implementation of the method includes: within a preset time interval of statistics, determining the number of requests and abnormal times that are queried in the cache with the key generated by the user ID and the page ID; Abnormality rate; comparing the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state. This implementation avoids the situation in the prior art that the abnormal information of the client can only be detected by excessively relying on the abnormal information of the client, and is not compatible with the technical defect that the server sends an access request normally, so that the data can be completed without relying on the data actively reported by the client. The detection of whether there is an abnormality on the page, and the technical means of the detection by the server, can achieve the technical effect of compatibility with the user's accidental click and other situations.

Figure 202010479108

Description

Method and device for detecting page abnormity
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for detecting page abnormity.
Background
In the prior art, when detecting a page abnormality, a client sends information data of the website abnormality, and a server analyzes the information data to judge whether the page is abnormal.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. excessively depending on abnormal information of the client;
2. the determination of an abnormal page is not quantified.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method and system for detecting a page anomaly, which can avoid the technical defect that the page anomaly can be detected only by excessively depending on anomaly information of a client in the prior art and cannot be compatible with the technical defect that a server normally sends an access request, so that whether the page anomaly exists can be detected without depending on data actively reported by the client, and the technical effect of compatibility with the situations of a user clicking by mistake can be achieved by using a technical means for detecting the page anomaly by the server.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a method for detecting a page exception, including:
counting the number of times of requests and abnormal times of key inquiry in a cache, wherein the request times and the abnormal times are generated by a user identifier and a page identifier within a preset time interval;
Calculating the page abnormality rate according to the ratio of the abnormality times to the request times;
and comparing the page abnormal rate with a preset abnormal standard to determine that the page is in an abnormal state.
Optionally, the counting, within a preset time interval, the determining the number of times of requests and the number of times of exceptions of the query in the cache by the key generated by the user identifier and the page identifier includes:
judging whether a key generated by the user identifier and the page identifier exists in the cache or not according to the user identifier and the page identifier in the queue;
if yes, accumulating the request times in the preset time period, and accumulating the abnormal times in the preset time period;
if the request times do not exist, accumulating the request times in the preset time period;
and counting the preset time period, the request times and the abnormal times.
Optionally, comparing the page exception rate with a preset exception criterion, and determining that the page is in an exception state before the page is in the exception state, includes:
acquiring historical request times and historical abnormal times of querying in a cache by using keys generated by the user identification and the page identification;
and determining the historical abnormal frequency as a preset abnormal reference according to the ratio of the historical abnormal frequency to the historical request frequency.
Optionally, determining whether a 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 includes:
receiving a page tail request;
and deleting the key consisting of the user identifier and the page identifier from the cache according to the page tail request.
Optionally, deleting a key formed by the user identifier and the page identifier from the cache according to the request of the page tail includes:
receiving a page uniform resource locator request;
storing the user identification corresponding to the page uniform resource locator request and the information corresponding to the page identification in a queue; generating a user identifier corresponding to the page uniform resource locator request and a key corresponding to the page identifier; storing the key in a cache and setting an expiration time of the key in the cache.
Optionally, comparing the page exception rate with a preset exception criterion, and after determining that the page is in an exception state, the method includes:
generating alarm information according to the page in the abnormal state;
and alarming according to the alarm information.
According to another aspect of the embodiments of the present invention, there is provided an apparatus for detecting a page exception, including:
The counting module is used for counting the request times and abnormal times of the key inquiry in the cache generated by the user identification and the page identification within a preset time interval;
the calculation module is used for calculating the page abnormality rate according to the ratio of the abnormality times to the request times;
and the determining module is used for comparing the page abnormity rate with a preset abnormity reference and determining that the page is in an abnormal state.
Optionally, the counting, within a preset time interval, the determining the number of times of requests and the number of times of exceptions of the query in the cache by the key generated by the user identifier and the page identifier includes:
judging whether a key generated by the user identifier and the page identifier exists in the cache or not according to the user identifier and the page identifier in the queue;
if yes, accumulating the request times in the preset time period, and accumulating the abnormal times in the preset time period;
if the request times do not exist, accumulating the request times in the preset time period;
and counting the preset time period, the request times and the abnormal times.
Optionally, the method further comprises: a benchmark determining module, configured to compare the page exception rate with a preset exception benchmark to determine that the page is in an exception state,
Acquiring historical request times and historical abnormal times of querying in a cache by using keys generated by the user identification and the page identification;
and determining the historical abnormal frequency as a preset abnormal reference according to the ratio of the historical abnormal frequency to the historical request frequency.
According to another aspect of the embodiments of the present invention, there is provided an electronic device for detecting page abnormality, including:
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 for detecting page faults provided by the invention.
According to still another aspect of the embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method for detecting a page fault provided by the present invention.
One embodiment of the above invention has the following advantages or benefits:
according to the optional embodiment of the application, the technical means of detecting the page abnormity at the server is adopted, the technical defects that in the prior art, the page abnormity can be detected only by excessively depending on the abnormity information of the client and the server cannot be compatible to normally send out the access request are avoided, whether the page is abnormal or not can be detected without depending on the data actively reported by the client is further achieved, and the technical means of detecting through the server can achieve the technical effect of compatibility on the conditions of error clicking and the like of a user.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a method for detecting a page fault according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating major blocks of an apparatus for detecting page faults according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method for detecting a page exception according to an embodiment of the present invention, as shown in fig. 1, including:
step S101, determining the number of times of requests and the number of abnormal times of key inquiry in a cache, wherein the keys (keys) are generated by user identification (user ID) and page identification (page ID) within a preset time interval;
step S102, calculating the page abnormal rate according to the ratio of the abnormal times to the request times;
step S103, comparing the page abnormal rate with a preset abnormal standard, and determining that the page is in an abnormal state.
The preset time interval is set according to actual needs, for example, one minute. I.e. counting the number of requests and anomalies in one minute.
In the application, a key (key) generated by a page identifier (page ID) is mainly stored, so that whether the key exists in the cache or not is conveniently judged subsequently, namely whether the key is consumed or not or whether the key is expired or not is judged.
Due to the fact that the page detection can allow a certain abnormal rate, the abnormal rate of the page is compared with a preset abnormal standard, and the technical effect that the page is determined to be in an abnormal state is achieved conveniently.
The prior art has the technical defects that the page abnormity can be detected only by excessively depending on the abnormal information of the client, and the server can not be compatible to normally send out an access request. The steps S101-S103 are implemented in the server, so that the technical defects are avoided, the detection on whether the page is abnormal or not can be finished without depending on data actively reported by the client, and the technical effect of compatibility on the conditions of error clicking and the like of the user can be realized by the technical means of detection by the server.
According to the optional embodiment of the application, the detection main body of the page abnormity is placed at the server side, the abnormity information of the client side is not depended on, and the condition that the request is made by the server and is not reached due to the operation of error points and the like of a user can be compatible.
In the application, the key values generated by the user ID and the page ID are stored in the cache, so that the operations of adding, inquiring, deleting and overdue the keys can be realized. Wherein the expiration operation is to prevent the cache space from being filled; the query is used for satisfying the condition of querying the key so as to determine whether the request at the tail part of the page reaches the server side; the add operation is used for adding a key to identify that the page is accessed; the delete operation is used to delete the key corresponding to the page that has been successfully opened.
The request of the page tail refers to the last request sent from the browser, and the request of the page tail can assist in determining whether the request sent by the browser reaches the server or not.
Optionally, the counting, within a preset time interval, the determining the number of times of requests and the number of times of exceptions of the query in the cache by the key generated by the user identifier and the page identifier includes:
judging whether a key generated by the user identifier and the page identifier exists in the cache or not according to the user identifier and the page identifier in the queue;
if yes, accumulating the request times in the preset time period, and accumulating the abnormal times in the preset time period;
if the request times do not exist, accumulating the request times in the preset time period;
and counting the preset time period, the request times and the abnormal times.
The queue is a channel between producer and consumer, in this application producer is a web service of a page and consumer is a computing service.
And acquiring the user identifier and the page identifier through the queue, caching and searching keys generated by the user identifier and the page identifier, and further determining whether the keys in the cache complete consumption. Specifically, after the cache queue receives the page tail request, the key corresponding to the page tail request in the cache is deleted, and when the cache is queried again, the key is not queried, and the abnormal times are not accumulated. Otherwise, if the key is found, it is indicated that the key exists in the cache, and the cache does not normally receive the request of the page tail, that is, it is indicated that the page does not complete loading and rendering, and the page to be detected is abnormal, and the abnormal times are accumulated.
Alternative embodiments of the present application use delayed consumption of queue messages in conjunction with proper cache validity to confirm whether a page tail request has been issued.
In practical application, a page web service may be adopted to provide a normal web service, and specifically, a request for a page type may obtain a current page ID and a current user ID, and send the page ID and the user ID to a queue and a cache. For asynchronous requests, in the present application, the request at the very end of the page is obtained, and then the key composed of the user ID and the page ID in the cache is deleted after the current user ID and the page ID are obtained.
Optionally, comparing the page exception rate with a preset exception criterion, and determining that the page is in an exception state before the page is in the exception state, includes:
acquiring historical request times and historical abnormal times of querying in a cache by using keys generated by the user identification and the page identification;
and determining the historical abnormal frequency as a preset abnormal reference according to the ratio of the historical abnormal frequency to the historical request frequency.
The technical means of quantizing the historical data to form the preset abnormal reference is used for generating the standard for judging whether the page is abnormal or not, so that a theoretical basis is provided for determining whether the page is abnormal or not, and the technical scheme of the application can be also adopted for the page abnormity caused by the fact that static resources cannot be loaded on the page.
The abnormal reference can be sorted, classified and calculated at preset time intervals, and the abnormal reference is updated according to actual conditions.
Optionally, determining whether a 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 includes:
receiving a page tail request;
and deleting the key consisting of the user identifier and the page identifier from the cache according to the page tail request.
The page tail request is asynchronous request data, and can be delayed, that is, a key corresponding to the page tail request is deleted from the cache after a certain delay time.
Optionally, deleting a key formed by the user identifier and the page identifier from the cache according to the request of the page tail includes:
receiving a page Uniform Resource Locator (URL) request;
storing the user identification corresponding to the page uniform resource locator request and the information corresponding to the page identification in a queue; generating a user identifier corresponding to the page uniform resource locator request and a key corresponding to the page identifier; storing the key in a cache and setting an expiration time of the key in the cache.
Optionally, comparing the page exception rate with a preset exception criterion, and after determining that the page is in an exception state, the method includes:
generating alarm information according to the page in the abnormal state;
and alarming according to the alarm information.
Specifically, when the page abnormal rate is obviously greater than the preset abnormal reference difference, the alarm service can be called to alarm.
A method for detecting page faults according to the present application is described in detail below with an embodiment.
FIG. 2 is a schematic flow chart diagram according to an embodiment of the present invention; as shown in fig. 2, includes:
step S201, the browser sends a page URL request to a page web service;
step S202, after receiving a page URL request, a page web service stores a user ID and a page ID as keys in a cache, and sets the expiration time of the keys in the cache;
step S203, storing the message containing the user ID and the page ID in a queue;
step S204, the message computing service asynchronously obtains the message about the user ID and the page ID stored in the queue;
step S205, the web page service receives a page tail request of the browser;
step S206, sending the page tail request to a cache, and deleting a user ID and a key generated by the page ID;
Step S207, the consumption computing service inquires whether a key for storing the user ID and the page ID exists in the cache by using the information of the user ID and the page ID;
if yes, executing step S208, accumulating the request times in the preset time period, and accumulating the abnormal times in the preset time period;
if not, executing step S209, and accumulating the request times within the preset time period;
step S210, counting the preset time period, the request times and the abnormal times, and calculating the abnormal rate.
Step S211, comparing the page abnormal rate with a preset abnormal standard, and judging whether the page is in an abnormal state; if yes, executing step S212, generating alarm information according to the page in the abnormal state, and giving an alarm.
FIG. 3 is a diagram illustrating major blocks of an apparatus for detecting page faults according to an embodiment of the present invention; as shown in fig. 3, there is provided an apparatus 300 for detecting a page fault, including:
the counting module 301 is configured to count the number of requests and the number of exceptions of the query in the cache of the key generated by the user identifier and the page identifier within a preset time interval;
A calculating module 302, configured to calculate a page exception rate according to a ratio of the exception times to the request times;
the determining module 303 is configured to compare the page exception rate with a preset exception criterion, and determine that the page is in an exception state.
Fig. 4 illustrates an exemplary system architecture 400 to which the method or apparatus for detecting page faults of embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for detecting a page fault provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for detecting a page fault is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that 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 section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not form a limitation on the modules themselves in some cases, and for example, the sending module may also be described as a "module sending a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
counting the number of times of requests and abnormal times of key inquiry in a cache, wherein the request times and the abnormal times are generated by a user identifier and a page identifier within a preset time interval;
calculating the page abnormality rate according to the ratio of the abnormality times to the request times;
and comparing the page abnormal rate with a preset abnormal standard to determine that the page is in an abnormal state.
According to the technical scheme of the embodiment of the invention, the following beneficial effects can be achieved:
according to the optional embodiment of the application, the technical means of detecting the page abnormity at the server is adopted, the technical defects that in the prior art, the page abnormity can be detected only by excessively depending on the abnormity information of the client and the server cannot be compatible to normally send out the access request are avoided, whether the page is abnormal or not can be detected without depending on the data actively reported by the client is further achieved, and the technical means of detecting through the server can achieve the technical effect of compatibility on the conditions of error clicking and the like of a user.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1.一种检测页面异常的方法,其特征在于,包括:1. a method for detecting page abnormality, is characterized in that, comprises: 统计预设时间间隔内,确定以用户标识和页面标识生成的键在缓存中查询的请求次数以及异常次数;Within the preset time interval, determine the number of requests and abnormal times that are queried in the cache with the keys generated by the user ID and page ID; 根据所述异常次数与请求次数的比值,计算页面异常率;Calculate the page exception rate according to the ratio of the number of exceptions to the number of requests; 将所述页面异常率与预设异常基准进行比较,确定所述页面处于异常状态。Comparing the page abnormality rate with a preset abnormality benchmark, it is determined that the page is in an abnormal state. 2.根据权利要求1所述的方法,其特征在于,所述统计预设时间间隔内,确定以用户标识和页面标识生成的键在缓存中查询的请求次数以及异常次数,包括:2. method according to claim 1, is characterized in that, in described statistical preset time interval, determine the request times and abnormal times that the key that user ID and page ID generate are inquired in cache, comprise: 根据队列中的用户标识和页面标识,判断在所述缓存中是否存在以用户标识和页面标识生成的键;According to the user ID and the page ID in the queue, determine whether there is a key generated with the user ID and the page ID in the cache; 若存在,则将所述预设时间段内的请求次数进行累加,并且将所述预设时间段内的异常次数进行累加;If there is, accumulating the number of requests within the preset time period, and accumulating the abnormal times within the preset time period; 若不存在,则将所述预设时间段内的请求次数进行累加;If it does not exist, accumulating the number of requests within the preset time period; 统计所述预设时间段,所述请求次数和异常次数。The preset time period, the number of requests and the number of exceptions are counted. 3.根据权利要求2所述的方法,其特征在于,将所述页面异常率与预设异常基准进行比较,确定所述页面处于异常状态之前,包括:3. The method according to claim 2, wherein before determining that the page is in an abnormal state by comparing the page abnormality rate with a preset abnormality benchmark, the method comprises: 获取以所述用户标识和所述页面标识生成的键在缓存中查询的历史请求次数和历史异常次数;Obtain the number of historical requests and the number of historical exceptions queried in the cache with the key generated by the user ID and the page ID; 根据所述历史异常次数与所述历史请求次数的比值,确定为预设异常基准。According to the ratio of the historical abnormal times to the historical request times, the preset abnormal reference is determined. 4.根据权利要求2或3所述的方法,其特征在于,根据队列中的用户标识和页面标识,判断在所述缓存中是否存在以用户标识和页面标识生成的键之前,包括:4. method according to claim 2 or 3, is characterized in that, according to the user identification and page identification in the queue, before the key that judges whether there is with user identification and page identification in described cache, comprises: 接收页面尾部请求;Receive page footer requests; 根据所述页面尾部请求,将用户标识和页面标识组成的键从缓存中删除。According to the request at the end of the page, the key composed of the user ID and the page ID is deleted from the cache. 5.根据权利要求4所述的方法,其特征在于,根据所述页面尾部请求,将用户标识和页面标识组成的键从缓存中删除之前包括:5. The method according to claim 4, wherein, according to the page tail request, before deleting the key composed of the user ID and the page ID from the cache, it comprises: 接收页面统一资源定位符请求;Receive a page uniform resource locator request; 将所述页面统一资源定位符请求对应的用户标识和页面标识对应的信息存储在队列中;生成所述页面统一资源定位符请求对应的用户标识和页面标识对应的键;将所述键存储在缓存中,并在所述缓存中设置所述键的过期时间。Store the user ID corresponding to the page URL request and the information corresponding to the page ID in the queue; generate the key corresponding to the user ID and the page ID corresponding to the page URL request; store the key in the cache, and set the expiration time of the key in the cache. 6.根据权利要求1所述的方法,其特征在于,将所述页面异常率与预设异常基准进行比较,确定所述页面处于异常状态之后,包括:6. The method according to claim 1, wherein after comparing the page abnormality rate with a preset abnormality benchmark, and determining that the page is in an abnormal state, the method comprises: 根据处于异常状态的所述页面生成报警信息;Generate alarm information according to the page in an abnormal state; 根据所述报警信息进行报警。The alarm is performed according to the alarm information. 7.一种检测页面异常的装置,其特征在于,包括:7. A device for detecting page abnormality, characterized in that, comprising: 统计模块,用于统计预设时间间隔内,确定以用户标识和页面标识生成的键在缓存中查询的请求次数以及异常次数;The statistics module is used to count the number of requests and abnormal times that the keys generated by the user ID and the page ID are queried in the cache within a preset time interval; 计算模块,用于根据所述异常次数与请求次数的比值,计算页面异常率;a calculation module, configured to calculate the page exception rate according to the ratio of the number of exceptions to the number of requests; 确定模块,用于将所述页面异常率与预设异常基准进行比较,确定所述页面处于异常状态。A determination module, configured to compare the page abnormality rate with a preset abnormality benchmark to determine that the page is in an abnormal state. 8.根据权利要求7所述的装置,其特征在于,所述统计预设时间间隔内,确定以用户标识和页面标识生成的键在缓存中查询的请求次数以及异常次数,包括:8. The device according to claim 7, characterized in that, within the statistical preset time interval, determine the number of requests and abnormal times that are queried in the cache with the key generated by the user ID and the page ID, including: 根据队列中的用户标识和页面标识,判断在所述缓存中是否存在以用户标识和页面标识生成的键;According to the user ID and the page ID in the queue, determine whether there is a key generated with the user ID and the page ID in the cache; 若存在,则将所述预设时间段内的请求次数进行累加,并且将所述预设时间段内的异常次数进行累加;If there is, accumulating the number of requests within the preset time period, and accumulating the abnormal times within the preset time period; 若不存在,则将所述预设时间段内的请求次数进行累加;If it does not exist, accumulating the number of requests within the preset time period; 统计所述预设时间段,所述请求次数和异常次数。The preset time period, the number of requests and the number of exceptions are counted. 9.根据权利要求8所述的装置,其特征在于,还包括:基准确定模块,用于在将所述页面异常率与预设异常基准进行比较,确定所述页面处于异常状态之前,9 . The apparatus according to claim 8 , further comprising: a benchmark determination module, configured to compare the page abnormality rate with a preset abnormality benchmark and determine that the page is in an abnormal state, 获取以所述用户标识和所述页面标识生成的键在缓存中查询的历史请求次数和历史异常次数;Obtain the number of historical requests and the number of historical exceptions queried in the cache with the key generated by the user ID and the page ID; 根据所述历史异常次数与所述历史请求次数的比值,确定为预设异常基准。According to the ratio of the historical abnormal times to the historical request times, the preset abnormal reference is determined. 10.一种检测页面异常的电子设备,其特征在于,包括:10. An electronic device for detecting page anomalies, characterized in that it comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6中任一所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6. 11.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-6中任一所述的方法。11. A computer-readable medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-6 is implemented.
CN202010479108.9A 2020-05-29 2020-05-29 Method and device for detecting page anomaly Active CN113722193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010479108.9A CN113722193B (en) 2020-05-29 2020-05-29 Method and device for detecting page anomaly

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010479108.9A CN113722193B (en) 2020-05-29 2020-05-29 Method and device for detecting page anomaly

Publications (2)

Publication Number Publication Date
CN113722193A true CN113722193A (en) 2021-11-30
CN113722193B CN113722193B (en) 2025-01-14

Family

ID=78672249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010479108.9A Active CN113722193B (en) 2020-05-29 2020-05-29 Method and device for detecting page anomaly

Country Status (1)

Country Link
CN (1) CN113722193B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756453A (en) * 2023-08-16 2023-09-15 浙江飞猪网络技术有限公司 Method, equipment and medium for user anomaly analysis and model training based on page

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731722A (en) * 2015-04-17 2015-06-24 吉林大学 Method and device for management of cache pages
CN106953740A (en) * 2017-01-24 2017-07-14 阿里巴巴集团控股有限公司 The processing method of page access data, client, server and system in
CN107896156A (en) * 2016-11-26 2018-04-10 上海壹账通金融科技有限公司 Web front-end abnormal monitoring method, monitoring server and monitoring system
CN108304410A (en) * 2017-01-13 2018-07-20 阿里巴巴集团控股有限公司 A kind of detection method, device and the data analysing method of the abnormal access page
JP2019067361A (en) * 2017-09-29 2019-04-25 株式会社リコー Information processing apparatus, communication system, image forming method, and program
CN110347548A (en) * 2019-05-28 2019-10-18 平安科技(深圳)有限公司 A kind of method for detecting abnormality and device, storage medium, electronic equipment
CN110879780A (en) * 2019-10-25 2020-03-13 北京奇艺世纪科技有限公司 Page abnormity detection method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731722A (en) * 2015-04-17 2015-06-24 吉林大学 Method and device for management of cache pages
CN107896156A (en) * 2016-11-26 2018-04-10 上海壹账通金融科技有限公司 Web front-end abnormal monitoring method, monitoring server and monitoring system
CN108304410A (en) * 2017-01-13 2018-07-20 阿里巴巴集团控股有限公司 A kind of detection method, device and the data analysing method of the abnormal access page
CN106953740A (en) * 2017-01-24 2017-07-14 阿里巴巴集团控股有限公司 The processing method of page access data, client, server and system in
JP2019067361A (en) * 2017-09-29 2019-04-25 株式会社リコー Information processing apparatus, communication system, image forming method, and program
CN110347548A (en) * 2019-05-28 2019-10-18 平安科技(深圳)有限公司 A kind of method for detecting abnormality and device, storage medium, electronic equipment
CN110879780A (en) * 2019-10-25 2020-03-13 北京奇艺世纪科技有限公司 Page abnormity detection method and device, electronic equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱凤梅;缪发军;: "基于Web的测震台网值班管理系统设计与实现", 地震地磁观测与研究, no. 2, 25 August 2013 (2013-08-25) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756453A (en) * 2023-08-16 2023-09-15 浙江飞猪网络技术有限公司 Method, equipment and medium for user anomaly analysis and model training based on page

Also Published As

Publication number Publication date
CN113722193B (en) 2025-01-14

Similar Documents

Publication Publication Date Title
CN112527649A (en) Test case generation method and device
CN112948138B (en) A method and device for processing messages
CN113760982B (en) Data processing method and device
CN112118352B (en) Method and device for processing notification trigger message, electronic equipment and computer readable medium
CN113312553B (en) User tag determining method and device
CN112685481A (en) Data processing method and device
CN113761565B (en) Data desensitization method and device
CN113722193B (en) Method and device for detecting page anomaly
CN112825519B (en) Method and device for identifying abnormal login
CN113238919A (en) Statistical method, device and system for user access number
CN118312076A (en) Map icon processing method and device, electronic equipment and computer readable medium
CN109087097B (en) Method and device for updating same identifier of chain code
CN113535420A (en) Message processing method and device
CN112699116A (en) Data processing method and system
CN113760965B (en) Data query method and device
CN112688982B (en) User request processing method and device
CN113761433B (en) Service processing method and device
CN112783716B (en) Monitoring method and device
CN110019671B (en) Method and system for processing real-time message
CN113760383A (en) Configuration information updating method and device
CN112749204A (en) Method and device for reading data
CN113114611A (en) Method and device for managing blacklist
CN114995764B (en) A method and device for data storage based on streaming computing
CN113760980B (en) Data caching method, data providing end and data using end
CN114756540B (en) Data processing method, device, electronic device and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant