CN111858303A - Method, device, equipment and medium for controlling page of applet - Google Patents

Method, device, equipment and medium for controlling page of applet Download PDF

Info

Publication number
CN111858303A
CN111858303A CN202010508117.6A CN202010508117A CN111858303A CN 111858303 A CN111858303 A CN 111858303A CN 202010508117 A CN202010508117 A CN 202010508117A CN 111858303 A CN111858303 A CN 111858303A
Authority
CN
China
Prior art keywords
page
image
determining
white
image area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010508117.6A
Other languages
Chinese (zh)
Other versions
CN111858303B (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 CN202010508117.6A priority Critical patent/CN111858303B/en
Publication of CN111858303A publication Critical patent/CN111858303A/en
Application granted granted Critical
Publication of CN111858303B publication Critical patent/CN111858303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a page control method, device, equipment and medium of an applet, and relates to the technical field of artificial intelligence and applet control. The specific implementation scheme is as follows: in the process of managing and controlling the page of the applet, for the page in the applet, determining whether the page is a white screen by combining a page image of the page, and when the page is determined to be the white screen, obtaining the times of the white screen of the page, and if the times of the white screen of the page is determined to exceed a preset time threshold, deleting the page address of the page from a page address white list of the applet, so that the page with the frequently-occurring white screen condition in the applet is timely deleted by combining the white screen condition of the page in the applet, thereby realizing intelligent management and control on the white screen condition of the page of the applet, further reducing the condition of the white screen of the applet when a user uses the applet, and reducing the white screen ratio of the applet.

Description

Method, device, equipment and medium for controlling page of applet
Technical Field
The application relates to the technical field of computers, in particular to the technical field of artificial intelligence and applet control, and particularly relates to a method, a device, equipment and a medium for controlling a page of an applet.
Background
As applications become more widely used, applets are beginning to be more and more applied and used. An applet may be embedded into an application, which is a program provided by a third party developer that embeds its own services into the application.
At present, the abnormal display condition easily occurs on the page of the applet, and the use of the user is influenced, so how to manage and control the page of the applet is very important for improving the user experience.
Disclosure of Invention
The application provides a page control method, device and equipment of an applet and a storage medium.
According to an aspect of the present application, there is provided a page control method of an applet, including: acquiring a page image of a page to be detected in an applet; determining the page to be detected as a white screen according to the page image; acquiring the number of times of white screen of the page to be detected; and if the times exceed a preset times threshold, deleting the page address of the page from a page address white list of the applet.
According to another aspect of the present application, there is provided a page control apparatus of an applet, including: the first acquisition module is used for acquiring a page image of a page to be detected in the applet; the determining module is used for determining that the page to be detected is a white screen according to the page image; the second acquisition module is used for acquiring the times of white screen of the page to be detected; and the processing module is used for deleting the page address of the page from the page address white list of the small program if the times exceed a preset times threshold.
According to another aspect of the present application, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the page control method of the applet of the present application.
According to another aspect of the present application, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a page control method of an applet of an electronic device disclosed in an embodiment of the present application.
One embodiment in the above application has the following advantages or benefits: the page with the white screen condition frequently appearing in the applet is deleted in time by combining the white screen condition of the page in the applet, so that intelligent management and control over the white screen condition of the applet are realized, the condition that the white screen appears in the applet when the applet is used by a user can be further reduced, and the white screen rate of the applet is reduced. Because the method determines whether the page is a white screen or not by combining the page image of the page for the page in the applet and acquires the number of times of the white screen of the page when the page is determined to be the white screen, if the number of times of white screen of the page is determined to exceed the preset number threshold, deleting the page address of the page from the page address white list of the applet, therefore, the technical problems that the user experience is influenced by abnormal conditions of the pages of the applet in the related technology are solved, by combining the white screen condition of the page in the small program in the process of controlling the page of the small program, the page which often has the white screen condition in the small program is deleted in time, thereby achieving the intelligent control of the white screen condition of the page of the small program, and furthermore, the condition that the screen of the small program is white when the user uses the small program can be reduced, and the technical effect of reducing the screen-white rate of the small program is achieved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present application;
FIG. 2 is a schematic diagram according to a second embodiment of the present application;
FIG. 3 is a schematic illustration according to a third embodiment of the present application;
FIG. 4 is a schematic illustration according to a fourth embodiment of the present application;
FIG. 5 is a schematic illustration according to a fifth embodiment of the present application;
FIG. 6 is a schematic illustration according to a sixth embodiment of the present application;
FIG. 7 is a schematic illustration according to a seventh embodiment of the present application;
fig. 8 is a block diagram of an electronic device for implementing the page control method of the applet according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the related art, in the process of using the applet, if the white screen condition of the page of the applet frequently occurs, the user experience is affected. Therefore, how to manage the page white screen condition in the applet is very important for improving the use experience of the user on the applet.
In order to solve the technical problem, the page of the applet is managed and controlled, specifically, for the page in the applet, when the page is determined to be a white screen by combining a page image of the page, the number of times of the white screen of the page is obtained, and if the number of times of the white screen of the page is determined to exceed a preset number threshold, the page address of the page is deleted from a page address white list of the applet, so that the page does not exist in the applet any more, the condition that the page is white screen in the applet is reduced, the white screen rate of the applet is reduced, and the user experience is improved.
A page control method, device, apparatus, and medium of an applet according to an embodiment of the present application are described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram according to a first embodiment of the present application.
As shown in fig. 1, the page control method of the applet may include:
step 101, acquiring a page image of a page to be detected in an applet.
The main execution body of the applet page control method in this embodiment is an applet page control device, the applet page control device may be implemented in a software and/or hardware manner, and may be integrated inside an electronic device, and the applet page control device in this embodiment is used to communicate with an applet and further manage the applet.
In the present embodiment, the electronic device may be any hardware device having a data processing function.
Specifically, when the page of the applet is controlled, the page control device of the applet may obtain a page image of a page to be detected in the applet, where the page to be detected in this embodiment may be any page provided by the applet.
The page image of the page to be detected in this embodiment may be obtained by performing technical means such as screen capture and screen capture software on the page to be detected.
In an embodiment of the application, in order to improve the accuracy of the acquired page image of the page to be detected, the page image of the page to be detected may be obtained by performing screen capture on a page window corresponding to the page to be detected after receiving a display request for the page to be detected.
Specifically, after receiving a display request for a page to be detected, the applet correspondingly creates a page window corresponding to the page to be detected, and loads page data of the page to be detected in the page window. Therefore, in this embodiment, a page image obtaining program may be set in the applet, and after receiving the display request for the page to be detected, the page image obtaining program may obtain a page window list of the applet, obtain a page window corresponding to the page to be detected through the page window list, obtain the page image of the page to be detected by performing screen capture on the page window, and transmit the page image of the page to be detected to the page control device of the applet, so that the page control device of the applet may obtain the page image of the page to be detected. Therefore, the page control device of the small program can accurately acquire the page image, and the problem that the page image obtained by screenshot is inaccurate due to the reason of a popup window or a prompt box and the like in the process of directly screenshot the screen of the small program, so that the white screen detection accuracy is influenced is avoided.
And 102, determining the page to be detected as a white screen according to the page image.
In some embodiments of the application, after the page image of the page to be detected is obtained, the page to be detected may be determined to be a white screen according to the page image in a variety of ways, for example, the page image may be input into a white screen detection model trained in advance, so as to determine whether the page to be detected is a white screen through the white screen detection model.
Other ways of determining that the page to be detected is a white screen with respect to the page image will be described in the following embodiments.
And 103, acquiring the white screen times of the page to be detected.
And 104, if the times exceed a preset time threshold, deleting the page address of the page from the page address white list of the applet.
The preset number threshold is a preset critical value of the page white screen number, and if the fact that the white screen number of a certain page in the small program exceeds the critical value is detected, in order to reduce the small program white screen number, the page address with the white screen number exceeding the critical value can be deleted from a small program page address white list.
The page address white list stores the page addresses of the pages which are allowed to be accessed by the user. It can be understood that, in the process of accessing the page of the applet by the user, if the page address of the applet page accessed by the user is not in the page address white list of the applet, the user is denied access to the corresponding page, and at this time, the user may be prompted that the page does not exist or that the page is offline.
According to the page control method of the small program, in the process of controlling the page of the small program, whether the page is a white screen is determined by combining the page image of the page for the page in the small program, the number of times of the white screen of the page is obtained when the page is determined to be the white screen, and if the number of times of the white screen of the page is determined to exceed a preset number threshold, the page address of the page is deleted from a page address white list of the small program, so that the page with the white screen frequently occurring in the small program is deleted in time by combining the white screen condition of the page in the small program, the intelligent control of the white screen condition of the page of the small program is realized, the white screen condition of the small program when a user uses the small program can be reduced, and the white screen ratio of the small program is reduced.
It will be appreciated that the content of a page is typically in the center portion of the page, and thus, in determining whether a page is white, to improve the efficiency of determining whether a page is white, it may be determined whether a page is white in conjunction with the center portion image in the page image. In order to make the present application clearly understood by those skilled in the art, the specific process of determining the page to be detected as a white screen according to the page image in this embodiment is further described below with reference to fig. 2.
Fig. 2 is a schematic diagram according to a second embodiment of the present application.
As shown in fig. 2, step 102 may include:
step 201, determining the center position of the page image according to the page image.
Step 202, forming an image area in the page image by taking the central position as a center, wherein the size of the image area is smaller than that of the page image.
In some embodiments, a circular image area may be formed by centering on the center position of the page image, wherein the radius of the circular image area is the preset radius R.
In some embodiments, a square image area may be formed by taking the central position as the center, wherein the central point of the square image area coincides with the central position, that is, the central point of the square image area is the central position of the page image.
Step 203, determining the page to be detected as a white screen according to the image area.
In some embodiments, the image area may be input into a white screen detection model trained in advance to determine whether the page to be detected is a white screen through the white screen detection model, and specifically, whether the page to be detected is a white screen may be determined according to an output result of the white screen detection model.
In some embodiments, according to the image area, the specific implementation manner of determining that the page to be detected is a white screen may be: and if the pixel points in the image area are all white pixel points according to the color values of the pixel points in the image area, determining that the page to be detected is a white screen. Therefore, whether the pixels in the image area are all white pixels is judged by combining the color values of the pixels in the image area, and whether the page to be detected is a white screen is accurately determined according to the judgment result.
The method includes the steps that for each pixel point in the image area, the pixel points in the image area can be traversed according to a preset traversal sequence, whether the current pixel point is a white pixel point or not can be determined when the current pixel point is traversed, and if the current pixel point is not the white pixel point, the image area can be rapidly determined to be a non-white screen. If the current pixel point is a white pixel point, the next pixel point of the current pixel point can be continuously traversed based on the traversal sequence. And if the last pixel point is traversed and the last pixel point is determined to be a white pixel point, determining that the image area is a white screen, and further determining that the page to be detected is the white screen.
In an embodiment of this application, in practical application, may cause the colour value of pixel because of the reason of equipment to have certain error, in order to reduce the influence that this colour value error caused to judging whether the page that awaits measuring is white screen, in this embodiment, according to the colour value of pixel in the image area, confirm that the pixel in the image area is the concrete implementation mode of white pixel and can be for: aiming at each pixel point in the image area, comparing the color value of the pixel point with the color value of the white pixel point; and if the difference between the color value of the pixel point and the color value of the white pixel point is smaller than a preset difference threshold, determining the pixel point as the white pixel point. Therefore, the influence on the white screen detection result caused by certain error of the color value of the pixel point due to equipment reasons can be avoided.
In order to further improve the accuracy of determining whether the page to be detected is a white screen, in one implementation of the present application, if it is determined that the pixel points in the image region are all white pixel points according to the color values of the pixel points in the image region, the specific implementation manner of determining that the page to be detected is a white screen may be: if the pixel points in the image area are determined to be white pixel points according to the color values of the pixel points in the image area, determining the proportion of the white pixel points in other image areas according to the color values of the pixel points in other image areas in the page image, wherein the other image areas are areas except the image area in the page image. And if the proportion of the white pixel points in the other image areas exceeds a preset first proportion threshold value, determining that the page to be detected is a white screen.
The first proportion threshold is a preset proportion threshold, for example, the first proportion threshold is 80%, and for a page image of the page to be detected, if it is determined that all pixel points in an image region determined based on the center position are white pixel points, and it is determined that the proportion of the white pixel points in other image regions in the page image exceeds 80%, it is determined that the page to be detected is a white screen.
In the embodiment, in the process of determining whether the page to be detected is a white screen, after white pixel points are determined in all image regions, the conditions of the pixel points of other image regions except the image region in the page image are further analyzed, and when the proportion of the white pixel points in the other image regions is determined to exceed a first proportion threshold value, the page to be detected is determined to be the white screen, so that whether the page to be detected is the white screen is determined by combining the whole image of the page image, and the accuracy of determining whether the page to be detected is the white screen is further improved.
In order to make the present application clear to those skilled in the art, the following description is made in conjunction with one possible specific implementation form for determining whether a page is white based on a central portion image of a page image.
Specifically, after the page image of the page to be detected is obtained, the page image may be divided into N preset numbers (for example, N is 5) along the horizontal direction or the vertical direction to obtain N image regions, and among the N divided image regions, an image region including a center point of the page image is selected, and the selected image region is used as a target image region.
And then, for each pixel point in the target image area, comparing the color value of each pixel point with the color value of a white pixel point, if the difference degree between the two is smaller than a preset difference degree, determining that the corresponding pixel point is a white pixel point, continuing to detect the pixel points of other image areas except the target image area, and if the proportion of the white pixel points in the other image areas is detected to exceed a preset proportion threshold value, determining that the page to be detected is a white screen.
The other image areas in this embodiment are areas other than the target image area in the page image.
Specifically, the color values of the pixels include four RGBA dimensions, when the corresponding pixels and the white pixels are compared, the color values of the two pixels in each dimension can be compared respectively, and if the difference value between the color values of the two pixels in each dimension is less than 1, the corresponding pixels are determined to be the white pixels.
For example, the color value of a pixel is shown in table 1:
TABLE 1 color value corresponding to a pixel point
R 255
G 221
B 227
A 178
Color values corresponding to the white pixels are shown in table 2;
TABLE 2 color values corresponding to white pixels
R 255
G 255
B 255
A 255
By comparing the RGBA sequence of the pixel point and the white pixel point, it can be seen that the difference between the color values of the two pixel points in the GBA dimension is greater than the preset difference (for example, the preset difference is 1), which indicates that the color difference is too large, and at this time, it can be determined that the pixel point is not the white pixel point.
In an embodiment of the present application, in order to improve the efficiency of determining whether a page to be detected is a white screen in combination with a page image, the page image may be divided into a plurality of image areas, and a determination may be made according to whether the image area is a pure color image area, and whether the page image is a white screen may be quickly determined in combination with a situation of the pure color image area in the page image, which is further described below with reference to fig. 3.
Fig. 3 is a schematic diagram according to a second embodiment of the present application. As shown in fig. 3, step 102 may include:
step 301, dividing the page image into a plurality of image areas.
Step 302, determining the number of the pure color image areas in the plurality of image areas according to the color values of the pixel points in each image area.
The pure color image area is the same color of the pixel points in the corresponding image area.
In this embodiment, the specific implementation manner for determining the number of the pure color image regions in the plurality of image regions according to the color value of the pixel point in each image region may be: for each image area, if the color values of all pixel points in the image area are the same, determining that the image area is a pure color image area, and determining the number of the pure color image areas in the plurality of image areas. Therefore, whether the color value of each pixel point in each image area is the same or not is combined, and whether the corresponding image area is a pure color image area or not is accurately determined.
Step 303, determining the proportion of the solid color image areas in the plurality of image areas according to the number of the solid color image areas.
And 304, if the proportion of the pure color image area exceeds a preset second proportion threshold value, determining that the page to be detected is a white screen.
The second proportional threshold may be a proportional value default to the system, and may be a proportional value preset according to service needs, for example, the second preset proportional threshold may be 0.6, 0.8, or 0.5, and a value of the second proportional threshold is not specifically limited in this embodiment.
For example, the second ratio threshold is 0.5, after the page image is divided into the plurality of image areas, if it is determined that the colors of the pure color image areas are all white and the proportion of the pure color image areas exceeds 0.5 in the plurality of image areas, it is determined that no content exists in the page image, and at this time, it is determined that the page to be detected corresponding to the page image is a white screen.
In the embodiment, in the process of determining whether the page to be detected is a white screen by combining the page image, the page image is divided into a plurality of image areas, and is judged according to whether the image areas are pure color image areas, and whether the page image is the white screen is rapidly determined by combining the proportion condition of the pure color image areas in the page image, so that the efficiency of determining whether the page to be detected is the white screen is improved.
In an embodiment of the present application, in order to improve efficiency of determining whether the corresponding image area is a pure color image area or a non-pure color image area (or referred to as a mixed color image area), a specific implementation manner of determining whether the image area is a pure color image area in an embodiment of the present application may include, as shown in fig. 4:
step 401, sequentially traversing each pixel point in the image region according to a preset traversal order, and comparing the color value of the pixel point with the color value of the next adjacent pixel point for the traversed pixel point.
Step 402, if the color value of the pixel point is the same as the color value of the next adjacent pixel point, continuously traversing the pixel points in the image area according to the traversal sequence.
In step 403, if the last pixel point of the image region is traversed according to the traversal order, the image region is determined to be a pure color image region.
It can be understood that, in the present embodiment, the color corresponding to the solid-color image area is white.
Step 404, if the color value of the pixel point is different from the color value of the next adjacent pixel point, ending the traversal, and determining that the image area is a non-solid image area.
In this embodiment, in the process of determining whether the corresponding image area is a solid image area, according to a preset traversal order, pixels in the image area are traversed one by one, and whether the image area is a solid color is determined by comparing color values of the traversed pixel point and a next pixel point corresponding to the traversed pixel point with color values of the next pixel point, if the color values of the corresponding pixel point and the next pixel point corresponding to the corresponding pixel point are the same, the pixel point continues to be traversed based on the traversal order, if the last pixel point of the image area is traversed according to the traversal order, the image area is determined to be a solid image area, if the color values of the pixel point are different from the color values of the next pixel point adjacent to the pixel point, the traversal is ended, and the image area is determined to be a non-solid. Therefore, the efficiency of determining whether the corresponding image area is a pure color image area or a mixed color area can be improved, and the efficiency of determining whether the page image is a white screen can be improved. …
In order to implement the foregoing embodiments, an embodiment of the present application further provides a page control device for an applet.
Fig. 5 is a schematic diagram according to a fifth embodiment of the present application.
As shown in fig. 5, the page control apparatus 1 of the applet may include a first obtaining module 10, a determining module 20, a second obtaining module 30, and a processing module 40, wherein:
the first obtaining module 10 is configured to obtain a page image of a page to be detected in an applet.
And the determining module 20 is configured to determine that the page to be detected is a white screen according to the page image.
And the second obtaining module 30 is configured to obtain the number of times of white screen of the page to be detected.
And the processing module 40 is used for deleting the page address of the page from the page address white list of the applet if the times exceed a preset time threshold.
It should be noted that the above explanation of the embodiment of the page control method for an applet is also applicable to the page control apparatus for an applet in this embodiment, and is not repeated here.
The page control device of the small program in the embodiment of the application determines whether the page is a white screen or not by combining the page image of the page for the page in the small program in the process of controlling the page of the small program, acquires the times of the white screen of the page when the page is determined to be the white screen, deletes the page address of the page from the page address white list of the small program if the times of the white screen of the page is determined to exceed a preset time threshold value, thereby deleting the page frequently appearing in the white screen condition in the small program in time by combining the white screen condition of the page in the small program, realizing intelligent control on the white screen condition of the page of the small program, further reducing the white screen condition of the small program when a user uses the small program, and reducing the white screen ratio of the small program.
In an embodiment of the present application, on the basis of the above-mentioned apparatus embodiment shown in fig. 5, as shown in fig. 6, the determining module 20 may include:
the first determining sub-module 210 is configured to determine a center position of the page image according to the page image.
The area forming sub-module 220 is configured to form an image area in the page image with the center position as a center, wherein the size of the image area is smaller than the size of the page image.
And the second determining submodule 230 is configured to determine that the page to be detected is a white screen according to the image area.
In one embodiment of the present application, as shown in fig. 6, the second determining submodule 230 may include:
the first determining unit 231 is configured to determine that the page to be detected is a white screen if it is determined that the pixel points in the image region are all white pixel points according to the color values of the pixel points in the image region.
In one embodiment of the present application, as shown in fig. 6, the first determining unit 231 may include:
the first determining subunit 2311 is configured to determine, if it is determined that the pixel points in the image region are all white pixel points according to color values of the pixel points in the image region, proportions of the white pixel points in other image regions according to color values of the pixel points in other image regions in the page image, where the other image regions are regions other than the image region in the page image.
The second determining subunit 2312 is configured to determine that the page to be detected is a white screen if the proportion of the white pixel points in the other image regions exceeds a preset first proportion threshold.
In an embodiment of the application, the first determining subunit 2311 is specifically configured to: and aiming at each pixel point in the image area, comparing the color value of the pixel point with the color value of the white pixel point. And if the difference between the color value of the pixel point and the color value of the white pixel point is smaller than a preset difference threshold, determining the pixel point as the white pixel point.
In an embodiment of the present application, on the basis of the embodiment of the apparatus shown in fig. 5, as shown in fig. 7, the determining module 20 may include:
a dividing sub-module 240 for dividing the page image into a plurality of image areas.
The third determining submodule 250 is configured to determine, according to the color value of the pixel point in each image region, the number of the pure color image regions in the plurality of image regions.
The fourth determining sub-module 260 is configured to determine a proportion of the monochrome image regions of the plurality of image regions according to the number of the monochrome image regions.
And a fifth determining sub-module 270, configured to determine that the page to be detected is a white screen if the proportion of the pure color image area exceeds a preset second proportion threshold.
In one embodiment of the present application, as shown in fig. 7, the third determination submodule 250 may include:
the second determining unit 251 is configured to, for each image region, determine that the image region is a pure color image region if color values of all pixel points in the image region are the same.
A third determining unit 252 for determining the number of the image areas of the plurality of image areas that are solid color image areas.
In an embodiment of the present application, the second determining unit 252 may include:
the first processing subunit 2521 is configured to sequentially traverse each pixel point in the image region according to a preset traversal order, and compare a color value of the pixel point with a color value of a next pixel point adjacent to the pixel point.
The second processing subunit 2522 is configured to, if the color value of the pixel is the same as the color value of the next pixel adjacent to the pixel, continue traversing the pixels in the image region according to the traversal order.
A third determining subunit 2523, configured to determine that the image area is a solid image area if the last pixel point of the image area is traversed according to the traversal order.
A fourth determining subunit 2524, configured to, if the color value of the pixel is different from the color value of the next adjacent pixel, end traversal, and determine that the image area is a non-solid image area.
In the embodiment of the application, in the process of determining whether the corresponding image area is a pure color image area, pixels in the image area are traversed one by one according to a preset traversal sequence, whether the image area is pure color is determined by comparing the traversed pixel point with the color value of the next pixel point corresponding to the traversed pixel point, if the color value of the corresponding pixel point is the same as that of the next pixel point corresponding to the corresponding pixel point, the pixel points are continuously traversed based on the traversal sequence, if the last pixel point of the image area is traversed according to the traversal sequence, the image area is determined to be the pure color image area, if the color value of the pixel point is different from that of the next pixel point adjacent to the pixel point, the traversal is finished, and the image area is determined to be the non-pure color image area. Therefore, the efficiency of determining whether the corresponding image area is a pure color image area or a mixed color area can be improved, and the efficiency of determining whether the page image is a white screen can be improved.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 8, the electronic device is a block diagram of an electronic device of a page control method of an applet according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 8, the electronic apparatus includes: one or more processors 801, memory 802, and interfaces for connecting the various components, including a high speed interface and a low speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 8 illustrates an example of a processor 801.
The memory 802 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by the at least one processor, so that the at least one processor executes the page control method of the applet provided by the application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute a page control method of an applet provided in the present application.
The memory 802, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first obtaining module 10, the determining module 20, the second obtaining module 30, and the processing module 40 shown in fig. 5) corresponding to the page control method of the applet in the embodiment of the present application. The processor 801 executes various functional applications of the server and data processing, i.e., implements the page control method of the applet in the above-described method embodiment, by running the non-transitory software program, instructions, and modules stored in the memory 802.
The memory 802 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device controlled by the page of the applet, and the like. Further, the memory 802 may include high speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 802 may optionally include memory located remotely from the processor 801, which may be connected to the applet's page controlled electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method of page control of an applet may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803, and the output device 804 may be connected by a bus or other means, and are exemplified by a bus in fig. 8.
The input device 803 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the page-controlled electronic device of the applet, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick or other input device. The output devices 804 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, in the process of managing and controlling the page of the small program, whether the page is a white screen is determined by combining the page image of the page for the page in the small program, the number of times of the white screen of the page is obtained when the page is determined to be the white screen, and if the number of times of the white screen of the page is determined to exceed a preset number threshold, the page address of the page is deleted from the page address white list of the small program, so that the page with the white screen condition frequently occurring in the small program is deleted in time by combining the white screen condition of the page in the small program, the intelligent management and control of the white screen condition of the page of the small program is realized, the white screen condition of the small program when a user uses the small program can be reduced, and the white screen ratio of the small program is reduced.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (18)

1. A page control method of an applet includes:
acquiring a page image of a page to be detected in an applet;
determining the page to be detected as a white screen according to the page image;
acquiring the number of times of white screen of the page to be detected;
and if the times exceed a preset times threshold, deleting the page address of the page from a page address white list of the applet.
2. The method according to claim 1, wherein the determining that the page to be detected is a white screen according to the page image comprises:
Determining the central position of the page image according to the page image;
forming an image area in the page image by taking the central position as a center, wherein the size of the image area is smaller than that of the page image;
and determining the page to be detected as a white screen according to the image area.
3. The method according to claim 1, wherein the determining that the page to be detected is a white screen according to the image area comprises:
and if the pixel points in the image area are all white pixel points according to the color values of the pixel points in the image area, determining that the page to be detected is a white screen.
4. The method of claim 3, wherein if it is determined that the pixel points in the image region are all white pixel points according to the color values of the pixel points in the image region, determining that the page to be detected is a white screen comprises:
if the pixel points in the image area are determined to be white pixel points according to the color values of the pixel points in the image area, determining the proportion of the white pixel points in other image areas according to the color values of the pixel points in other image areas in the page image, wherein the other image areas are areas except the image area in the page image;
And if the proportion of the white pixel points in the other image areas exceeds a preset first proportion threshold value, determining that the page to be detected is a white screen.
5. The method of claim 1, wherein the determining that the pixels in the image region are all white pixels according to the color values of the pixels in the image region comprises:
aiming at each pixel point in the image area, comparing the color value of the pixel point with the color value of a white pixel point;
and if the difference between the color value of the pixel point and the color value of the white pixel point is smaller than a preset difference threshold, determining that the pixel point is the white pixel point.
6. The method according to claim 1, wherein the determining that the page to be detected is a white screen according to the page image comprises:
dividing the page image into a plurality of image areas;
determining the number of pure-color image areas in the plurality of image areas according to the color values of the pixel points in each image area;
determining the proportion of the pure color image areas in the plurality of image areas according to the number of the pure color image areas;
and if the proportion of the pure color image area exceeds a preset second proportion threshold value, determining that the page to be detected is a white screen.
7. The method of claim 6, wherein the determining the number of the image regions that are solid color image regions according to the color values of the pixel points in each image region comprises:
for each image area, if the color values of all pixel points in the image area are the same, determining that the image area is a pure color image area;
determining the number of the plurality of image areas that are solid color image areas.
8. The method of claim 7, wherein the determining that the image region is the solid image region if the color values of all the pixels in the image region are the same comprises:
sequentially traversing each pixel point in the image area according to a preset traversal sequence, and comparing the color value of the pixel point with the color value of the next adjacent pixel point for the traversed pixel point;
if the color value of the pixel point is the same as the color value of the next adjacent pixel point, continuously traversing the pixel points in the image area according to the traversal sequence;
if the last pixel point of the image area is traversed according to the traversal sequence, determining that the image area is a pure-color image area;
And if the color value of the pixel point is different from the color value of the next adjacent pixel point, ending traversal, and determining the image area as a non-pure-color image area.
9. A page control apparatus of an applet, comprising:
the first acquisition module is used for acquiring a page image of a page to be detected in the applet;
the determining module is used for determining that the page to be detected is a white screen according to the page image;
the second acquisition module is used for acquiring the times of white screen of the page to be detected;
and the processing module is used for deleting the page address of the page from the page address white list of the small program if the times exceed a preset times threshold.
10. The apparatus of claim 9, wherein the means for determining comprises:
the first determining submodule is used for determining the central position of the page image according to the page image;
the area forming submodule is used for forming an image area in the page image by taking the central position as a center, wherein the size of the image area is smaller than that of the page image;
and the second determining submodule is used for determining the page to be detected as a white screen according to the image area.
11. The apparatus of claim 9, wherein the second determination submodule comprises:
and the first determining unit is used for determining that the page to be detected is a white screen if the pixels in the image area are all white pixels according to the color values of the pixels in the image area.
12. The apparatus of claim 11, wherein the first determining unit comprises:
the first determining subunit is configured to determine, if it is determined that the pixels in the image region are all white pixels according to the color values of the pixels in the image region, the proportion of the white pixels in other image regions according to the color values of the pixels in the other image regions in the page image, where the other image regions are regions other than the image region in the page image;
and the second determining subunit is configured to determine that the page to be detected is a white screen if the proportion of the white pixel points in the other image regions exceeds a preset first proportion threshold.
13. The apparatus according to claim 9, wherein the first determining subunit is specifically configured to:
aiming at each pixel point in the image area, comparing the color value of the pixel point with the color value of a white pixel point;
And if the difference between the color value of the pixel point and the color value of the white pixel point is smaller than a preset difference threshold, determining that the pixel point is the white pixel point.
14. The apparatus of claim 9, wherein the means for determining comprises:
the dividing submodule is used for dividing the page image into a plurality of image areas;
the third determining submodule is used for determining the number of the pure-color image areas in the image areas according to the color values of the pixel points in each image area;
a fourth determining submodule, configured to determine, according to the number of the pure color image areas, a proportion of the pure color image areas in the plurality of image areas;
and the fifth determining submodule is used for determining that the page to be detected is a white screen if the proportion of the pure-color image area exceeds a preset second proportion threshold.
15. The apparatus of claim 14, wherein the third determination submodule comprises:
the second determining unit is used for determining that the image area is a pure color image area if the color values of all pixel points in the image area are the same for each image area;
a third determining unit configured to determine the number of the image areas that are solid color image areas among the plurality of image areas.
16. The apparatus of claim 15, wherein the second determining unit comprises:
the first processing subunit is used for sequentially traversing each pixel point in the image area according to a preset traversal sequence, and comparing the color value of the traversed pixel point with the color value of the next adjacent pixel point;
the second processing subunit is used for continuously traversing the pixel points in the image area according to the traversal order if the color value of the pixel point is the same as the color value of the next adjacent pixel point;
a third determining subunit, configured to determine that the image region is a pure color image region if a last pixel point of the image region is traversed according to the traversal order;
and the fourth determining subunit is configured to, if the color value of the pixel is different from the color value of the next adjacent pixel, end traversal, and determine that the image area is a non-solid image area.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202010508117.6A 2020-06-05 2020-06-05 Page control method, device, equipment and medium for applet Active CN111858303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010508117.6A CN111858303B (en) 2020-06-05 2020-06-05 Page control method, device, equipment and medium for applet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010508117.6A CN111858303B (en) 2020-06-05 2020-06-05 Page control method, device, equipment and medium for applet

Publications (2)

Publication Number Publication Date
CN111858303A true CN111858303A (en) 2020-10-30
CN111858303B CN111858303B (en) 2023-12-01

Family

ID=72986112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010508117.6A Active CN111858303B (en) 2020-06-05 2020-06-05 Page control method, device, equipment and medium for applet

Country Status (1)

Country Link
CN (1) CN111858303B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610580A (en) * 2022-03-17 2022-06-10 北京火山引擎科技有限公司 Page white screen monitoring method, device, equipment and medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6011537A (en) * 1997-01-27 2000-01-04 Slotznick; Benjamin System for delivering and simultaneously displaying primary and secondary information, and for displaying only the secondary information during interstitial space
CN105760301A (en) * 2016-02-24 2016-07-13 惠州Tcl移动通信有限公司 Automatic testing method and system based on Monkey command
CN105786513A (en) * 2016-02-29 2016-07-20 四川长虹电器股份有限公司 Mixed mobile application development method based on Html5
CN106919377A (en) * 2016-07-05 2017-07-04 阿里巴巴集团控股有限公司 Determine application program displaying interface whether be white screen method and device
CN107231434A (en) * 2017-07-10 2017-10-03 北京小米移动软件有限公司 The control method and device of terminal device
CN107741869A (en) * 2017-11-20 2018-02-27 青岛海信移动通信技术股份有限公司 The startup method, apparatus and terminal device of application program
CN108196904A (en) * 2017-12-27 2018-06-22 广州品唯软件有限公司 Calculate the method, apparatus and computer storage media of page response duration
CN109033302A (en) * 2018-07-16 2018-12-18 深圳鼎盛电脑科技有限公司 A kind of method for page jump, device, terminal and storage medium
CN109766242A (en) * 2018-12-29 2019-05-17 云智慧(北京)科技有限公司 Monitoring method, device and system based on mobile user side and storage medium
CN110187931A (en) * 2019-05-17 2019-08-30 北京百度网讯科技有限公司 The operation method and device of small routine
CN110851294A (en) * 2019-10-10 2020-02-28 上海上湖信息技术有限公司 Method and device for remedying program operation breakdown
CN110928555A (en) * 2019-11-21 2020-03-27 广州品唯软件有限公司 Gray scale release control method and device, computer equipment and storage medium
CN111026462A (en) * 2019-12-10 2020-04-17 百度在线网络技术(北京)有限公司 Applet control method, apparatus, device and medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6011537A (en) * 1997-01-27 2000-01-04 Slotznick; Benjamin System for delivering and simultaneously displaying primary and secondary information, and for displaying only the secondary information during interstitial space
CN105760301A (en) * 2016-02-24 2016-07-13 惠州Tcl移动通信有限公司 Automatic testing method and system based on Monkey command
CN105786513A (en) * 2016-02-29 2016-07-20 四川长虹电器股份有限公司 Mixed mobile application development method based on Html5
CN106919377A (en) * 2016-07-05 2017-07-04 阿里巴巴集团控股有限公司 Determine application program displaying interface whether be white screen method and device
CN107231434A (en) * 2017-07-10 2017-10-03 北京小米移动软件有限公司 The control method and device of terminal device
CN107741869A (en) * 2017-11-20 2018-02-27 青岛海信移动通信技术股份有限公司 The startup method, apparatus and terminal device of application program
CN108196904A (en) * 2017-12-27 2018-06-22 广州品唯软件有限公司 Calculate the method, apparatus and computer storage media of page response duration
CN109033302A (en) * 2018-07-16 2018-12-18 深圳鼎盛电脑科技有限公司 A kind of method for page jump, device, terminal and storage medium
CN109766242A (en) * 2018-12-29 2019-05-17 云智慧(北京)科技有限公司 Monitoring method, device and system based on mobile user side and storage medium
CN110187931A (en) * 2019-05-17 2019-08-30 北京百度网讯科技有限公司 The operation method and device of small routine
CN110851294A (en) * 2019-10-10 2020-02-28 上海上湖信息技术有限公司 Method and device for remedying program operation breakdown
CN110928555A (en) * 2019-11-21 2020-03-27 广州品唯软件有限公司 Gray scale release control method and device, computer equipment and storage medium
CN111026462A (en) * 2019-12-10 2020-04-17 百度在线网络技术(北京)有限公司 Applet control method, apparatus, device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610580A (en) * 2022-03-17 2022-06-10 北京火山引擎科技有限公司 Page white screen monitoring method, device, equipment and medium

