CN113672453A - Display page monitoring method and device, electronic equipment and storage medium - Google Patents

Display page monitoring method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113672453A
CN113672453A CN202110850765.4A CN202110850765A CN113672453A CN 113672453 A CN113672453 A CN 113672453A CN 202110850765 A CN202110850765 A CN 202110850765A CN 113672453 A CN113672453 A CN 113672453A
Authority
CN
China
Prior art keywords
monitoring
service
script
page
monitored
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.)
Pending
Application number
CN202110850765.4A
Other languages
Chinese (zh)
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110850765.4A priority Critical patent/CN113672453A/en
Publication of CN113672453A publication Critical patent/CN113672453A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/88Monitoring involving counting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a method and a device for monitoring a display page, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring monitoring configuration information aiming at a service to be monitored, wherein the monitoring configuration information comprises a monitoring script and target equipment information corresponding to the monitoring script; determining the current use state of the target equipment corresponding to the target equipment information; when the current use state of the target equipment is a preset idle state, intercepting a display page corresponding to the service to be monitored in the target equipment and detecting the feature content of the intercepted page screenshot by executing the monitoring script to obtain a detection result corresponding to the monitoring script; and determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to the monitoring script. The method and the device for monitoring the display effect of the display page corresponding to the front-end service to be monitored automatically monitor the display effect of the display page corresponding to the front-end service to be monitored, and the front-end problem page can be found in time.

Description

Display page monitoring method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for monitoring a display page, an electronic device, and a storage medium.
Background
With the rapid development of computer technology, the functions of the application programs in the terminal are more and more abundant, and each application program interacts and exchanges information with a user through a displayed service page.
In the related art, the display effect of the front-end service page is monitored manually, so that the problem page (i.e. the service page which does not present the expected effect) is found out in a non-timely manner, and further, the processing time is delayed, and a huge loss may be caused due to the non-timely processing.
Disclosure of Invention
The disclosure provides a method and a device for monitoring a display page, electronic equipment and a storage medium, which are used for at least solving the problem that the front-end problem page is not timely found in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for monitoring a display page is provided, including:
acquiring monitoring configuration information aiming at a service to be monitored, wherein the monitoring configuration information comprises a monitoring script and target equipment information corresponding to the monitoring script;
determining the current use state of the target equipment corresponding to the target equipment information;
when the current use state of the target equipment is a preset idle state, intercepting a display page corresponding to the service to be monitored in the target equipment by executing the monitoring script;
detecting the feature content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script; the characteristic content is the content which represents whether the display page corresponding to the service to be monitored is normal or not;
and determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to the monitoring script.
In an exemplary embodiment, the detecting the feature content of the intercepted page screenshot, and obtaining a detection result corresponding to the monitoring script includes:
calling a preset image recognition algorithm, and carrying out feature content recognition processing on the intercepted page screenshot through the preset image recognition algorithm to obtain a feature content recognition result;
and determining a detection result corresponding to the monitoring script according to the matching condition of the characteristic content identification result and preset characteristic content.
In an exemplary embodiment, in a case that the monitoring configuration information includes a plurality of monitoring scripts, the determining, according to a detection result corresponding to the monitoring script, a monitoring result corresponding to the service to be monitored includes:
storing the detection result corresponding to the monitoring script in a database;
updating the value of a target counter in the database;
judging whether the value of the target counter reaches a target value; the target value is the number of the monitoring scripts;
and when the judgment result is yes, determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to each monitoring script in the plurality of monitoring scripts.
In an exemplary embodiment, the method further comprises:
acquiring a preset page intercepting range and the preset characteristic content; the preset page intercepting range is used for indicating the range for intercepting the display page corresponding to the service to be monitored;
determining the preset image recognition algorithm according to the preset characteristic content;
and generating the monitoring script according to the preset page intercepting range, the preset characteristic content and the preset image recognition algorithm.
In an exemplary embodiment, after generating the monitoring script, the method further comprises:
storing the monitoring script to a specified script storage space to obtain the address information of the monitoring script;
acquiring target equipment information corresponding to the monitoring script;
acquiring service information indicating the service to be monitored;
and generating the monitoring configuration information according to the service information, the address information of the monitoring script and the target equipment information corresponding to the monitoring script.
In an exemplary embodiment, in case the monitoring result indicates an alarm, the method further comprises:
generating alarm information;
acquiring an alarm strategy in the monitoring configuration information;
and sending the alarm information according to the alarm strategy.
In an exemplary embodiment, in case that the monitoring result indicates a service process, the method further includes:
acquiring exception handling logic corresponding to the detection result of the exception;
executing the exception handling logic to eliminate the detection of the exception.
According to a second aspect of the embodiments of the present disclosure, there is provided a monitoring apparatus for displaying a page, including:
the system comprises a configuration information acquisition unit, a configuration information acquisition unit and a configuration information processing unit, wherein the configuration information acquisition unit is configured to execute the acquisition of monitoring configuration information aiming at a service to be monitored, and the monitoring configuration information comprises a monitoring script and target equipment information corresponding to the monitoring script;
a use state determination unit configured to perform determining that the target device information corresponds to a current use state of a target device;
the display page intercepting unit is configured to execute intercepting a display page corresponding to the service to be monitored in the target device by executing the monitoring script when the current use state of the target device is a preset idle state;
the characteristic content detection unit is configured to detect the characteristic content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script; the characteristic content is the content which represents whether the display page corresponding to the service to be monitored is normal or not;
and the monitoring result determining unit is configured to execute the detection result corresponding to the monitoring script and determine the monitoring result corresponding to the service to be monitored.
In an exemplary embodiment, the feature content detecting unit includes:
the recognition unit is configured to execute calling of a preset image recognition algorithm, and perform recognition processing on feature content on the intercepted page screenshot through the preset image recognition algorithm to obtain a feature content recognition result;
and the matching unit is configured to execute the matching of the characteristic content identification result and preset characteristic content and determine the detection result corresponding to the monitoring script.
In an exemplary embodiment, in a case that the monitoring configuration information includes a plurality of monitoring scripts, the monitoring result determining unit includes:
the detection result storage unit is configured to store the detection result corresponding to the monitoring script into a database;
a value updating unit configured to perform updating of a value of a target counter in the database;
a determination unit configured to perform a determination of whether or not the value of the target counter reaches a target value; the target value is the number of the monitoring scripts;
and the monitoring result determining subunit is configured to determine the monitoring result corresponding to the service to be monitored according to the detection result corresponding to each monitoring script in the plurality of monitoring scripts when the result judged by the judging unit is yes.
In an exemplary embodiment, the apparatus further comprises:
the first acquisition unit is configured to acquire a preset page interception range and the preset feature content; the preset page intercepting range is used for indicating the range for intercepting the display page corresponding to the service to be monitored;
a recognition algorithm determination unit configured to perform determination of the preset image recognition algorithm according to the preset feature content;
and the monitoring script generating unit is configured to execute the preset image recognition algorithm according to the preset page intercepting range, the preset feature content and the preset image, and generate the monitoring script.
In an exemplary embodiment, the apparatus further comprises:
the monitoring script storage unit is configured to store the monitoring script into a specified script storage space to obtain the address information of the monitoring script;
the equipment information acquisition unit is configured to execute acquisition of target equipment information corresponding to the monitoring script;
a service information obtaining unit configured to perform obtaining of service information indicating the service to be monitored;
and the configuration information generating unit is configured to execute the generation of the monitoring configuration information according to the service information, the address information of the monitoring script and the target device information corresponding to the monitoring script.
In an exemplary embodiment, in case that the monitoring result indicates an alarm, the apparatus further includes:
an alert information generation unit configured to perform generating alert information;
an alarm strategy obtaining unit configured to execute obtaining of an alarm strategy in the monitoring configuration information;
an alarm information sending unit configured to perform sending of the alarm information according to the alarm policy.
In an exemplary embodiment, in a case that the monitoring result indicates a service process, the apparatus further includes:
an exception handling logic acquiring unit configured to execute an exception handling logic acquiring a result of detection of an exception;
an execution unit configured to execute the exception handling logic to eliminate a detection result of the exception.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method for monitoring a presentation page of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, where instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method for monitoring a presentation page of the first aspect.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including a computer program, which when executed by a processor implements the method for monitoring a presentation page of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
by acquiring monitoring configuration information aiming at the service to be monitored, wherein the monitoring configuration information comprises a monitoring script and target equipment information corresponding to the monitoring script, further determining the current use state of the target device corresponding to the target device information, and when the current use state of the target device is a preset idle state, intercepting a display page corresponding to a service to be monitored in the target equipment by executing the monitoring script and detecting the characteristic content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script, further determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to the monitoring script, therefore, the display effect of the display page corresponding to the front-end service to be monitored is automatically monitored, the front-end problem page can be found in time, the rapid processing response is facilitated, and the loss caused by untimely processing of the problem page is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an application environment illustrating a method for monitoring a presentation page according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for monitoring a presentation page in accordance with an exemplary embodiment;
FIG. 3 is a flowchart illustrating detecting feature content of an intercepted screenshot of a page to obtain a detection result corresponding to a monitoring script according to an illustrative embodiment;
fig. 4 is a flowchart illustrating determining a monitoring result corresponding to a service to be monitored according to a detection result corresponding to a monitoring script according to an exemplary embodiment;
FIG. 5 is a flow diagram illustrating another method of monitoring a presentation page in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating a monitoring device displaying a page in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Referring to fig. 1, a schematic diagram of an application environment of a method for monitoring a presentation page according to an exemplary embodiment is shown, where the application environment may include a terminal 110 and a server 120, and the terminal 110 and the server 120 may be connected through a wired network or a wireless network.
The terminal 110 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like. The terminal 110 may have client software such as an Application (App) installed therein, and the Application may be a stand-alone Application or a sub-program in the Application. Illustratively, the service corresponding to the application may be a video service, a live broadcast service, and the like, and the application may perform presentation of a service page to the user through the terminal 110. The user of the terminal 110 may log into the application through pre-registered user information, which may include an account number and a password.
The server 120 may be a server that provides a background service for an application in the terminal 110, and specifically, the service provided by the server 120 may be a monitoring service for page display effect. The server 120 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like.
The method for monitoring the display page provided by the embodiment of the disclosure may be executed by a monitoring device of the display page, for example, the method for monitoring the display page may be executed by a terminal or a server or other electronic devices. In an exemplary embodiment, the method for monitoring a presentation page may be implemented by a processor calling computer readable instructions stored in a memory.
Fig. 2 is a flowchart illustrating a method for monitoring a presentation page according to an exemplary embodiment, where as shown in fig. 2, the method includes the following steps:
in step S201, monitoring configuration information for a service to be monitored is acquired.
The monitoring configuration information includes a monitoring script and target device information corresponding to the monitoring script.
In a specific embodiment, the monitoring configuration information may include service information, address information of the monitoring script, and target device information corresponding to the monitoring script. The service information indicates a service to be monitored, and may include, for example, application program identification information and version information; the target device information may include a brand identifier, a device identifier, an operating system identifier, and the like of the target device, which may be, for example, a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like; the address information of the monitoring script is used to indicate a script storage space for storing the monitoring script, and it can be understood that when the monitoring configuration information includes a plurality of monitoring scripts, the plurality of monitoring scripts may be stored in the same script storage space or different script storage spaces, and may be specifically set according to actual needs.
In an exemplary embodiment, the monitoring configuration information may be obtained at a preset time interval, which may be set according to actual needs, for example, 1 minute, 3 minutes, and so on. In a specific implementation, a timer may be set according to the preset time interval, and the monitoring configuration information is triggered and acquired when the timing time is reached.
In the embodiment of the disclosure, the monitoring script is used for monitoring the display effect of the display page corresponding to the service to be monitored in the target device. Specifically, the monitoring script may be executed, and the execution of the monitoring script may intercept a display page corresponding to a service to be monitored in the target device and detect feature content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script.
Based on this, in an exemplary embodiment, before obtaining the monitoring configuration information, the method may further include a step of generating a monitoring script, and the generating of the monitoring script may include:
acquiring a preset page intercepting range and preset characteristic content;
determining the preset image recognition algorithm according to the preset characteristic content;
and generating a monitoring script according to the preset page intercepting range, the preset characteristic content and the preset image recognition algorithm.
Specifically, the preset page intercepting range is used to indicate a range for intercepting the display page corresponding to the service to be monitored, for example, the preset page intercepting range may be the whole display page or an appointed area of the display page, and may be specifically set according to actual monitoring requirements. The preset feature content is expected content contained in a display page corresponding to the preset page intercepting range, and in specific implementation, the type of the preset feature content may be a file, an image, and the like.
The preset image recognition algorithm is matched with the type of the preset characteristic content, and different preset image recognition algorithms are adopted for different types of preset characteristic content. For example, when the type of the preset feature content is a case, the preset image recognition algorithm may be a character recognition algorithm, such as an ocr (optical channel recognition) character recognition algorithm based on deep learning; when the type of the preset Feature content is an image, the preset image recognition algorithm may be an image Feature point matching algorithm, such as a Scale Invariant Feature Transform (SIFT) algorithm; when the type of the preset feature content includes both a document and an image, the preset image recognition algorithm may include a character recognition algorithm and an image feature point matching algorithm.
In an exemplary embodiment, the monitoring script may be a Python language script, and in a specific implementation, the monitoring script may be written and managed using a Python + selenium automation environment, where selenium is an automation testing tool of the web.
According to the method and the device for monitoring the display page, the preset page intercepting range and the preset feature content are obtained, the preset image recognition algorithm is determined according to the preset feature content, and then the automatic monitoring script is generated according to the preset page intercepting range, the preset feature content and the preset image recognition algorithm, so that the monitoring script can be flexibly configured according to actual monitoring requirements, and the flexibility of monitoring the display page is improved.
Based on this, in an exemplary embodiment, after the monitoring script is generated, the method may further include a step of generating monitoring configuration information, where the step may specifically include:
storing a monitoring script to a specified script storage space to obtain address information of the monitoring script;
acquiring target equipment information corresponding to the monitoring script;
acquiring service information indicating a service to be monitored;
and generating the monitoring configuration information according to the service information, the address information of the monitoring script and the target equipment information corresponding to the monitoring script.
Specifically, after the monitoring script is generated, the monitoring script is stored in the designated script storage space, so that the address information of the monitoring script can be obtained. In practical application, the service information input by the user and the target equipment information corresponding to the monitoring script can be acquired through the front-end visual configuration platform, and then the monitoring configuration information is generated by combining the service information, the address information and the equipment information, so that the flexibility of generating the monitoring configuration information is improved.
In step S203, the current usage state of the target device corresponding to the target device information is determined.
In this embodiment of the present disclosure, the current usage state of the target device may include a preset idle state and a non-preset idle state, where the preset idle state indicates that no monitoring script is executed on the target device, and the non-preset idle state indicates that a monitoring script is executed on the target device.
In an exemplary embodiment, the current usage state of each device may be managed by the device management system, and then in step S203, an acquisition request for the current usage state of the target device may be sent to the device management system according to the monitoring configuration information, so that the device management system returns the current usage state of the target device in response to the acquisition request.
In step S205, when the current usage state of the target device is a preset idle state, intercepting a display page corresponding to the service to be monitored in the target device by executing the monitoring script.
In step S207, the feature content of the captured screenshot is detected to obtain a detection result corresponding to the monitoring script.
In a specific implementation, when the current use state of the target device corresponding to the monitoring script is a preset idle state, intercepting a display page corresponding to a service to be monitored in the target device by running the monitoring script, and detecting feature content of an intercepted page screenshot, so as to obtain a detection result corresponding to the monitoring script.
When the display page corresponding to the service to be monitored in the target device is intercepted, the display page can be intercepted according to a preset page intercepting range in the monitoring script, for example, when the preset page intercepting range is the whole display page, the whole display page corresponding to the service to be monitored in the target device can be intercepted, so that a page screenshot of the whole display page is obtained, when the preset page intercepting range is an appointed area of the display page, only the appointed area in the display page corresponding to the service to be monitored in the target device can be intercepted, and therefore the page screenshot of the appointed area is obtained.
The characteristic content is a content that represents whether the display page corresponding to the service to be monitored is normal, and in a specific implementation, the characteristic content may be a text content and/or an image content in the display page corresponding to the service to be monitored.
In order to improve the efficiency and accuracy of monitoring the front-end page display effect, in an exemplary embodiment, as shown in fig. 3, when detecting the feature content of the captured page screenshot to obtain a detection result corresponding to the monitoring script, the method may include:
in step S301, a preset image recognition algorithm is called, and feature content recognition processing is performed on the captured screenshot of the page through the preset image recognition algorithm, so as to obtain a feature content recognition result.
The preset image recognition algorithm is an image recognition algorithm associated when the monitoring script is generated. When the preset image recognition algorithm comprises a character recognition algorithm, carrying out character content recognition processing on the intercepted page screenshot through the character recognition algorithm so as to obtain recognized character content; and when the preset image recognition algorithm comprises an image feature point matching algorithm, carrying out image recognition processing through the image feature point matching algorithm so as to obtain recognized image content.
In step S303, a detection result corresponding to the monitoring script is determined according to a matching condition of the feature content identification result and a preset feature content.
Specifically, the characteristic content identification result is matched with the preset characteristic content in the monitoring script, if the characteristic content identification result is consistent with the preset characteristic content, the display effect of the page at the front end is correct, and it can be determined that the detection result corresponding to the monitoring script indicates correct display; on the contrary, if the characteristic content identification result is inconsistent with the preset characteristic content, it indicates that the display effect of the page at the front end is wrong, and it can be determined that the detection result corresponding to the monitoring script indicates wrong display, that is, the page is a problem page, and the detection result is an abnormal detection result.
According to the embodiment of the invention, the image recognition technology of artificial intelligence is combined with the automatic monitoring of the front-end page, so that the display effect correctness of the front-end page is monitored, and the monitoring efficiency and the monitoring accuracy are improved.
In step S209, a monitoring result corresponding to the service to be monitored is determined according to the detection result corresponding to the monitoring script.
Specifically, after the detection result corresponding to the monitoring script is obtained, the monitoring result for the service to be monitored can be determined according to the detection result corresponding to the monitoring script.
The monitoring result is a decision result determined by combining a preset decision policy on the basis of a detection result corresponding to the monitoring script, the preset decision policy may be set according to actual experience, for example, it may be determined whether to alarm or perform service processing according to a matching degree between a feature content recognition result and preset feature content when the detection result indicates an incorrect presentation, the service processing may include automatic replacement, repair, and offline monitoring of a problem page, for example, an alarm may be performed when the matching degree exceeds a preset matching degree threshold, a service processing may be performed when the matching degree does not exceed the preset matching degree threshold, and the preset matching degree threshold may be set according to an actual situation, such as 80%.
In practical applications, in a case that the monitoring configuration information includes a plurality of monitoring scripts, each monitoring script corresponds to target device information, so that the monitoring configuration information includes a plurality of target device information, and then it is possible that only a part of the target devices corresponding to the plurality of target device information have a current use state of a preset idle state, and the remaining target devices have a current use state of a non-preset idle state.
In order to determine a monitoring result according to a detection result of each monitoring script in time to improve monitoring efficiency and avoid causing delay in processing a problem page under the condition that the monitoring configuration information includes a plurality of monitoring scripts, in an exemplary embodiment, as shown in fig. 4, when determining a monitoring result corresponding to the service to be monitored according to a detection result corresponding to the monitoring script, the following steps may be included:
in step S401, the detection result corresponding to the monitoring script is stored in a database.
In step S403, the value of the target counter in the database is updated.
In step S405, it is determined whether the value of the target counter reaches the target value, and when the result of the determination is yes, step S407 is executed.
In step S407, a monitoring result corresponding to the service to be monitored is determined according to a detection result corresponding to each monitoring script in the multiple monitoring scripts.
The target counter is a counter corresponding to the monitoring scripts of the service to be monitored, and the target value is the number of the monitoring scripts. Updating the value of the target counter may be adding 1 on the basis of the current value. Specifically, when the judgment result is that the value of the target counter reaches the target value, it indicates that the execution of the plurality of monitoring scripts is completed, and at this time, the monitoring result corresponding to the service to be monitored can be determined according to the detection result corresponding to each monitoring script; on the contrary, if the result of the determination is that the value of the target counter does not reach the target value, it indicates that there are unexecuted monitoring scripts in the plurality of monitoring scripts, and it is necessary to continue to wait for the detection result corresponding to the unexecuted monitoring scripts.
In an exemplary embodiment, the database may be a key-value database (e.g., a Redis database), a plurality of monitoring scripts corresponding to the service to be monitored may be set as a group, a corresponding group identifier is set, a counter, i.e., a target counter (e.g., a Redis accumulator), is set for the key by using the group identifier, and the number of executed monitoring scripts in the corresponding group by using the group identifier is value. Therefore, when the detection result corresponding to the monitoring script in the plurality of monitoring scripts is stored in the database, the group identification of the group corresponding to the monitoring script can be obtained, the target counter corresponding to the key in the database is searched by taking the group identification as the key, and the value of the target counter is updated.
In an exemplary embodiment, the monitoring result corresponding to the service to be monitored, which is determined according to the detection result corresponding to each monitoring script, may be a decision result determined by combining a preset decision policy, where the preset decision policy may be set according to actual experience, for example, an alarm is performed when one detection result indicates error display, and service processing is performed when two or more detection results indicate error display, where the service processing may include automatic replacement, repair, and offline monitoring of a problem page.
After the detection result corresponding to the monitoring script is obtained, the detection result is stored in the database, the value of the target counter is updated, and then the step of determining the monitoring result according to the detection result corresponding to each monitoring script in the multiple monitoring scripts is executed when the value of the target counter reaches the target value, so that the monitoring result aiming at the service to be monitored can be determined in time, the monitoring efficiency is improved, and the delay of processing the problem page is avoided; in addition, the parallel monitoring of a plurality of services to be monitored can be realized, and the monitoring efficiency under the condition of concurrent monitoring is improved.
In an exemplary embodiment, as another monitoring method of a presentation page provided in fig. 5, in case that the monitoring result indicates an alarm, the method may further include:
in step S501, alarm information is generated.
In step S503, an alarm policy in the monitoring configuration information is obtained.
In this embodiment, the monitoring configuration information may further include an alarm policy, where the alarm policy may indicate a notification manner, a notification frequency, an alarm receiving party, and the like of the alarm information, where the notification manner may include, for example, a mail, a short message, and the like, and the notification frequency may be once per 1 minute notification or once per 5 minutes notification, and may be specifically set according to needs in actual applications.
In step S505, the alarm information is sent according to the alarm policy.
According to the embodiment of the disclosure, under the condition that the monitoring result indicates alarm, alarm information is generated and sent according to the alarm strategy in the monitoring configuration information, so that the relevant responsible node can be timely notified after the page abnormity is monitored.
With continued reference to fig. 5, in an exemplary embodiment, in a case that the monitoring result indicates a traffic process, the method may further include:
in step S507, an abnormality processing logic corresponding to the detection result of the abnormality is acquired.
In step S509, the exception handling logic is executed to eliminate the detection result of the exception.
The abnormal detection result is a detection result indicating error display in the detection result, and when the monitoring result indicates service processing, the abnormal processing logic corresponding to the abnormal detection result can be obtained, the abnormal processing logic is used for performing preset processing operation on a page corresponding to the abnormal detection result, the preset processing operation can include automatic replacement, repair, offline and the like, and in specific implementation, the abnormal processing logic can be compiled by service personnel according to the abnormal detection result.
According to the embodiment of the disclosure, under the condition that the monitoring result indicates the service processing, the abnormal processing logic corresponding to the abnormal detection result is obtained, and the abnormal processing logic is executed, so that the problem page can be processed in time under the condition that the problem page is found in time, and the loss caused by untimely processing is prevented.
It can be understood that the monitoring result may only indicate alarm or service processing, or may indicate service processing while indicating alarm, and may specifically be set in a preset decision policy according to actual needs.
In an exemplary embodiment, the detection result of each monitoring script corresponding to the service to be monitored can also be displayed in real time.
The embodiment of the disclosure obtains the monitoring configuration information for the service to be monitored, wherein the monitoring configuration information comprises the monitoring script and the target device information corresponding to the monitoring script, further determining the current use state of the target device corresponding to the target device information, and when the current use state of the target device is a preset idle state, intercepting a display page corresponding to a service to be monitored in target equipment by executing the monitoring script and detecting the characteristic content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script, and then, the monitoring result is determined according to the detection result corresponding to the monitoring script, so that the display effect of the display page corresponding to the front-end service to be monitored is automatically monitored, the front-end problem page can be found in time, the quick processing response is facilitated, and the loss caused by untimely processing of the problem page is avoided.
FIG. 6 is a block diagram illustrating a monitoring device that presents a page in accordance with an exemplary embodiment. Referring to fig. 6, the monitoring apparatus 600 for the presentation page includes:
a configuration information obtaining unit 610 configured to perform obtaining of monitoring configuration information for a service to be monitored, where the monitoring configuration information includes a monitoring script and target device information corresponding to the monitoring script;
a use state determination unit 620 configured to perform determining a current use state of a target device corresponding to the target device information;
a display page intercepting unit 630, configured to execute, when the current usage state of the target device is a preset idle state, intercepting, by executing the monitoring script, a display page corresponding to the service to be monitored in the target device;
the feature content detection unit 640 is configured to perform feature content detection on the intercepted page screenshot to obtain a detection result corresponding to the monitoring script; the characteristic content is the content which represents whether the display page corresponding to the service to be monitored is normal or not;
the monitoring result determining unit 650 is configured to execute determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to the monitoring script.
In an exemplary embodiment, the feature content detecting unit 640 includes:
the recognition unit is configured to execute calling of a preset image recognition algorithm, and perform recognition processing on feature content on the intercepted page screenshot through the preset image recognition algorithm to obtain a feature content recognition result;
and the matching unit is configured to execute the matching of the characteristic content identification result and preset characteristic content and determine the detection result corresponding to the monitoring script.
In an exemplary embodiment, in the case that the monitoring configuration information includes a plurality of monitoring scripts, the monitoring result determining unit 650 includes:
the detection result storage unit is configured to store the detection result corresponding to the monitoring script into a database;
a value updating unit configured to perform updating of a value of a target counter in the database;
a determination unit configured to perform a determination of whether or not the value of the target counter reaches a target value; the target value is the number of the monitoring scripts;
and the monitoring result determining subunit is configured to determine the monitoring result corresponding to the service to be monitored according to the detection result corresponding to each monitoring script in the plurality of monitoring scripts when the result judged by the judging unit is yes.
In an exemplary embodiment, the apparatus further comprises:
the first acquisition unit is configured to acquire a preset page interception range and the preset feature content; the preset page intercepting range is used for indicating the range for intercepting the display page corresponding to the service to be monitored;
a recognition algorithm determination unit configured to perform determination of the preset image recognition algorithm according to the preset feature content;
and the monitoring script generating unit is configured to execute the preset image recognition algorithm according to the preset page intercepting range, the preset feature content and the preset image, and generate the monitoring script.
In an exemplary embodiment, the apparatus further comprises:
the monitoring script storage unit is configured to store the monitoring script into a specified script storage space to obtain the address information of the monitoring script;
the equipment information acquisition unit is configured to execute acquisition of target equipment information corresponding to the monitoring script;
a service information obtaining unit configured to perform obtaining of service information indicating the service to be monitored;
and the configuration information generating unit is configured to execute the generation of the monitoring configuration information according to the service information, the address information of the monitoring script and the target device information corresponding to the monitoring script.
In an exemplary embodiment, in case that the monitoring result indicates an alarm, the apparatus further includes:
an alert information generation unit configured to perform generating alert information;
an alarm strategy obtaining unit configured to execute obtaining of an alarm strategy in the monitoring configuration information;
an alarm information sending unit configured to perform sending of the alarm information according to the alarm policy.
In an exemplary embodiment, in a case that the monitoring result indicates a service process, the apparatus further includes:
an exception handling logic acquiring unit configured to execute an exception handling logic acquiring a result of detection of an exception;
an execution unit configured to execute the exception handling logic to eliminate a detection result of the exception.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In an exemplary embodiment, there is also provided an electronic device, comprising a processor; a memory for storing processor-executable instructions; when the processor is configured to execute the instructions stored in the memory, the method for monitoring the display page provided in the embodiment of the present disclosure is implemented.
The electronic device may be a terminal, a server, or a similar computing device, taking the electronic device as a server as an example, fig. 7 is a block diagram of an electronic device for monitoring a front-end display page according to an exemplary embodiment, and as shown in fig. 7, the server 700 may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 710 (the processor 710 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 730 for storing data, and one or more storage media 720 (e.g., one or more mass storage devices) for storing an application 723 or data 722. Memory 730 and storage medium 720 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 720 may include one or more modules, each of which may include a series of instruction operations for the server. Still further, central processor 710 may be configured to communicate with storage medium 720 and execute a series of instruction operations in storage medium 720 on server 700. The server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input-output interfaces 740, and/or one or more operating systems 721, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The input/output interface 740 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 700. In one example, the input/output Interface 740 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the input/output interface 740 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 700 may also include more or fewer components than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as memory 730 comprising instructions, executable by processor 710 of apparatus 700 to perform the above-described method is also provided. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is further provided, which includes a computer program, and when the computer program is executed by a processor, the computer program implements any one of the monitoring methods for a presentation page provided in the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for monitoring a display page is characterized by comprising the following steps:
acquiring monitoring configuration information aiming at a service to be monitored, wherein the monitoring configuration information comprises a monitoring script and target equipment information corresponding to the monitoring script;
determining the current use state of the target equipment corresponding to the target equipment information;
when the current use state of the target equipment is a preset idle state, intercepting a display page corresponding to the service to be monitored in the target equipment by executing the monitoring script;
detecting the feature content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script; the characteristic content is the content which represents whether the display page corresponding to the service to be monitored is normal or not;
and determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to the monitoring script.
2. The method for monitoring the display page according to claim 1, wherein the detecting the feature content of the captured screenshot of the page and obtaining the detection result corresponding to the monitoring script comprises:
calling a preset image recognition algorithm, and carrying out feature content recognition processing on the intercepted page screenshot through the preset image recognition algorithm to obtain a feature content recognition result;
and determining a detection result corresponding to the monitoring script according to the matching condition of the characteristic content identification result and preset characteristic content.
3. The method for monitoring the display page according to claim 1 or 2, wherein, when the monitoring configuration information includes a plurality of monitoring scripts, the determining, according to the detection results corresponding to the monitoring scripts, the monitoring results corresponding to the service to be monitored includes:
storing the detection result corresponding to the monitoring script in a database;
updating the value of a target counter in the database;
judging whether the value of the target counter reaches a target value; the target value is the number of the monitoring scripts;
and when the judgment result is yes, determining a monitoring result corresponding to the service to be monitored according to the detection result corresponding to each monitoring script in the plurality of monitoring scripts.
4. The method for monitoring the display page of claim 2, wherein the method further comprises:
acquiring a preset page intercepting range and the preset characteristic content; the preset page intercepting range is used for indicating the range for intercepting the display page corresponding to the service to be monitored;
determining the preset image recognition algorithm according to the preset characteristic content;
and generating the monitoring script according to the preset page intercepting range, the preset characteristic content and the preset image recognition algorithm.
5. The method for monitoring a presentation page of claim 4, wherein after generating the monitoring script, the method further comprises:
storing the monitoring script to a specified script storage space to obtain the address information of the monitoring script;
acquiring target equipment information corresponding to the monitoring script;
acquiring service information indicating the service to be monitored;
and generating the monitoring configuration information according to the service information, the address information of the monitoring script and the target equipment information corresponding to the monitoring script.
6. The method for monitoring the display page according to claim 1, wherein in case that the monitoring result indicates an alarm, the method further comprises:
generating alarm information;
acquiring an alarm strategy in the monitoring configuration information;
and sending the alarm information according to the alarm strategy.
7. A monitoring device for a display page, comprising:
the system comprises a configuration information acquisition unit, a configuration information acquisition unit and a configuration information processing unit, wherein the configuration information acquisition unit is configured to execute the acquisition of monitoring configuration information aiming at a service to be monitored, and the monitoring configuration information comprises a monitoring script and target equipment information corresponding to the monitoring script;
a use state determination unit configured to perform determination of a current use state of a target device corresponding to the target device information;
the display page intercepting unit is configured to execute intercepting a display page corresponding to the service to be monitored in the target device by executing the monitoring script when the current use state of the target device is a preset idle state;
the characteristic content detection unit is configured to detect the characteristic content of the intercepted page screenshot to obtain a detection result corresponding to the monitoring script; the characteristic content is the content which represents whether the display page corresponding to the service to be monitored is normal or not;
and the monitoring result determining unit is configured to execute the detection result corresponding to the monitoring script and determine the monitoring result corresponding to the service to be monitored.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of monitoring a presentation page as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, whose instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of monitoring a presentation page as claimed in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements a method for monitoring a presentation page according to any one of claims 1 to 6.
CN202110850765.4A 2021-07-27 2021-07-27 Display page monitoring method and device, electronic equipment and storage medium Pending CN113672453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110850765.4A CN113672453A (en) 2021-07-27 2021-07-27 Display page monitoring method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110850765.4A CN113672453A (en) 2021-07-27 2021-07-27 Display page monitoring method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113672453A true CN113672453A (en) 2021-11-19

Family

ID=78540483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110850765.4A Pending CN113672453A (en) 2021-07-27 2021-07-27 Display page monitoring method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113672453A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168880A (en) * 2021-11-30 2022-03-11 北京达佳互联信息技术有限公司 Webpage state determination method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150331779A1 (en) * 2014-05-13 2015-11-19 Unisys Corporation Framework to accommodate test plan changes without affecting or interrupting test execution
CN109901968A (en) * 2019-01-31 2019-06-18 阿里巴巴集团控股有限公司 A kind of automation page data method of calibration and device
CN110032507A (en) * 2018-12-25 2019-07-19 阿里巴巴集团控股有限公司 Applied program testing method, device, system, electronic equipment and storage medium
CN111813687A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Test method, test device, control terminal, test equipment and storage medium
CN112306893A (en) * 2020-11-27 2021-02-02 平安普惠企业管理有限公司 UI page testing method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150331779A1 (en) * 2014-05-13 2015-11-19 Unisys Corporation Framework to accommodate test plan changes without affecting or interrupting test execution
CN110032507A (en) * 2018-12-25 2019-07-19 阿里巴巴集团控股有限公司 Applied program testing method, device, system, electronic equipment and storage medium
CN109901968A (en) * 2019-01-31 2019-06-18 阿里巴巴集团控股有限公司 A kind of automation page data method of calibration and device
CN111813687A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Test method, test device, control terminal, test equipment and storage medium
CN112306893A (en) * 2020-11-27 2021-02-02 平安普惠企业管理有限公司 UI page testing method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168880A (en) * 2021-11-30 2022-03-11 北京达佳互联信息技术有限公司 Webpage state determination method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109522287B (en) Monitoring method, system, equipment and medium for distributed file storage cluster
CN111143163B (en) Data monitoring method, device, computer equipment and storage medium
CN107169094B (en) Information aggregation method and device
CN111767173A (en) Network equipment data processing method and device, computer equipment and storage medium
CN109905292B (en) Terminal equipment identification method, system and storage medium
CN114077525A (en) Abnormal log processing method and device, terminal equipment, cloud server and system
CN112737800A (en) Service node fault positioning method, call chain generation method and server
CN112367345A (en) Data processing method, server device and computer readable storage medium
CN105553770B (en) Data acquisition control method and device
CN111221722B (en) Behavior detection method, behavior detection device, electronic equipment and storage medium
CN113672453A (en) Display page monitoring method and device, electronic equipment and storage medium
CN113672475B (en) Alarm processing method and device, computer equipment and storage medium
CN113746790B (en) Abnormal flow management method, electronic equipment and storage medium
CN114036360A (en) Web crawler intercepting method and device, electronic equipment and readable storage medium
CN114840408A (en) Application program performance analysis method, system, device and storage medium
CN113672894A (en) Data processing method, device and equipment for identifying code request and storage medium
CN106789335B (en) Method and system for processing information
CN110011845B (en) Log collection method and system
CN110224975B (en) APT information determination method and device, storage medium and electronic device
CN114327988B (en) Visual network fault relation determination method and device
CN113778709A (en) Interface calling method, device, server and storage medium
CN113553588A (en) Terminal software management method
CN110875856B (en) Method and apparatus for activation data anomaly detection and analysis
CN113254313A (en) Monitoring index abnormality detection method and device, electronic equipment and storage medium
CN112612679A (en) System running state monitoring method and device, computer equipment and storage 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