White screen detection method, device, system, equipment and medium

By detecting page elements changes and determining the white screen scores by the client, sending page information to the server for further judgment, solving the problem that the page white screen cannot be fully detected in the prior art, and achieving efficient and accurate white screen detection.

CN119807558APending Publication Date: 2025-04-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311309841.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art is difficult to conduct comprehensive detection of white screens that appear during the display of the page, and there is a problem that some white screens cannot be detected.

Method used

In response to detecting the page element change, the client determines the white screen score based on the page elements included in the currently displayed page. If the white screen score meets the initial judgment conditions, send the page information of the page to the server to determine again whether the page is a white screen.

Benefits of technology

The comprehensive detection of the white screen during the page display process is realized, which reduces the resource loss required by the client to detect the white screen, reduces the cost of the client to detect the white screen, increases the confidence of the white screen detection, and reduces the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807558A_ABST
    Figure CN119807558A_ABST
Patent Text Reader

Abstract

The invention discloses a white screen detection method, device and system, equipment and a medium which are applied to the technical field of data processing. In the method, a client determines a white screen score based on a page element included in a currently displayed page in response to a detected page element change. And if the white screen score meets the initial judgment condition, the client sends page information used for judging again to determine whether the page is a white screen page or not to the server. And the server side can determine whether the page is a white screen or not by using the obtained page information of the page. According to the invention, the client can realize relatively comprehensive white screen detection in the page display process by detecting the change of the page elements. Moreover, the client performs initial white screen detection on the page, so that resources consumed by the client for detecting the white screen can be reduced, and the cost of the client for detecting the white screen is reduced. The client side and the server side sequentially carry out white screen detection on the page, the confidence coefficient of white screen detection can be improved, and the false alarm rate of white screen detection can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a white screen detection method, device, system, equipment and medium. Background Art

[0002] When the client displays a page, a white screen may appear. The white screen does not contain valid content. If the client displays a white screen, the user cannot normally use the services provided by the page, affecting the user experience.

[0003] Currently, when a client detects that a new page is displayed, it performs a white screen detection on the page to determine whether the displayed page is a white screen. However, such a white screen detection method is difficult to perform a relatively comprehensive detection of the white screen, and there is a problem that some white screens cannot be detected. Summary of the invention

[0004] In view of this, the present application provides a white screen detection method, device, system, equipment and medium, which can realize comprehensive detection of the white screen during the page display process.

[0005] Based on this, the technical solutions provided by this application are as follows:

[0006] In a first aspect, the present application provides a white screen detection method, which is applied to a client that displays a web page, and the method includes: in response to detecting a change in a page element, determining a white screen score based on the page elements included in the currently displayed page, and the white screen score is used to measure the complexity of the page elements included in the page; if the white screen score meets the initial judgment condition, sending page information of the page to a server, and the page information is used to judge again to determine whether the page is a white screen.

[0007] In one possible implementation, the detecting of a page element change includes: detecting a structural change of a document object model tree of the page, the document object model tree of the page being used to describe a hierarchical structure of page elements included in the page, the document object model tree of the page including document object model nodes, and the document object model nodes corresponding to the page elements included in the page.

[0008] In one possible implementation, determining a white screen score based on page elements included in a currently displayed page includes: determining a node score of a document object model node included in a document object model tree of the page, and determining a white screen score based on the document object model node score; the node score of the document object model node is determined based on the number of layers of the document object model node in the document object model tree and a display ratio of the document object model node, wherein the display ratio is the ratio of a display area of ​​a page element corresponding to the document object model node in the page to a display area of ​​a page element corresponding to a parent node of the document object model node in the page.

[0009] In one possible implementation, determining the node scores of the document object model nodes included in the document object model tree of the page and determining the white screen score based on the document object model node scores include: determining the node scores of each document object model node included in the document object model tree; and calculating the sum of the scores of each document object model node included in the document object model tree to obtain the white screen score.

[0010] In a possible implementation, determining the node scores of the document object model nodes included in the document object model tree of the page, and determining the white screen score based on the document object model node scores, includes:

[0011] The document object model node that is ranked first in a preset order among the document object model nodes included in the document object model tree is used as the target document object model node; the following operations are performed in a loop until the next document object model node of the target document object model node indicated by the preset order is empty, or the intermediate score does not meet the initial judgment condition, and the intermediate score is used as the white screen score: determine the node score of the target document object model node; determine the intermediate score based on the determined node scores of the document object model nodes included in the document object model tree; and use the next document object model node of the target document object model node indicated by the preset order as the target document object model node.

[0012] In a possible implementation, the page information of the page includes a page image obtained by taking a screenshot of the page.

[0013] In a possible implementation, the page information of the page includes a hypertext markup language string of the page, and the hypertext markup language string of the page is used to render the page on the server to obtain a page image of the page.

[0014] In a possible implementation, the hypertext markup language character string is a character string obtained by concatenating a character string corresponding to a document object model node of the page and a style tag character string, and deleting a script tag.

[0015] In a possible implementation, before sending the page information of the page to the server, the method further includes: compressing the hypertext markup language string of the page by using a thread other than the main thread;

[0016] The sending of the page information of the page to the server includes: sending a compressed hypertext markup language character string of the page to the server.

[0017] In a possible implementation, before sending the page information of the page to the server, the method further includes: determining that the page is not a security page and the security page is a non-white screen.

[0018] In a possible implementation, determining that the page is not a secure page includes: determining that a document object model of the page does not include a filtering hypertext markup language tag, where the filtering hypertext markup language tag is used to indicate that the page is not a white screen.

[0019] In a second aspect, the present application provides a white screen detection device, which is applied to a client that displays a web page, and the device includes: a score determination unit, which is used to determine a white screen score in response to detecting a change in page elements, based on the page elements included in the currently displayed page, and the white screen score is used to measure the complexity of the page elements included in the page; a sending unit, which is used to send page information of the page to a server if the white screen score meets an initial judgment condition, and the page information is used to judge again to determine whether the page is a white screen.

[0020] In one possible implementation, the score determination unit is used to detect changes in page elements, including: the score determination unit is used to detect structural changes in a document object model tree of a page, the document object model tree of the page is used to describe the hierarchical structure of page elements included in the page, the document object model tree of the page includes document object model nodes, and the document object model nodes correspond to the page elements included in the page.

[0021] In one possible implementation, the score determination unit is used to determine the white screen score based on the page elements included in the currently displayed page, including: the score determination unit is used to determine the node score of the document object model node included in the document object model tree of the page, and determine the white screen score based on the document object model node score; the node score of the document object model node is determined based on the number of layers of the document object model node in the document object model tree and the display ratio of the document object model node, and the display ratio is the ratio of the display area of ​​the page element corresponding to the document object model node in the page to the display area of ​​the page element corresponding to the parent node of the document object model node in the page.

[0022] In one possible implementation, the score determination unit is used to determine the node scores of the document object model nodes included in the document object model tree of the page, and determine the white screen score based on the document object model node scores, including: the score determination unit is used to determine the node scores of each document object model node included in the document object model tree; calculate the sum of the scores of each document object model node included in the document object model tree to obtain the white screen score.

[0023] In a possible implementation, the score determination unit is used to determine the node scores of the document object model nodes included in the document object model tree of the page, and determine the white screen score based on the document object model node scores, including: the score determination unit is used to take the document object model node that is ranked first in a preset order among the document object model nodes included in the document object model tree as the target document object model node; loop the following operations until the next document object model node of the target document object model node indicated by the preset order is empty, or the intermediate score does not meet the initial judgment condition, and take the intermediate score as the white screen score: determine the node score of the target document object model node; determine the intermediate score based on the determined node scores of the document object model nodes included in the document object model tree; take the next document object model node of the target document object model node indicated by the preset order as the target document object model node.

[0024] In a possible implementation, the page information of the page includes a page image obtained by taking a screenshot of the page.

[0025] In a possible implementation, the page information of the page includes a hypertext markup language string of the page, and the hypertext markup language string of the page is used to render the page on the server to obtain a page image of the page.

[0026] In a possible implementation, the hypertext markup language character string is a character string obtained by concatenating a character string corresponding to a document object model node of the page and a style tag character string, and deleting a script tag.

[0027] In a possible implementation, the device further includes: a compression unit, used to compress the hypertext markup language string of the page using a thread other than the main thread; and the sending unit, specifically used to send the compressed hypertext markup language string of the page to the server.

[0028] In a possible implementation, the device further includes: a security page determination unit, configured to determine that the page is not a security page and that the security page is a non-white screen.

[0029] In a possible implementation, the security page determination unit is specifically configured to determine that a document object model of the page does not include a filtering hypertext markup language tag, where the filtering hypertext markup language tag is used to indicate that the page is not a white screen.

[0030] In a third aspect, the present application provides a white screen detection system, the system comprising a client and a server for displaying a web page; the client is used to determine a white screen score based on the page elements included in the currently displayed page in response to detecting a change in the page elements, the white screen score being used to measure the complexity of the page elements included in the page; if the white screen score meets the initial judgment condition, the page information of the page is sent to the server, the page information is used to judge again to determine whether the page is a white screen; the server is used to obtain the page information and determine whether the page is a white screen based on the page information.

[0031] In one possible implementation, the client is used to detect changes in page elements, including: the client is used to detect structural changes in a document object model tree of a page, the document object model tree of the page is used to describe the hierarchical structure of page elements included in the page, the document object model tree of the page includes document object model nodes, and the document object model nodes correspond to the page elements included in the page.

[0032] In one possible implementation, the client is used to determine a white screen score based on page elements included in a currently displayed page, including: the client is used to determine a node score of a document object model node included in a document object model tree of the page, and determines the white screen score based on the document object model node score; the node score of the document object model node is determined based on the number of layers of the document object model node in the document object model tree and the display ratio of the document object model node, the display ratio being the ratio of a display area of ​​the page element corresponding to the document object model node in the page to a display area of ​​the page element corresponding to a parent node of the document object model node in the page.

[0033] In one possible implementation, the client is used to determine the node scores of the document object model nodes included in the document object model tree of the page, and determine the white screen score based on the document object model node scores, including: the client is used to determine the node scores of each document object model node included in the document object model tree; calculate the sum of the scores of each document object model node included in the document object model tree to obtain the white screen score.

[0034] In a possible implementation, the client is used to determine the node scores of the document object model nodes included in the document object model tree of the page, and determine the white screen score based on the document object model node scores, including: the client is used to take the document object model node that is ranked first in a preset order among the document object model nodes included in the document object model tree as the target document object model node; loop the following operations until the next document object model node of the target document object model node indicated by the preset order is empty, or the intermediate score does not meet the initial judgment condition, and take the intermediate score as the white screen score: determine the node score of the target document object model node; determine the intermediate score based on the determined node scores of the document object model nodes included in the document object model tree; take the next document object model node of the target document object model node indicated by the preset order as the target document object model node.

[0035] In a possible implementation, the page information of the page includes a page image obtained by taking a screenshot of the page.

[0036] In a possible implementation, the page information of the page includes a hypertext markup language string of the page, and the hypertext markup language string of the page is used to render the page on the server to obtain a page image of the page.

[0037] In a possible implementation, the hypertext markup language character string is a character string obtained by concatenating a character string corresponding to a document object model node of the page and a style tag character string, and deleting a script tag.

[0038] In a possible implementation, before sending the page information of the page to the server, the client is also used to compress the hypertext markup language string of the page using a thread other than the main thread; the client is used to send the page information of the page to the server, including: the client is used to send the compressed hypertext markup language string of the page to the server.

[0039] In a possible implementation, before sending the page information of the page to the server, the client is further configured to determine that the page is not a security page and that the security page is not a white screen.

[0040] In a possible implementation, the client is used to determine that the page is not a secure page, including: the client is used to determine that the document object model of the page does not include a filtering hypertext markup language tag, and the filtering hypertext markup language tag is used to indicate that the page is not a white screen.

[0041] In a fourth aspect, the present application provides an electronic device, including:

[0042] one or more processors;

[0043] a storage device having one or more programs stored thereon,

[0044] When the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect.

[0045] In a fifth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method described in the first aspect is implemented.

[0046] In a sixth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any of the methods described in the first aspect.

[0047] It can be seen that this application has the following beneficial effects:

[0048] The present application provides a white screen detection method, device, system, equipment and medium. In this method, in response to detecting a change in a page element, the client determines a white screen score based on the page elements included in the currently displayed page. If the white screen score meets the initial judgment condition, the client sends the page information of the page for re-judgment to determine whether the page is a white screen to the server. The server can determine whether the page is a white screen using the page information of the acquired page. By detecting changes in page elements, the client can achieve a more comprehensive white screen detection during the page display process. In addition, the client performs an initial white screen detection on the page, which can reduce the resources consumed by the client to detect the white screen and reduce the cost of the client to detect the white screen. The client and the server perform white screen detection on the page in turn, which can improve the confidence of the white screen detection and reduce the false alarm rate of the white screen detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of an exemplary application scenario provided for an embodiment of the present application;

[0050] Figure 2 A schematic diagram of a white screen detection method provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of a flow chart of another white screen detection method provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of the structure of a white screen detection device provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of the structure of a white screen detection system provided in an embodiment of the present application;

[0054] Figure 6 A schematic diagram of the basic structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.

[0056] When a user uses a client to browse a web page, the page may be a white screen. The white screen does not include valid information. When the client displays a white screen, it is difficult for the user to continue to access the page, and the user can only revisit the page to try, which reduces the user's experience. At present, when the client detects that the user triggers the display of a new page, the displayed page is detected as a white screen. This type of method can only perform white screen detection on newly visited pages. However, during the operation of the page, the page may also be a white screen. The above-mentioned method for performing white screen detection on newly visited pages is difficult to detect the white screen that appears during the operation of the page, and it is impossible to fully detect the problem of the page being a white screen. In addition, the current method of white screen detection needs to record the changes in HTML (Hyper Text Markup Language) during a period of time when the page is displayed, which consumes a large amount of client operating resources.

[0057] Based on this, an embodiment of the present application provides a white screen detection method. In this method, in response to detecting a change in a page element, the client determines a white screen score based on the page elements included in the currently displayed page. If the white screen score meets the initial judgment condition, the client sends the page information of the page used to judge again to determine whether the page is a white screen to the server. The server can determine whether the page is a white screen by using the page information of the acquired page. By detecting changes in page elements, the client can achieve a more comprehensive white screen detection during the page display process. In addition, the client performs an initial white screen detection on the page, which can reduce the resources consumed by the client to detect the white screen and reduce the cost of the client to detect the white screen. The client and the server perform white screen detection on the page in turn, which can improve the confidence of the white screen detection and reduce the false alarm rate of the white screen detection.

[0058] In order to facilitate understanding of the white screen detection method provided in the embodiment of the present application, the white screen detection method provided in the embodiment of the present application is described below in conjunction with the accompanying drawings. Figure 1 See the example scenario shown in the figure. Figure 1 As shown, this figure is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.

[0059] Those skilled in the art will understand that Figure 1 The schematic diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited in any aspect by this framework.

[0060] The white screen detection method provided in the embodiment of the present application is applied to a client and a server. The client is used to display a page. The server is connected to the client to detect the white screen.

[0061] The client pre-configures the Blank Screen SDK (Software Development Kit). The Blank Screen SDK is used to detect the white screen. The Blank Screen SDK encapsulates the white screen detection algorithm module. The Blank Screen SDK calls the white screen detection algorithm module when detecting a change in the page elements. The Blank ScreenDetect algorithm module is used to determine the white screen score based on the page elements included in the currently displayed page. Among them, the white screen score is used to measure the complexity of the page elements. Based on the white screen score, it is possible to make an initial judgment on whether the page is a white screen. If the white screen score meets the initial judgment condition, the client sends the page information of the page to the server. The page information, for example, includes a page image obtained by the client screenshot module encapsulated by the Blank Screen SDK for performing a screenshot operation on the page, or includes an HTML string of the page. In the case where the page information includes an HTML string, the server uses the configured server image generation SDK to render the page based on the HTML string, and takes a screenshot of the page to obtain a page image. The server uses the white screen detection model to process the page image to obtain a white screen detection result of the page.

[0062] In order to facilitate understanding of the technical solution provided in the embodiment of the present application, the white screen detection method provided in the embodiment of the present application is described below with reference to the accompanying drawings.

[0063] See also Figure 2 As shown in FIG. 1 , the figure is a schematic diagram of the process of the white screen detection method provided in the embodiment of the present application, such as Figure 2 As shown, the method may include S201-S202:

[0064] S201: In response to detecting a change in a page element, the client determines a white screen score based on page elements included in a currently displayed page.

[0065] The client is a client that displays web pages, such as a browser.

[0066] The client detects changes in page elements during page display. Page elements are elements that constitute a page. Page elements include, for example, text, buttons, controls, and other elements displayed on the page. Changes in page elements, as an example, include changes in page elements displayed by a page caused by a page jump. A page jump may be, for example, a page jump triggered by a user, or a page jump automatically triggered by a client. As another example, changes in page elements include changes in page elements triggered by user operations on the page or a preset display method when the page has not jumped.

[0067] The embodiments of the present application do not limit the implementation method of the client detecting changes in page elements.

[0068] In a possible implementation, the client detects the structure of the DOM (Document Object Model) tree of the page. Figure 3 As shown, this figure is a flow chart of a white screen detection method provided by an embodiment of the present application. DOM is a programming interface for HTML documents and XML (EXtensible Markup Language) documents. DOM defines a standard method for accessing and manipulating HTML documents. HTML DOM expresses HTML documents in a tree structure. The DOM tree is used to describe the hierarchical structure of page elements included in the page. The DOM tree includes DOM nodes at different levels. The DOM nodes correspond to the page elements included in the page. If the page elements included in the page change, the structure of the DOM tree corresponding to the page will change. The client detects the changes in the page elements by detecting the structure of the DOM tree of the page. The embodiment of the present application does not limit the method of detecting the structure of the DOM tree of the page. In one implementation method, the MutationObserver (change observer) API (Application Programming Interface) is used to detect changes in the structure of the DOM tree of the page.

[0069] In another possible implementation, the client detects the Uniform Resource Locator (URL) of the displayed page. When it is detected that the URL of the page has changed, it is determined that the page has jumped and the page elements of the page have changed. Alternatively, the client detects the user's operation. If it is detected that the user has triggered an operation on the page element, it is determined that the page element of the page has changed.

[0070] When the client detects changes in page elements, it determines the white screen score of the currently displayed page. This enables a more comprehensive white screen detection and determines the white screen that appears during the page operation.

[0071] The currently displayed page is the page displayed after the page elements are changed. The white screen score of the page is used to measure the complexity of the page elements included in the page.

[0072] See also Figure 3 As shown, it is determined whether the white screen score meets the initial judgment condition. If the white screen score meets the initial judgment condition, it means that there is a possibility that the page is a white screen, and it is necessary to further determine whether the page is a white screen. If the white screen score does not meet the initial judgment condition, it means that the page is not a white screen, and the white screen detection of the page is ended.

[0073] The initial judgment condition is a pre-set condition for judging whether a page is a white screen using a white screen score. As an example, the initial judgment condition is that the white screen score is less than or equal to the score threshold. The score threshold can be pre-set based on the business services provided by the page. If the white screen score is less than or equal to the score threshold, it means that the page elements included in the page are relatively simple, and there is a possibility that the page is a white screen, and it is necessary to continue to judge whether the page is a white screen.

[0074] The embodiment of the present application does not limit the implementation method of determining the white screen score of the page.

[0075] As an example, the white screen score of the page is determined using the DOM tree of the page.

[0076] The DOM tree includes multiple DOM nodes. Each DOM node corresponds to a page element included in the page. The node score of the DOM node is determined based on the number of layers of the DOM node in the DOM tree and the display ratio of the DOM node. The number of layers of the DOM node in the DOM tree can reflect the complexity of the DOM tree, that is, the complexity of the hierarchical relationship between the page elements. The display ratio of the DOM node is the ratio of the display area of ​​the page element corresponding to the DOM node in the page to the display area of ​​the page element corresponding to the parent node of the DOM node in the page. The display ratio of the DOM node can reflect the display ratio of the page element corresponding to the DOM node in the page.

[0077] As an example, the node score of a DOM node is calculated by formula (1):

[0078]

[0079] Where depth is the number of layers of the DOM node in the DOM tree. height is the display height of the page element corresponding to the DOM node. innerheight is the display height of the page element corresponding to the parent node of the DOM node. width is the display width of the page element corresponding to the DOM node. innerwidth is the display width of the page element corresponding to the parent node of the DOM node.

[0080] The obtained node score of the DOM node is used to determine the white screen score, which is, for example, a statistical value of the node score of the DOM node.

[0081] As an example, the white screen score is the sum of the node scores of the DOM nodes.

[0082] In one possible calculation method, the node score of each DOM node included in the DOM tree is calculated respectively. Then the sum of the node scores of each DOM node is calculated to obtain the white screen score. As an example, a breadth first search method is adopted to traverse each DOM node to determine the node score of each DOM node.

[0083] Another possible calculation method is that the node score of the DOM node is not a negative number. The initial judgment condition is that the white screen score is less than or equal to the score threshold.

[0084] After obtaining the node score of a DOM node each time, the sum of the node scores of the determined DOM nodes is calculated to obtain the intermediate score. Determine whether the intermediate score meets the initial judgment condition. If the intermediate score no longer meets the initial judgment condition, the sum of the node scores of all DOM nodes also does not meet the initial judgment condition, and there is no need to continue calculating the node scores of other DOM nodes. Use the intermediate score as the white screen score. If the intermediate score meets the initial judgment condition, continue to calculate the node scores of the DOM nodes and update the intermediate score until all DOM nodes included in the DOM tree are calculated, or the intermediate score does not meet the initial judgment condition.

[0085] The following is a possible implementation method for calculating the white screen score, including A1-A2:

[0086] A1: Among the DOM nodes included in the DOM tree, the DOM node that is ranked first in a preset order is used as the target DOM node.

[0087] The preset order is the order in which the DOM nodes are calculated. As an example, the preset order is from top to bottom and from left to right. The target DOM node is the DOM node for which the node score is calculated this time.

[0088] A2: Loop the following operations until the next DOM node of the target DOM node indicated by the preset order is empty, or the middle score does not meet the initial judgment condition, and use the middle score as the white screen score:

[0089] Determine the node score of the target DOM node;

[0090] Determine an intermediate score based on the node scores of the DOM nodes included in the determined DOM tree;

[0091] The next DOM node of the target DOM node indicated by the preset sequence is used as the target DOM node.

[0092] In this way, when the intermediate score does not meet the initial judgment condition, the calculation of the node score of the DOM node can be ended, thereby saving computing resources for calculating the node score and improving the speed of calculating the white screen score.

[0093] S202: If the white screen score meets the initial judgment condition, the client sends page information of the page to the server.

[0094] When the white screen score meets the initial judgment condition, the server needs to judge whether the page is a white screen again to obtain the final judgment result of whether the page is a white screen.

[0095] In some possible implementations, after determining that the white screen score meets the initial judgment condition, before the client sends the page information of the page to the server, it is also determined that the page is not a preset security page. The preset security page is a page that is determined not to be a white screen. As an example, a page whitelist is pre-established. The page whitelist includes preset security pages.

[0096] The embodiment of the present application does not limit the implementation method of determining that a page is not a preset security page. As an example, a filtering HTML tag for a security page is preset. Figure 3 As shown, it is determined whether the DOM of the page includes a filter HTML tag. If the DOM of the page does not include a filter HTML tag, it means that the page is not a safe page and there is a possibility of a white screen. The filter HTML tag is, for example, an interactive HTML tag or a custom HTML tag. The interactive HTML tag is, for example, <textarea>< / textarea> Label or <input> If the DOM of the page includes the filtered HTML tag, it means that the page is a safe page and the page is not a white screen, and the white screen detection of the page ends.

[0097] The client obtains the page information of the page. The page information is used to determine whether the page is a white screen.

[0098] As an example, the page information of a page includes a page image obtained by taking a screenshot of the page. Figure 3 As shown, the client takes a screenshot of the page to obtain a page image. For example, the client calls HTML2Canvas to convert the DOM nodes included in the DOM tree corresponding to the page into an image to obtain the page image.

[0099] As another example, the DOM nodes included in the DOM tree corresponding to the page are relatively complex. If the client takes a screenshot of the page, it will affect the normal operation of the client main thread.

[0100] The client obtains the HTML string of the page and sends the page information including the HTML string of the page to the server. The HTML string is used to render the page. The server can render the page based on the obtained HTML string. This can reduce the cost of white screen detection on the client.

[0101] As an example, an HTML string is a string obtained by concatenating the string corresponding to the DOM node of the page and the style tag string, and deleting the script tag. The string corresponding to the DOM node is used to determine the page elements included in the page. The style tag is used to define the style of the page element. The script tag is used to define the client script. Deleting the script tag can improve the stability of the server when rendering the page using the HTML string.

[0102] In addition, after generating the HTML string of the page, you can also compress the HTML string. For example, compress the HTML string using zip (a compression method) to obtain a binary file. Figure 3 As shown, the client sends a compressed HTML string, that is, a binary file, to the server. As an example, the main thread of the client generates an HTML string and sends the HTML string to the Web Worker through IPC (Inter-Process Communication). WebWorker implements the compression of the HTML string. Web Worker is an independent thread running on the client except the main thread. In this way, the resource occupation of the client main thread by white screen detection can be reduced, the impact of white screen detection on the client display page can be reduced, the efficiency of the client display page can be improved, and the jamming of the display page can be reduced.

[0103] After obtaining the page information of the page, the server determines whether the page is a blank screen based on the page information of the page. As a possible implementation method, the embodiment of the present application provides an implementation method for the server to use the page information of the page to determine whether the page is a blank screen, including the following steps:

[0104] B1: The server obtains the page information sent by the client.

[0105] B2: The server obtains the page image of the page based on the page information.

[0106] The server parses the page information and obtains the page image of the page.

[0107] In a possible implementation, the page information includes a page image, and the server parses the page information to obtain the page image.

[0108] In another possible implementation, the page information includes an HTML string of the page. The server parses the page information to obtain the HTML string. For example, in the case where the page information includes a binary file obtained by compressing the HTML string, see Figure 3As shown, the server can decompress the binary file to obtain an HTML string. The client can use Decompressor (a decompression tool) to decompress the binary file. The server renders the page based on the HTML string and takes a screenshot of the page to obtain a page image. As an example, the server calls puppeteer (a browser without a graphical user interface) to process the HTML string and render the page.

[0109] B3: The server uses the white screen detection model to process the page image and obtain the white screen detection result.

[0110] The white screen detection model is a pre-trained model used to determine the white screen detection result based on the input page image. The white screen detection model is, for example, a deep learning model.

[0111] The server inputs the page image into the white screen detection model and obtains the white screen detection result output by the white screen detection model. The white screen detection result is used to indicate whether the page image is a white screen image. As an example, the white screen detection result is a probability value that the page image is a white screen image. As another example, the white screen detection result is a determination value of whether the page image is a white screen image. The type of the white screen detection result is determined by the training process of the white screen detection model.

[0112] In a possible implementation, the server needs to normalize the image size of the page image before inputting it into the white screen detection model. The processed page image meets the size requirements of the image processed by the white screen detection model and adapts to the size of the input image that the white screen detection model can process.

[0113] As an example, an embodiment of the present application provides a training method for a white screen detection model, including the following steps C1-C2:

[0114] C1: Obtain a training page image and a label corresponding to the training page image. The training page image is a white screen image or a non-white screen image. The label is used to identify whether the training page image is a white screen image.

[0115] A training data set for training a white screen detection model is pre-established. The training data set includes training page images and labels corresponding to the training page images.

[0116] The training page image is a white screen image or a non-white screen image. The training page image included in the training data set is an original white screen image, or an original non-white screen image, and is also, for example, a page image obtained by performing an enhancement operation on the original white screen image or the original non-white screen image. The enhancement operation, for example, includes operations such as inversion and rotation to expand the training page image included in the training data set.

[0117] The label corresponding to the training page image is used to identify whether the training page image is a white screen image. As an example, when the label corresponding to the training page image is 0, it means that the training page image is not a white screen image. When the label corresponding to the training page image is 1, it means that the training page image is a white screen image.

[0118] C2: The white screen detection model is trained using the training page images and the labels corresponding to the training page images.

[0119] The embodiment of the present application does not limit the method of training the white screen detection model using training page images and labels corresponding to the training page images.

[0120] In one possible implementation, the white screen detection model is pre-trained using imageNET (image network). Then, the white screen detection model is trained using the training page images and the labels corresponding to the training page images, and the pre-trained white screen detection model is fine-tuned (Finetune). This can increase the speed of training the white screen detection model and improve the efficiency of training the white screen detection model.

[0121] B4: The server determines whether the page is a white screen based on the white screen detection result.

[0122] As an example, the white screen detection result is used to measure the possibility that the page image is a white screen image. For example, the white screen detection result is a probability value that the page image is a white screen image. The server determines whether the white screen detection result belongs to the numerical interval of the white screen image. If the white screen detection result belongs to the numerical interval of the white screen image, it is determined that the page is a white screen. If the white screen detection result does not belong to the numerical interval of the white screen image, it is determined that the page is not a white screen.

[0123] As another example, the white screen detection result is a determination value of whether the page image is a white screen image. The server can determine whether the page is a white screen according to the determination value.

[0124] In a possible implementation, when the server determines that the page is a white screen, the server calls a white screen processing method to process the page.

[0125] Based on the above content, it can be known that in the white screen detection method provided in the embodiment of the present application, comprehensive detection of the page can be achieved. In addition, the client performs initial white screen detection on the page, which can reduce the resources consumed by the client to detect the white screen and reduce the cost of the client to detect the white screen. The client and the server perform white screen detection on the page in turn, which can improve the confidence of the white screen detection and reduce the false alarm rate of the white screen detection.

[0126] Based on a white screen detection method provided in the above method embodiment, an embodiment of the present application further provides a white screen detection device, which will be described below in conjunction with the accompanying drawings.

[0127] See also Figure 4 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a white screen detection device provided in an embodiment of the present application. Figure 4 As shown, the white screen detection device includes:

[0128] A score determination unit 401 is used to determine a white screen score based on the page elements included in the currently displayed page in response to detecting a page element change, wherein the white screen score is used to measure the complexity of the page elements included in the page;

[0129] The sending unit 402 is used to send the page information of the page to the server if the white screen score meets the initial judgment condition, and the page information is used for re-judgment to determine whether the page is a white screen.

[0130] In a possible implementation, the score determination unit 401 is used to detect a change in a page element, including:

[0131] The score determination unit 401 is used to detect a structural change in a document object model tree of a page, where the document object model tree of the page is used to describe a hierarchical structure of page elements included in the page, and the document object model tree of the page includes document object model nodes, and the document object model nodes correspond to the page elements included in the page.

[0132] In a possible implementation, the score determining unit 401 is used to determine the white screen score based on the page elements included in the currently displayed page, including:

[0133] The score determination unit 401 is used to determine the node score of the document object model node included in the document object model tree of the page, and determine the white screen score based on the document object model node score; the node score of the document object model node is determined based on the number of layers of the document object model node in the document object model tree and the display ratio of the document object model node, and the display ratio is the ratio of the display area of ​​the page element corresponding to the document object model node in the page to the display area of ​​the page element corresponding to the parent node of the document object model node in the page.

[0134] In a possible implementation, the score determination unit 401 is configured to determine a node score of a document object model node included in the document object model tree of the page, and determine a white screen score based on the document object model node score, including:

[0135] The score determination unit 401 is used to determine the node score of each DOM node included in the DOM tree; and calculate the sum of the scores of each DOM node included in the DOM tree to obtain a white screen score.

[0136] In a possible implementation, the score determination unit 401 is configured to determine a node score of a document object model node included in the document object model tree of the page, and determine a white screen score based on the document object model node score, including:

[0137] The score determination unit 401 is used to take the first DOM node in a preset order among the DOM nodes included in the DOM tree as the target DOM node;

[0138] The following operations are performed in a loop until the next DOM node of the target DOM node indicated by the preset sequence is empty or the intermediate score does not meet the initial judgment condition, and the intermediate score is used as the white screen score:

[0139] Determining a node score of the target document object model node;

[0140] Determining an intermediate score based on the determined node scores of the document object model nodes included in the document object model tree;

[0141] The next DOM node of the target DOM node indicated by the preset sequence is used as the target DOM node.

[0142] In a possible implementation, the page information of the page includes a page image obtained by taking a screenshot of the page.

[0143] In a possible implementation, the page information of the page includes a hypertext markup language string of the page, and the hypertext markup language string of the page is used to render the page on the server to obtain a page image of the page.

[0144] In a possible implementation, the hypertext markup language character string is a character string obtained by concatenating a character string corresponding to a document object model node of the page and a style tag character string, and deleting a script tag.

[0145] In a possible implementation manner, the device further includes:

[0146] A compression unit, used for compressing the hypertext markup language string of the page by using threads other than the main thread;

[0147] The sending unit 402 is specifically configured to send the compressed hypertext markup language string of the page to the server.

[0148] In a possible implementation manner, the device further includes:

[0149] The security page determination unit is used to determine that the page is not a security page and the security page is a non-white screen.

[0150] In a possible implementation, the security page determination unit is specifically configured to determine that a document object model of the page does not include a filtering hypertext markup language tag, where the filtering hypertext markup language tag is used to indicate that the page is not a white screen.

[0151] Based on a white screen detection method provided in the above method embodiment, the embodiment of the present application also provides a white screen detection system, which will be described below in conjunction with the accompanying drawings.

[0152] See also Figure 5 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a white screen detection system provided in an embodiment of the present application. Figure 5 As shown, the white screen detection system includes a client 501 and a server 502 for displaying web pages.

[0153] The client 501 is used to determine a white screen score based on the page elements included in the currently displayed page in response to detecting a change in the page elements, wherein the white screen score is used to measure the complexity of the page elements included in the page; if the white screen score meets the initial judgment condition, send the page information of the page to the server 502, wherein the page information is used to judge again to determine whether the page is a white screen;

[0154] The server 502 is used to obtain the page information and determine whether the page is a white screen based on the page information.

[0155] In a possible implementation, the client 501 is used to detect a change in a page element, including:

[0156] The client 501 is used to detect structural changes in the document object model tree of the page, where the document object model tree of the page is used to describe the hierarchical structure of the page elements included in the page, and the document object model tree of the page includes document object model nodes, which correspond to the page elements included in the page.

[0157] In a possible implementation, the client 501 is configured to determine a white screen score based on page elements included in a currently displayed page, including:

[0158] The client 501 is used to determine the node score of the document object model node included in the document object model tree of the page, and determine the white screen score based on the document object model node score; the node score of the document object model node is determined based on the number of layers of the document object model node in the document object model tree and the display ratio of the document object model node, and the display ratio is the ratio of the display area of ​​the page element corresponding to the document object model node in the page to the display area of ​​the page element corresponding to the parent node of the document object model node in the page.

[0159] In a possible implementation, the client 501 is configured to determine a node score of a document object model node included in the document object model tree of the page, and determine a white screen score based on the document object model node score, including:

[0160] The client 501 is used to determine the node score of each DOM node included in the DOM tree; calculate the sum of the scores of each DOM node included in the DOM tree to obtain a white screen score.

[0161] In a possible implementation, the client 501 is configured to determine a node score of a document object model node included in the document object model tree of the page, and determine a white screen score based on the document object model node score, including:

[0162] The client 501 is used to use the first document object model node in a preset order among the document object model nodes included in the document object model tree as a target document object model node;

[0163] The following operations are performed in a loop until the next DOM node of the target DOM node indicated by the preset sequence is empty or the intermediate score does not meet the initial judgment condition, and the intermediate score is used as the white screen score:

[0164] Determining a node score of the target document object model node;

[0165] Determining an intermediate score based on the determined node scores of the document object model nodes included in the document object model tree;

[0166] The next DOM node of the target DOM node indicated by the preset sequence is used as the target DOM node.

[0167] In a possible implementation, the page information of the page includes a page image obtained by taking a screenshot of the page.

[0168] In a possible implementation, the page information of the page includes a hypertext markup language string of the page, and the hypertext markup language string of the page is used to render the page on the server 502 to obtain a page image of the page.

[0169] In a possible implementation, the hypertext markup language character string is a character string obtained by concatenating a character string corresponding to a document object model node of the page and a style tag character string, and deleting a script tag.

[0170] In a possible implementation, before sending the page information of the page to the server 502, the client 501 is further used to compress the hypertext markup language string of the page using a thread other than the main thread;

[0171] The client 501 is used to send the page information of the page to the server 502, including:

[0172] The client 501 is used to send the compressed hypertext markup language string of the page to the server 502.

[0173] In a possible implementation, before sending the page information of the page to the server 502, the client 501 is further used to determine that the page is not a security page and the security page is not a white screen.

[0174] In a possible implementation, the client 501 is configured to determine that the page is not a secure page, including:

[0175] The client 501 is used to determine that the document object model of the page does not include a filtering hypertext markup language tag, and the filtering hypertext markup language tag is used to indicate that the page is not a white screen.

[0176] Based on a white screen detection method provided in the above method embodiment, the present application also provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the white screen detection method as described in any of the above embodiments.

[0177] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0178] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0179] Typically, the following devices may be connected to the I / O interface 605: an input device 608 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0180] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0181] The electronic device provided in the embodiment of the present application and the white screen detection method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0182] Based on a white screen detection method provided in the above method embodiment, an embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the program is executed by a processor, the white screen detection method as described in any of the above embodiments is implemented.

[0183] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0184] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0185] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0186] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the white screen detection method.

[0187] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0188] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0189] The units involved in the embodiments described in this application may be implemented by software or hardware. The name of a unit / module does not limit the unit itself in some cases. For example, a voice data acquisition module may also be described as a "data acquisition module".

[0190] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0191] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0192] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0193] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0194] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0195] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0196] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A white screen detection method, characterized in that: The method is applied to a client that displays a web page, and the method comprises: In response to detecting a page element change, determining a white screen score based on the page elements included in the currently displayed page, wherein the white screen score is used to measure the complexity of the page elements included in the page; If the white screen score meets the initial judgment condition, the page information of the page is sent to the server, and the page information is used for re-judgment to determine whether the page is a white screen.

2. The method according to claim 1, characterized in that The detecting of a page element change includes: A structural change of a document object model tree of a page is detected, wherein the document object model tree of the page is used to describe a hierarchical structure of page elements included in the page, and the document object model tree of the page includes document object model nodes, and the document object model nodes correspond to the page elements included in the page.

3. The method according to claim 1, characterized in that The determining of the white screen score based on the page elements included in the currently displayed page includes: Determine the node scores of the document object model nodes included in the document object model tree of the page, and determine the white screen score based on the document object model node scores; the node scores of the document object model nodes are determined based on the number of layers of the document object model nodes in the document object model tree and the display ratio of the document object model nodes, wherein the display ratio is the ratio of the display area of ​​the page element corresponding to the document object model node in the page to the display area of ​​the page element corresponding to the parent node of the document object model node in the page.

4. The method according to claim 3, characterized in that The step of determining the node scores of the document object model nodes included in the document object model tree of the page, and determining the white screen score based on the document object model node scores, comprises: Determine a node score of each document object model node included in the document object model tree; The sum of the scores of the document object model nodes included in the document object model tree is calculated to obtain a white screen score.

5. The method according to claim 3, characterized in that: The step of determining the node scores of the document object model nodes included in the document object model tree of the page, and determining the white screen score based on the document object model node scores, comprises: Among the document object model nodes included in the document object model tree, the document object model node that is ranked first in a preset order is used as a target document object model node; The following operations are performed in a loop until the next DOM node of the target DOM node indicated by the preset sequence is empty or the intermediate score does not meet the initial judgment condition, and the intermediate score is used as the white screen score: Determining a node score of the target document object model node; Determining an intermediate score based on the determined node scores of the document object model nodes included in the document object model tree; The next DOM node of the target DOM node indicated by the preset sequence is used as the target DOM node.

6. The method according to claim 1, characterized in that The page information of the page includes a page image obtained by taking a screenshot of the page.

7. The method according to claim 1, characterized in that The page information of the page includes a hypertext markup language string of the page, and the hypertext markup language string of the page is used to render the page on the server side to obtain a page image of the page.

8. The method according to claim 7, characterized in that The hypertext markup language character string is a character string obtained by concatenating the character string corresponding to the document object model node of the page and the style tag character string, and deleting the script tag.

9. The method according to claim 7, characterized in that: Before sending the page information of the page to the server, the method further includes: Compressing the hypertext markup language string of the page using threads other than the main thread; The sending of the page information of the page to the server includes: The compressed hypertext markup language string of the page is sent to the server.

10. The method according to any one of claims 1 to 9, characterized in that: Before sending the page information of the page to the server, the method further includes: It is determined that the page is not a security page, and the security page is a non-white screen.

11. The method according to claim 10, characterized in that The determining that the page is not a secure page includes: It is determined that the document object model of the page does not include a filtering hypertext markup language tag, where the filtering hypertext markup language tag is used to indicate that the page is a non-white screen.

12. A white screen detection device, characterized in that: The device is applied to a client for displaying a web page, and the device comprises: A score determination unit, configured to determine a white screen score based on the page elements included in the currently displayed page in response to detecting a change in the page elements, wherein the white screen score is used to measure the complexity of the page elements included in the page; The sending unit is used to send the page information of the page to the server if the white screen score meets the initial judgment condition, and the page information is used to judge again to determine whether the page is a white screen.

13. A white screen detection system, characterized in that: The white screen detection system includes a client and a server for displaying web pages; The client is used to determine a white screen score based on the page elements included in the currently displayed page in response to detecting a change in the page elements, wherein the white screen score is used to measure the complexity of the page elements included in the page; If the white screen score meets the initial judgment condition, the page information of the page is sent to the server, and the page information is used for re-judgment to determine whether the page is a white screen; The server is used to obtain the page information and determine whether the page is a white screen based on the page information.

14. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-11.

15. A computer readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.