[go: up one dir, main page]

CN112000538B - Page content display monitoring method, device and equipment and readable storage medium - Google Patents

Page content display monitoring method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN112000538B
CN112000538B CN201910390158.7A CN201910390158A CN112000538B CN 112000538 B CN112000538 B CN 112000538B CN 201910390158 A CN201910390158 A CN 201910390158A CN 112000538 B CN112000538 B CN 112000538B
Authority
CN
China
Prior art keywords
page
pixels
monitoring
content
statistics
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.)
Active
Application number
CN201910390158.7A
Other languages
Chinese (zh)
Other versions
CN112000538A (en
Inventor
郝俊伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910390158.7A priority Critical patent/CN112000538B/en
Publication of CN112000538A publication Critical patent/CN112000538A/en
Application granted granted Critical
Publication of CN112000538B publication Critical patent/CN112000538B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a readable storage medium for monitoring page content display. The method comprises the following steps: acquiring an image of a content display area of a browsing page; calculating statistics of pixel values of pixels in an image of the content display area; and monitoring whether the page content is displayed normally or not according to the statistic of the pixel values of the pixels. The embodiment realizes monitoring by a computer vision method and does not depend on html labels; moreover, the display condition of the page is monitored by utilizing the difference of pixel value statistics when the page content is displayed normally and not displayed normally, so that the monitoring process is accurate and efficient.

Description

Page content display monitoring method, device and equipment and readable storage medium
Technical Field
The embodiment of the invention relates to a computer vision technology, in particular to a method, a device and equipment for monitoring page content display and a readable storage medium.
Background
With the development of terminal technology and software technology, various browsing pages provided by software are displayed on a terminal. At present, after a browsing page is opened on a terminal, a long or short time is often required to be waited for, so that normal browsing contents can be loaded and successfully displayed.
Aiming at the technical problem of how to monitor whether the browsed content is normally displayed, the method is mainly solved by selenium webdriver, phastomjs and other technologies at present. Wherein, the phantomJS can open the page and locate the html tag on the page; by monitoring whether an html tag exists or can be clicked, whether the page is displayed normally is monitored. selenium webdriver is also to monitor whether the page is displayed normally by locating the html tag and monitoring the click operation on the html tag.
The existing display monitoring method strongly depends on the html code writing mode of the website page, if the website is changed and upgraded, the monitoring code needs to be modified, so that the maintenance cost of the monitoring code is higher; in addition, the compatibility of different browsers to javascript and html pages is different, and a certain failure probability exists when the execution is performed; moreover, for the page realized by adopting the non-html tag, the display monitoring cannot be performed because the html tag cannot be acquired, and the universality cannot be realized.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for monitoring page content display and a readable storage medium, so that the display monitoring of the page content is accurately and efficiently realized without depending on html tags.
In a first aspect, an embodiment of the present invention provides a method for monitoring display of page content, including:
acquiring an image of a content display area of a browsing page;
calculating statistics of pixel values of pixels in an image of the content display area;
and monitoring whether the page content is displayed normally or not according to the statistic of the pixel values of the pixels.
In a second aspect, an embodiment of the present invention further provides a device for monitoring display of page content, including:
the acquisition module is used for acquiring an image of a content display area of the browsed page;
a calculation module for calculating statistics of pixel values of pixels in an image of the content display area;
and the monitoring module is used for monitoring whether the page content is normally displayed according to the statistic of the pixel values of the pixels.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for monitoring display of page content as described in any of the embodiments.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements the method for monitoring display of page content according to any embodiment.
In the embodiment of the invention, the image of the content display area of the browsed page is obtained, and whether the content of the page is normally displayed is monitored by analyzing the image, namely, monitoring is realized by a computer vision method, and the method does not depend on html labels, even the internal realization technology of the browsed page, so that the code maintenance cost is reduced, the failure probability is brought by different page compatibility is improved, and the method has universality; the statistics of the pixel values of each pixel are calculated in the image of the content display area, and whether the page content is normally displayed is monitored according to the statistics of the pixel values of each pixel, so that the display condition of the page is monitored by utilizing the difference of the statistics of the pixel values when the page content is normally displayed and not normally displayed, and the monitoring process is accurate and efficient.
Drawings
FIG. 1a is a flowchart of a method for monitoring display of page content according to an embodiment of the present invention;
FIG. 1b is a schematic diagram of a page display load icon according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of a browse page and content display area according to an embodiment of the present invention;
fig. 2a is a flowchart of a method for monitoring display of page content according to a second embodiment of the present invention;
fig. 2b is a mean distribution and standard deviation distribution of gray values of each pixel when the page provided in the second embodiment of the present invention is displayed normally;
fig. 2c is a mean distribution and standard deviation distribution of gray values of each pixel when the page provided in the second embodiment of the present invention is not normally displayed;
fig. 3 is a flowchart of a method for monitoring display of page content according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for monitoring display of page content according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1a is a flowchart of a method for monitoring display of page content according to an embodiment of the present invention, where the method is applicable to monitoring whether content on a browsed page is normally displayed after the browsed page is opened, and the method may be performed by a device for monitoring display of page content, where the device may be formed by hardware and/or software and is generally integrated in an electronic device, and specifically includes the following operations:
s110, acquiring an image of a content display area of the browsed page.
In this embodiment, the browse page may be a page provided by various software installed on the electronic device, including, but not limited to, a web page, a reader page of a reader, and a preview page. After the browsing page is opened, loading and displaying contents such as documents, pictures, videos and the like; however, if a network failure, a device failure or a software failure occurs, the format of the page content may not be displayed normally, a blank may be displayed, a word of "content not loaded" or "network disconnected" may be displayed, a messy code may be displayed, and only the loading icon as shown in fig. 1b may be displayed.
In order to monitor whether page content is normally displayed, firstly, an image of a content display area of a browsing page is acquired. Wherein, all or part of the browsed page is a content display area. As shown in fig. 1c, the upper part of the browsing page is a title bar and an operation bar, the left part of the browsing page is a catalog bar, and the lower right part of the browsing page is a content display area, which is represented by gray. Alternatively, an image of the content display area is taken or photographed.
S120, calculating statistics of pixel values of pixels in an image of a content display area.
In general, if the page content is displayed normally, the content display area will display more characters and/or pictures; if the page content is not displayed normally, the content display area will display fewer text and/or pictures, such as the "content unloaded" or "network disconnected" word described above and the load icon in FIG. 1 b.
Based on the above analysis, pixel values of each pixel in a color space including, but not limited to, RGB color space, YUV color space, and HSV color space are extracted. Then, the pixel values of the pixels in the color space are counted, for example, summed, averaged, standard deviation, etc., to obtain a statistic.
S130, monitoring whether page content is displayed normally or not according to statistics of pixel values of pixels.
Based on the analysis, the statistics can reflect the visual characteristics of the entirety of the image of the content display area. Based on the difference of visual characteristics between normal display and abnormal display of the page contents, whether the page contents are normally displayed or not is monitored according to statistics.
In an alternative embodiment, when a plurality of pages are normally displayed, counting a first range A-B of statistics; and counting a second range C-D of statistics when the pages are not normally displayed. If the statistic of the pixel values of the pixels obtained in the step S120 is in the first range A-B, the content of the page is measured to be displayed normally; if the statistics of the pixel values are within the second range C-D, the page content is determined to be not normally displayed.
In the embodiment of the invention, the image of the content display area of the browsed page is obtained, and whether the content of the page is normally displayed is monitored by analyzing the image, namely, monitoring is realized by a computer vision method, and the method does not depend on html labels, even the internal realization technology of the browsed page, so that the code maintenance cost is reduced, the failure probability is brought by different page compatibility is improved, and the method has universality; the statistics of the pixel values of each pixel are calculated in the image of the content display area, and whether the page content is normally displayed is monitored according to the statistics of the pixel values of each pixel, so that the display condition of the page is monitored by utilizing the difference of the statistics of the pixel values when the page content is normally displayed and not normally displayed, and the monitoring process is accurate and efficient.
Example two
The present embodiment is further optimized based on the optional implementation manners of the foregoing embodiments. Optionally, the "statistics of calculating the pixel values of the pixels in the image of the content display area" is thinned to "the statistics of calculating the gray values of the pixels in the image of the content display area, and/or the statistics of the color values of the pixels, the statistics including the average value and/or the standard deviation. The color value of each pixel is the color value of RGB three channels of each pixel. The color values of the RGB three channels of each pixel are input into the formula gray=r×0.299+g×0.587+b×0.114, to obtain the Gray value Gray.
Optionally, the statistics of the pixel values of each pixel are input into the monitoring model to obtain the monitoring result of whether the page content output by the monitoring model is normally displayed, so that the accuracy is improved through the monitoring model.
Fig. 2a is a flowchart of a method for monitoring the display of page content according to a second embodiment of the present invention, in which gray values are used as an example.
S210, acquiring an image of a content display area of a browsing page.
S220, calculating statistics of gray values of pixels in the image of the content display area, wherein the statistics comprise average values and/or standard deviations.
Fig. 2b is a mean distribution and standard deviation distribution of gray values of each pixel when the page provided in the second embodiment of the present invention is displayed normally, and fig. 2c is a mean distribution and standard deviation distribution of gray values of each pixel when the page provided in the second embodiment of the present invention is not displayed normally. The abscissa of fig. 2b and 2c is the number of the browsed page, and the ordinate is the numerical value. As can be seen, when the page is normally displayed, the average value distribution of gray values of each pixel is generally below 250, and the standard deviation is about 40; when the page is not normally displayed, the average distribution of gray values of each pixel is substantially 250 or more (actually, very close to 255), and the standard deviation is substantially 10 or less.
And training a monitoring model by utilizing the difference of the average value and/or the standard deviation of the gray values of each pixel when the page is displayed normally and not displayed normally, and obtaining a monitoring result of whether the page content is displayed normally by adopting the monitoring model.
Specifically, the first step: and constructing a monitoring model to be trained by adopting an extreme gradient lifting xgboost algorithm. And a second step of: and acquiring the average value and/or standard deviation of the gray values of all pixels in the positive sample image with normal page content display, and the average value and/or standard deviation of the gray values of all pixels in the negative sample image with abnormal page content display. And a third step of: and training a monitoring model according to the average value and/or standard deviation of the gray values of the pixels in the positive sample image and the average value and/or standard deviation of the gray values of the pixels in the negative sample image.
The xgboost algorithm is an efficient, flexible and portable machine learning library realized by using a gradient lifting framework, and the generation of the tree is completed in parallel, so that the learning speed is improved. The principles and advantages of the xgboost algorithm are referred to in the art and are not described in detail herein. The algorithm firstly gives a target loss function, and if the normal display of the page content is detected, a target value 1 is output; when the page content is not normally displayed, a target value 0 is output, and in the training process, the distance between the output value of the monitoring model and the target value or the square of the difference between the output value and the target value is determined as a target loss function. The model training process finds the monitoring model so that the objective loss function is minimized.
In one test, 1133 positive sample images and negative sample images are adopted for training, and the training accuracy of the model reaches 99% due to the xgboost algorithm, which is superior to that of the traditional neural network model. The accuracy is 93% in the scene of monitoring 10 ten thousand documents, and the single document monitoring processing time is only 10 seconds, so the monitoring model is considered to have a certain practical application value.
S230, inputting the average value and/or the standard deviation of the gray values of the pixels into the monitoring model to obtain a monitoring result of whether the page content output by the monitoring model is normally displayed.
The average value and/or standard deviation of the gray values of the pixels in one image can be input into the monitoring model by adopting the monitoring model constructed by the xgboost algorithm to obtain a monitoring result, and the average value and/or standard deviation of the gray values of the pixels in a plurality of images can be simultaneously input into the monitoring model to obtain the monitoring result, namely the monitoring model constructed by adopting the xgboost algorithm supports single-point processing and batch processing.
In the embodiment, the average value and/or standard deviation of the gray values of each pixel are input into the monitoring model to obtain the monitoring result of whether the page content output by the monitoring model is normally displayed, so that the difference between the average value and the standard deviation of the gray values when the page content is normally displayed and not normally displayed is utilized, the display condition of the page is monitored by combining with the monitoring model, and the accuracy of the monitoring process is improved; by adopting the xgboost algorithm to construct the monitoring model, the accuracy and the monitoring efficiency are greatly improved.
Example III
Fig. 3 is a flowchart of a method for monitoring display of page content according to a third embodiment of the present invention. The embodiment of the invention performs operation optimization based on the technical scheme of each embodiment. Further, the operation of acquiring the image of the content display area of the browsing page is thinned to intercept screenshot of the browsing page within a preset time period after the browsing page is opened; and cutting the image' of the content display area from the screenshot according to the display position of the content display area in the browsed page, so as to timely and online monitor the display condition of the page content. With reference to fig. 3, the method provided in this embodiment specifically includes the following operations:
s310, capturing a screenshot of the browsed page within a preset time period after the browsed page is opened.
In an alternative embodiment, the browse page is displayed in a browser. For a document, the reader of the document needs to be embedded inside the browser, so that the browsed page of the document will be displayed in the browser. Then, intercepting a window screenshot of the browser within a preset time period after the browsing page is opened. For example, in chrome webdriver headless mode of selenium webdriver, the browser only needs to run in the background to complete the screenshot, which is typically the entire window of the browser, covering substantially all of the page content perceived by the first screen's human eye.
In another alternative embodiment, the viewed page is not displayed in the browser, and for the document, the reader of the document runs independently on the operating system, without browser support, so that the viewed page of the document is not displayed in the browser. Then, within a preset time period after the browsing page is opened, a screenshot tool such as screenshot, shootme can be adopted, or a screenshot function of the system can be called by codes to intercept the screenshot of the browsing page.
In the two embodiments, the preset duration may be set to 1 second, 2 seconds or 3 seconds, so that in a scene of opening the browsed page to monitor content display, the display condition of the browsed page is monitored in time, so that a page with abnormal display can be found in time.
S320, cutting out the image of the content display area from the screenshot according to the display position of the content display area in the browsing page.
The display location includes, but is not limited to, the distance of the content display area from the top or bottom of the page, the distance to the left or right of the page, the length, width, area, etc. of the content display area.
Optionally, an image of the content display area is cropped from the screenshot using an imageMagic tool. Further, the image is scaled to save computational resource consumption and improve monitoring efficiency.
S330, calculating statistics of pixel values of pixels in the image of the content display area.
S340, according to statistics of pixel values of the pixels, whether page content is normally displayed is monitored.
In the embodiment, the screenshot of the browsed page is intercepted and monitored within the preset time after the browsed page is opened, so that the display monitoring of the page content is timely and online; by intercepting window screenshot of the browser, the application scene is expanded to a browsing page compatible with the browser, and the method has certain universality.
Example IV
Fig. 4 is a schematic structural diagram of a display monitoring device for page content according to a fourth embodiment of the present invention, where the embodiment of the present invention is suitable for monitoring whether content on a browsed page is normally displayed after the browsed page is opened, and in conjunction with fig. 4, the display monitoring device for page content includes: an acquisition module 410, a calculation module 420, and a monitoring module 430.
An acquisition module 410, configured to acquire an image of a content display area of a browsing page;
a calculation module 420 for calculating statistics of pixel values of pixels in an image of the content display area;
the monitoring module 430 is configured to monitor whether the page content is displayed normally according to the statistics of the pixel values of the pixels.
In the embodiment of the invention, the image of the content display area of the browsed page is obtained, and whether the content of the page is normally displayed is monitored by analyzing the image, namely, monitoring is realized by a computer vision method, and the method does not depend on html labels, even the internal realization technology of the browsed page, so that the code maintenance cost is reduced, the failure probability is brought by different page compatibility is improved, and the method has universality; the statistics of the pixel values of each pixel are calculated in the image of the content display area, and whether the page content is normally displayed is monitored according to the statistics of the pixel values of each pixel, so that the display condition of the page is monitored by utilizing the difference of the statistics of the pixel values when the page content is normally displayed and not normally displayed, and the monitoring process is accurate and efficient.
Optionally, the monitoring module 430 is specifically configured to, when monitoring whether the page content is displayed normally according to the statistics of the pixel values of the pixels: if the statistic of the pixel values of the pixels is in a first range, determining that the page content is normally displayed; if the statistic of the pixel values of the pixels is in the second range, determining that the page content is not normally displayed; the first range is obtained by counting statistics of the plurality of pages in normal display, and the second range is obtained by counting statistics of the plurality of pages in abnormal display.
Optionally, the calculating module 420 is specifically configured to, when calculating statistics of pixel values of pixels in an image of a content display area: calculating statistics of gray values of pixels and/or statistics of color values of pixels in an image of a content display area; the statistics include mean and/or standard deviation.
Optionally, the monitoring module 430 is specifically configured to, when monitoring whether the page content is displayed normally according to the statistics of the pixel values of the pixels: and (3) inputting the average value and/or standard deviation of the gray values of the pixels into the monitoring model to obtain a monitoring result of whether the page content output by the monitoring model is normally displayed.
Optionally, the device further comprises a training module, wherein the training module is used for constructing a monitoring model to be trained by adopting an extreme gradient lifting xgboost algorithm before the average value and/or standard deviation of the gray values of the pixels are input into the monitoring model to obtain a monitoring result of whether the page content output by the monitoring model is normally displayed; acquiring an average value and/or a standard deviation of gray values of pixels in a positive sample image with normal page content display, and an average value and/or a standard deviation of gray values of pixels in a negative sample image with abnormal page content display; and training a monitoring model according to the average value and/or standard deviation of the gray values of the pixels in the positive sample image and the average value and/or standard deviation of the gray values of the pixels in the negative sample image.
Optionally, the acquiring module 410 is specifically configured to, when acquiring an image of a content display area of a browsing page: capturing a screenshot of the browsed page within a preset time period after the browsed page is opened; and cutting out the image of the content display area from the screenshot according to the display position of the content display area in the browsing page.
Optionally, the obtaining module 410 is specifically configured to, when capturing a screenshot of a browsing page within a preset duration after the browsing page is opened: intercepting a window screenshot of a browser within a preset time period after a browsing page is opened; wherein the browse page is displayed in the browser.
The device for displaying and monitoring the page content provided by the embodiment of the invention can execute the method for displaying and monitoring the page content provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 5, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that can be accessed by the electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, camera, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, to implement the display monitoring method of page contents provided by the embodiment of the present invention.
Example six
The sixth embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the display monitoring method of page content of any of the embodiments.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A method for monitoring the display of page content, comprising:
acquiring an image of a content display area of a browsing page;
calculating statistics of pixel values of pixels in an image of the content display area; wherein the statistics of the pixel values of the pixels comprises statistics of gray values of the pixels and statistics of color values of the pixels;
according to the statistic of the pixel values of the pixels, monitoring whether the page content is normally displayed or not comprises the following steps:
constructing a monitoring model to be trained by adopting an extreme gradient lifting xgboost algorithm;
acquiring an average value and/or a standard deviation of gray values of pixels in a positive sample image with normal page content display, and an average value and/or a standard deviation of gray values of pixels in a negative sample image with abnormal page content display;
training the monitoring model according to the average value and/or standard deviation of the gray values of all pixels in the positive sample image and the average value and/or standard deviation of the gray values of all pixels in the negative sample image;
and inputting the average value and/or standard deviation of the gray values of the pixels into the monitoring model to obtain a monitoring result of whether the page content output by the monitoring model is normally displayed.
2. The method of claim 1, wherein calculating statistics of pixel values of pixels in the image of the content display area comprises:
calculating statistics of gray values of the pixels and/or statistics of color values of the pixels in an image of the content display area;
the statistics include mean and/or standard deviation.
3. The method of claim 1, wherein the monitoring whether the page content is displayed normally based on the statistics of the pixel values of the pixels, further comprises:
if the statistic of the pixel values of the pixels is in a first range, determining that the page content is normally displayed;
if the statistic of the pixel values of the pixels is in a second range, determining that the page content is not normally displayed;
the first range is obtained by counting statistics of a plurality of pages in normal display, and the second range is obtained by counting statistics of a plurality of pages in abnormal display.
4. A method according to any one of claims 1 to 3, wherein the acquiring an image of a content display area of a browsed page comprises:
capturing a screenshot of the browsed page within a preset time period after the browsed page is opened;
and cutting out the image of the content display area from the screenshot according to the display position of the content display area in the browsing page.
5. The method of claim 4, wherein intercepting the screenshot of the browsed page within a preset time period after the browsed page is opened comprises:
intercepting a window screenshot of a browser within a preset time period after a browsing page is opened;
wherein the browsing page is displayed in the browser.
6. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the display content of the browsing page comprises a document;
the non-normal display of the page content includes a format of the page content being non-normal displayed.
7. A display monitor device for page content, comprising:
the acquisition module is used for acquiring an image of a content display area of the browsed page;
a calculation module for calculating statistics of pixel values of pixels in an image of the content display area; wherein the statistics of the pixel values of the pixels comprises statistics of gray values of the pixels and statistics of color values of the pixels;
the monitoring module is used for monitoring whether the page content is normally displayed according to the statistic of the pixel values of the pixels;
the training module is used for constructing a monitoring model to be trained by adopting an extreme gradient lifting xgboost algorithm; acquiring an average value and/or a standard deviation of gray values of pixels in a positive sample image with normal page content display, and an average value and/or a standard deviation of gray values of pixels in a negative sample image with abnormal page content display; training the monitoring model according to the average value and/or standard deviation of the gray values of all pixels in the positive sample image and the average value and/or standard deviation of the gray values of all pixels in the negative sample image;
the monitoring module is specifically configured to input an average value and/or a standard deviation of the gray values of the pixels into the monitoring model, so as to obtain a monitoring result that whether the page content output by the monitoring model is displayed normally.
8. An electronic device, the electronic device comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of display monitoring of page content as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements a method for monitoring the display of page content according to any one of claims 1-6.
CN201910390158.7A 2019-05-10 2019-05-10 Page content display monitoring method, device and equipment and readable storage medium Active CN112000538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910390158.7A CN112000538B (en) 2019-05-10 2019-05-10 Page content display monitoring method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910390158.7A CN112000538B (en) 2019-05-10 2019-05-10 Page content display monitoring method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112000538A CN112000538A (en) 2020-11-27
CN112000538B true CN112000538B (en) 2023-09-15

Family

ID=73461184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910390158.7A Active CN112000538B (en) 2019-05-10 2019-05-10 Page content display monitoring method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112000538B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679487A (en) * 2012-09-05 2014-03-26 阿里巴巴集团控股有限公司 Advertisement display monitoring method and device
CN105979092A (en) * 2016-05-13 2016-09-28 腾讯科技(深圳)有限公司 Abnormity monitoring method and device
CN106874926A (en) * 2016-08-04 2017-06-20 阿里巴巴集团控股有限公司 Service exception detection method and device based on characteristics of image
CN108121648A (en) * 2016-11-29 2018-06-05 北京京东尚科信息技术有限公司 A kind of interface error monitoring method
CN108305240A (en) * 2017-05-22 2018-07-20 腾讯科技(深圳)有限公司 Picture quality detection method and device
CN108733336A (en) * 2018-05-21 2018-11-02 北京字节跳动网络技术有限公司 page display method and device
CN108875649A (en) * 2018-06-22 2018-11-23 北京佳格天地科技有限公司 A kind of terrain classification method, system, equipment and storage medium
CN109086711A (en) * 2018-07-27 2018-12-25 华南理工大学 Facial Feature Analysis method, apparatus, computer equipment and storage medium
CN109299415A (en) * 2018-09-30 2019-02-01 百度在线网络技术(北京)有限公司 H5 page method of calibration and device
CN109600345A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 Abnormal data flow rate testing methods and device
CN109657221A (en) * 2018-12-13 2019-04-19 北京金山数字娱乐科技有限公司 A kind of document segment sort method, collator, electronic equipment and storage medium
CN109710348A (en) * 2018-11-14 2019-05-03 深圳壹账通智能科技有限公司 The method and device of page jump, computer equipment, storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530851A (en) * 2013-09-13 2016-04-27 奥林巴斯株式会社 Image processing device, method, and program
US10140548B2 (en) * 2014-08-15 2018-11-27 Lenovo (Singapore) Pte. Ltd. Statistical noise analysis for motion detection

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679487A (en) * 2012-09-05 2014-03-26 阿里巴巴集团控股有限公司 Advertisement display monitoring method and device
CN105979092A (en) * 2016-05-13 2016-09-28 腾讯科技(深圳)有限公司 Abnormity monitoring method and device
CN106874926A (en) * 2016-08-04 2017-06-20 阿里巴巴集团控股有限公司 Service exception detection method and device based on characteristics of image
CN108121648A (en) * 2016-11-29 2018-06-05 北京京东尚科信息技术有限公司 A kind of interface error monitoring method
CN108305240A (en) * 2017-05-22 2018-07-20 腾讯科技(深圳)有限公司 Picture quality detection method and device
CN109600345A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 Abnormal data flow rate testing methods and device
CN108733336A (en) * 2018-05-21 2018-11-02 北京字节跳动网络技术有限公司 page display method and device
CN108875649A (en) * 2018-06-22 2018-11-23 北京佳格天地科技有限公司 A kind of terrain classification method, system, equipment and storage medium
CN109086711A (en) * 2018-07-27 2018-12-25 华南理工大学 Facial Feature Analysis method, apparatus, computer equipment and storage medium
CN109299415A (en) * 2018-09-30 2019-02-01 百度在线网络技术(北京)有限公司 H5 page method of calibration and device
CN109710348A (en) * 2018-11-14 2019-05-03 深圳壹账通智能科技有限公司 The method and device of page jump, computer equipment, storage medium
CN109657221A (en) * 2018-12-13 2019-04-19 北京金山数字娱乐科技有限公司 A kind of document segment sort method, collator, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
嵌入式动态图像监测系统设计与实现;谢发荣;张力;陈宇星;;微处理机(第01期);第69-72页 *

Also Published As

Publication number Publication date
CN112000538A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
US9519661B2 (en) Method and system for updating a background picture of a web search results page for different search queries
US20200394414A1 (en) Keyframe scheduling method and apparatus, electronic device, program and medium
US9495334B2 (en) Visualizing content referenced in an electronic document
US20130238433A1 (en) Method and system for providing relevant advertisements by monitoring scroll-speeds
WO2022105507A1 (en) Text recording video definition measurement method and apparatus, computer device and storage medium
US12288193B2 (en) Systems and methods for facilitating candidate interviews
US8700992B1 (en) Method for determining position and dimensions of webpage elements by wireframe injection
CN114299366A (en) Image detection method and device, electronic equipment and storage medium
CN113641933A (en) Abnormal webpage identification method, abnormal site identification method and device
CN113255516A (en) Living body detection method and device and electronic equipment
CN115952020A (en) Page abnormity detection method, medium, device and computing equipment
CN113780163B (en) Page loading time detection method and device, electronic equipment and medium
CN113807416B (en) Model training method and device, electronic equipment and storage medium
EP3564833B1 (en) Method and device for identifying main picture in web page
CN112000538B (en) Page content display monitoring method, device and equipment and readable storage medium
WO2025007919A1 (en) Data detection method and apparatus, computer, storage medium, and program product
CN112559340A (en) Picture testing method, device, equipment and storage medium
US20130339354A1 (en) Method and system for mining trends around trending terms
CN117009701A (en) Front-end page detection method and device, electronic equipment and medium
CN111914850A (en) Picture feature extraction method, device, server and medium
CN115756461A (en) Annotation template generation method, image identification method and device and electronic equipment
CN116363656A (en) Image recognition method and device containing multiple lines of text and computer equipment
CN114067145A (en) Passive spectroscope detection method, device, equipment and medium
CN114595758A (en) Flame detection method, device, equipment and storage medium
CN113392624A (en) Sensitive vocabulary labeling method and device, electronic equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant