A web page anomaly detection method, system and medium

By calculating the color proportion and image processing of the web page, combining threshold and proportional judgment, the problem of a single method for detecting abnormal display in the web page in the existing technology is solved, real-time detection and feedback of various abnormal situations is realized, and user experience is improved. Maintainability of web pages.

CN113221050BActive Publication Date: 2024-12-03SUZHOU MODUO INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202110493554.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-07
Publication Date
2024-12-03
Estimated Expiration
2041-05-07

AI Technical Summary

Technical Problem

In the prior art, the detection method for web page display abnormality is too single, and it is impossible to effectively detect abnormality of multiple web page display, affecting the user experience.

Method used

By obtaining the resource locator and conversion format of the web page, calculating the color proportion, setting the image acquisition function and breakpoint, acquiring the image, and judging the web page display situation based on the threshold and proportion, dividing the image area to identify abnormal situations.

Benefits of technology

Real-time detection and feedback on web page exceptions is realized, the applicability and user experience of web pages are improved, and the maintenance difficulty of web page developers is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113221050B_ABST
    Figure CN113221050B_ABST
Patent Text Reader

Abstract

The present invention discloses a web page anomaly detection method, system and medium, the web page anomaly detection method comprising the following steps: obtaining a resource locator corresponding to a web page, setting a conversion format of the corresponding web page, and obtaining a first color ratio value based on the resource locator and the conversion format; setting an image acquisition function and a break point, obtaining a loading process of the web page, and obtaining a first image based on the image acquisition function, the break point and the loading process; setting a first threshold, obtaining a second color ratio value of the first image, and obtaining a web page display condition based on the first threshold, the second color ratio value and the first color ratio value; setting a second threshold and a division ratio, and judging a web page anomaly condition based on the web page display condition, the second threshold and the division ratio; the present invention can detect web page anomalies in real time, and accurately feedback the corresponding anomalies, thereby greatly improving the applicability of web pages and enhancing user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of web page display detection, and in particular to a web page anomaly detection method, system and medium. Background Art

[0002] In the prior art, the detection method for abnormal web page display is too simple. It can only detect whether a white screen appears on a web page, but cannot provide feedback for a variety of different abnormal web page display situations, which greatly affects the user experience. Summary of the invention

[0003] The present invention mainly solves the problem that the existing detection method for abnormal web page display is too single and cannot provide feedback for a variety of abnormal web page display situations, which greatly affects the user experience.

[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is: to provide a web page anomaly detection method, comprising the following steps:

[0005] Obtaining a resource locator corresponding to a webpage, setting a conversion format corresponding to the webpage, and obtaining a first color ratio value based on the resource locator and the conversion format;

[0006] Setting an image acquisition function and a break point, acquiring the loading process of the webpage, and acquiring a first image based on the image acquisition function, the break point and the loading process;

[0007] Setting a first threshold, obtaining a second color proportion value of the first image, and obtaining a webpage display condition based on the first threshold, the second color proportion value, and the first color proportion value;

[0008] A second threshold and a division ratio are set, and an abnormality of the web page is determined based on the web page display condition, the second threshold and the division ratio.

[0009] As an improved solution, the step of acquiring the first color proportion value based on the resource locator and the conversion format further includes:

[0010] The color identification information in the resource locator is extracted, and the color identification information is processed according to the conversion format to obtain the first color proportion value.

[0011] As an improved solution, the step of acquiring the first image based on the image acquisition function, the interruption point and the loading process further includes:

[0012] When the loading process reaches the interruption point, calling the image acquisition function to acquire the image data of the web page in the video memory;

[0013] The image acquisition function imports the image data into an image template to obtain the first image.

[0014] As an improved solution, the step of obtaining the second color proportion value of the first image further includes:

[0015] Identify a first size of the first image, obtain a size-pixel conversion formula, and convert the first size into a first pixel value based on the size-pixel conversion formula;

[0016] The first color value of the first pixel in the first image is counted, and the quotient of the first color value and the first pixel value is set as the second color proportion value.

[0017] As an improved solution, the step of obtaining the webpage display condition based on the first threshold, the second color proportion value and the first color proportion value further includes:

[0018] Calculating an absolute value of a difference between the first color proportion value and the second color proportion value, and comparing the absolute value with the first threshold value;

[0019] If the absolute value is greater than the first threshold, the web page display condition is abnormal;

[0020] If the absolute value is not greater than the first threshold, the web page display is normal.

[0021] As an improved solution, the step of determining the abnormality of the webpage based on the webpage display condition, the second threshold and the division ratio further includes:

[0022] When the webpage display condition is the display abnormality, dividing the first image into a plurality of second images based on the division ratio, and identifying a second size of the second image;

[0023] Setting a reference color, and counting second color values ​​of second pixels corresponding to the reference color in the second image;

[0024] Generate a black pixel ratio value based on the second size, the size-pixel conversion formula and the second color value;

[0025] The abnormal situation is determined based on the black pixel ratio and the second threshold.

[0026] As an improved solution, the step of judging the abnormal situation based on the black pixel ratio and the second threshold further includes:

[0027] When the black pixel ratio is greater than the second threshold, setting the second image corresponding to the black pixel ratio as an abnormal image, setting the coordinate range of the first image, and determining the abnormal situation based on the coordinate range and the abnormal image;

[0028] When the black pixel ratio is not greater than the second threshold, it is determined that the abnormal situation is that the webpage display exceeds the display device or the color block in the webpage area is abnormal.

[0029] As an improved solution, the step of judging the abnormal situation based on the coordinate range and the abnormal image further includes:

[0030] Obtaining a coordinate address of the abnormal image with respect to the first image;

[0031] If the coordinate address is within the coordinate range, it is determined that the abnormal situation is that the web page image is lost, the web page display is partially black, or the color block of the web page area is abnormal.

[0032] The present invention also provides a web page anomaly detection system, comprising:

[0033] Initial data acquisition module, image acquisition module, display situation acquisition module and abnormal situation judgment module;

[0034] The initial data acquisition module is used to acquire a resource locator corresponding to a webpage and set a conversion format for the webpage, and the initial data acquisition module acquires a first color ratio value based on the resource locator and the conversion format;

[0035] The image acquisition module is used to set an image acquisition function and a break point, and acquire the loading process of the webpage, and the image acquisition module acquires a first image based on the image acquisition function, the break point and the loading process;

[0036] The display condition acquisition module is used to set a first threshold value and acquire a second color proportion value of the first image, and the display condition acquisition module acquires the webpage display condition based on the first threshold value, the second color proportion value and the first color proportion value;

[0037] The abnormal situation judgment module is used to set a second threshold and a division ratio, and judge the abnormal situation of the web page based on the web page display situation, the second threshold and the division ratio.

[0038] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the web page anomaly detection method are implemented.

[0039] The beneficial effects of the present invention are:

[0040] 1. The web page anomaly detection method described in the present invention can realize real-time detection of web page anomalies through real-time capture of web page images and proportional division operations, and accurately feedback corresponding abnormal situations, which greatly improves the applicability of web pages and enhances user experience.

[0041] 2. The web page anomaly detection system described in the present invention can realize real-time capture of web page images and perform division operations in proportion through the mutual cooperation of the initial data acquisition module, the image acquisition module, the display situation acquisition module and the abnormal situation judgment module, thereby performing real-time detection of web page anomalies and accurately feeding back the corresponding abnormal situations, which greatly improves the applicability of the web page and enhances the user experience.

[0042] 3. The computer-readable storage medium described in the present invention can guide the initial data acquisition module, the image acquisition module, the display situation acquisition module and the abnormal situation judgment module to cooperate, thereby realizing real-time capture of web page images, and performing division operations according to proportion, thereby performing real-time detection of web page anomalies, and accurately feeding back corresponding abnormal situations, which greatly improves the applicability of web pages, enhances user experience, and effectively improves the operability of the web page anomaly detection method. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 is a flow chart of the web page anomaly detection method according to Embodiment 1 of the present invention;

[0045] Figure 2 It is an architecture diagram of the web page anomaly detection system described in Example 2 of the present invention. DETAILED DESCRIPTION

[0046] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0047] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0048] In the description of the present invention, it should be noted that the terms “first” and “second” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0049] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "resource locator", "conversion format", "color ratio value", "image acquisition function", "interruption point", "loading process", "web page display situation", "division ratio", "abnormal situation", "color identification information", "image data", "image template", "size pixel conversion formula", "black pixel ratio value", "web page display exceeds the display device", "web page area color block abnormality", "coordinate address", "abnormal image", "coordinate range", "web page image loss", "web page display part black screen", "initial data acquisition module", "image acquisition module", "display situation acquisition module", "abnormal situation judgment module" should be understood in a broad sense. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0050] In the description of the present invention, it should be noted that: getScreenShot is a screenshot code; URL is a uniform resource locator; WebView is a web page view; PC is a personal computer.

[0051] Example 1

[0052] This embodiment provides a web page anomaly detection method, such as Figure 1 As shown, the following steps are included:

[0053] First of all, it should be noted that the method described in this embodiment is in English and in a device that can load a web page; the device includes a mobile phone, a tablet computer, etc., a non-mobile processor or a server, etc.; correspondingly, in the prior art, whether a white screen appears on a web page can only be calculated based on the pixel matching degree of the current page. This method is too simple and cannot cope with a variety of abnormal web page display situations that may occur in a real-time network. Therefore, the method described in this embodiment starts from this perspective and solves the problems existing in the prior art. The steps are as follows:

[0054] S100, obtaining a resource locator corresponding to a webpage, setting a conversion format corresponding to the webpage, and obtaining a first color proportion value based on the resource locator and the conversion format;

[0055] Step S100 specifically includes:

[0056] S110, extract the color identification information in the resource locator, process the color identification information according to the conversion format, and obtain the first color proportion value; in this embodiment, it should be noted that the resource locator is the URL of the web page, and the conversion format is the established rules that match the web page; for example: usually the URL is displayed in the form of website information and color identification information. In this embodiment, the website information is https: / / www.juli.com, and the color identification information is color=R:1,B:2.5,W:7. When the two are displayed in the form of URL, they are connected by a question mark in the middle. Correspondingly, "R:1,B:2.5,W:7" is the color identification information in the resource locator of the web page. After conversion according to the established rules, the first color proportion value obtained is: RED:10,BLUE:25,WHITE:70, that is, red accounts for 10%, blue accounts for 25%, and white accounts for 70%; the above example is only used as an implementation method, and the specific established rules and color identification information need to be obtained according to the specific situation.

[0057] S200, setting an image acquisition function and a break point, acquiring the loading process of the webpage, and acquiring a first image based on the image acquisition function, the break point and the loading process;

[0058] Step S200 specifically includes:

[0059] S210, when the loading process reaches the interruption point, the image acquisition function is called to acquire the image data of the web page in the video memory; in the present embodiment, it should be noted that the loading process is a loading control of the mobile terminal in the device where the web page is located, for example, in an Android device, the loading process is a WebView process; in a PC device, the loading process is a running process of the operating kernel of the browser; correspondingly, considering that the web page loading speeds of different devices are different, it is necessary to set an interruption point to ensure that the web page loading is completed or finished; correspondingly, the interruption point is set according to the specific situation. In the present embodiment, in order to ensure the performance and efficiency of the entire process, the interval between the interruption point and the process does not exceed 3s, but is not limited.

[0060] S220, the image acquisition function imports the image data into the image template to obtain the first image; in the present embodiment, it should be noted that, for different devices, the corresponding image acquisition functions are different, and the principle is similar to screenshot. Correspondingly, if the application device is the above-mentioned Android device, the corresponding image data in the device video memory is accessed through the getScreenShot code provided by the Android control, and the data is imported into the template, then the corresponding screenshot, i.e., the first image, will be generated.

[0061] S300, setting a first threshold, obtaining a second color proportion value of the first image, and obtaining a webpage display condition based on the first threshold, the second color proportion value, and the first color proportion value;

[0062] Step S300 specifically includes:

[0063] S310, identifying a first size of the first image, obtaining a size pixel conversion formula, and converting the first size into a first pixel value based on the size pixel conversion formula; correspondingly, the size pixel conversion formula is to multiply a width dimension of the first size by a length dimension to obtain a corresponding first pixel value; for example, if the first size of the image is 1920*1080, the corresponding first pixel value is 2074600;

[0064] S320, counting the first color value of the first pixel in the first image, and setting the quotient of the first color value and the first pixel value as the second color proportion value; in this embodiment, extracting the first pixel in the first image, the first pixel is a plurality of pixels, and counting the corresponding color values ​​one by one according to the R\G\B color values; after obtaining the color value, dividing it by the pixel value corresponding to the color, the second color proportion value corresponding to the color can be obtained;

[0065] S330. Calculate the absolute value of the difference between the first color proportion value and the second color proportion value according to the corresponding color value, and compare the absolute value with the first threshold value; if the absolute value is greater than the first threshold value, generate the web page display as abnormal display; if the absolute value is not greater than the first threshold value, generate the web page display as normal display; correspondingly, in this embodiment, the first color proportion of the web page is determined in the case of a screenshot, and as long as the absolute value of the difference between the second color proportion and the first color proportion calculated subsequently is not within the threshold, the current web page must have a display abnormality, such as a large area of ​​color imbalance caused by a color block error, or only half of the web page is displayed, lacking the other half of the color proportion, or the web page exceeds the screen proportion, which is also an incomplete web page display, which will cause the second color proportion value to be less than the first color proportion value; the reason for considering the absolute value of the difference is to satisfy the situation where the second color proportion value is more or less.

[0066] S400: Setting a second threshold and a division ratio, and determining an abnormality of the web page based on the web page display condition, the second threshold and the division ratio.

[0067] Step S400 specifically includes:

[0068] S410, when the web page display condition is the display abnormality, the first image is divided into a plurality of second images based on the division ratio, and the second size of the second image is identified; a reference color is set, and second color values ​​of second pixels corresponding to the reference color in the second image are counted; a black pixel ratio value is generated based on the second size, the size-pixel conversion formula and the second color value; correspondingly, in this step, in order to specifically understand the display abnormality of the web page, the web page is divided into different parts according to a ratio, and correspondingly, the ratio is not limited; the calculation step of the above black pixel ratio value is the same as the calculation step of the second color ratio value in step S300, and will not be repeated here;

[0069] S420, correspondingly, when the black pixel ratio is greater than the second threshold, the second image corresponding to the black pixel ratio is set as an abnormal image; in this embodiment, the second threshold is 98%, and the second threshold is set according to specific circumstances; when the black pixel ratio is greater than the second threshold, it means that the black screen is unreasonable and is not within the allowable range of black pixels on the page;

[0070] S421, set the coordinate range of the first image, obtain the coordinate address of the abnormal image with respect to the first image; if the coordinate address is within the coordinate range, determine that the abnormal situation is the loss of the web page image, the black screen of the web page display part, or the abnormal color block of the web page area; correspondingly, the coordinate range of the first image is set according to the division ratio, for example, the top of the first image may have a first coordinate range, the middle of the first image may have a second coordinate range, and the bottom of the first image may have a third coordinate range; correspondingly, the abnormal image is part of the first image, so the coordinate address of the abnormal image with respect to the first image is analyzed. By comparing the coordinate address with the coordinate range, it is possible to know which part of the entire first image is black; for example, when the coordinate range is within the first coordinate range, it is determined that the top of the first image is not displayed, when the coordinate range is within the second coordinate range, it is determined that the middle of the first image is not displayed, and when the coordinate range is within the third coordinate range, it is determined that the bottom of the first image is not displayed; correspondingly, the above example is only used as an implementation method, so it is possible to determine whether a web page is partially black or half is not displayed based on the coordinate addresses and black pixel ratio values ​​of several second images; if the upper and lower parts of the web page are normal, but the middle part is abnormal, it may be that the color block in the web page area is abnormal;

[0071] S430. When the black pixel ratio is not greater than the second threshold, the abnormal situation is judged as the web page display exceeds the display device or the regional color block is abnormal; correspondingly, when the second color ratio is incorrect, the black pixel ratio meets the conditions, so it can be judged that the abnormal situation is beyond the display device or the regional color block is abnormal.

[0072] Correspondingly, a corresponding alarm signal is sent to the web page developer according to each different abnormal situation, and the first image of the abnormal situation is saved as a log file. Correspondingly, the user-side page can send a message to the user saying "Page abnormality, please try again later" or "Reload"; correspondingly, the above example is only used as an implementation method and is not limited here.

[0073] Through the web page anomaly detection method described in this embodiment, abnormal situations of web pages can be detected in real time. The method is diverse and can provide feedback on different abnormal situations, thereby improving the maintainability of the web page and making timely warnings, improving user experience, and reducing the maintenance difficulty for web page developers.

[0074] Example 2

[0075] This embodiment provides a web page anomaly detection system. Figure 2 As shown, it includes: an initial data acquisition module, an image acquisition module, a display situation acquisition module and an abnormal situation judgment module;

[0076] In the webpage anomaly detection system, the initial data acquisition module is used to acquire a resource locator corresponding to the webpage and set a conversion format for the webpage, and the initial data acquisition module acquires a first color proportion value based on the resource locator and the conversion format;

[0077] Specifically, the initial data acquisition module extracts the color identification information in the resource locator, processes the color identification information according to the conversion format, and obtains the first color proportion value.

[0078] In the webpage anomaly detection system, the image acquisition module is used to set an image acquisition function and a breakpoint, and acquire the loading process of the webpage, and the image acquisition module acquires the first image based on the loading process, the breakpoint and the image acquisition function;

[0079] Specifically, when the loading process reaches the interruption point, the image acquisition module calls the image acquisition function to acquire the image data of the web page in the video memory; the image acquisition module calls the image acquisition function to import the image data into the image template to obtain the first image;

[0080] In the webpage anomaly detection system, the display situation acquisition module is used to set a first threshold and acquire a second color proportion value of the first image, and the display situation acquisition module acquires the webpage display situation based on the second color proportion value, the first color proportion value and the first threshold;

[0081] Specifically, the display situation acquisition module identifies the first size of the first image and obtains a size-pixel conversion formula, and the display situation acquisition module converts the first size into a first pixel point value based on the size-pixel conversion formula; the display situation acquisition module counts the first color value of the first pixel point in the first image, and sets the quotient of the first color value and the first pixel point value as the second color proportion value; the display situation acquisition module calculates the absolute value of the difference between the first color proportion value and the second color proportion value according to the corresponding color value, and compares the absolute value with the first threshold value; if the absolute value is greater than the first threshold value, the display situation acquisition module generates the web page display condition as abnormal display; if the absolute value is not greater than the first threshold value, the display situation acquisition module generates the web page display condition as normal display.

[0082] In the web page anomaly detection system, the anomaly judgment module is used to set a second threshold and a division ratio, and judge the anomaly of the web page based on the web page display situation, the second threshold and the division ratio.

[0083] Specifically, when the web page display situation is the display abnormality, the abnormal situation judgment module divides the first image into several second images based on the division ratio, and identifies the second size of the second image; the abnormal situation judgment module sets a reference color, and counts the second color value of the second pixel corresponding to the reference color in the second image; the abnormal situation judgment module generates a black pixel ratio value based on the second size, the size-pixel conversion formula and the second color value; when the black pixel ratio value is greater than the second threshold, the abnormal situation judgment module sets the second image corresponding to the black pixel ratio value as an abnormal image; the abnormal situation judgment module sets the coordinate range of the first image, and obtains the coordinate address of the abnormal image with respect to the first image; if the coordinate address is within the coordinate range, the abnormal situation judgment module judges that the abnormal situation is that the web page image is lost, the web page displays a partially black screen, or the color block of the web page area is abnormal; when the black pixel ratio value is not greater than the second threshold, the abnormal situation judgment module judges that the abnormal situation is that the web page display exceeds the display device or the regional color block is abnormal.

[0084] The web page anomaly detection system described in this embodiment can perform real-time detection of abnormal situations on the web page through the cooperation of the initial data acquisition module, the image acquisition module, the display situation acquisition module and the abnormal situation judgment module. The system is diverse and can provide feedback on different abnormal situations, thereby improving the maintainability of the web page and making timely warnings, improving the user experience and reducing the maintenance difficulty for web page developers.

[0085] Example 3

[0086] This embodiment provides a computer-readable storage medium, including:

[0087] The storage medium is used to store computer software instructions used to implement the web page anomaly detection method described in the above-mentioned embodiment 1, which includes a program for executing the above-mentioned program set for the web page anomaly detection method; specifically, the executable program can be built into the web page anomaly detection system described in embodiment 2, so that the web page anomaly detection system can implement the web page anomaly detection method described in embodiment 1 by executing the built-in executable program.

[0088] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof.

[0089] Different from the prior art, the web page anomaly detection method, system and medium of the present application can capture web page images in real time through the method, and divide them according to the set ratio, so as to realize real-time detection of web page anomalies and accurately feedback the corresponding abnormal situations. The system provides effective technical support for the method, which ultimately greatly improves the applicability of the web page and enhances the user experience.

[0090] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0091] A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware. The program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0092] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A web page anomaly detection method, It is characterized in that The following steps are involved: Obtaining a resource locator corresponding to a webpage, setting a conversion format corresponding to the webpage, and obtaining a first color ratio value based on the resource locator and the conversion format; Setting an image acquisition function and a break point, acquiring the loading process of the webpage, and acquiring a first image based on the image acquisition function, the break point and the loading process; Setting a first threshold, obtaining a second color proportion value of the first image, and obtaining a webpage display condition based on the first threshold, the second color proportion value, and the first color proportion value; Setting a second threshold and a division ratio, and judging an abnormality of the webpage based on the webpage display situation, the second threshold and the division ratio; The step of obtaining the second color proportion value of the first image further includes: identifying a first size of the first image, obtaining a size-pixel conversion formula, and converting the first size into a first pixel value based on the size-pixel conversion formula; counting a first color value of a first pixel in the first image, and setting a quotient of the first color value and the first pixel value as the second color proportion value; The step of obtaining the web page display condition based on the first threshold, the second color proportion value and the first color proportion value further includes: calculating the absolute value of the difference between the first color proportion value and the second color proportion value, and comparing the absolute value with the first threshold; if the absolute value is greater than the first threshold, the web page display condition is abnormal; if the absolute value is not greater than the first threshold, the web page display condition is normal; The step of judging the abnormality of the webpage based on the webpage display condition, the second threshold and the division ratio further comprises: when the webpage display condition is the display abnormality, dividing the first image into a plurality of second images based on the division ratio, and identifying the second size of the second image; setting a reference color, and counting the second color value of the second pixel corresponding to the reference color in the second image; generating a black pixel ratio value based on the second size, the size-pixel conversion formula and the second color value; and judging the abnormality based on the black pixel ratio value and the second threshold; The step of judging the abnormal situation based on the black pixel ratio and the second threshold value further includes: when the black pixel ratio is greater than the second threshold value, setting the second image corresponding to the black pixel ratio as an abnormal image, setting the coordinate range of the first image, and judging the abnormal situation based on the coordinate range and the abnormal image; when the black pixel ratio is not greater than the second threshold value, judging the abnormal situation as a web page display exceeding the display device or a color block abnormality in the web page area.

2. The webpage anomaly detection method according to claim 1, It is characterized in that The step of acquiring the first color proportion value based on the resource locator and the conversion format further includes: The color identification information in the resource locator is extracted, and the color identification information is processed according to the conversion format to obtain the first color proportion value.

3. The webpage anomaly detection method according to claim 1, It is characterized in that The step of acquiring the first image based on the image acquisition function, the interruption point and the loading process further comprises: When the loading process reaches the interruption point, calling the image acquisition function to acquire the image data of the web page in the video memory; The image acquisition function imports the image data into an image template to obtain the first image.

4. The webpage anomaly detection method according to claim 1, It is characterized in that The step of judging the abnormal situation based on the coordinate range and the abnormal image further comprises: Obtaining a coordinate address of the abnormal image with respect to the first image; If the coordinate address is within the coordinate range, it is determined that the abnormal situation is that the web page image is lost, the web page display is partially black, or the color block of the web page area is abnormal.

5. A web page anomaly detection system, It is characterized in that include: Initial data acquisition module, image acquisition module, display situation acquisition module and abnormal situation judgment module; The initial data acquisition module is used to acquire a resource locator corresponding to a webpage and set a conversion format for the webpage, and the initial data acquisition module acquires a first color ratio value based on the resource locator and the conversion format; The image acquisition module is used to set an image acquisition function and a break point, and acquire the loading process of the webpage, and the image acquisition module acquires a first image based on the image acquisition function, the break point and the loading process; The display situation acquisition module is used to set a first threshold and acquire the second color proportion value of the first image. The display situation acquisition module acquires the webpage display situation based on the first threshold, the second color proportion value and the first color proportion value; the acquisition of the second color proportion value of the first image further includes: the display situation acquisition module identifies the first size of the first image, acquires the size pixel conversion formula, and converts the first size into a first pixel point value based on the size pixel conversion formula; the display situation acquisition module counts the first color value of the first pixel point in the first image, and sets the quotient of the first color value and the first pixel point value as the second color proportion value; the acquisition of the webpage display situation based on the first threshold, the second color proportion value and the first color proportion value further includes: the display situation acquisition module calculates the absolute value of the difference between the first color proportion value and the second color proportion value, and compares the absolute value with the first threshold; if the absolute value is greater than the first threshold, the webpage display situation is abnormal; if the absolute value is not greater than the first threshold, the webpage display situation is normal; The abnormal situation judgment module is used to set a second threshold and a division ratio, and judge the abnormal situation of the web page based on the web page display situation, the second threshold and the division ratio; the judging of the abnormal situation of the web page based on the web page display situation, the second threshold and the division ratio includes: when the web page display situation is the display abnormality, the abnormal situation judgment module divides the first image into a plurality of second images based on the division ratio, and identifies the second size of the second image; sets a reference color, and the abnormal situation judgment module counts the second color value of the second pixel corresponding to the reference color in the second image; the abnormal situation judgment module generates a black pixel ratio value based on the second size, the size-pixel conversion formula and the second color value; judges the abnormal situation based on the black pixel ratio value and the second threshold; when the black pixel ratio value is greater than the second threshold, the abnormal situation judgment module sets the second image corresponding to the black pixel ratio value as an abnormal image, sets the coordinate range of the first image, and judges the abnormal situation based on the coordinate range and the abnormal image; when the black pixel ratio value is not greater than the second threshold, the abnormal situation judgment module judges that the abnormal situation is that the web page display exceeds the display device or the web page area color block is abnormal.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the web page anomaly detection method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method for online live telecast of surveillance videos

    CN103533443A

  • Black screen identification methods, devices and server for monitoring lines

    CN109413411A

  • A method and device for determining a website page display state

    CN109885446A

  • Differential detection method and device for browser webpage and computer storage medium

    CN109949295A

  • Webpage interface white screen monitoring method and device

    CN110851350A