Also Published As

Publication number Publication date
CN111858303B (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN111026462A (en) Applet control method, apparatus, device and medium
US20210357660A1 (en) Method, apparatus, electronic device, and storage medium for monitoring an image acquisition device
CN111754407A (en) Layout method, device and equipment for image display and storage medium
CN111861991B (en) Method and device for calculating image definition
CN111461343A (en) Model parameter updating method and related equipment thereof
CN112506581A (en) Method and device for rendering small program, electronic equipment and readable storage medium
CN110796191B (en) Trajectory classification method and device
CN111858303A (en) Method, device, equipment and medium for controlling page of applet
CN111191619A (en) Method, device and equipment for detecting virtual line segment of lane line and readable storage medium
CN113312560A (en) Group detection method and device and electronic equipment
CN111177479B (en) Method and device for acquiring feature vector of node in relational network graph
CN111176838B (en) Method and device for distributing embedded vector to node in bipartite graph
CN110995687A (en) Cat pool equipment identification method, device, equipment and storage medium
US11632552B2 (en) Method and apparatus for coding video, device and medium
CN112150380B (en) Method, apparatus, electronic device, and readable storage medium for correcting image
CN111553283B (en) Method and device for generating model
CN113220927A (en) Image detection method, device, equipment and storage medium
CN111966432A (en) Verification code processing method and device, electronic equipment and storage medium
CN112381090A (en) Method and device for determining telephone, electronic equipment and storage medium
CN110689090A (en) Image storage method and device
CN111639116A (en) Data access connection session protection method and device
CN111651229A (en) Font changing method, device and equipment
CN111857488B (en) Method and device for popping up menu in applet, electronic equipment and storage medium
US11531463B2 (en) Method for determining touch instruction, electronic device and storage medium
KR20210042859A (en) Method and device for detecting pedestrians

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