CN116340690A - Page abnormality detection method and device and computer equipment - Google Patents
Page abnormality detection method and device and computer equipment Download PDFInfo
- Publication number
- CN116340690A CN116340690A CN202310391259.2A CN202310391259A CN116340690A CN 116340690 A CN116340690 A CN 116340690A CN 202310391259 A CN202310391259 A CN 202310391259A CN 116340690 A CN116340690 A CN 116340690A
- Authority
- CN
- China
- Prior art keywords
- page
- information
- data packet
- abnormal
- abnormality
- 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
Links
- 230000005856 abnormality Effects 0.000 title claims abstract description 135
- 238000001514 detection method Methods 0.000 title claims abstract description 37
- 230000002159 abnormal effect Effects 0.000 claims abstract description 201
- 238000000034 method Methods 0.000 claims abstract description 66
- 230000004044 response Effects 0.000 claims description 47
- 238000012423 maintenance Methods 0.000 claims description 38
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000007726 management method Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
- G06F11/0787—Storage of error reports, e.g. persistent data storage, storage using memory protection
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a page abnormality detection method, a page abnormality detection device and computer equipment, and relates to the technical field of computers. The method comprises the following steps: sending a page operation instruction input by a user aiming at a preset page to a server, so that the server operates the preset page according to the page operation instruction; receiving a page operation result sent by a server; if the page operation result includes: operating abnormal information to obtain a screenshot of a preset page; converting a screenshot of a preset page into a page text of the preset page; generating an abnormal data packet, wherein the abnormal data packet comprises the following steps: operation abnormality information and page text with corresponding relation; and sending the abnormal data packet to the server so that the server stores the abnormal data packet. The method and the device can improve page stability and user experience.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for detecting page abnormality, and a computer device.
Background
A browser is a piece of software that displays HyperText markup-up Language (HTML) files and allows users to interact with such files.
The user browses the web page through the browser to acquire the network information, but if the script in the web page is abnormal, the browser cannot load the web page.
After the web page is abnormal, operation and maintenance personnel often need to search and analyze abnormal problems from a large number of operation logs, so that the abnormal problems cannot be solved in time, and the stability of the web page and the use experience of users are affected.
Disclosure of Invention
The invention aims to provide a page abnormality detection method, a page abnormality detection device and computer equipment aiming at the defects in the prior art, so as to improve page stability and user experience.
In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
in a first aspect, an embodiment of the present application provides a method for detecting page exceptions, applied to a client, where the method includes:
a page operation instruction input by a user aiming at a preset page is sent to a server, so that the server operates the preset page according to the page operation instruction;
receiving a page operation response sent by the server, wherein the page operation response carries a page operation result;
if the page operation result includes: operating abnormal information to obtain a screenshot of the preset page;
Converting the screenshot of the preset page into a page text of the preset page;
generating an abnormal data packet, wherein the abnormal data packet comprises the following components: the operation abnormality information and the page text with the corresponding relation;
and sending the abnormal data packet to the server side to enable the server side to store the abnormal data packet.
Optionally, the method further comprises:
acquiring an operation resource positioning identifier according to the page operation instruction;
the abnormal data packet further comprises: the operation resource location identifier.
In a second aspect, an embodiment of the present application further provides a method for detecting page abnormality, which is applied to a server, where the method includes:
receiving a page operation instruction which is sent by a client and is input by a user aiming at a preset page;
if the page operation instruction is executed to generate an abnormality, acquiring operation abnormality information;
sending a page operation response to the client, wherein the page operation response carries a page operation result, and if the page operation result comprises: operating abnormal information, wherein the page operation result is used for enabling the client to acquire a page screenshot of the preset page, converting the page screenshot of the preset page into a page text of the preset page and generating an abnormal data packet, and the abnormal data packet comprises the following components: the operation abnormality information and the page text;
And receiving and storing the abnormal data packet.
Optionally, if the page operation instruction is executed and an abnormality occurs, obtaining operation abnormality information includes:
if the page operation instruction is executed to generate an exception, the configurable handlerExceptionResolvers method is called through a WebMvcConfigururer interface, and the operation exception information is acquired and encrypted.
Optionally, the abnormal data packet further includes: operating a resource location identifier, the method further comprising:
determining an abnormality occurrence module according to the operation resource positioning identifier;
and sending an abnormality prompt message to maintenance personnel of the abnormality generating module.
Optionally, the exception packet further includes: the step of sending the abnormality prompt information to the maintainer of the abnormality generation module by using the user information and the abnormality generation time of the preset page comprises the following steps:
determining a user grade according to the user information;
determining a prompting mode and prompting timeliness of the abnormal prompting information according to the user grade and the abnormal occurrence time;
and sending abnormal prompt information to maintenance personnel of the abnormal generation module according to the prompt mode and prompt timeliness.
Optionally, the storing the abnormal data packet includes:
generating the screenshot of the page according to the page text of the preset page;
locally storing the page screenshot in the abnormal data packet, and determining a storage address of the page screenshot;
and storing the operation abnormality information, the information of an abnormality generation module and the storage address of the page screenshot in the abnormal data packet in a preset database.
In a third aspect, an embodiment of the present application further provides a device for detecting page abnormality, applied to a client, where the device includes:
the instruction sending module is used for sending a page operation instruction input by a user aiming at a preset page to the server, so that the server operates the preset page according to the page operation instruction;
the response receiving module is used for receiving a page operation response sent by the server, wherein the page operation response carries a page operation result;
and the page screenshot module is used for, if the page operation result comprises: operating abnormal information to obtain a screenshot of the preset page;
the text conversion module is used for converting the screenshot of the preset page into the page text of the preset page;
The data packet generation module is used for generating an abnormal data packet, and the abnormal data packet comprises the following components: the operation abnormality information and the page text with the corresponding relation;
and the data packet sending module is used for sending the abnormal data packet to the server side so that the server side stores the abnormal data packet.
Optionally, the apparatus further includes:
the positioning identifier determining module is used for acquiring an operation resource positioning identifier according to the page operation instruction;
the abnormal data packet further comprises: the operation resource location identifier.
In a third aspect, an embodiment of the present application further provides a device for detecting page abnormality, which is applied to a server, where the device includes:
the instruction receiving module is used for receiving a page operation instruction which is sent by the client and is input by a user aiming at a preset page;
the information acquisition module is used for acquiring operation abnormality information if the page operation instruction is executed and abnormal occurs;
the response sending module is configured to send a page operation response to the client, where the page operation response carries a page operation result, and if the page operation result includes: operating abnormal information, wherein the page operation result is used for enabling the client to acquire a page screenshot of the preset page, converting the page screenshot of the preset page into a page text of the preset page and generating an abnormal data packet, and the abnormal data packet comprises the following components: the operation abnormality information and the page text;
And the data packet receiving module is used for receiving and storing the abnormal data packet.
Optionally, the information obtaining module is specifically configured to, if the page operation instruction is executed and an exception occurs, call a configurable handleexception solutions method through a webmvc configurable interface, and obtain and encrypt the operation exception information.
Optionally, the abnormal data packet further includes: operating a resource location identifier, the apparatus further comprising:
the abnormal generation module determining module is used for determining an abnormal generation module according to the operation resource positioning identifier;
the abnormal prompt information sending module is used for sending abnormal prompt information to maintenance personnel of the abnormal generation module.
Optionally, the exception packet further includes: the abnormal prompt information sending module uses the user information and the abnormal occurrence time of the preset page and comprises:
a user grade determining unit for determining a user grade according to the user information;
the prompt confirmation unit is used for determining a prompt mode and prompt timeliness of the abnormal prompt information according to the user grade and the abnormal occurrence time;
and the abnormal prompt information sending unit is used for sending abnormal prompt information to maintenance personnel of the abnormal generation module according to the prompt mode and prompt timeliness.
Optionally, the data packet receiving module is specifically configured to generate the screenshot according to a page text of the preset page; locally storing the page screenshot in the abnormal data packet, and determining a storage address of the page screenshot; and storing the operation abnormality information, the information of the abnormality generation module and the storage address of the page screenshot in a preset database.
In a fifth aspect, embodiments of the present application further provide a computer device, including: a processor, a storage medium, and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the page fault detection method as described in any of the first aspects or to perform the steps of the page fault detection method as described in any of the second aspects.
In a sixth aspect, embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor performs the steps of the method for detecting a page abnormality according to any one of the first aspect, or performs the steps of the method for detecting a page abnormality according to any one of the second aspect.
The beneficial effects of this application are:
the application provides a page abnormality detection method, a page abnormality detection device and computer equipment, when an operation page is abnormal, a page screenshot of a preset page is converted into a page text, and an abnormal data packet composed of operation abnormality information of the page and the page text is sent to a server for storage, so that real-time tracking, capturing and storage of page abnormality are realized, operation and maintenance personnel can check the abnormality information in time and maintain abnormality problems, a large number of operation logs are not required to search and analyze the abnormality problems, and the operation stability of the page and the use experience of a user are ensured; and the page screenshot is sent to the server in the form of page text, so that the size of an abnormal data packet can be reduced, and the speed of sending the abnormal data packet is increased.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a page abnormality detection system provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for detecting page abnormality according to an embodiment of the present application;
fig. 3 is a second schematic flow chart of a method for detecting page abnormality according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a third method for detecting page abnormality according to an embodiment of the present application;
fig. 5 is a flow chart diagram of a page abnormality detection method provided in an embodiment of the present application;
fig. 6 is a flowchart fifth of a method for detecting page abnormality according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a page abnormality detection device according to an embodiment of the present disclosure;
fig. 8 is a second schematic structural diagram of the page abnormality detection device provided in the embodiment of the present application;
fig. 9 is a schematic diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Furthermore, the terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, without conflict, features in embodiments of the present application may be combined with each other.
Before explaining the page abnormality detection method provided by the application, in order to better understand the scheme of the application, an explanation is first provided for a page abnormality detection system applied by the application.
Referring to fig. 1, a schematic structural diagram of a page abnormality detection system provided in an embodiment of the present application, as shown in fig. 1, the page abnormality detection system includes: client 10 and server 20, client 10 and server 20 are communicatively connected.
The browser is a client program running on the client 10 through which a user can browse a web page, and the client 10 communicates with the server 20 to display web page information to the user through the client 10.
The server 20 receives an operation instruction input by a user in a webpage through the client 10, returns an operation result to the client according to the operation instruction, and displays webpage information corresponding to the operation result in the browser.
In some embodiments, the client 10 sends an operation instruction to the server 20 using an Axios interface, and the Axios interface may capture operation anomaly information sent by the server 20 when an anomaly occurs in the server 20.
In some embodiments, the server 20 adopts a springboot frame, in which configuration files of the server 20 responding to operation instructions for the web pages can be simplified, and different web pages can be quickly developed based on the springboot frame.
In one possible implementation manner, a WebMvc configuration class is created in the engineering of the server 20, a web service configuration file of a webpage or an application program where a preset page is located is managed in the WebMvc configuration class through a WebMvc configuration interface, a configurable handleexception solutions method is rewritten in the WebMvc configuration class, the Exception of the server 20 is processed by using the configurable handleexception solutions method, when the server 20 processes an operation instruction sent by the client 10 to generate an Exception, the configurable handleexception solutions method is called, the Exception information generated in the Exception handling mechanism Exception is encrypted, the encrypted Exception information, the Exception code and the address information of a failure page are sent to the client 10, and the client 10 displays the failure page in the browser according to the address information of the failure page.
Based on the page abnormality detection system, the embodiment of the application provides a page abnormality detection method which is applied to a client in the page abnormality detection system. Referring to fig. 2, a first flowchart of a method for detecting page faults according to an embodiment of the present application is shown in fig. 2, where the method may include:
S11: and sending a page operation instruction input by a user aiming at the preset page to the server, so that the server operates the preset page according to the page operation instruction.
In this embodiment, address information of a preset page is input in a browser of a client to display the preset page in the browser, page information is displayed in the preset page, a user can input a page operation instruction for the page information in the preset page, the client sends the page operation instruction to a server, the server receives the page operation instruction, then executes the page operation instruction, accesses a configuration file for the preset page in the server, achieves operation for the preset page, and generates a page operation result.
S12: and receiving a page operation response sent by the server, wherein the page operation response carries a page operation result.
In this embodiment, the client receives, through an interface in communication with the server, a page operation response returned by the server, where the page operation response carries a page operation result generated by the server for the page operation instruction. For example, the client obtains the page operation response sent by the server through the Axios interface.
If the page operation response indicates that the server side responds successfully to the page operation instruction, the page operation result is information of a skip page generated by operation on a preset page, the page operation result carried in the page operation instruction is rendered to the client side, and the skip page is displayed on the client side.
S13: if the page operation result includes: and operating the abnormal information to obtain a screenshot of a preset page.
In this embodiment, if the page operation result includes operation exception information, determining that the response of the server to the page operation instruction fails, where the operation exception information includes: abnormal description information, abnormal files, abnormal parameters and other information of the server side abnormal.
The method comprises the steps that a client determines that a response of a server to a page operation instruction fails according to operation abnormality information in a page operation result, captures a preset page, and obtains a page screenshot of the preset page, wherein the page screenshot comprises the following steps: and the user operates the page operation content of the preset page.
In some embodiments, the way to obtain the screenshot of the preset page may be: and capturing the screen of the preset page through a screen capturing plug-in installed on the client to obtain a screen capturing of the page.
For example, the preset page can be captured through an html2canvas frame in the client to obtain a page screenshot.
In some embodiments, after the Axios interface determines that the page operation result includes operation anomaly information, the screenshot plug-in is triggered to perform screenshot on a preset page to obtain a page screenshot.
It should be noted that, in addition to the operation exception information, the page operation result may further include: error coding and response information, wherein the error coding is coding indicating failure reasons determined by the server according to the reasons for responding to page operation instructions failure, such as error coding of 400, 505 and the like, and the client switches a preset page to a display page of the error coding; the response message is used for prompting the user of page operation abnormality at the client, and the response message can be displayed in a preset form, such as a popup window and the like.
S14: and converting the screenshot of the preset page into a page text of the preset page.
In this embodiment, in order to reduce the size of the abnormal data packet and reduce the resources consumed for sending the abnormal data packet, the screenshot of the page may be encoded to obtain the page text corresponding to the preset page. For example, base64 encoding may be employed to convert information in the page shots into page text.
S15: generating an abnormal data packet, wherein the abnormal data packet comprises the following steps: operation abnormality information and page text having correspondence.
In this embodiment, a correspondence between operation anomaly information and page text is established, and the operation anomaly information and page information of the page text are encapsulated to generate an anomaly data packet in a preset format, where the format of the anomaly data packet may be a format convenient for database storage. For example, the operation anomaly information and the page text may be numbered to establish a correspondence between the operation anomaly information and the page text; or, the corresponding relation between the operation abnormality information and the page text can be established according to the page identification of the preset page.
S15: and sending the abnormal data packet to the server so that the server stores the abnormal data packet.
In this embodiment, the client sends the abnormal data packet to the server, and the server stores the abnormal data packet and notifies the operation and maintenance personnel to check the information in the abnormal data packet, so that the operation and maintenance personnel optimize the configuration file of the preset page according to the operation abnormal information.
According to the page abnormality detection method provided by the embodiment, when the operation page is abnormal, the abnormal data packet formed by the operation abnormality information and the page screenshot of the preset page is sent to the server for storage, so that the real-time tracking, capturing and storage of the page abnormality are realized, the operation and maintenance personnel can check the abnormality information in time and maintain the abnormality problem, the abnormality problem does not need to be searched and analyzed from a large number of operation logs, and the operation stability of the webpage and the use experience of a user are ensured.
In one possible implementation, the method may further include:
according to the page operation instruction, an operation resource positioning identifier is obtained, and the abnormal data packet further comprises: the operation resource positioning identifier is used for determining the abnormality occurrence module by the server and sending abnormality prompt information to maintenance personnel of the abnormality occurrence module.
In this embodiment, after receiving an operation input by a user for a preset page, the client generates a page operation instruction according to an operation object in the preset page for which the operation is directed, where the page operation instruction includes an operation resource location identifier corresponding to the operation object, and the operation resource location identifier is a uniform resource location identifier (Uniform Resource Locator, URL) of the operation object.
The client packs the operation resource positioning identifier in an abnormal data packet and sends the abnormal data packet to the server, so that the server determines that a module corresponding to the operation object in the server is an abnormal generation module according to the operation resource positioning identifier, and sends abnormal prompt information to maintenance personnel corresponding to the abnormal generation module, and the maintenance personnel is instructed to conduct troubleshooting and maintenance on the abnormality in the abnormal generation module according to the operation abnormal information and the page screenshot.
According to the page abnormality detection method provided by the embodiment, the operation resource positioning identifier is determined according to the page operation instruction, so that the server side can determine the abnormality generation module according to the operation resource positioning identifier, and therefore an operation and maintenance responsible person of the abnormality generation module can be notified to process the page abnormality as soon as possible, and the efficiency of the operation and maintenance person for solving the abnormality problem is improved.
The embodiment of the application also provides a page abnormality detection method which is applied to the server side in the page abnormality detection system. Referring to fig. 3, a second flowchart of a method for detecting page faults according to an embodiment of the present application is shown in fig. 3, where the method may include:
s21: and receiving a page operation instruction which is sent by the client and is input by a user aiming at a preset page.
In this embodiment, the server receives a page operation instruction sent by the client, where the page operation instruction is input by a user for a preset page displayed in a browser of the client.
S22: if the page operation instruction is executed abnormally, operation abnormal information is obtained.
In this embodiment, the server accesses the configuration file for the preset page according to the page operation instruction, obtains the operation content corresponding to the page operation instruction, implements the operation for the preset page, and generates the page operation result.
If the process that the server accesses the configuration file of the preset page to acquire the operation content is abnormal, determining that the operation instruction of the execution page is abnormal, acquiring operation abnormality information generated in the operation process, wherein the operation abnormality information is an operation log generated in the operation process of the server on the configuration file, and the operation abnormality information comprises: abnormal description information, abnormal files, abnormal parameters and other information of the server side abnormal.
In one possible implementation manner, if the page operation instruction is executed and an exception occurs in S22, the obtaining operation exception information may include:
if the page operation instruction is executed abnormally, the configurable handleexception servers method is called through the webmvcon configuration interface, and operation abnormal information is acquired and encrypted.
In this embodiment, the WebMvc configuration class of the server manages the web service configuration file of the preset page through the WebMvc configuration server interface, rewrites the configurable handicutensionresolvers method in the WebMvc configuration class, when the page operation instruction is abnormal, invokes the configurable handicutensionresolvers method through the WebMvc configuration server interface, obtains the operation abnormality information through the configurable handicutensionresolvers method, and encrypts the operation abnormality information, and because the operation abnormality information may contain sensitive information related to the server and the database, in order to avoid security holes, encryption processing needs to be performed on the operation abnormality information.
S23: and sending a page operation response to the client, wherein the page operation response carries a page operation result.
If the page operation result includes: the method comprises the steps of operating abnormal information, wherein a page operation result is used for enabling a client to obtain a page screenshot of a preset page, converting the page screenshot of the preset page into a page text of the preset page and generating an abnormal data packet, and the abnormal data packet comprises the operating abnormal information and the page text.
In this embodiment, a page operation response is sent to the client, where the page operation response carries a page operation result, and if the page operation response indicates that the server side is successful in responding to the page operation instruction, information of a skip page generated by the page operation result for operation of a preset page is obtained; if the page operation response indicates that the server fails to respond to the page operation instruction, the page operation result carries operation exception information, so that the client executes the steps S13-S15 according to the operation exception information, which is not described in detail herein.
S24: and receiving and storing the abnormal data packet.
In this embodiment, after receiving the abnormal data packet sent by the client, the server stores the abnormal data packet, and notifies the operation and maintenance personnel to check the information in the abnormal data packet, so that the operation and maintenance personnel optimizes the configuration file of the preset page according to the operation abnormal information.
In one possible implementation, if an abnormality occurs in the operation, the method may further include:
error coding and response messages are generated, and page operation results also include error coding and response messages.
In this embodiment, after determining that the response to the page operation instruction fails, the server generates an error code and a response message according to the cause of the operation failure.
According to the page abnormality detection method provided by the embodiment, when the operation page is abnormal, the operation abnormality information of the page and the abnormality data packet of the failed page are sent to the server for storage, so that real-time tracking, capturing and storage of page abnormality are realized, operation and maintenance personnel can check the abnormality information in time and maintain the abnormality problem, a large number of operation logs are not required to search and analyze the abnormality problem, and the operation stability of the webpage and the use experience of a user are ensured.
In one possible implementation, the exception packet further includes: referring to fig. 4, referring to the flowchart of the method for detecting page exceptions provided in the embodiment of the present application, as shown in fig. 4, the method may further include:
s31: and determining an abnormality occurrence module according to the operation resource positioning identifier.
S32: and sending the abnormality prompt information to maintenance personnel of the abnormality generating module.
In this embodiment, the abnormal data packet sent by the client further includes an operation resource location identifier, where the operation location identifier is a URL corresponding to the operation object determined by the client according to the page operation instruction, after the server receives the URL, the server may determine, according to the URL, that a module corresponding to the operation object in the server is an abnormal occurrence module, and the server configures, in advance, a corresponding maintainer as a responsible person of each module for each module of a preset page, determines, according to the URL, a maintainer corresponding to the abnormal occurrence module, determines, according to a communication address of the maintainer, send abnormal prompt information to the maintainer, where the maintainer may view the abnormal data information according to address information in the abnormal prompt information. By way of example, the communication address may be a mailbox address.
According to the page abnormality detection method provided by the embodiment, the server side determines the abnormality generation module according to the operation resource positioning identifier, so that an operation and maintenance responsible person of the abnormality generation module can be notified to process the page abnormality as soon as possible, and the efficiency of the operation and maintenance person for solving the abnormality problem is improved.
In one possible implementation, the exception packet may further include: abnormal occurrence time, user information using a preset page, and the like. Referring to fig. 5, in a fourth flowchart of the method for detecting page abnormality provided in the embodiment of the present application, as shown in fig. 5, the sending, by S32, abnormality prompting information to a maintainer of an abnormality sending module may include:
s321: and determining the user grade according to the user information.
S322: and determining the prompting mode and prompting time of the abnormal prompting information according to the user grade and the abnormal occurrence time.
S323: and sending abnormal prompt information to maintenance personnel of the abnormal occurrence module according to the prompt mode and prompt timeliness.
In this embodiment, the abnormal prompt information is classified, and the mode of sending the abnormal prompt information to the maintainer is determined according to the class of the abnormal prompt information, so that the abnormal prompt information is sent to the maintainer in different modes, and thus the timeliness of the maintainer for processing the abnormal prompt information of different classes is determined.
Specifically, when generating an abnormal data packet according to operation abnormal information, the client obtains abnormal occurrence time and user information using a preset page, the abnormal data packet carries the abnormal occurrence time and the user information using the preset page, after receiving the abnormal data packet, the server determines user grades from a user information management library according to the user information carried in the abnormal data packet, the server predefines prompting modes and prompting timeliness corresponding to different user grades and different abnormal occurrence time periods, and the server determines the corresponding prompting modes and prompting timeliness according to the user grades and the time periods corresponding to the abnormal occurrence time, so as to send the abnormal prompting information to maintenance personnel of the abnormal occurrence module according to the prompting modes and the prompting timeliness.
For example, if the user level is high and the abnormal occurrence time period is the first time period, the prompt mode is the first prompt mode, and prompt timeliness is instant prompt; the user grade is high, the abnormal occurrence time period is a second time period, the prompting mode is a first prompting mode, the prompting time is a suspending prompting mode, and the suspending prompting is regulated to be performed within a preset time period; the user grade is low, the abnormal occurrence time period is the first time period, the prompting mode is the second prompting mode, and the prompting time is instant prompting; the user grade is low, the abnormal occurrence time period is a second time period, the prompting mode is a second prompting mode, and the prompting time is a suspension prompting. The first prompting mode may be a mode that a maintainer can timely receive a prompt, the second prompting mode may be a mode that the maintainer receives the prompt in non-timeliness, for example, the first prompting mode may be: the telephone combines with mail prompting mode, the second prompting mode can be: mail prompting mode.
The above user level division, time period division, prompt mode division, and prompt time period division are only exemplary division modes, and are not the only division limiting modes.
In a possible implementation manner, please refer to fig. 6, which is a flowchart of a method for detecting a page abnormality provided in an embodiment of the present application, as shown in fig. 6, the step S24 of storing an abnormal data packet may include:
s241: and generating a screenshot of the page according to the page text of the preset page.
S242: and locally storing the page screenshot in the abnormal data packet, and determining the storage address of the page screenshot.
S243: and storing the operation abnormality information, the information of the abnormality occurrence module and the storage address of the page screenshot in the abnormal data packet in a preset database.
In this embodiment, after the server receives the abnormal data packet, since the content of the page text is more, directly storing the page text increases the storage pressure of the server, so after the server receives the abnormal data packet, the server reconverts the page text of the preset page into the corresponding local physical server of the server, stores the page screenshot in the local physical server corresponding to the server, determines the storage address of the page screenshot, and the server stores the operation abnormality information, the storage address of the page screenshot and the information of the abnormality occurrence module in the database.
In some embodiments, in order to reduce the storage pressure of the server and the database, the storage time limit of the page screenshot and the abnormal data packet may be set, and after the storage time of the page screenshot and the abnormal data packet exceeds the storage time limit, the page screenshot and the abnormal data packet are deleted.
According to the page abnormality detection method provided by the embodiment, the page screenshot is stored in the server, and other information is stored in the database, so that the storage pressure of the server and the database can be reduced.
In some embodiments, the server has an anomaly information management maintenance page, and a maintainer accesses the anomaly information management maintenance page according to the address information, and checks operation anomaly information displayed in the anomaly information management maintenance page, information of an anomaly occurrence module, anomaly occurrence time, user information using a preset page, and a storage address of a page screenshot.
Furthermore, each piece of abnormal information is displayed through the abnormal information management maintenance page, and after the operation and maintenance personnel process the page abnormality by checking the information in each abnormal data packet in the abnormal information management maintenance page, the maintenance state of the corresponding information of each abnormal data packet can be maintained in the abnormal information management maintenance page, and the maintenance state is used for indicating whether the abnormality corresponding to the abnormal data packet is completed or not.
In other embodiments, the abnormal information in the abnormal data packet stored in the database may be counted, so as to determine the frequencies of abnormal situations of different operation and maintenance persons, different modules and different times, for example, modules and times of abnormal situations may be intuitively counted in a scattered point distribution manner, so as to further optimize the preset page.
On the basis of the embodiment, the embodiment of the application also provides a page abnormality detection device which is applied to the client. Referring to fig. 7, a first structural diagram of a page fault detection device provided in an embodiment of the present application is shown in fig. 7, where the device includes:
the instruction sending module 11 is configured to send a page operation instruction input by a user for a preset page to the server, so that the server operates the preset page according to the page operation instruction;
the response receiving module 12 is configured to receive a page operation response sent by the server, where the page operation response carries a page operation result;
the page screenshot module 13 is configured to, if the page operation result includes: operating abnormal information to obtain a screenshot of a preset page;
the text conversion module 14 is configured to convert a screenshot of a preset page into a page text of the preset page;
The data packet generating module 15 is configured to generate an abnormal data packet, where the abnormal data packet includes: operation abnormality information and page text with corresponding relation;
the data packet sending module 16 is configured to send an abnormal data packet to the server, so that the server stores the abnormal data packet.
Optionally, the apparatus may further include:
the positioning identifier determining module is used for acquiring an operation resource positioning identifier according to the page operation instruction;
the exception packet further includes: the resource location identifier is operated.
On the basis of the embodiment, the embodiment of the application also provides a page abnormality detection device which is applied to the server. Referring to fig. 8, a second structural diagram of a page fault detection device provided in an embodiment of the present application is shown in fig. 8, where the device includes:
the instruction receiving module 21 is configured to receive a page operation instruction sent by the client and input by a user for a preset page;
the information obtaining module 22 is configured to obtain operation abnormality information if the page operation instruction is executed to generate an abnormality;
the response sending module 23 is configured to send a page operation response to the client, where the page operation response carries a page operation result, and if the page operation result includes: operating abnormal information, wherein the page operation result is used for enabling the client to acquire a page screenshot of a preset page, converting the page screenshot of the preset page into a page text of the preset page and generating an abnormal data packet, and the abnormal data packet comprises: operating abnormal information and page text;
The data packet receiving module 24 is configured to receive and store the abnormal data packet.
Optionally, the information obtaining module 22 is specifically configured to, if an exception occurs in executing the page operation instruction, call a configurable handleexception resolution method through a webmvc configuration interface, and obtain and encrypt operation exception information.
Optionally, the abnormal data packet further includes: operating the resource location identifier, the apparatus may further comprise:
the abnormal generation module determining module is used for determining the abnormal generation module according to the operation resource positioning identifier;
the abnormal prompt information sending module is used for sending the abnormal prompt information to maintenance personnel of the abnormal generation module.
Optionally, the exception packet further includes: the abnormal prompt information sending module uses user information and abnormal occurrence time of a preset page and comprises:
a user grade determining unit for determining a user grade according to the user information;
the prompt confirmation unit is used for determining the prompt mode and prompt timeliness of the abnormal prompt information according to the user grade and the abnormal occurrence time;
the abnormal prompt information sending unit is used for sending abnormal prompt information to maintenance personnel of the abnormal generation module according to the prompt mode and prompt timeliness.
Optionally, the data packet receiving module 24 is specifically configured to generate a screenshot according to a page text of a preset page; locally storing the page screenshot in the abnormal data packet, and determining the storage address of the page screenshot; and storing the operation abnormality information, the information of the abnormality occurrence module and the storage address of the page screenshot in the abnormal data packet in a preset database.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASICs), or one or more microprocessors, or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGAs), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Referring to fig. 9, a schematic diagram of a computer device provided in an embodiment of the present application, as shown in fig. 9, the computer device 100 includes: the computer device 100 comprises a processor 101, a storage medium 102 and a bus, wherein the storage medium 102 stores program instructions executable by the processor 101, and when the computer device 100 runs, the processor 101 communicates with the storage medium 102 through the bus, and the processor 101 executes the program instructions to execute the method embodiment applied to the client or the method embodiment applied to the server. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method embodiment applied to the client or the method embodiment applied to the server is executed by the processor. The specific implementation manner and the technical effect are similar, and are not repeated here.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the invention. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely illustrative of embodiments of the present invention, and the present invention is not limited thereto, and any changes or substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and the present invention is intended to be covered by the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. A method for detecting page anomalies, applied to a client, the method comprising:
a page operation instruction input by a user aiming at a preset page is sent to a server, so that the server operates the preset page according to the page operation instruction;
receiving a page operation response sent by the server, wherein the page operation response carries a page operation result;
if the page operation result includes: operating abnormal information to obtain a screenshot of the preset page;
converting the screenshot of the preset page into a page text of the preset page;
generating an abnormal data packet, wherein the abnormal data packet comprises the following components: the operation abnormality information and the page text with the corresponding relation;
and sending the abnormal data packet to the server side to enable the server side to store the abnormal data packet.
2. The method of claim 1, wherein the method further comprises:
acquiring an operation resource positioning identifier according to the page operation instruction;
the abnormal data packet further comprises: the operation resource positioning identifier is used for determining an abnormality occurrence module by the server and sending abnormality prompt information to maintenance personnel of the abnormality occurrence module.
3. The page abnormality detection method is characterized by being applied to a server, and comprises the following steps:
receiving a page operation instruction which is sent by a client and is input by a user aiming at a preset page;
if the page operation instruction is executed to generate an abnormality, acquiring operation abnormality information;
sending a page operation response to the client, wherein the page operation response carries a page operation result, and if the page operation result comprises: operating abnormal information, wherein the page operation result is used for enabling the client to acquire a page screenshot of the preset page, converting the page screenshot of the preset page into a page text of the preset page and generating an abnormal data packet, and the abnormal data packet comprises the following components: the operation abnormality information and the page text;
And receiving and storing the abnormal data packet.
4. The method of claim 3, wherein if an exception occurs in executing the page operation instruction, obtaining operation exception information comprises:
if the page operation instruction is executed to generate an exception, the configurable handlerExceptionResolvers method is called through a WebMvcConfigururer interface, and the operation exception information is acquired and encrypted.
5. The method of claim 3, wherein the exception packet further comprises: operating a resource location identifier, the method further comprising:
determining an abnormality occurrence module according to the operation resource positioning identifier;
and sending an abnormality prompt message to maintenance personnel of the abnormality generating module.
6. The method of claim 5, wherein the exception packet further comprises: the step of sending the abnormality prompt information to the maintainer of the abnormality generation module by using the user information and the abnormality generation time of the preset page comprises the following steps:
determining a user grade according to the user information;
determining a prompting mode and prompting timeliness of the abnormal prompting information according to the user grade and the abnormal occurrence time;
And sending abnormal prompt information to maintenance personnel of the abnormal generation module according to the prompt mode and prompt timeliness.
7. The method of claim 5, wherein storing the exception packet comprises:
generating the screenshot of the page according to the page text of the preset page;
locally storing the page screenshot in the abnormal data packet, and determining a storage address of the page screenshot;
and storing the operation abnormality information, the information of an abnormality generation module and the storage address of the page screenshot in the abnormal data packet in a preset database.
8. A page fault detection device, for application to a client, the device comprising:
the instruction sending module is used for sending a page operation instruction input by a user aiming at a preset page to the server, so that the server operates the preset page according to the page operation instruction;
the response receiving module is used for receiving a page operation response sent by the server, wherein the page operation response carries a page operation result;
and the page screenshot module is used for, if the page operation result comprises: operating abnormal information to obtain a screenshot of the preset page;
The data packet generation module is used for generating an abnormal data packet, and the abnormal data packet comprises the following components: the operation abnormality information and the page screenshot;
and the data packet sending module is used for sending the abnormal data packet to the server side so that the server side stores the abnormal data packet.
9. A page fault detection device, applied to a server, the device comprising:
the instruction receiving module is used for receiving a page operation instruction which is sent by the client and is input by a user aiming at a preset page;
the information acquisition module is used for acquiring operation abnormality information if the page operation instruction is executed and abnormal occurs;
the response sending module is configured to send a page operation response to the client, where the page operation response carries a page operation result, and if the page operation result includes: operating abnormal information, wherein the page operation result is used for enabling the client to acquire a page screenshot of the preset page and generating an abnormal data packet, and the abnormal data packet comprises the following components: the operation abnormality information and the page screenshot;
and the data packet receiving module is used for receiving and storing the abnormal data packet.
10. A computer device, comprising: a processor, a storage medium, and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the page fault detection method according to any one of claims 1 to 2 or to perform the steps of the page fault detection method according to any one of claims 3 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310391259.2A CN116340690B (en) | 2023-04-12 | 2023-04-12 | Page abnormality detection method and device and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310391259.2A CN116340690B (en) | 2023-04-12 | 2023-04-12 | Page abnormality detection method and device and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116340690A true CN116340690A (en) | 2023-06-27 |
CN116340690B CN116340690B (en) | 2024-01-23 |
Family
ID=86880518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310391259.2A Active CN116340690B (en) | 2023-04-12 | 2023-04-12 | Page abnormality detection method and device and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116340690B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108268332A (en) * | 2017-08-10 | 2018-07-10 | 广州神马移动信息科技有限公司 | Webpage abnormality monitoring method, equipment and system |
CN112100035A (en) * | 2020-10-27 | 2020-12-18 | 苏州浪潮智能科技有限公司 | Page abnormity detection method, system and related device |
-
2023
- 2023-04-12 CN CN202310391259.2A patent/CN116340690B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108268332A (en) * | 2017-08-10 | 2018-07-10 | 广州神马移动信息科技有限公司 | Webpage abnormality monitoring method, equipment and system |
CN112100035A (en) * | 2020-10-27 | 2020-12-18 | 苏州浪潮智能科技有限公司 | Page abnormity detection method, system and related device |
Also Published As
Publication number | Publication date |
---|---|
CN116340690B (en) | 2024-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109714192B (en) | Monitoring method and system for monitoring cloud platform | |
US10210036B2 (en) | Time series metric data modeling and prediction | |
CN105743730B (en) | The method and its system of real time monitoring are provided for the web service of mobile terminal | |
CN106484611B (en) | Fuzzy test method and device based on automatic protocol adaptation | |
CN108304704A (en) | Authority control method, device, computer equipment and storage medium | |
WO2011072272A1 (en) | Performance, analytics and auditing framework for portal applications | |
CN112527484B (en) | Workflow breakpoint continuous running method and device, computer equipment and readable storage medium | |
CN113495820B (en) | Anomaly information collecting and processing method and device and anomaly monitoring system | |
CN112231711B (en) | Vulnerability detection method and device, computer equipment and storage medium | |
CN111046011A (en) | Log collection method, system, node, electronic device and readable storage medium | |
CN107168844B (en) | Performance monitoring method and device | |
CN114465741B (en) | Abnormality detection method, abnormality detection device, computer equipment and storage medium | |
US20130254373A1 (en) | Method and system of providing a summary of web application performance monitoring | |
CN110875832B (en) | Abnormal service monitoring method, device and system and computer readable storage medium | |
CN116340690B (en) | Page abnormality detection method and device and computer equipment | |
CN101677278A (en) | Method and system for monitoring availability of network information system | |
KR20120071175A (en) | Mobile phone loading web-platform, method for offering log information using the same mobile phone, verification system and method for web-platform | |
CN108880920B (en) | Cloud service management method and device and electronic equipment | |
CN114598622B (en) | Data monitoring method and device, storage medium and computer equipment | |
CN112446030B (en) | Method and device for detecting file uploading vulnerability of webpage end | |
WO2018192569A1 (en) | Device monitoring method, apparatus and system | |
CN117591381B (en) | Data reporting method and device | |
CN118264548B (en) | Computer security operation and maintenance service system | |
Haibo et al. | Design and implementation of wireless sensor network management systems based on WEBGIS | |
CN115842716B (en) | Method, device, equipment and storage medium for determining fault server |
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 | ||
CP03 | Change of name, title or address |
Address after: Room 814, Floor 8, Building 2, No. 1535, Hongmei Road, Xuhui District, Shanghai, 200030 Patentee after: Zhongdian Jinxin Digital Technology Group Co.,Ltd. Country or region after: China Address before: Room 814, Floor 8, Building 2, No. 1535, Hongmei Road, Xuhui District, Shanghai, 200030 Patentee before: Zhongdian Jinxin Digital Technology Group Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |