White screen detection method and device, electronic equipment, medium and program product
By combining frame white screen detection and somatosensory white screen detection, the problems of incomplete coverage of white screen detection in the existing technology are solved, and accurate and efficient white screen detection for multi-platform adaptation are achieved, improving the stability and user experience of the application.
Patent Information
- Application Number
- CN202510317529.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the application white screen detection covers incomplete scenarios or the detection method is too simple, resulting in large errors and the failure to effectively identify the white screen problem of multiple platforms, affecting the user experience and corporate image.
Using a combination of frame white screen detection and somatosensory white screen detection, the two detection solutions are combined to achieve accurate and efficient white screen detection for multi-platform adaptation.
It improves the accuracy and comprehensiveness of white screen detection, can meet the recognition requirements of most white screen scenes, reduces misjudgments and misjudgments, and improves the user experience and application stability.
Smart Images

Figure CN120256294A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular, to a white screen detection method, device, electronic device, medium, and program product. Background Art
[0002] With the popularization of mobile Internet applications, the user experience of application programs (Apps) has been increasingly emphasized. Among them, a white screen on the page brings a bad user experience. Usually, the application program needs to actively detect that the page is in a white screen state in order to make corresponding protection processing in time, which is crucial for the user experience. If the white screen problem cannot be discovered and solved in time, it may seriously affect the use and promotion effect of the application program, and even have an adverse impact on the corporate image. Seriously, it may lead to incorrect background data. Summary of the Invention
[0003] Embodiments of this specification provide a white screen detection method, device, electronic device, medium, and program product. It can not only use frame white screen detection to accurately and low-energy consume white screen detection by analyzing the front-end code of the page to be detected, but also use somatosensory white screen detection to achieve efficient and streamlined white screen detection that is more in line with the user's somatosensation by analyzing the screenshot of the page to be detected. It can also integrate the above two white screen detection schemes of somatosensory white screen detection and frame white screen detection to achieve white screen detection for multi-platform adaptation (such as but not limited to IOS, Android, and HarmonyOS, etc.), improve the accuracy and comprehensiveness of white screen detection, enable white screen detection to meet the recognition requirements of most white screen scenarios, and provide underlying technical support for solving the white screen anomaly of application programs. The above technical solutions are as follows:
[0004] In a first aspect, embodiments of this specification provide a white screen detection method, including:
[0005] Obtain the front-end code of the page to be detected of the application program;
[0006] Based on the above front-end code, perform frame white screen detection on the page to be detected to obtain a frame white screen detection result;
[0007] Based on the screenshot of the page to be detected, perform somatosensory white screen detection on the page to be detected to obtain a somatosensory white screen detection result;
[0008] Based on the above frame white screen detection result and / or the above somatosensory white screen detection result, determine the target white screen detection result corresponding to the page to be detected.
[0009] In a second aspect, embodiments of this specification provide a white screen detection device, and the above device includes:
[0010] A front-end code acquisition module, configured to acquire the front-end code of the page to be detected of the application;
[0011] A framework white screen detection module, configured to perform framework white screen detection on the page to be detected based on the above front-end code to obtain a framework white screen detection result;
[0012] A body feeling white screen detection module, configured to perform body feeling white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a body feeling white screen detection result;
[0013] A determination module, configured to determine the target white screen detection result corresponding to the page to be detected based on the above framework white screen detection result and / or the above body feeling white screen detection result.
[0014] In a third aspect, an embodiment of this specification provides an electronic device, including: a processor and a memory;
[0015] The above-mentioned processor is connected to the above-mentioned memory;
[0016] The above-mentioned memory is used to store executable program codes;
[0017] The above-mentioned processor runs a program corresponding to the executable program code by reading the executable program code stored in the above-mentioned memory, so as to execute the method provided in the first aspect of the embodiment of this specification.
[0018] In a fourth aspect, an embodiment of this specification provides a computer storage medium, and the above computer storage medium stores multiple instructions, and the above instructions are suitable for being loaded and executed by a processor to execute the method provided in the first aspect of the embodiment of this specification.
[0019] In a fifth aspect, an embodiment of this specification provides a computer program product including instructions. When the above computer program product runs on a computer or a processor, the above computer or the above processor is enabled to execute the white screen detection method provided in the first aspect of the embodiment of this specification.
[0020] In the embodiments of this specification, the front-end code of the page to be detected of the application program is obtained, and the frame white screen detection is performed on the page to be detected based on the above front-end code to obtain the frame white screen detection result; the somatosensory white screen detection is performed on the page to be detected based on the screenshot of the page to be detected to obtain the somatosensory white screen detection result; the target white screen detection result corresponding to the page to be detected is determined based on the above frame white screen detection result and / or the above somatosensory white screen detection result. Therefore, the accurate and low-power white screen detection can be realized by analyzing the front-end code of the page to be detected through the frame white screen detection, and the efficient, streamlined and more user-somatosensory white screen detection can be realized by analyzing the screenshot of the page to be detected through the somatosensory white screen detection. In addition, the two white screen detection schemes of the above somatosensory white screen detection and frame white screen detection can be integrated to realize the white screen detection adapted to multiple platforms (such as but not limited to IOS, Android, HarmonyOS, etc.), improve the accuracy and comprehensiveness of the white screen detection, enable the white screen detection to meet the recognition requirements of most white screen scenarios, and provide the underlying technical support for solving the white screen anomaly of the application program. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 Schematic diagram of the architecture of a white screen detection system provided by an exemplary embodiment of this specification;
[0023] Figure 2 Schematic diagram of the flow of a white screen detection method provided by an exemplary embodiment of this specification;
[0024] Figure 3 Schematic diagram of the implementation process of frame white screen detection provided by an exemplary embodiment of this specification;
[0025] Figure 4 Schematic diagram of a white screen page provided by an exemplary embodiment of this specification;
[0026] Figure 5 Schematic diagram of the implementation process of frame white screen detection provided by an exemplary embodiment of this specification;
[0027] Figure 6 Schematic diagram of the implementation process of somatosensory white screen detection provided by an exemplary embodiment of this specification;
[0028] Figure 7Schematic diagram of the implementation process of a somatosensory white screen detection provided by an exemplary embodiment of this specification;
[0029] Figure 8 Schematic flowchart of another white screen detection method provided by an exemplary embodiment of this specification;
[0030] Figure 9 Schematic diagram of the structure of a white screen detection device provided by an exemplary embodiment of this specification;
[0031] Figure 10 Schematic diagram of the structure of an electronic device provided by an exemplary embodiment of this specification. Detailed implementation manners
[0032] Next, the technical solutions in the embodiments of this specification will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this specification.
[0033] Terms such as "first", "second", "third", etc. in this specification, the claims and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0034] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the front-end code, screenshots of the page to be detected, etc. involved in this specification are obtained under full authorization.
[0035] In related white screen technologies, either the white screen detection coverage scenario is incomplete and only suitable for the Android platform, while it cannot be used on IOS. For example, the white screen detection based on the UC kernel constructs a canvas for drawing analysis based on the page to be detected, and then draws the current layer tree onto this canvas. By analyzing whether there is a texture layer and drawing operations in the drawing instructions, it is determined whether the page is a white screen page. Or the white screen detection coverage scenario is incomplete, and the white screen detection judgment is too simple with a large error. For example, the white screen detection of Domain Specific Language (DSL) executes a front-end JS script on the page to be detected. This script checks whether there is an appx-DOM root node with className=tiny-page in the front-end code of the page to be detected and whether there is an element with a size exceeding 12x12 pixels among the first-level child nodes under this node to determine whether it is a white screen page.
[0036] Based on this, the embodiments of this specification provide a white screen detection method that can not only use framework white screen detection to achieve accurate and low-power white screen detection by analyzing the front-end code of the page to be detected, but also use somatosensory white screen detection to achieve efficient and streamlined white screen detection that is more in line with the user's somatosensory experience by analyzing the screenshots of the page to be detected. It can also integrate the above two white screen detection schemes of somatosensory white screen detection and framework white screen detection to achieve white screen detection that is adaptable to multiple platforms (such as but not limited to IOS, Android, and HarmonyOS, etc.), improve the accuracy and comprehensiveness of white screen detection, enable white screen detection to meet the recognition requirements of most white screen scenarios, and provide underlying technical support for solving the white screen exception of application programs.
[0037] Next, please refer to Figure 1 , Figure 1 which is a schematic diagram of the architecture of a white screen detection system provided by an exemplary embodiment of this specification. As Figure 1 shown, the white screen detection system may include: a terminal 110 and a server 120. Among them:
[0038] The terminal 110 may include one or more user ends. One or more user versions of application programs can be installed in the terminal 110. The terminal 110 can establish a data relationship with the network and establish a data connection relationship with the server 120 through this network, such as sending user access requests, receiving white screen detection results, etc. Among them, the terminal 110 can be but is not limited to devices such as mobile phones, tablets, and laptop computers installed with user version application programs.
[0039] Specifically, during the process of a user accessing an application through the terminal 110, after the page (the page to be detected) is rendered, it is possible but not limited to first obtaining the front-end code of the page to be detected of the application, and based on the above front-end code, performing a framework white screen detection on the page to be detected to obtain a framework white screen detection result, and performing a motion white screen detection on the page to be detected based on a screenshot of the page to be detected to obtain a motion white screen detection result; finally, determining the target white screen detection result corresponding to the page to be detected based on the above framework white screen detection result and / or the above motion white screen detection result.
[0040] Optionally, when the terminal 110 detects that the target white screen detection result corresponding to the page to be detected after the current rendering is completed indicates that the page to be detected is a white screen page, the terminal 110 can also report the above target white screen detection result to the server 120 through the network to trigger the server 120 to perform an anomaly analysis on the page to be detected.
[0041] The server 120 can be a server that can provide various white screen detections or white screen result analyses. The server 120 can be but is not limited to a hardware server, a virtual server, a cloud server, etc.
[0042] Optionally, the server 120 can be but is not limited to receiving the front-end code and / or screenshot of the page to be detected reported by the terminal 110 after the page to be detected is rendered, and performing corresponding white screen detections through the white screen detection solution provided in the embodiments of this specification to obtain the corresponding target white screen detection result. At the same time, the server 120 can also return the above target white screen detection result to the terminal 110.
[0043] Optionally, the server 120 can also be but is not limited to directly receiving the target white screen detection result of the page to be detected reported by the terminal 110 after the terminal 110 detects that the page to be detected is a white screen page through the white screen detection method provided in this specification, and performing an anomaly analysis based on the above target white screen detection result to promptly promote the repair and solution of the white screen problem existing in the page to be detected of the application.
[0044] It can be understood that the above white screen detection process is not limited to being executed by the above server 120, and can also be executed by the above terminal 110. The embodiments of this specification do not make specific limitations in this regard. The following embodiments will all be described by taking the terminal 110 as an example for executing the above white screen detection.
[0045] The network can be a medium that provides a communication link between the server 120 and the terminal 110, or it can be the Internet that includes network devices and transmission media, and is not limited thereto. The transmission medium can be a wired link, such as but not limited to, coaxial cable, optical fiber, and digital subscriber line (DSL), etc., or a wireless link, such as but not limited to, wireless fidelity (WIFI), Bluetooth, and mobile device network, etc.
[0046] Understandably, Figure 1 The number of the terminal 110 and the server 120 in the shown white screen detection system is only an example. In a specific implementation, the white screen detection system may include any number of terminals 110 and servers. The embodiments of this specification do not make specific limitations in this regard. For example but not limited to, the terminal 110 can be a terminal cluster composed of multiple terminals, and the server 120 can be a server cluster composed of multiple servers.
[0047] Next, in combination with Figure 1 , introduce the white screen detection method provided by the embodiments of this specification. Specifically, please refer to Figure 2 , which is a schematic flowchart of a white screen detection method provided by an exemplary embodiment of this specification. As Figure 2 shown, the white screen detection method includes the following steps:
[0048] S202, Obtain the front-end code of the page to be detected of the application.
[0049] Specifically, when a user accesses the page to be detected in the application through an automated testing tool or manually, it is possible but not limited to use developer tools or dedicated web crawler technology to capture the front-end code of the page to be detected. The above-mentioned page to be detected can be the page that needs to be displayed after being currently rendered in the application, or it can be the page that needs to be reported for white screen detection manually selected by the user, etc. The embodiments of this specification do not make limitations in this regard. The above-mentioned front-end code refers to the code used to build the user interface of the application, and usually includes HTML, CSS, and JavaScript, etc.
[0050] S204, Perform frame white screen detection on the page to be detected based on the front-end code, and obtain the frame white screen detection result.
[0051] Specifically, the above-mentioned framework white screen detection is used to detect whether there is a phenomenon that the page shows blank for a long time or fails to load valid content due to reasons such as framework or component loading failure, code error, etc. in an application built using a front-end framework. Through the framework white screen detection in the embodiments of this specification, not only can the front-end white screen problem in the application be discovered and solved in time, improving the user experience and the stability of the application, but also the automated white screen detection based on the front-end code reduces the cost and time required for manual detection when the application has a white screen problem, improving the efficiency and quality of the white screen detection.
[0052] Optionally, after obtaining the front-end code of the page to be detected, the front-end code can be parsed first to extract the framework information (such as, but not limited to, the front-end framework, component library, etc. used by the page to be detected) and page element information of the page to be detected, and then based on the above framework information and page element information, it is detected whether the page to be detected fails to display any valid content within a certain period of time, whether the page elements fail to load, etc. If the page to be detected fails to display any valid content within a certain period of time or the page elements fail to load, it is determined that the framework white screen detection result is that the page to be detected is a white screen page.
[0053] In some possible embodiments, for the above S204, the implementation process of performing frame white screen detection on the page to be detected based on the front-end code to obtain the frame white screen detection result may include but is not limited to: when the page to be detected reaches a steady state, determining the page rendering information of the page to be detected based on the front-end code of the page to be detected; then, determining the frame white screen detection result based on the above page rendering information. The above steady state is used to characterize the state after the page rendering is completed, that is, the page is loaded, all resources (such as pictures, CSS, JavaScript files, etc.) have been loaded, and the dynamic content on the page (such as data returned by AJAX requests) has been updated, and the page no longer changes significantly. That is, when receiving an access operation from the user for the application, the terminal can load the page that the user currently wants to access (i.e., the page to be detected) based on this access operation. When the page to be detected is rendered and reaches a steady state, it may include but is not limited to first parsing the front-end code of the page to be detected, extracting the page rendering information of the page to be detected, and then analyzing the page rendering information, such as but not limited to checking whether the page to be detected renders valid content as expected (such as checking whether page elements are visible, whether there is content blocked or not displayed correctly, etc.), and checking whether the rendering information related to the frame is in an abnormal state (such as whether the state of front-end frameworks such as React, Vue, or Angular is abnormal, whether the component rendering state is abnormal, etc.), to obtain the corresponding frame white screen detection result. If the page to be detected shows blank or only shows a loading indicator without valid content under the steady state, that is, there are no rendering frames and content nodes in the page rendering information, it can be determined that the frame white screen detection result corresponding to the page to be detected is that the page to be detected is a white screen page. The above page rendering information may include but is not limited to the presentation method of the page to be detected in the browser, such as but not limited to including the DOM tree structure, element styles, event listeners, etc.
[0054] In the embodiments of this specification, by waiting for the page to be detected to reach a steady state before performing white screen detection, it not only ensures the accuracy of the white screen detection, avoids misjudgment problems caused by the incomplete loading of the page to be detected, but also can automatically detect the frame white screen problem that occurs during the operation of the application in a timely manner, greatly improving the timeliness of the white screen detection, and helping to improve the stability and user experience of the application.
[0055] Optionally, as Figure 3 shown, the implementation process of the above frame white screen detection may include but is not limited to:
[0056] S302, when the page to be detected reaches a steady state, determining the page rendering information of the page to be detected based on the front-end code.
[0057] Specifically, the above-mentioned steady state is used to characterize the state after page rendering is completed, that is, the page loading is completed, all resources (such as pictures, CSS, JavaScript files, etc.) have been loaded, and the dynamic content on the page (such as data returned by AJAX requests) has been updated, and the page no longer undergoes significant changes. When the page to be detected reaches the steady state after rendering is completed, it is possible but not limited to first parse the front-end code of the page to be detected and extract the page rendering information of the page to be detected. The above page rendering information may include but is not limited to the presentation method of the page to be detected in the browser, such as but not limited to including DOM tree structure, element styles, event listeners, etc.
[0058] S304, Determine whether the page to be detected renders content based on the page rendering information.
[0059] Specifically, after determining the page rendering information of the page to be detected, the page rendering information can be analyzed to check whether there are page elements in the DOM tree of the page to be detected and whether these page elements contain valid content (such as text, pictures, sibling nodes, etc.). If there are page elements containing valid content in the DOM tree, it is determined that the page to be detected has rendered content; if not, it is determined that the page to be detected has not rendered content.
[0060] S306, If the page to be detected does not render content, determine the frame white screen detection result based on the application state corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected.
[0061] Specifically, if the page to be detected does not render content, it indicates that there may be a white screen problem with the page to be detected. Then, it is possible to further detect whether the reason for the page to be detected not rendering content is due to the page to be detected being a white screen page or other reasons based on the application state corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected. If the reason for the page to be detected not rendering content is due to the page to be detected being a white screen page, it can be determined that the frame white screen detection result is that the page to be detected is a white screen page. If the reason for the page to be detected not rendering content is due to other reasons, it can be determined that the frame white screen detection result is that the page to be detected is not a white screen page.
[0062] Optionally, the implementation process of determining the frame white screen detection result based on the application state corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected may include but is not limited to:
[0063] If the content not rendered on the page to be detected is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration (such as but not limited to 6 seconds, 10 seconds, etc.), and the application status corresponding to the page to be detected is an abnormal status, then it can be determined that the page to be detected is a blank screen page.
[0064] If the content not rendered on the page to be detected is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application status corresponding to the page to be detected is a normal status, and the code error detection result corresponding to the page to be detected indicates the existence of code errors, then it can be determined that the page to be detected is a blank screen page.
[0065] If the content not rendered on the page to be detected is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application status corresponding to the page to be detected is a normal status, and the code error detection result corresponding to the page to be detected indicates no code errors, and there are no content nodes and image resources in the DOM scan result corresponding to the page to be detected, then it can be determined that the page to be detected is a blank screen page.
[0066] Exemplarily, when there are no content nodes and image resources in the DOM scan result corresponding to the page to be detected, that is, when the page to be detected has DOM nodes with empty content, the page to be detected is, for example but not limited to, Figure 4 the blank screen page shown.
[0067] Optionally, as Figure 5As shown, the implementation process of the above-mentioned frame white screen detection may but is not limited to include: after the page to be detected reaches a steady state, if it is detected that no content is rendered in the page to be detected, it can first be determined whether the rendering of the page to be detected is interrupted and stopped due to user interaction behavior (for example, the user clicks to exit the page to be detected). If so, it can be determined that the page to be detected is not a white screen page. If not, it can be further detected whether the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration (for example, but not limited to 6 seconds, 10 seconds, etc.). If not, it means that the loading time of the page to be detected is too short and the current time cannot be effectively judged, that is, the current time for white screen detection is invalid, and the white screen detection can be performed after reaching the effective time. If so, it means that the loading time of the page to be detected is too long and may cause a white screen problem, then it can be further determined whether the application state corresponding to the page to be detected (such as the component state of the front-end framework, routing information, etc.) is in a normal state. If not, that is, the application state is an abnormal state, it can be determined that the page to be detected is a white screen page; optionally, it can also be determined that the white screen error code corresponding to the page to be detected is Appx WhiteScreen, that is, it represents that the white screen problem of the page to be detected is caused by an abnormal application state. If the application state corresponding to the page to be detected is in a normal state, it means that the content of the page to be detected is not rendered due to the application state, then it can be further determined to check for errors in the front-end code using a code analysis tool, such as but not limited to syntax errors, runtime exceptions, etc., and analyze whether the page fails to render content due to code errors based on the corresponding code error detection results. If there are code errors in the code error detection results of the front-end code corresponding to the page to be detected, it can be determined that the page to be detected is a white screen page; optionally, it can also be determined that the white screen error code corresponding to the page to be detected is JSError WhiteScreen, that is, it represents that the white screen problem of the page to be detected is caused by errors in the front-end code. If there are no code errors in the code error detection results of the front-end code corresponding to the page to be detected, it can be further deeply scanned the DOM tree of the front-end code corresponding to the page to be detected to check whether there are content nodes and / or image resources in the DOM scan results. If there are content nodes and / or image resources, it means that the content of the page to be detected is not rendered due to the included content nodes and / or image resources, then it can be determined that the page to be detected is not a white screen page; if neither content nodes nor image resources exist, it can be determined that the page to be detected is a white screen page; optionally, it can also be determined that the white screen error code corresponding to the page to be detected is Potential WhiteScreen, that is, it represents a potential display abnormality (white screen) that may occur in the page to be detected due to reasons such as hardware failures (such as graphics card, memory, monitor, or power supply problems), software exceptions (such as operating system crashes, software conflicts, virus infections, or driver problems), etc., that is, the page to be detected may become completely white and display no images or content.
[0068] Next, please continue to refer to Figure 3 , as Figure 3 shown, after determining whether the page to be detected renders content based on the page rendering information, the implementation process of the framework white screen detection may also but is not limited to include:
[0069] S308. If the page to be detected renders content, determine the framework white screen detection result based on the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected.
[0070] Specifically, if the page to be detected renders content, it is possible to further determine whether there is a white screen problem on the page to be detected according to the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected, and then deeply dig out potential problems that may exist in the page to be detected.
[0071] Optionally, the implementation process of determining the framework white screen detection result based on the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected may also but is not limited to include:
[0072] If the content rendered on the page to be detected is not all nodes of the same layer, and the content set to be visible in the content style setting information of the page to be detected is only meaningless text nodes, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to the preset duration, determine that the page to be detected is a white screen page.
[0073] If there are no nodes of the same layer in the content rendered on the page to be detected, and all content in the content style setting information of the page to be detected is set to be invisible, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to the preset duration, determine that the page to be detected is a white screen page.
[0074] Optionally, as Figure 5As shown, the implementation process of the above-mentioned blank screen detection of the framework can include, but is not limited to: after the page to be detected reaches a steady state, if content is rendered in the page to be detected, the node information of the page to be detected can be checked first. For example, but not limited to, the DOM tree corresponding to the page to be detected can be traversed to check whether the rendered content is all nodes of the same layer. If so, it indicates that the content of the page to be detected is consistent in layout, usually meaning that there are substantial visual elements presented on the page to be detected. At this time, it can be directly determined that the page to be detected is not a blank screen page, and there is no need to enter the subsequent steps. If the rendered content in the page to be detected is not all nodes of the same layer, it means that the content of the page to be detected is diverse in layout, that is, different page elements may be located in different layers or regions. Then, the content style setting information of the page to be detected can be further analyzed to determine whether all the content on the page to be detected is set to be invisible. In the case where the content on the page to be detected is completely invisible, if the rendered content in the page to be detected has nodes of the same layer, it indicates that there are substantial visual elements on the page to be detected, and these visual elements have a certain coherence and consistency in layout. At this time, it can be directly determined that the page to be detected is not a blank screen page, and there is no need to enter the subsequent steps. In the case where the content on the page to be detected is completely invisible, if the rendered content in the page to be detected has no nodes of the same layer, it may mean that the page content is completely missing or the layout is extremely chaotic. At this time, it can be directly determined whether the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to the preset duration. If so, it can be determined that the page to be detected is a blank screen page; optionally, it can also be determined that the blank screen error code corresponding to the page to be detected is CssInVisible WhiteScreen, which means that the page to be detected may be a blank screen problem caused by making elements invisible in the content style setting. In the case where the content on the page to be detected is partially visible, if the visible content rendered in the page to be detected contains substantial elements, it can be determined that the page to be detected is not a blank screen page; if the visible content rendered in the page to be detected only has meaningless text nodes (such as spaces, placeholders, etc.), it can be determined that the page to be detected is a blank screen page when the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to the preset duration; optionally, it can also be determined that the blank screen error code corresponding to the page to be detected is TextMeaningless WhiteScreen, which means that the page to be detected is a blank screen problem because all the visible content it renders is meaningless. In the case where the time interval between the rendering completion time and the start loading time of the page to be detected is less than the preset duration, it means that the loading time of the page to be detected is too short and the current time cannot be effectively judged, that is, the current time for blank screen detection is invalid, and the blank screen detection can be performed again after reaching the effective time. The above-mentioned rendering completion time can be the time point when all resources of the page to be detected are loaded and the page is stably presented.
[0075] In the embodiments of this specification, on the one hand, by comprehensively analyzing the content structure characteristics, content visibility settings, and loading time of the page, it is possible to more accurately determine whether the page is a blank screen page, reducing the possibility of misjudgment and missed judgment; on the other hand, the blank screen detection method provided in the embodiments of this specification is not only applicable to conventional blank screen detection scenarios, but can also effectively handle extreme situations such as the absence of same-layer nodes in the rendered content, improving the applicability and flexibility of blank screen detection.
[0076] Next, please continue to refer to Figure 2 , as Figure 2 shown, the above blank screen detection method may but is not limited to include:
[0077] S206, perform somatic blank screen detection on the page to be detected based on the screenshot of the page to be detected, and obtain the somatic blank screen detection result.
[0078] Specifically, the above somatic blank screen detection refers to the detection based on the state that the page appears blank or almost has no content in the subjective perception of the user. Somatic blank screen is not only related to the actual content of the page, but also related to the user's visual perception and expectations. The above screenshot refers to the image captured from the page to be detected, which contains the complete viewport content of the page to be detected and can accurately reflect the state of the page to be detected.
[0079] It can be understood that the above S206 can be executed before S202, or after S202 or synchronously with S202. That is, in the embodiments of this specification, blank screen detection can be performed only by using frame blank screen detection or somatic blank screen detection, or blank screen detection can be performed by combining frame blank screen detection and somatic blank screen detection. When combining frame blank screen detection and somatic blank screen detection for blank screen detection, the above frame blank screen detection and somatic blank screen detection can be executed successively or synchronously. The embodiments of this specification do not make any limitations in this regard.
[0080] Optionally, after the page to be detected is rendered, the page to be detected can also be screenshot first, and then an image recognition algorithm or a machine learning model is used to extract the blank screen features in the screenshot, such as but not limited to large areas of white or other solid colors, and the lack of obvious content elements (such as text, pictures, buttons, etc.). And according to the extracted blank screen features, combined with the preset somatic blank screen judgment criteria, somatic blank screen detection is performed on the page to be detected to obtain the corresponding somatic blank screen detection result. The above preset somatic blank screen judgment criteria may but is not limited to include indicators such as the proportion of the white or solid color area of the page to be detected and the degree of content element absence.
[0081] In the embodiments of this specification, it is not only possible to reflect the subjective perception of users through the detection of the body-sensing white screen, which helps to promptly discover and solve page loading or presentation problems and improve the user experience, but also through the image recognition algorithm or machine learning model, it is possible to more accurately extract and judge the white screen features of the page, thereby improving the accuracy of the body-sensing white screen detection. It also realizes the automation and intelligence of the body-sensing white screen detection, reduces the subjectivity of manual intervention and judgment, and improves the detection efficiency and consistency. At the same time, this body-sensing white screen detection method is not only applicable to the scenarios of web page performance and user experience optimization, but also can be used for the detection and optimization of various interface presentations such as mobile applications and desktop software.
[0082] Optionally, in order to ensure the legality of the body-sensing white screen detection and protect the privacy and security of users, before taking a screenshot of the page to be detected, it is also possible to first determine whether the page to be detected or the application corresponding to the page to be detected belongs to a preset blacklist of prohibited screenshots. Only when it does not belong, will a screenshot of the page to be detected be taken for the body-sensing white screen detection.
[0083] Optionally, as Figure 6 shown, the implementation process of the above S206 for performing body-sensing white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain the body-sensing white screen detection result may include but is not limited to:
[0084] S602, extracting the color description information and / or the proportion of the main color corresponding to the screenshot of the page to be detected.
[0085] Specifically, the above color description information refers to the information describing the color distribution and characteristics in the screenshot, such as hue, saturation, brightness distribution, etc. The above proportion of the main color refers to the proportion of the main color in the screenshot. The screenshot of the page to be detected can be converted from the RGB color space to a color space more suitable for color analysis, such as but not limited to HSV (hue, saturation, value) or Lab (lightness, a and b channels representing color opponency), HLS (hue, lightness, saturation), and the pixel values in the converted color space are analyzed to extract the color description information of the screenshot, and it is possible to determine the main color in the screenshot and calculate the proportion of each main color in the screenshot, that is, the ratio of the number of pixels covered by the color to the total number of pixels, using but not limited to clustering algorithms (such as K-means) or color quantization algorithms (such as median cut method), etc.
[0086] Optionally, in order to improve the accuracy and efficiency of the body-sensing white screen and reduce the interference of irrelevant information, after obtaining the screenshot of the page to be detected, it is also possible to first preprocess the screenshot, such as but not limited to scaling processing (reducing the storage space), top cropping processing (such as cropping the top title area), bottom cropping processing (such as cropping the bottom menu area), etc., and then extract the color description information and / or the proportion of the main color corresponding to the preprocessed image of the page to be detected.
[0087] S604. Determine the somatosensory white screen detection result of the page to be detected based on the color description information corresponding to the screenshot and / or the proportion of the main color.
[0088] It can be understood that the somatosensory white screen can be judged by analyzing the extracted color description information, such as whether the hue is too single, whether the saturation is too low, whether the brightness is too high or too low, etc., and / or by judging according to the proportion of the main color and a preset threshold. It can also combine the judgment results of the color description information and the proportion of the main color to comprehensively judge the somatosensory white screen. The embodiments of this specification do not limit this.
[0089] Optionally, the above color description information may but is not limited to include saturation and / or brightness. For example Figure 7 As shown, the implementation process of the above somatosensory detection may but is not limited to include: after obtaining the color description information and / or the proportion of the main color of the screenshot of the page to be detected, if the brightness of the screenshot is less than or equal to the first brightness (such as but not limited to 0.05f, 0.04f, etc.), it means that when the current brightness of the page to be detected is too low, no matter how the saturation changes, what is seen in the human senses is a black screen, then it can be determined that the page to be detected is a black screen page; if the color description information meets the preset conditions, that is, the brightness of the screenshot is greater than or equal to the second brightness (the second brightness is greater than or equal to the first brightness, such as but not limited to 0.06f, 0.07f, etc.) and the saturation of the screenshot is less than or equal to the preset saturation (such as but not limited to 0.01f, 0.02f, etc.), or, the brightness of the screenshot is greater than or equal to the third brightness (the third brightness is greater than the second brightness, such as but not limited to 0.98f, 0.99f, etc.), and the human senses are all white, then it can be determined that the page to be detected is a white screen page; if the color description information does not meet the preset conditions and the proportion of the main color is 1, it can be determined that the page to be detected is a solid color screen page; if the brightness of the screenshot is greater than the first brightness, the color description information does not meet the preset conditions, and the proportion of the main color is not 1, it can be determined that the page to be detected is not a white screen page.
[0090] The white screen page in the embodiments of this specification can be a page without any content, presenting a solid color interface. That is, the white screen is a white screen concept in a broad sense. White screen, black screen, single color (such as all red, all blue, etc.) can all be the targets for white screen detection in the embodiments of this specification.
[0091] In some possible embodiments, when the page to be detected is a white screen page, the frame white screen detection result may but is not limited to further include the white screen error code corresponding to the page to be detected, and the above white screen error code is used to characterize the reason for the white screen of the page to be detected; when the page to be detected is a white screen page, the somatosensory white screen detection result may but is not limited to further include the white screen type corresponding to the page to be detected, and the above white screen type may but is not limited to include at least one of the following: white screen, black screen, other solid color screens. That is, in the embodiments of this specification, more accurate and refined white screen detection can be achieved through frame white screen detection and somatosensory white screen detection.
[0092] S208. Determine the target white screen detection result corresponding to the page to be detected based on the frame white screen detection result and / or the somatosensory white screen detection result.
[0093] Specifically, the target white screen detection result corresponding to the page to be detected may be the frame white screen detection result, or the somatosensory white screen detection result, or may also be jointly determined based on the frame white screen detection result and the somatosensory white screen detection result. For example, when both the frame white screen detection result and the somatosensory white screen detection result indicate that the page to be detected is not a white screen page, it can be determined that the target white screen detection result corresponding to the page to be detected is not a white screen page. When at least one of the frame white screen detection result and the somatosensory white screen detection result indicates that the page to be detected is a white screen page, it can be determined that the target white screen detection result corresponding to the page to be detected is a white screen page.
[0094] In the embodiments of this specification, the front-end code of the page to be detected of the application program is obtained, and the frame white screen detection is performed on the page to be detected based on the above front-end code to obtain the frame white screen detection result; the somatosensory white screen detection is performed on the page to be detected based on the screenshot of the page to be detected to obtain the somatosensory white screen detection result; the target white screen detection result corresponding to the page to be detected is determined based on the above frame white screen detection result and / or the above somatosensory white screen detection result. Thus, on one hand, the frame white screen detection can be used to analyze the front-end code of the page to be detected to achieve accurate and low-power white screen detection, and on the other hand, the somatosensory white screen detection can be used to analyze the screenshot of the page to be detected to achieve efficient, streamlined and more user-sensory white screen detection. In addition, the two white screen detection schemes of the somatosensory white screen detection and the frame white screen detection can be integrated to achieve white screen detection for multi-platform adaptation (such as but not limited to IOS, Android, and HarmonyOS, etc.), improve the accuracy and comprehensiveness of white screen detection, enable white screen detection to meet the recognition requirements of most white screen scenarios, and provide underlying technical support for solving the white screen anomaly of the application program.
[0095] Next, please refer to Figure 8 , which is a schematic flowchart of another white screen detection method provided by an exemplary embodiment of this specification. As Figure 8 shown, this white screen detection method includes the following steps:
[0096] S802, obtain the front-end code of the page to be detected of the application.
[0097] Specifically, the above S802 is the same as S202, and details are not described herein again.
[0098] S804, perform frame blank screen detection on the page to be detected based on the front-end code, and obtain a frame blank screen detection result.
[0099] Specifically, the above S804 is the same as S204, and details are not described herein again.
[0100] S806, determine whether the frame blank screen detection result indicates that the page to be detected is a blank screen page.
[0101] S808, if the frame blank screen detection result indicates that the page to be detected is not a blank screen page, obtain a screenshot of the page to be detected.
[0102] Specifically, the process of obtaining the screenshot of the page to be detected is the same as the process described in the above S206, and details are not described herein again.
[0103] S810, perform somatosensory blank screen detection on the page to be detected based on the screenshot of the page to be detected, and obtain a somatosensory blank screen detection result.
[0104] Specifically, the above S810 is the same as the above S206, and details are not described herein again.
[0105] S812, determine the target blank screen detection result corresponding to the page to be detected based on the somatosensory blank screen detection result.
[0106] Specifically, when the frame blank screen detection result indicates that the page to be detected is not a blank screen page, the target blank screen detection result corresponding to the page to be detected is the same as the somatosensory blank screen detection result.
[0107] In some possible embodiments, next, please continue to refer to Figure 3 , such as Figure 3 shown, after the above S306, determine whether the frame blank screen detection result indicates that the page to be detected is a blank screen page, the blank screen detection method may further but not limited to include:
[0108] S814, if the frame blank screen detection result indicates that the page to be detected is a blank screen page, determine that the target blank screen detection result corresponding to the page to be detected is that the page to be detected is a blank screen page.
[0109] In the embodiments of this specification, since the frame white screen detection is more accurate and comprehensive and consumes less performance, the frame white screen detection can be performed first. If the result of the frame white screen detection indicates that the page to be detected is not a white screen page, then the body sensation white screen detection with higher performance consumption can be performed to supplement the detection of scenarios not covered by the frame white screen detection, ensuring the accuracy of the white screen detection and the comprehensiveness of scenario coverage. If the result of the frame white screen detection indicates that the page to be detected is a white screen page, there is no need to perform the body sensation white screen detection with higher performance consumption, avoiding the ineffective consumption of resource performance, and improving the efficiency of the white screen detection while ensuring the accuracy of the white screen detection.
[0110] In some possible embodiments, after determining the target white screen detection result corresponding to the page to be detected based on the frame white screen detection result and / or the body sensation white screen detection result, when the target white screen detection result indicates that the page to be detected is a white screen page, the white screen type and / or the white screen error code corresponding to the page to be detected can be directly reported to the server, so that the server can analyze and solve the page exception situation in the application program in a timely manner.
[0111] Next, please refer to Figure 9 , Figure 9 which is a schematic structural diagram of a white screen detection device provided in an exemplary embodiment of this specification. As Figure 9 shown, the white screen detection device 900 includes:
[0112] A front-end code acquisition module 910, configured to acquire the front-end code of the page to be detected of the application program;
[0113] A frame white screen detection module 920, configured to perform frame white screen detection on the page to be detected based on the above front-end code to obtain a frame white screen detection result;
[0114] A body sensation white screen detection module 930, configured to perform body sensation white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a body sensation white screen detection result;
[0115] A determination module 940, configured to determine the target white screen detection result corresponding to the page to be detected based on the above frame white screen detection result and / or the above body sensation white screen detection result.
[0116] In a possible implementation manner, the above white screen detection device 900 further includes:
[0117] A judgment module, configured to judge whether the frame white screen detection result indicates that the page to be detected is a white screen page;
[0118] A screenshot acquisition module, configured to, if the frame white screen detection result indicates that the page to be detected is a non-white screen page, acquire a screenshot of the page to be detected, and perform the step of performing a motion white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a motion white screen detection result;
[0119] The above-mentioned determination module 940 is specifically configured to:
[0120] Determine the target white screen detection result corresponding to the page to be detected based on the above-mentioned motion white screen detection result.
[0121] In a possible implementation manner, the above-mentioned determination module 940 is further configured to:
[0122] If the frame white screen detection result indicates that the page to be detected is a white screen page, determine that the target white screen detection result corresponding to the page to be detected is that the page to be detected is a white screen page.
[0123] In a possible implementation manner, the above-mentioned frame white screen detection module 920 includes:
[0124] A rendering information determination unit, configured to, when the page to be detected reaches a steady state, determine the page rendering information of the page to be detected based on the above-mentioned front-end code;
[0125] A frame white screen detection result determination unit, configured to determine a frame white screen detection result based on the above-mentioned page rendering information.
[0126] In a possible implementation manner, the above-mentioned frame white screen detection result determination unit includes:
[0127] A judgment subunit, configured to judge whether the page to be detected renders content based on the above-mentioned page rendering information;
[0128] A first determination subunit, configured to, if the page to be detected does not render content, determine a frame white screen detection result based on the application state corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected;
[0129] A second determination subunit, configured to, if the page to be detected renders content, determine a frame white screen detection result based on the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected.
[0130] In a possible implementation manner, the above-mentioned first determination subunit is specifically configured to:
[0131] If the content not rendered on the to-be-detected page is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the to-be-detected page is greater than or equal to a preset duration, and the application status corresponding to the to-be-detected page is an abnormal status, then determine that the to-be-detected page is a blank screen page; if the content not rendered on the to-be-detected page is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the to-be-detected page is greater than or equal to a preset duration, and the application status corresponding to the to-be-detected page is a normal status, and the code error detection result corresponding to the to-be-detected page indicates the existence of code errors, then determine that the to-be-detected page is a blank screen page; if the content not rendered on the to-be-detected page is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the to-be-detected page is greater than or equal to a preset duration, and the application status corresponding to the to-be-detected page is a normal status, and the code error detection result corresponding to the to-be-detected page indicates the non-existence of code errors, and there are no content nodes and image resources in the DOM scan result corresponding to the to-be-detected page, then determine that the to-be-detected page is a blank screen page.
[0132] In a possible implementation manner, the above-mentioned second determination subunit is specifically configured to:
[0133] If the content rendered on the to-be-detected page is not all nodes of the same layer, and the content set to be visible in the content style setting information of the to-be-detected page is only meaningless text nodes, and the time interval between the rendering completion time and the start loading time of the to-be-detected page is greater than or equal to a preset duration, then determine that the to-be-detected page is a blank screen page; if there are no nodes of the same layer in the content rendered on the to-be-detected page, and all the content in the content style setting information of the to-be-detected page is set to be invisible, and the time interval between the rendering completion time and the start loading time of the to-be-detected page is greater than or equal to the above-mentioned preset duration, then determine that the to-be-detected page is a blank screen page.
[0134] In a possible implementation manner, the above-mentioned somatosensory blank screen detection module 930 includes:
[0135] An extraction unit, configured to extract the color description information and / or the main color ratio corresponding to the screenshot of the to-be-detected page;
[0136] A somatosensory blank screen detection result determination unit, configured to determine the somatosensory blank screen detection result of the to-be-detected page based on the color description information and / or the main color ratio corresponding to the screenshot.
[0137] In a possible implementation manner, the above-mentioned color description information includes saturation and / or brightness;
[0138] The above-mentioned somatosensory blank screen detection result determination unit is specifically configured to:
[0139] If the brightness of the above screenshot is less than or equal to the first brightness, it is determined that the above page to be detected is a black screen page; if the above color description information meets the preset conditions, it is determined that the above page to be detected is a white screen page; the above preset conditions include that the brightness of the above screenshot is greater than or equal to the second brightness and the saturation of the above screenshot is less than or equal to the preset saturation, or, the brightness of the above screenshot is greater than or equal to the third brightness; the above second brightness is greater than or equal to the above first brightness, and the above third brightness is greater than the above second brightness; if the proportion of the main color is 1, it is determined that the above page to be detected is a solid color screen page; if the brightness of the above screenshot is greater than the above first brightness and the above color description information does not meet the above preset conditions and the proportion of the main color is not 1, it is determined that the above page to be detected is a non-white screen page.
[0140] In a possible implementation manner, the above white screen detection device 900 further includes:
[0141] A preprocessing module, configured to preprocess the screenshot of the above page to be detected to obtain a preprocessed image of the page to be detected; the above preprocessing includes at least one of the following: scaling processing, top cropping processing, and bottom cropping processing.
[0142] The above extraction unit is specifically configured to:
[0143] Extract the color description information and / or the proportion of the main color corresponding to the preprocessed image of the above page to be detected.
[0144] In a possible implementation manner, when the above page to be detected is a white screen page, the above frame white screen detection result includes the white screen error code corresponding to the above page to be detected; the above white screen error code is used to characterize the reason for the white screen of the above page to be detected;
[0145] When the above page to be detected is a white screen page, the above somatosensory white screen detection result includes the white screen type corresponding to the above page to be detected; the above white screen type includes at least one of the following: white screen, black screen, and other solid color screens.
[0146] In a possible implementation manner, the above white screen detection device 900 further includes:
[0147] A reporting module, configured to report the above white screen type and / or the white screen error code corresponding to the above page to be detected to the server when the above target white screen detection result is that the above page to be detected is a white screen page; the above white screen error code is used to characterize the reason for the white screen of the above page to be detected.
[0148] The division of each module in the above white screen detection device is only for illustrative purposes. In other embodiments, the white screen detection device can be divided into different modules as needed to complete all or part of the functions of the above white screen detection device. In the embodiments of this specification, the implementation of each module in the white screen detection device can be in the form of a computer program. This computer program can run on a terminal or a server. The program module constituted by this computer program can be stored in the memory of the terminal or the server. When this computer program is executed by a processor, all or part of the steps of the white screen detection method described in the embodiments of this specification are implemented.
[0149] Next, please refer to Figure 10 , Figure 10 which is a schematic structural diagram of an electronic device provided by an exemplary embodiment of this specification. As Figure 10 shown, the electronic device 1000 may include: at least one processor 1010, at least one communication bus 1020, a user interface 1030, at least one network interface 1040, and a memory 1050. Among them, the communication bus 1020 can be used to realize the connection and communication of the above-mentioned various components.
[0150] Among them, the user interface 1030 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1030 may further include a standard wired interface and a wireless interface.
[0151] Among them, the network interface 1040 may optionally include a Bluetooth module, a near field communication (NFC) module, a wireless fidelity (Wi-Fi) module, etc.
[0152] Among them, the processor 1010 may include one or more processing cores. The processor 1010 connects various parts within the entire electronic device 1000 through various interfaces and circuits. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1050, and by invoking the data stored in the memory 1050, it performs various functions of the routing electronic device 1000 and processes data. Optionally, the processor 1010 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 1010 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1010 and may be implemented separately by a single chip.
[0153] Among them, the memory 1050 may include random access memory (RAM) and may also include read-only memory (ROM). Optionally, the memory 1050 includes a non-transitory computer-readable medium. The memory 1050 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1050 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as the front-end code acquisition function, the white screen detection function, the frame white screen detection function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. Optionally, the memory 1050 may further be at least one storage device located far from the aforementioned processor 1010. As Figure 10 shown, the memory 1050, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.
[0154] Specifically, the processor 1010 can be used to call the application programs stored in the memory 1050 and specifically perform the following operations: obtain the front-end code of the page to be detected of the application program; perform frame white screen detection on the page to be detected based on the above front-end code to obtain a frame white screen detection result; perform somatosensory white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a somatosensory white screen detection result; determine the target white screen detection result corresponding to the page to be detected based on the above frame white screen detection result and / or the above somatosensory white screen detection result.
[0155] In some possible embodiments, after the processor 1010 performs the above frame white screen detection on the page to be detected based on the above front-end code to obtain a frame white screen detection result and before performing the above somatosensory white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a somatosensory white screen detection result, it is further used to perform:
[0156] Judge whether the above frame white screen detection result indicates that the page to be detected is a white screen page; if not, obtain a screenshot of the page to be detected and perform the above step of performing somatosensory white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a somatosensory white screen detection result.
[0157] When the processor 1010 determines the target white screen detection result corresponding to the page to be detected based on the above frame white screen detection result and / or the above somatosensory white screen detection result, it is specifically used to perform:
[0158] Determine the target white screen detection result corresponding to the page to be detected based on the above somatosensory white screen detection result.
[0159] In some possible embodiments, after the processor 1010 performs the above judgment on whether the frame white screen detection result indicates that the page to be detected is a white screen page, it is further used to perform: if so, determine that the target white screen detection result corresponding to the page to be detected is that the page to be detected is a white screen page.
[0160] In some possible embodiments, when the processor 1010 performs the above frame white screen detection on the page to be detected based on the above front-end code to obtain a frame white screen detection result, it is specifically used to perform:
[0161] When the page to be detected reaches a steady state, determine the page rendering information of the page to be detected based on the above front-end code; determine the frame white screen detection result based on the above page rendering information.
[0162] In some possible embodiments, when the processor 1010 determines the frame white screen detection result based on the above page rendering information, it is specifically used to perform:
[0163] Determine whether the page to be detected renders content based on the above page rendering information; if not, determine the frame blank screen detection result based on the application status corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected; if so, determine the frame blank screen detection result based on the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected.
[0164] In some possible embodiments, when the above processor 1010 executes the determination of the frame blank screen detection result based on the application status corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected, it is specifically configured to execute: if the fact that the page to be detected does not render content is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application status corresponding to the page to be detected is an abnormal state, then determine that the page to be detected is a blank screen page; if the fact that the page to be detected does not render content is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application status corresponding to the page to be detected is a normal state, and the code error detection result corresponding to the page to be detected indicates that there is a code error, then determine that the page to be detected is a blank screen page; if the fact that the page to be detected does not render content is not caused by user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application status corresponding to the page to be detected is a normal state, and the code error detection result corresponding to the page to be detected indicates that there is no code error, and there are no content nodes and image resources in the DOM scan result corresponding to the page to be detected, then determine that the page to be detected is a blank screen page.
[0165] In some possible embodiments, when the above-mentioned processor 1010 determines the frame blank screen detection result based on the node information and / or content style setting information corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected, it is specifically used to execute: If the content rendered in the page to be detected is not all nodes of the same layer, and the content set to be visible in the content style setting information of the page to be detected is only meaningless text nodes, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, then it is determined that the page to be detected is a blank screen page; If there are no nodes of the same layer in the content rendered in the page to be detected, and all content in the content style setting information of the page to be detected is set to be invisible, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to the preset duration, then it is determined that the page to be detected is a blank screen page.
[0166] In some possible embodiments, when the above-mentioned processor 1010 performs somatosensory blank screen detection on the page to be detected based on the screenshot of the page to be detected and obtains the somatosensory blank screen detection result, it is specifically used to execute: Extract the color description information and / or the main color ratio corresponding to the screenshot of the page to be detected; Determine the somatosensory blank screen detection result of the page to be detected based on the color description information and / or the main color ratio corresponding to the screenshot.
[0167] In some possible embodiments, the above-mentioned color description information includes saturation and / or brightness;
[0168] When the above-mentioned processor 1010 determines the somatosensory blank screen detection result of the page to be detected based on the color description information and / or the main color ratio corresponding to the screenshot, it is specifically used to execute:
[0169] If the brightness of the screenshot is less than or equal to the first brightness, then it is determined that the page to be detected is a black screen page; If the color description information meets the preset conditions, then it is determined that the page to be detected is a blank screen page; The preset conditions include that the brightness of the screenshot is greater than or equal to the second brightness and the saturation of the screenshot is less than or equal to the preset saturation, or, the brightness of the screenshot is greater than or equal to the third brightness; The second brightness is greater than or equal to the first brightness, and the third brightness is greater than the second brightness; If the main color ratio is 1, then it is determined that the page to be detected is a solid color screen page; If the brightness of the screenshot is greater than the first brightness and the color description information does not meet the preset conditions and the main color ratio is not 1, then it is determined that the page to be detected is not a blank screen page.
[0170] In some possible embodiments, before the above-mentioned processor 1010 extracts the color description information and / or the main color ratio corresponding to the screenshot of the page to be detected, it is also used to execute:
[0171] Preprocess the screenshot of the to-be-detected page to obtain the preprocessed to-be-detected page image; the above preprocessing includes at least one of the following: scaling processing, top cropping processing, and bottom cropping processing.
[0172] When the above processor 1010 executes the extraction of the color description information and / or the main color ratio corresponding to the screenshot of the to-be-detected page, it is specifically used to execute:
[0173] Extract the color description information and / or the main color ratio corresponding to the preprocessed to-be-detected page image.
[0174] In some possible embodiments, when the to-be-detected page is a white screen page, the above framework white screen detection result includes the white screen error code corresponding to the to-be-detected page; the white screen error code is used to characterize the reason for the white screen of the to-be-detected page;
[0175] When the to-be-detected page is a white screen page, the above somatosensory white screen detection result includes the white screen type corresponding to the to-be-detected page; the white screen type includes at least one of the following: white screen, black screen, and other solid color screens.
[0176] In some possible embodiments, after the above processor 1010 executes the determination of the target white screen detection result corresponding to the to-be-detected page based on the above framework white screen detection result and / or the above somatosensory white screen detection result, it is further used to execute:
[0177] When the target white screen detection result is that the to-be-detected page is a white screen page, report the white screen type and / or the white screen error code corresponding to the to-be-detected page to the server; the white screen error code is used to characterize the reason for the white screen of the to-be-detected page.
[0178] The embodiments of this specification also provide a computer-readable storage medium, in which instructions are stored. When it runs on a computer or a processor, it enables the computer or the processor to execute one or more steps in the above embodiments. If each component module of the above white screen detection device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium.
[0179] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the processes or functions described above in the embodiments of this specification are generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above computer instructions can be stored in a computer-readable storage medium or transmitted through the above computer-readable storage medium. The above computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire, such as coaxial cable, optical fiber, Digital Subscriber Line (DSL), or wirelessly (such as infrared, wireless, microwave, etc.). The above computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The above available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Versatile Disc (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD), etc.).
[0180] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. This program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disk, or optical disc. Without conflict, the technical features in this embodiment and the implementation solutions can be combined arbitrarily.
[0181] The above-described embodiments are merely described as preferred implementation manners of this specification, and do not limit the scope of this specification. Without departing from the design spirit of this specification, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of this specification shall fall within the protection scope determined by the claims.
[0182] The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims and the specification may be performed in a different order than in the embodiments described in the specification and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A white screen detection method, the method comprising: Obtaining the front-end code of the page to be detected of an application; Performing frame white screen detection on the page to be detected based on the front-end code to obtain a frame white screen detection result; Performing body feeling white screen detection on the page to be detected based on a screenshot of the page to be detected to obtain a body feeling white screen detection result; Determining a target white screen detection result corresponding to the page to be detected based on the frame white screen detection result and / or the body feeling white screen detection result.
2. The method according to claim 1, after performing frame white screen detection on the page to be detected based on the front-end code to obtain a frame white screen detection result and before performing body feeling white screen detection on the page to be detected based on a screenshot of the page to be detected to obtain a body feeling white screen detection result, the method further comprising: Judging whether the frame white screen detection result indicates that the page to be detected is a white screen page; If not, obtaining a screenshot of the page to be detected and performing the step of performing body feeling white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a body feeling white screen detection result; The determining a target white screen detection result corresponding to the page to be detected based on the frame white screen detection result and / or the body feeling white screen detection result includes: Determining a target white screen detection result corresponding to the page to be detected based on the body feeling white screen detection result.
3. The method according to claim 2, after judging whether the frame white screen detection result indicates that the page to be detected is a white screen page, the method further comprising: If so, determining that the target white screen detection result corresponding to the page to be detected is that the page to be detected is a white screen page.
4. The method according to claim 1, the performing frame white screen detection on the page to be detected based on the front-end code to obtain a frame white screen detection result includes: When the page to be detected reaches a steady state, determining page rendering information of the page to be detected based on the front-end code; Determining a frame white screen detection result based on the page rendering information.
5. The method according to claim 4, the determining a frame white screen detection result based on the page rendering information includes: Judging whether the page to be detected renders content based on the page rendering information; If not, determining a frame white screen detection result based on the application state corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scanning result corresponding to the page to be detected; If so, determining a frame white screen detection result based on the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected.
6. The method according to claim 5, wherein determining the frame blank screen detection result based on the application state corresponding to the page to be detected and / or the time interval between the rendering completion time and the start loading time of the page to be detected and / or the code error detection result corresponding to the page to be detected and / or the DOM scan result corresponding to the page to be detected includes: If the content of the page to be detected is not rendered due to user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application state corresponding to the page to be detected is an abnormal state, then determine that the page to be detected is a blank screen page; If the content of the page to be detected is not rendered due to user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application state corresponding to the page to be detected is a normal state, and the code error detection result corresponding to the page to be detected indicates that there is a code error, then determine that the page to be detected is a blank screen page; If the content of the page to be detected is not rendered due to user interaction behavior, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, and the application state corresponding to the page to be detected is a normal state, and the code error detection result corresponding to the page to be detected indicates that there is no code error, and there are no content nodes and image resources in the DOM scan result corresponding to the page to be detected, then determine that the page to be detected is a blank screen page.
7. The method according to claim 5, wherein determining the frame blank screen detection result based on the node information corresponding to the page to be detected and / or the content style setting information and / or the time interval between the rendering completion time and the start loading time of the page to be detected includes: If the rendered content in the page to be detected is not all nodes of the same layer, and the content set to be visible in the content style setting information of the page to be detected is only meaningless text nodes, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to a preset duration, then determine that the page to be detected is a blank screen page; If there are no nodes of the same layer in the rendered content of the page to be detected, and all content in the content style setting information of the page to be detected is set to be invisible, and the time interval between the rendering completion time and the start loading time of the page to be detected is greater than or equal to the preset duration, then determine that the page to be detected is a blank screen page.
8. The method according to claim 1, wherein performing a somatosensory blank screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a somatosensory blank screen detection result includes: Extracting the color description information and / or the main color ratio corresponding to the screenshot of the page to be detected; Determining the somatosensory blank screen detection result of the page to be detected based on the color description information and / or the main color ratio corresponding to the screenshot.
9. The method according to claim 8, wherein the color description information includes saturation and / or brightness; Determining the somatosensory white screen detection result of the page to be detected based on the color description information and / or the main color ratio corresponding to the screenshot includes: If the brightness of the screenshot is less than or equal to the first brightness, it is determined that the page to be detected is a black screen page; If the color description information meets the preset conditions, it is determined that the page to be detected is a white screen page; the preset conditions include that the brightness of the screenshot is greater than or equal to the second brightness and the saturation of the screenshot is less than or equal to the preset saturation, or the brightness of the screenshot is greater than or equal to the third brightness; the second brightness is greater than or equal to the first brightness, and the third brightness is greater than the second brightness; If the main color ratio is 1, it is determined that the page to be detected is a solid color screen page; If the brightness of the screenshot is greater than the first brightness, the color description information does not meet the preset conditions, and the main color ratio is not 1, it is determined that the page to be detected is not a white screen page.
10. The method according to claim 8, before extracting the color description information and / or the main color ratio corresponding to the screenshot of the page to be detected, the method further includes: Preprocessing the screenshot of the page to be detected to obtain a preprocessed image of the page to be detected; The preprocessing includes at least one of the following: scaling processing, top cropping processing, bottom cropping processing; The extracting the color description information and / or the main color ratio corresponding to the screenshot of the page to be detected includes: Extracting the color description information and / or the main color ratio corresponding to the preprocessed image of the page to be detected.
11. The method according to any one of claims 1-10, in the case where the page to be detected is a white screen page, the frame white screen detection result includes the white screen error code corresponding to the page to be detected; the white screen error code is used to characterize the reason for the white screen of the page to be detected; In the case where the page to be detected is a white screen page, the somatosensory white screen detection result includes the white screen type corresponding to the page to be detected; the white screen type includes at least one of the following: white screen, black screen, other solid color screens.
12. The method according to any one of claims 1-10, after determining the target white screen detection result corresponding to the page to be detected based on the frame white screen detection result and / or the somatosensory white screen detection result, the method further includes: In the case where the target white screen detection result is that the page to be detected is a white screen page, reporting the white screen type and / or the white screen error code corresponding to the page to be detected to the server; The white screen error code is used to characterize the reason for the white screen of the page to be detected.
13. A white screen detection device, the device includes: A front-end code acquisition module, configured to acquire the front-end code of the page to be detected of the application program; A frame white screen detection module, configured to perform frame white screen detection on the page to be detected based on the front-end code to obtain a frame white screen detection result; A somatosensory white screen detection module, configured to perform somatosensory white screen detection on the page to be detected based on the screenshot of the page to be detected to obtain a somatosensory white screen detection result; A determination module, configured to determine a target white screen detection result corresponding to the page to be detected based on the framework white screen detection result and / or the somatosensory white screen detection result.
14. An electronic device, comprising: A processor and a memory; The processor is connected to the memory; The memory is configured to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1-12.
15. A computer storage medium storing multiple instructions, the instructions being adapted to be loaded and executed by a processor to perform the method steps according to any one of claims 1-12.
16. A computer program product containing instructions, when the computer program product runs on a computer or a processor, causing the computer or the processor to execute the white screen detection method according to any one of claims 1-12.