CN111858303B - Page control method, device, equipment and medium for applet - Google Patents

Page control method, device, equipment and medium for applet Download PDF

Info

Publication number
CN111858303B
CN111858303B CN202010508117.6A CN202010508117A CN111858303B CN 111858303 B CN111858303 B CN 111858303B CN 202010508117 A CN202010508117 A CN 202010508117A CN 111858303 B CN111858303 B CN 111858303B
Authority
CN
China
Prior art keywords
page
image
image area
determining
white
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
CN202010508117.6A
Other languages
Chinese (zh)
Other versions
CN111858303A (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

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)
  • Image Analysis (AREA)
  • User Interface Of Digital Computer (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 pages of the small program, determining whether the pages are white screens or not according to the page images of the pages, acquiring the times of the white screens of the pages when the pages are determined to be the white screens, deleting the page addresses of the pages from the page address white list of the small program if the times of the white screens of the pages exceed a preset time threshold, and deleting the pages with the white screen conditions frequently occurring in the small program according to the white screen conditions of the pages in the small program, so that intelligent management and control of the white screen conditions of the pages of the small program is realized, the white screen conditions of the small program when a user uses the small program can be reduced, and the white screen rate of the small program is reduced.

Description

Page control method, device, equipment and medium for applet
Technical Field
The application relates to the technical field of computers, in particular to the technical field of artificial intelligence and applet management and control, and particularly relates to a method, a device, equipment and a medium for controlling an applet page.
Background
As applications become more widely used, applets are beginning to be increasingly used and deployed. An applet may be embedded in an application, which is a program provided by a third party developer to embed an own service in the application.
At present, the condition that the page of the applet is easy to display abnormality affects the use of a user, so how to manage 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 the applet; determining that the page to be detected is a white screen according to the page image; acquiring the times of the white screen of the page to be detected; and if the times exceeds a preset times threshold, deleting the page address of the page from the 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, comprising: the first acquisition module is used for acquiring page images of pages 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 the 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 applet if the times exceed a preset times threshold.
According to another aspect of the present application, there is provided an electronic apparatus 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.
According to another aspect of the application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the page control method of the applet of the application.
One embodiment of the above application has the following advantages or benefits: by combining the white screen condition of the pages in the applet, the pages with the white screen condition frequently appearing in the applet are deleted in time, so that intelligent control over the white screen condition of the applet pages is realized, the condition that the applet appears in the white screen when a user uses the applet can be reduced, and the white screen rate of the applet is reduced. Because the technical means that the page in the applet is deleted from the page address white list of the applet if the number of times of the page white screen exceeds the preset number threshold is adopted, the technical problem that the abnormal condition of the applet occurs and the user experience is influenced is solved, and the intelligent management and control of the white screen condition of the applet page is achieved by combining the white screen condition of the applet in the process of managing the applet page and deleting the page with the white screen condition frequently occurring in the applet in time when the page is determined to be the white screen, so that the white screen condition of the applet page can be reduced when the user uses the applet, and the technical effect of reducing the white screen rate of the applet is achieved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
FIG. 1 is a schematic diagram of a first embodiment according to the present application;
FIG. 2 is a schematic diagram of a second embodiment according to the present application;
FIG. 3 is a schematic diagram of a third embodiment according to the present application;
FIG. 4 is a schematic diagram of a fourth embodiment according to the present application;
FIG. 5 is a schematic diagram of a fifth embodiment according to the present application;
FIG. 6 is a schematic diagram of a sixth embodiment according to the present application;
FIG. 7 is a schematic diagram of a seventh embodiment according to the application;
fig. 8 is a block diagram of an electronic device for implementing the page control method of the applet of the embodiment of the application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. 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 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 occurs frequently on the page of the applet, the user experience is affected. Therefore, how to manage the page white screen situation in the applet is important to improve the user experience of using the applet.
In order to solve the technical problem, the method and the device for managing and controlling the pages of the applet, specifically, for the pages in the applet, when the pages are determined to be white screens by combining with the page images of the pages, the times of the white screens of the pages are obtained, if the times of the white screens of the pages are determined to exceed a preset time threshold, the page addresses of the pages are deleted from the page address white list of the applet, so that the pages are not existed in the applet any more, the condition of the white screens of the pages in the applet is reduced, the white screen rate of the applet is reduced, and the user experience is improved.
The following describes a page control method, device, equipment and medium of an applet according to an embodiment of the application 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 the applet.
The main execution body of the applet page control method in this embodiment is an applet page control device, and the applet page control device may be implemented in software and/or hardware, and may be integrated in an electronic device.
In this embodiment, the electronic device may be any hardware device having a data processing function.
Specifically, when managing and controlling the pages of the applet, the page control device of the applet may acquire the page image of the page to be detected in the applet, where the page to be detected in the embodiment may be any page provided by the applet.
The page image of the page to be detected in the embodiment may be obtained by performing technical means such as screen capturing and screen capturing software on the page to be detected.
In one embodiment of the present application, in order to improve 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 capturing on a page window corresponding to the page to be detected after receiving the display request for the page to be detected.
Specifically, after receiving a display request for a page to be detected, correspondingly, the applet 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 acquiring program may be set in the applet, where the page image acquiring program may acquire a page window list of the applet after receiving the display request for the page to be detected, and acquire a page window corresponding to the page to be detected through the page window list, and screen capture is performed on the page window to obtain a page image of the page to be detected, and the page image of the page to be detected is transmitted to the page control device of the applet, so that the page control device of the applet may acquire the page image of the page to be detected. Therefore, the page control device of the applet can accurately acquire the page image, and the problem that the page image obtained by screenshot is inaccurate due to the reasons of popup windows or prompt boxes in the process of directly screenshot the applet is avoided, so that the white screen detection accuracy is affected.
Step 102, determining that the page to be detected is a white screen according to the page image.
In some embodiments of the present application, after the page image of the page to be detected is acquired, the page to be detected may be determined to be a white screen according to the page image in various manners, for example, the page image may be input into a pre-trained white screen detection model, 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 step 103, acquiring the number of times of the white screen of the page to be detected.
And 104, deleting the page address of the page from the page address white list of the applet if the number exceeds a preset number threshold.
The preset time threshold is a preset critical value of the number of white screens of the page, and if the number of white screens of a certain page in the applet is detected to exceed the critical value, in order to reduce the number of white screens of the applet, the page address of the applet with the number of white screens exceeding the critical value can be deleted from the page address white list of the applet.
The page address white list stores page addresses of all pages which the user is allowed to access. It will be appreciated that during the process of a user accessing a page of an applet, if the page address of the applet page accessed by the user is not in the applet page address white list, the user is denied access to the corresponding page, at which point the user may be prompted that the page does not exist or that the user is prompted that the page is offline.
In the page control method of the applet in the embodiment of the application, in the process of controlling the page of the applet, whether the page is a white screen or not is determined by combining the page image of the page, and when the page is determined to be the white screen, the number of times of the white screen is acquired, if the number of times of the white screen exceeds the threshold value of the preset number of times, the page address of the page is deleted from the page address white list of the applet, thereby combining the white screen condition of the page in the applet, deleting the page with the white screen condition frequently appearing in the applet in time, realizing intelligent control of the white screen condition of the applet page, further reducing the white screen condition of the applet when a user uses the applet, and reducing the white screen rate of the applet.
It will be appreciated that the content of a page is typically in the central portion of the page, and thus in determining whether the page is white screen, in order to increase the efficiency of determining whether the page is white screen, the central portion of the page images may be combined to determine whether the page is white screen. In order to make the present application clearly understood by those skilled in the art, a specific process of determining that the page to be detected is a white screen according to the page image in this embodiment will be further described 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 with the center position as the center, wherein the size of the image area is smaller than the size of the page image.
In some embodiments, a circular image area may be formed with the center position of the page image as the center, where the radius of the circular image area is a preset radius R.
In some embodiments, a square image area may be formed centered on a center position, wherein a center point of the square image area coincides with the center position, i.e., a center point of the square area image is the center position of the page image.
And 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 pre-trained white screen detection model 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, a 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 determined to be 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 white pixels or not 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 or not is accurately determined according to the judging result.
It can be understood that, for each pixel in the image area, the pixel in the image area can be traversed according to a preset traversal sequence, when the current pixel is traversed, whether the current pixel is a white pixel can be determined, if the current pixel is not a white pixel, the image area can be rapidly determined to be a non-white screen. If the current pixel is a white pixel, the next pixel to the current pixel may be traversed continuously based on the traversal order. If the last pixel point is traversed and the last pixel point is determined to be a white pixel point, the image area can be determined to be a white screen, and then the page to be detected can be determined to be the white screen.
In an embodiment of the present application, in practical application, there may be a certain error in a color value of a pixel point due to a device, in order to reduce an influence of the color value error on determining whether a page to be tested is a white screen, in this embodiment, a specific implementation manner of determining, according to a color value of a pixel point in an image area, that the pixel points in the image area are all white pixel points may be: comparing, for each pixel in the image area, a color value of the pixel with a color value of a white pixel; and if the difference between the color value of the pixel point and the color value of the white pixel point is smaller than the preset difference threshold value, determining that the pixel point is the white pixel point. Therefore, the influence on the white screen detection result caused by certain errors of the color values of the pixel points due to equipment 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 pixels in the image area are all white pixels according to the color values of the pixels in the image area, a specific implementation manner of determining that the page to be detected is a white screen may be: if the pixels in the image area are white pixels according to the color values of the pixels in the image area, determining the proportion of the white pixels in other image areas according to the color values of the pixels 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 a page to be detected, if the pixels in the image area determined based on the central position are all white pixels according to the determination, and the proportion of the white pixels in other image areas in the page image is determined to be more than 80%, the page to be detected is determined to be a white screen.
In the process of determining whether the page to be detected is a white screen, after determining that the image areas are all white pixel points, the embodiment further analyzes the pixel point conditions of other image areas except the image areas in the page image, and determines that the page to be detected is a white screen when determining that the proportion of the white pixel points in the other image areas exceeds a first proportion threshold, thereby determining whether the page to be detected is a white screen by combining the whole image of the page image, and further improving the accuracy of determining whether the page to be detected is a white screen.
In order to make it clear to those skilled in the art that the present application will be described below in connection with one possible specific implementation form for determining whether a page is white based on a center portion image of the page image.
Specifically, after the page image of the page to be detected is acquired, the page image may be divided into N preset numbers of image areas (for example, N is 5) along the lateral direction or the longitudinal direction, and the divided N image areas are selected, and the image area including the center point of the page image is selected and the selected image area is taken as the target image area.
And then, comparing the color value of each pixel point with the color value of the white pixel point for each pixel point in the target image area, if the difference degree between the color value and the color value of the white pixel point is smaller than the preset difference degree, determining that the corresponding pixel point is the 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 exceeds the preset proportion threshold value, determining that the page to be detected is a white screen.
The other image area in the present embodiment is an area other than the target image area in the page image.
Specifically, the color values of the pixel points include four dimensions RGBA, when comparing the corresponding pixel point with the white pixel point, the color values of the two pixel points in each dimension may be respectively compared, and if the difference between the color values of the two pixel points in each dimension is less than 1, the corresponding pixel point is determined to be the white pixel point.
For example, the color value of one pixel is shown in table 1:
TABLE 1 color values for a pixel
R 255
G 221
B 227
A 178
The color values corresponding to the white pixels are shown in table 2;
TABLE 2 color values for 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 one embodiment of the present application, in order to improve the efficiency of determining whether the page to be detected is a white screen in combination with the page image, the page image may be divided into a plurality of image areas, and the determination may be made according to whether the image area is a solid image area, and whether the page image is a white screen may be quickly determined in combination with the solid image area in the page image, which is further described below in conjunction with fig. 3.
Fig. 3 is a schematic diagram according to a second embodiment of the application. As shown in fig. 3, step 102 may include:
in step 301, a page image is divided into a plurality of image areas.
Step 302, determining the number of solid-color image areas in the plurality of image areas according to the color values of the pixel points in each image area.
The solid-color image areas are the same in color of the pixel points in the corresponding image areas.
In this embodiment, according to the color value of the pixel point in each image area, a specific implementation manner of determining the number of image areas that are solid colors in the plurality of image areas may be: for each image area, if the color values of all the pixel points in the image area are the same, determining that the image area is a solid-color image area, and determining the number of the solid-color image areas in the plurality of image areas. Therefore, whether the corresponding image area is a solid-color image area is accurately determined according to whether the color value of each pixel point in each image area is the same.
Step 303, determining the proportion of the solid image area in the plurality of image areas according to the number of the solid image areas.
And step 304, if the proportion of the solid image area exceeds a preset second proportion threshold value, determining that the page to be detected is a white screen.
The second ratio threshold may be a ratio value set by default in the system, and may be a ratio value set in advance according to service needs, for example, the second preset ratio threshold may be 0.6, 0.8 or 0.5, and the value of the second ratio threshold is not specifically limited in this embodiment.
For example, after the page image is divided into a plurality of image areas, if it is determined that the colors of the solid-color image areas are all white and the duty ratio of the solid-color image areas exceeds 0.5, it is determined that no content exists in the page image, and at this time, it may be determined that the page to be detected corresponding to the page image is a white screen.
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, judgment is performed according to whether the image areas are solid-color image areas, and whether the page image is the white screen is rapidly determined by combining the proportion of the solid-color image areas in the page image, so that the efficiency of determining whether the page to be detected is the white screen can be improved.
In one embodiment of the present application, to improve the efficiency of determining whether a corresponding image region is a solid image region or a non-solid image region (alternatively referred to as a mixed-color image region), in one embodiment of the present application, determining whether an image region is a solid image region may include, as shown in fig. 4:
step 401, sequentially traversing each pixel point in the image area according to a preset traversing sequence, and comparing the color value of the traversed pixel point with the color value of the next adjacent pixel point.
In step 402, if the color value of the pixel is the same as the color value of the next pixel adjacent thereto, the pixel in the image area is continuously traversed in the traversal order.
In step 403, 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.
It can be appreciated that in this embodiment, the color corresponding to the solid image area is white.
If the color value of the pixel point is different from the color value of the next adjacent pixel point, the step 404 ends the traversal, and determines the image area as a non-solid image area.
In this embodiment, in determining whether the corresponding image area is a solid image area, according to a preset traversal order, traversing pixels in the image area one by one, determining whether the image area is solid by comparing color values of the traversed pixels and the corresponding next pixel, continuing traversing the pixels based on the traversal order if the color values of the corresponding pixels and the corresponding next pixel are the same, determining that the image area is a solid image area if the last pixel traversed to the image area according to the traversal order, ending the traversal if the color values of the pixels and the adjacent next pixel are different, and determining that the image area is a non-solid image area. Therefore, the efficiency of determining whether the corresponding image area is a solid-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 achieve the above embodiment, the embodiment of the present application further provides a device for controlling a page of 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 acquisition module 10, a determination module 20, a second acquisition module 30, and a processing module 40, wherein:
the first acquiring module 10 is configured to acquire a page image of a page to be detected in the applet.
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 acquisition module 30 is used for acquiring the number of times of the 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 number exceeds a preset number threshold.
It should be noted that the foregoing explanation of the embodiments of the method for controlling the page of the applet is also applicable to the apparatus for controlling the page of the applet in this embodiment, and will not be repeated here.
In the page control device of the applet in the embodiment of the application, in the process of controlling the page of the applet, whether the page is a white screen or not is determined by combining the page image of the page, and when the page is determined to be the white screen, the number of times of the white screen is acquired, if the number of times of the white screen exceeds the threshold value of the preset number of times, the page address of the page is deleted from the page address white list of the applet, so that the page with the white screen condition of the page in the applet is deleted in time, the intelligent control of the white screen condition of the page of the applet is realized, and further, the white screen condition of the applet when a user uses the applet is reduced, and the white screen rate of the applet is reduced.
In one embodiment of the present application, based on the embodiment of the apparatus 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 region forming sub-module 220 is configured to form an image region in the page image with the center position as a center, where the size of the image region is smaller than the size of the page image.
A second determining submodule 230, configured to determine, according to the image area, that the page to be detected is a white screen.
In one embodiment of the present application, as shown in fig. 6, the second determining sub-module 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 pixels in the image area are all white pixels according to the color values of the pixels in the image area.
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 the pixels in the image area are all white pixels according to the color values of the pixels in the image area, a proportion of the white pixels in other image areas in the page image according to the color values of the pixels in the other image areas, where the other image areas are areas other than the image area 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 pixels in the other image area exceeds the preset first proportion threshold.
In one embodiment of the present application, the first determining subunit 2311 is specifically configured to: for each pixel in the image area, the color value of the pixel is compared with the color value of the white pixel. And if the difference between the color value of the pixel point and the color value of the white pixel point is smaller than the preset difference threshold value, determining that the pixel point is the white pixel point.
In one embodiment of the present application, based on the embodiment of the apparatus shown in fig. 5, as shown in fig. 7, the determining module 20 may include:
the dividing sub-module 240 is configured to divide the page image into a plurality of image areas.
A third determining sub-module 250 is configured to determine the number of solid-color image areas in the plurality of image areas according to the color value of the pixel point in each image area.
A fourth determination sub-module 260 is configured to determine a proportion of the solid image area in the plurality of image areas according to the number of solid image areas.
A fifth determining submodule 270, configured to determine that the page to be detected is a white screen if the proportion of the solid image area exceeds a preset second proportion threshold.
In one embodiment of the present application, as shown in fig. 7, the third determination sub-module 250 may include:
a second determining unit 251, configured to determine, for each image area, that the image area is a solid-color image area if color values of all pixel points in the image area are the same.
The third determining unit 252 is configured to determine the number of image areas that are solid colors among the plurality of image areas.
In one 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 area according to a preset traversal order, and compare the color value of the traversed pixel point with the color value of the next pixel point adjacent to the pixel point.
The second processing subunit 2522 is configured to continue 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 pixel point adjacent thereto.
A third determining subunit 2523 is configured to determine the image area as a solid color image area if traversing to the last pixel point of the image area according to the traversal order.
A fourth determining subunit 2524, configured to end the traversal if the color value of the pixel point and the color value of the next adjacent pixel point are different, and determine the image area as a non-solid image area.
In the embodiment of the application, in the process of determining whether the corresponding image area is a solid-color image area, the pixels in the image area are traversed one by one according to a preset traversing sequence, whether the image area is solid-color is determined by comparing the color values of the traversed pixel point and the corresponding next pixel point, if the color values of the corresponding pixel point and the corresponding next pixel point are the same, the pixel point continues to be traversed based on the traversing sequence, if the last pixel point of the image area is traversed according to the traversing sequence, the image area is determined to be the solid-color image area, and if the color values of the pixel point and the color values of the adjacent next pixel point are different, the traversing is ended, and the image area is determined to be the non-solid-color image area. Therefore, the efficiency of determining whether the corresponding image area is a solid-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, the present application also provides an electronic device and a readable storage medium.
As shown in fig. 8, there is a block diagram of an electronic device of the page control method of the applet according to the embodiment of the 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 8, the electronic device includes: one or more processors 801, memory 802, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. 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 executing within the electronic device, including instructions stored in or on memory to display graphical information of the GU I 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, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 801 is illustrated in fig. 8.
Memory 802 is a non-transitory computer readable storage medium provided by the present application. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of page control of the applet provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the page control method of the applet provided by the present application.
The memory 802 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first acquisition module 10, the determination module 20, the second acquisition 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 application. The processor 801 executes various functional applications of the server and data processing, that is, implements the page control method of the applet in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 802.
Memory 802 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the electronic device of the page control of the applet, and the like. In addition, 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, memory 802 may optionally include memory located remotely from processor 801, which may be connected to the applet's page controlled electronic device through 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 the applet may further include: an input device 803 and an output device 804. The processor 801, memory 802, input devices 803, and output devices 804 may be connected by a bus or other means, for example 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 controls of the electronic device for page control of the applet, such as input devices for a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. The output device 804 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration 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 may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 pages of the small program, whether the pages are white screens or not is determined by combining the page images of the pages, when the pages are determined to be the white screens, the times of the white screens of the pages are obtained, if the times of the white screens of the pages are determined to exceed the threshold value of the preset times, the page addresses of the pages are deleted from the white list of the page addresses of the small program, so that the pages with the white screen condition frequently appearing in the small program are deleted in time by combining the white screen condition of the pages in the small program, the intelligent management and control of the white screen condition of the pages of the small program is realized, the white screen condition of the small program appearing when the small program is used by a user can be reduced, and the white screen rate of the small program is reduced.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed embodiments are achieved, and are not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (12)

1. A method of page control for an applet, comprising:
acquiring a page image of a page to be detected in the applet;
determining that the page to be detected is a white screen according to the page image;
acquiring the times of the white screen of the page to be detected;
if the times exceeds a preset times threshold, deleting the page address of the page from the page address white list of the applet;
the determining that the page to be detected is a white screen according to the page image includes:
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 the center, wherein the size of the image area is smaller than that of the page image;
according to the image area, determining that the page to be detected is a white screen;
the determining that the page to be detected is a white screen according to the image area includes:
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 that the page to be detected is a white screen;
if the pixels in the image area are determined to be white pixels according to the color values of the pixels in the image area, determining that the page to be detected is a white screen includes:
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 in the page image according to the color values of the pixel points in the other image areas, 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.
2. The method of claim 1, wherein the determining that the pixels in the image area are white pixels according to the color values of the pixels in the image area comprises:
comparing, for each pixel in the image area, a color value of the pixel with a color value of a white pixel;
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 value, determining that the pixel point is a white pixel point.
3. The method of claim 1, wherein the determining that the page to be detected is a white screen from the page image comprises:
dividing the page image into a plurality of image areas;
determining the number of the image areas which are solid colors in the plurality of image areas according to the color value of the pixel point in each image area;
determining proportions of solid image areas in the plurality of image areas according to the number of the solid image areas;
and if the proportion of the solid-color image area exceeds a preset second proportion threshold value, determining that the page to be detected is a white screen.
4. A method according to claim 3, wherein said determining the number of solid image areas of said plurality of image areas based on the color values of the pixels in each image area 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 solid-color image area;
the number of image areas of the plurality of image areas that are solid is determined.
5. The method of claim 4, wherein the determining that the image area is the solid image area if color values of all pixels in the image area are the same comprises:
sequentially traversing each pixel point in the image area according to a preset traversing sequence, and comparing the color value of the traversed pixel point with the color value of the next adjacent pixel point;
if the color value of the pixel point is the same as the color value of the next adjacent pixel point, continuing to traverse the pixel points in the image area according to the traversing sequence;
if the last pixel point of the image area is traversed according to the traversing sequence, determining that the image area is a solid-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 the traversal, and determining the image area as a non-solid image area.
6. An applet page control apparatus comprising:
the first acquisition module is used for acquiring page images of pages 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 the white screen of the page to be detected;
the processing module 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 times threshold;
wherein, the determining module includes:
the first determining submodule is used for determining the center position of the page image according to the page image;
the region forming sub-module is used for forming an image region in the page image by taking the central position as the center, wherein the size of the image region is smaller than that of the page image;
the second determining submodule is used for determining that the page to be detected is a white screen according to the image area;
Wherein the second determination submodule includes:
the first determining unit is used for determining that the page to be detected is a white screen 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;
wherein the first determining unit includes:
a first determining subunit, configured to determine, if the pixels in the image area are all white pixels according to the color values of the pixels in the image area, determine, according to the color values of the pixels in other image areas in the page image, a proportion of the white pixels in the other image areas, where the other image areas are areas in the page image except the image area;
and the second determining subunit is used for determining that the page to be detected is a white screen if the proportion of the white pixel points in the other image areas exceeds a preset first proportion threshold value.
7. The apparatus of claim 6, wherein the first determination subunit is specifically configured to:
comparing, for each pixel in the image area, a color value of the pixel with a color value of a white pixel;
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 value, determining that the pixel point is a white pixel point.
8. The apparatus of claim 6, wherein the means for determining comprises:
the dividing sub-module is used for dividing the page image into a plurality of image areas;
a third determining submodule, configured to determine, according to a color value of a pixel point in each image area, the number of image areas that are solid colors in the plurality of image areas;
a fourth determining submodule, configured to determine a proportion of solid-color image areas in the plurality of image areas according to the number of solid-color image areas;
and a fifth determining submodule, configured to determine that the page to be detected is a white screen if the proportion of the solid-color image area exceeds a preset second proportion threshold.
9. The apparatus of claim 8, wherein the third determination submodule comprises:
a second determining unit, configured to determine, for each image area, that the image area is a solid-color image area if color values of all pixel points in the image area are the same;
and a third determining unit configured to determine the number of image areas that are solid color among the plurality of image areas.
10. The apparatus of claim 9, wherein the second determining unit comprises:
the first processing subunit is used for traversing each pixel point in the image area in sequence according to a preset traversing sequence, and comparing the color value of the traversed pixel point with the color value of the next adjacent pixel point;
a second processing subunit, configured to continue 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 pixel point adjacent to the pixel point;
a third determining subunit, configured to determine, if the image area is traversed to a last pixel point of the image area according to the traversal order, that the image area is a solid-color image area;
and a fourth determining subunit, configured to end the traversal if the color value of the pixel point is different from the color value of the next adjacent pixel point, and determine that the image area is a non-solid image area.
11. An electronic device, comprising:
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 method of any one of claims 1-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
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 CN111858303A (en) 2020-10-30
CN111858303B true 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)

Families Citing this family (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

Also Published As

Publication number Publication date
CN111858303A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111523468B (en) Human body key point identification method and device
EP3869403A2 (en) Image recognition method, apparatus, electronic device, storage medium and program product
CN111754407B (en) Layout method, device and equipment for image display and storage medium
DE102012109959A1 (en) Automatic enlargement and selection confirmation
CN110968718B (en) Target detection model negative sample mining method and device and electronic equipment
US11557062B2 (en) Method and apparatus for processing video frame
US11423659B2 (en) Method, apparatus, electronic device, and storage medium for monitoring an image acquisition device
CN111191619B (en) Method, device and equipment for detecting virtual line segment of lane line and readable storage medium
CN111611767B (en) Verification method and device
CN111858303B (en) Page control method, device, equipment and medium for applet
CN111861991A (en) Method and device for calculating image definition
US20220004812A1 (en) Image processing method, method for training pre-training model, and electronic device
CN111708653B (en) Memory fault processing method and device, electronic equipment and storage medium
CN112102417B (en) Method and device for determining world coordinates
US11462013B2 (en) Method and apparatus for recognizing target object, electronic device and storage medium
CN111797647B (en) Bar code decoding method and device
CN111401248B (en) Sky area identification method and device, electronic equipment and storage medium
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
CN110737560B (en) Service state detection method and device, electronic equipment and medium
CN110798681A (en) Monitoring method and device of imaging equipment and computer equipment
CN112150380B (en) Method, apparatus, electronic device, and readable storage medium for correcting image
CN110647936A (en) Training method and device for video super-resolution reconstruction model and electronic equipment
US20210368179A1 (en) Method and apparatus for coding video, device and medium
CN111553283B (en) Method and device for generating model

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