Display state determination method and apparatus, electronic device, and storage medium
By identifying candidate and target page elements during page detection, combining patterns and randomly generated coordinate points, and utilizing the DOM API to determine page state, the problem of insufficient effectiveness in existing page detection technologies is solved, achieving higher detection accuracy.
Patent Information
- Application Number
- PCT/CN2025/090634
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-23
- Filing Date
- 2025-04-23
- Publication Date
- 2025-10-30
AI Technical Summary
The effectiveness of existing technologies that use event detection methods for page inspection cannot meet the requirements.
By identifying candidate page elements and target page elements of the page to be detected, it is determined whether the page displays abnormally based on these elements. Coordinate points are generated using a combination of regularity and randomness. Page elements are determined using the DOM API, and the page status is judged by the abnormal display area ratio and threshold.
It improves the accuracy and effectiveness of page detection, reduces false positives and false negatives, and is suitable for various network environments and devices.
Smart Images

Figure CN2025090634_30102025_PF_FP_ABST
Abstract
Description
Display status determination method, apparatus, electronic device and storage medium
[0001] This application claims priority to Chinese Patent Application No. 202410494996.X, filed on April 23, 2024, the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0002] This disclosure relates to a display status determination method, apparatus, electronic device, and storage medium. Background Technology
[0003] In related technologies, page detection can be performed using event detection methods, which analyze the page loading process by detecting loading events to determine if there are any abnormal page displays. However, the effectiveness of this method for page detection cannot meet the requirements. Summary of the Invention
[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for determining display status, thereby improving the effectiveness of page detection.
[0005] In a first aspect, embodiments of this disclosure provide a method for determining a display state, including:
[0006] Determine the candidate page elements and target page elements corresponding to the page to be detected, wherein the target page element is selected from the candidate page elements;
[0007] Based on the candidate page elements and the target page elements, the display status of the page to be detected is determined, and the display status indicates whether the page to be detected is displaying abnormally.
[0008] Secondly, embodiments of this disclosure also provide a display status determination device, comprising:
[0009] The first determining module is used to determine the candidate page elements and the target page elements corresponding to the page to be detected, wherein the target page elements are selected from the candidate page elements;
[0010] The second determining module is used to determine the display status of the page to be detected based on the candidate page elements and the target page elements, wherein the display status indicates whether the page to be detected is displaying abnormally.
[0011] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0012] One or more processing devices;
[0013] Storage device for storing one or more programs.
[0014] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the display state determination method provided in the embodiments of this disclosure.
[0015] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the display state determination method provided in embodiments of this disclosure. Attached Figure Description
[0016] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0017] Figure 1 is a flowchart illustrating a display status determination method provided in an embodiment of this disclosure;
[0018] Figure 2 is a flowchart illustrating another method for determining display status provided in an embodiment of this disclosure;
[0019] Figure 3 is a schematic diagram of selecting coordinate points in a page to be detected according to an embodiment of this disclosure;
[0020] Figure 4 is a flowchart illustrating another method for determining display status provided in an embodiment of this disclosure;
[0021] Figure 5 is a flowchart illustrating another method for determining display status provided in an embodiment of this disclosure;
[0022] Figure 6 is a schematic diagram of a display status determination device provided in an embodiment of this disclosure; and
[0023] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0024] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0025] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0026] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0028] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0029] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0030] Figure 1 is a schematic flowchart of a display state determination method provided in an embodiment of this disclosure. This embodiment is applicable to situations where the page to be detected is displaying abnormally. The method can be executed by a display state determination device, which can be implemented in software and / or hardware and integrated into an electronic device. Optionally, the electronic device can be a mobile terminal or a PC, etc.
[0031] As shown in Figure 1, the method includes:
[0032] S110. Determine the candidate page elements and target page elements corresponding to the page to be detected, wherein the target page element is selected from the candidate page elements.
[0033] The page to be tested can be a page whose display is abnormal. Display abnormality can be understood as an abnormal situation in the display of the page to be tested, such as the page displaying as a blank screen. A blank screen can be understood as a situation where the page is blank because it cannot be loaded correctly during browsing.
[0034] In this embodiment of the disclosure, the page to be detected can be a web page in a browser, that is, a page loaded when browsing the web through a browser, or an H5 (also known as Hyper Text Markup Language, HTML) page in an application, or other pages that need to be detected for white screen, which is not limited here.
[0035] Page elements can be the elements that make up the page to be tested, such as HTML elements. Page elements can be text, images, videos, hyperlinks, etc., and there are no specific restrictions. From all the page elements contained in the page to be tested, a subset of page elements can be selected to detect whether there are any display anomalies.
[0036] The candidate page element corresponding to the page to be detected can be the page element selected initially on the page to be detected. The target page element corresponding to the page to be detected can be the page element selected again from the candidate page elements obtained initially. There is no limit to the number of candidate page elements and target page elements; they can be selected according to actual needs.
[0037] The methods for determining candidate page elements corresponding to the page to be detected may include, but are not limited to, the following:
[0038] Multiple coordinate points are randomly selected from the page to be tested, and the page element corresponding to each coordinate point is selected as a candidate page element. Multiple coordinate points are also selected from the page to be tested in a patterned manner, and the page element corresponding to each coordinate point is selected as a candidate page element. Finally, multiple coordinate points are selected from the page to be tested using a combination of patterned and random methods, and the page element corresponding to each coordinate point is selected as a candidate page element. Here, the coordinate points can be the coordinates of points on the page to be tested, which can be represented by a combination of horizontal and vertical coordinates. The page element corresponding to a coordinate point can be the page element corresponding to the position of that coordinate point on the page to be tested.
[0039] In this step, the target page element can be selected from the candidate page elements based on the number of candidate page elements. For example, the target page element can be determined based on the frequency of occurrence of each page element in the candidate page elements; alternatively, the target page element can be determined based on the frequency of occurrence of some page elements in the candidate page elements. Here, some page elements can be page elements in the candidate page elements other than replaceable page elements. Replaceable page elements can be understood as page elements in the page to be detected that can be replaced, such as image elements (also known as img elements) or video elements (also known as video elements).
[0040] S120. Based on the candidate page elements and the target page elements, determine the display status of the page to be detected, wherein the display status indicates whether the page to be detected is displaying abnormally.
[0041] The display status of the page to be tested can indicate whether the page is displaying an abnormal state, that is, the display status can indicate whether the page to be tested is in a blank screen state.
[0042] The method for determining the display status of the page to be detected based on candidate page elements and target page elements is not limited. For example, the abnormal display area ratio of the page to be detected can be determined based on the number of candidate page elements and the number of target page elements, and then compared with a set threshold to determine whether the page to be detected is displaying abnormally. The abnormal display area ratio of the page to be detected can be the proportion of the abnormally displayed area to the total area of the page to be detected. There is no limitation on the set threshold.
[0043] The technical solution of this disclosure involves determining candidate page elements corresponding to the page to be detected, selecting target page elements from the candidate page elements, determining the display state of the page to be detected based on the candidate page elements and the target page elements, and then determining whether there is a display anomaly by performing a second selection of page elements. This improves the effectiveness of page detection.
[0044] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0045] Figure 2 is a flowchart illustrating another display state determination method provided by an embodiment of this disclosure, which is a further refinement based on the above embodiments.
[0046] As shown in Figure 2, the method includes:
[0047] S210. Select coordinate points from the page to be detected.
[0048] The method for selecting coordinate points from the page to be tested can be to randomly select multiple coordinate points, select multiple coordinate points in a regular manner, or combine both regular and random methods to select multiple coordinate points. There is no limit to the number of coordinate points selected.
[0049] In one embodiment, selecting coordinate points from the page to be detected includes:
[0050] The page to be detected is equally divided into at least two grids;
[0051] Randomly select coordinate points from the grid.
[0052] In practical applications, the page to be inspected can be uniformly divided into M*N grids. M and N can be the same or different, and both M and N are positive integers; no restrictions are imposed here. After the grid division is completed, a deployment algorithm can be used to generate random coordinate points in each grid. The deployment algorithm can be any algorithm used to randomly generate coordinate points in the grid, or any algorithm capable of achieving this function; no restrictions are imposed here.
[0053] Figure 3 is a schematic diagram of selecting coordinate points in a page to be detected according to an embodiment of this disclosure. As shown in Figure 3, the page to be detected (which can be regarded as the visible area in the browser) is evenly divided into 6*6 grid points, and a coordinate point is randomly generated in each grid point. The coordinate point selection method shown in Figure 3 can be understood as a combination of two methods: regularity (evenly dividing the grid points) and randomness (randomly selecting coordinate points from the grid points).
[0054] S220. Select the page element corresponding to the coordinate point as a candidate page element.
[0055] There are no restrictions on how the page element corresponding to the coordinate point is determined. For example, in a browser scenario, the page element corresponding to the coordinate point can be determined through the Application Programming Interface (API) of the Document Object Model (DOM).
[0056] In one embodiment, the timing for determining the candidate page element includes:
[0057] After the page to be detected has been loaded for a set period of time, and a target event associated with the page to be detected is detected, the target event includes an event associated with triggering a display anomaly, and the page to be detected is a web page to be detected.
[0058] The target events associated with the page to be inspected can be understood as events related to display abnormalities on the page, such as global error events, interaction events, leave events, and refresh events, etc., without limitation here. The page to be inspected is a web page, such as a page in a browser; correspondingly, the aforementioned events can be browser events.
[0059] After a set time has elapsed since the page to be tested has finished loading, if a target event associated with that page is triggered, candidate page elements can be determined. The set time can be determined based on network conditions; allowing sufficient time for subsequent processing after the set time ensures that elements on the page have adequate time to load.
[0060] Optionally, if a target event associated with the page to be detected is triggered after a set time has elapsed since the page to be detected has finished loading, debouncing can be performed before determining the candidate page elements. The purpose of debouncing is to avoid frequently triggering the detection of display anomalies.
[0061] S230. Select the page element with the highest frequency of occurrence among the candidate page elements as the target page element.
[0062] Determine the frequency of occurrence of each page element among the candidate page elements, and select the page element with the highest frequency as the target page element. This step can be one way to determine the target page element corresponding to the candidate page elements.
[0063] S240. If the target page element is a replaceable page element, then the state indicating normal display is taken as the display state of the page to be detected; otherwise, the abnormal display area ratio of the page to be detected is determined according to the ratio of the number of target page elements to the number of candidate page elements, and the display state of the page to be detected is determined based on the comparison result of the abnormal display area ratio and a set threshold.
[0064] If the target page element is a replaceable element, it indicates that the display area of replaceable elements on the page being tested may occupy a large proportion, meaning that the area occupied by image or video elements on the page being tested may be relatively large. Therefore, the page being tested is not in a blank screen state, and the display status indicator of the page being tested is normal.
[0065] If the target page element is not a replaceable page element, the abnormal display area ratio of the page to be detected needs to be determined. The abnormal display area ratio is the ratio of the number of target page elements (i.e., the frequency of occurrence of target page elements) to the number of candidate page elements. If the abnormal display area ratio of the page to be detected exceeds a set threshold, the page to be detected is determined to be displaying abnormally; otherwise, the page to be detected is determined to be displaying normally.
[0066] The technical solution of this disclosure combines two methods: regularity (uniformly dividing grid points) and randomness (randomly selecting coordinate points from the grid points) to generate uniform and flexible coordinate points. These generated coordinate points are then used for subsequent anomaly detection, avoiding misjudgments or omissions caused by extreme scenarios (such as network fluctuations), and enabling more accurate identification of display anomalies. The anomaly detection process can be implemented using basic algorithms such as random algorithms, traversal algorithms, and DOM APIs, offering higher performance and being virtually imperceptible even on low-end machines, without affecting normal use. Different methods exist for determining the display state of the page to be detected by checking whether the most frequently occurring target page element among the candidate page elements is a replaceable element, making the display state judgment more accurate. This solution can be applied to page display anomaly detection in various scenarios, such as various web applications, desktop and mobile devices, and is also suitable for various network environments.
[0067] The following is an exemplary description of embodiments of this disclosure:
[0068] Figure 4 is a flowchart illustrating another display state determination method provided in this embodiment of the present disclosure. As shown in Figure 4, this process is used to detect white screen on a browser page and includes the following steps:
[0069] 1. Loading completion event detection is initiated: When entering a web page (i.e. the page to be detected), this technical solution initiates real-time detection of the loading completion event (also known as the load event) through the browser's event detection mechanism.
[0070] 2. Delayed Startup of White Screen Detection: After the loading completion event is triggered and loading is complete, the white screen detection function will automatically start after a certain delay (i.e., wait X seconds) depending on network conditions. The delay is designed to ensure that all elements on the page have sufficient time to load, reducing false positives and improving the accuracy of white screen detection.
[0071] 3. Error and Interaction Event Detection: Integrates global error event detection, interaction event detection, and exit / refresh event detection, and debouncing the white screen detection logic (debouncing for Y seconds). The introduction of debouncing technology is used to optimize the processing of continuous event signals, avoid frequent triggering of white screen detection operations, and improve performance.
[0072] 4. Random Grid Point White Screen Detection Strategy: Divide the visible area of the browser into an M*N uniform grid. Randomly select a page element in each grid as a candidate page element, i.e., randomly select coordinate points from each grid and use the page element corresponding to each coordinate point as a candidate page element. Select the page element A with the highest frequency of occurrence from the candidate page elements as the target page element. If page element A is not a replaceable page element, calculate the white screen area ratio (i.e., abnormal display area ratio), which is equal to the frequency of occurrence of page element A divided by M*N. If the white screen area ratio exceeds the threshold B (i.e., the set threshold), the current page is determined to be in a white screen state.
[0073] The above examples also include page exit trigger detection, that is, when preparing to leave the page (such as triggering the page to close), a white screen detection is immediately performed to ensure that the page performance meets expectations throughout the entire access cycle.
[0074] Figure 5 is a flowchart illustrating another display state determination method provided by an embodiment of this disclosure. This embodiment is based on the above embodiments and provides another implementation for determining the target page element corresponding to the candidate page element and determining the display state of the page to be detected based on the candidate page element and the target page element.
[0075] As shown in Figure 5, the method includes:
[0076] S510. Select coordinate points from the page to be detected.
[0077] S520. Select the page element corresponding to the coordinate point as a candidate page element.
[0078] S530. Remove replaceable page elements from the candidate page elements to obtain filtered page elements.
[0079] The filtered page elements can be the page elements remaining after removing replaceable page elements from the candidate page elements.
[0080] S540. The page element with the highest frequency among the filtered page elements is taken as the target page element.
[0081] The target page element can be the element that appears most frequently among the filtered page elements. The target page element can be determined by iterating through the elements in the filtered page.
[0082] S550. Determine the abnormal display area ratio of the page to be detected based on the ratio of the number of target page elements to the number of candidate page elements.
[0083] The number of target page elements can be understood as the frequency of occurrence of target page elements among the filtered page elements. Dividing the number of target page elements by the number of candidate page elements will give the abnormal display area ratio.
[0084] S560. Based on the comparison result between the abnormal display area ratio and the set threshold, determine the display status of the page to be detected.
[0085] If the abnormal display area ratio of the page to be tested exceeds a set threshold, the page to be tested is determined to be displaying abnormally; otherwise, the page to be tested is determined to be displaying normally. The set threshold is not limited.
[0086] The technical solution of this disclosure removes replaceable page elements from candidate page elements to obtain filtered page elements, selects the page element with the highest frequency from the filtered page elements as the target page element, and then determines the display state of the page to be detected by the number of target page elements and the number of candidate page elements. By removing replaceable page elements that have a significant impact on the misjudgment of the display abnormality of the page to be detected before judgment, the accuracy of determining whether the page to be detected is display abnormal can be improved.
[0087] Figure 6 is a schematic diagram of a display status determination device provided in an embodiment of the present disclosure. As shown in Figure 6, the device includes: a first determination module 610 and a second determination module 620.
[0088] The first determining module 610 is used to determine the candidate page elements and the target page elements corresponding to the page to be detected, wherein the target page elements are selected from the candidate page elements;
[0089] The second determining module 620 is used to determine the display state of the page to be detected based on the candidate page elements and the target page elements, wherein the display state indicates whether the page to be detected is displaying abnormally.
[0090] The technical solution provided in this disclosure involves a first determining module that identifies candidate page elements and a target page element corresponding to the page to be detected, wherein the target page element is selected from the candidate page elements; and a second determining module that, based on the candidate page elements and the target page element, determines the display state of the page to be detected, wherein the display state indicates whether the page to be detected is displaying abnormally. This improves the effectiveness of page detection.
[0091] In one embodiment, the first determining module 610 is specifically used for:
[0092] The page element that appears most frequently among the candidate page elements is selected as the target page element.
[0093] In one embodiment, the second determining module 620 is specifically used for:
[0094] If the target page element is a replaceable page element, the state indicating normal display is taken as the display state of the page to be detected; otherwise, the abnormal display area ratio of the page to be detected is determined according to the ratio of the number of target page elements to the number of candidate page elements.
[0095] Based on the comparison results between the abnormal display area ratio and the set threshold, the display status of the page to be detected is determined.
[0096] In one embodiment, the first determining module 610 is specifically used for:
[0097] Remove replaceable page elements from the candidate page elements to obtain filtered page elements;
[0098] The page element that appears most frequently among the filtered page elements is taken as the target page element.
[0099] In one embodiment, the second determining module 620 is specifically used for:
[0100] The abnormal display area ratio of the page to be detected is determined based on the ratio of the number of target page elements to the number of candidate page elements.
[0101] Based on the comparison results between the abnormal display area ratio and the set threshold, the display status of the page to be detected is determined.
[0102] In one embodiment, the first determining module 610 is specifically used for:
[0103] Select coordinate points from the page to be detected;
[0104] The page element corresponding to the coordinate point is selected as a candidate page element.
[0105] In one embodiment, the first determining module 610 is specifically used for:
[0106] The page to be detected is equally divided into at least two grids;
[0107] Randomly select coordinate points from the grid.
[0108] In one embodiment, the timing for determining the candidate page element includes:
[0109] After the page to be detected has been loaded for a set period of time, and a target event associated with the page to be detected is detected, the target event includes an event associated with triggering a display anomaly, and the page to be detected is a web page to be detected.
[0110] The display state determination device provided in this disclosure can execute the display state determination method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
[0111] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0112] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Referring to Figure 7 below, a schematic diagram of the structure of an electronic device (e.g., a terminal device or server in Figure 7) 500 suitable for implementing an embodiment of the present disclosure is shown.
[0113] An electronic device provided in this disclosure includes:
[0114] One or more processing devices;
[0115] Storage device for storing one or more programs.
[0116] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the display state determination method provided in any embodiment of this disclosure.
[0117] The terminal devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic device shown in Figure 7 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this disclosure.
[0118] As shown in Figure 7, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0119] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 shows electronic device 500 with various devices, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0120] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0121] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0122] The electronic device provided in this embodiment and the display state determination method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0123] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the display state determination method provided in the above embodiments.
[0124] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof.
[0125] The computer storage medium may be a storage medium for computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in this disclosure.
[0126] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0127] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0128] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0129] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine candidate page elements and target page elements corresponding to the page to be detected, wherein the target page element is selected from the candidate page elements; and, based on the candidate page elements and the target page element, determine the display state of the page to be detected, wherein the display state indicates whether the page to be detected is displaying abnormally.
[0130] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0132] The modules or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules or units do not necessarily limit the specific unit itself.
[0133] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0134] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0135] According to one or more embodiments of this disclosure, Example 1 provides a display state determination method, including:
[0136] Determine the candidate page elements and target page elements corresponding to the page to be detected, wherein the target page element is selected from the candidate page elements;
[0137] Based on the candidate page elements and the target page elements, the display status of the page to be detected is determined, and the display status indicates whether the page to be detected is displaying abnormally.
[0138] According to one or more embodiments of this disclosure, Example 2 describes the method described in Example 1.
[0139] Determining the target page element corresponding to the candidate page element includes:
[0140] The page element that appears most frequently among the candidate page elements is selected as the target page element.
[0141] According to one or more embodiments of this disclosure, Example 3 describes the method described in Example 2.
[0142] Determining the display state of the page to be detected based on the candidate page elements and the target page elements includes:
[0143] If the target page element is a replaceable page element, the state indicating normal display is taken as the display state of the page to be detected; otherwise, the abnormal display area ratio of the page to be detected is determined according to the ratio of the number of target page elements to the number of candidate page elements.
[0144] Based on the comparison results between the abnormal display area ratio and the set threshold, the display status of the page to be detected is determined.
[0145] According to one or more embodiments of this disclosure, Example 4 describes the method described in Example 1.
[0146] Determining the target page element corresponding to the candidate page element includes:
[0147] Remove replaceable page elements from the candidate page elements to obtain filtered page elements;
[0148] The page element that appears most frequently among the filtered page elements is taken as the target page element.
[0149] According to one or more embodiments of this disclosure, Example 5 describes the method described in Example 4.
[0150] Determining the display state of the page to be detected based on the candidate page elements and the target page elements includes:
[0151] The abnormal display area ratio of the page to be detected is determined based on the ratio of the number of target page elements to the number of candidate page elements.
[0152] Based on the comparison results between the abnormal display area ratio and the set threshold, the display status of the page to be detected is determined.
[0153] According to one or more embodiments of this disclosure, Example 6 describes the method described in Example 1.
[0154] Identify candidate page elements corresponding to the page to be detected, including:
[0155] Select coordinate points from the page to be detected;
[0156] The page element corresponding to the coordinate point is selected as a candidate page element.
[0157] According to one or more embodiments of this disclosure, Example 7 describes the method according to Example 6.
[0158] Selecting coordinate points from the page to be detected includes:
[0159] The page to be detected is equally divided into at least two grids;
[0160] Randomly select coordinate points from the grid.
[0161] According to one or more embodiments of this disclosure, Example 8 describes the method described in Example 1.
[0162] The timing for determining the candidate page elements includes:
[0163] After the page to be detected has been loaded for a set period of time, and a target event associated with the page to be detected is detected, the target event includes an event associated with triggering a display anomaly, and the page to be detected is a web page to be detected.
[0164] According to one or more embodiments of this disclosure, Example 9 provides a display status determination device, comprising:
[0165] The first determining module is used to determine the candidate page elements and the target page elements corresponding to the page to be detected, wherein the target page elements are selected from the candidate page elements;
[0166] The second determining module is used to determine the display status of the page to be detected based on the candidate page elements and the target page elements, wherein the display status indicates whether the page to be detected is displaying abnormally.
[0167] According to one or more embodiments of this disclosure, Example 10 provides an electronic device, the electronic device comprising:
[0168] One or more processing devices;
[0169] Storage device for storing one or more programs.
[0170] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the display state determination method as described in any of Examples 1-8.
[0171] According to one or more embodiments of the present disclosure, Example 11 provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a display state determination method as described in any of Examples 1-8.
[0172] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0173] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0174] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for determining a display state, comprising: Determine the candidate page elements and target page elements corresponding to the page to be detected, wherein the target page element is selected from the candidate page elements; Based on the candidate page elements and the target page elements, the display status of the page to be detected is determined, and the display status indicates whether the page to be detected is displaying abnormally.
2. The method according to claim 1, wherein, Determining the target page element corresponding to the candidate page element includes: The page element that appears most frequently among the candidate page elements is selected as the target page element.
3. The method according to claim 2, wherein, Determining the display state of the page to be detected based on the candidate page elements and the target page elements includes: If the target page element is a replaceable page element, the state indicating normal display is taken as the display state of the page to be detected; otherwise, the abnormal display area ratio of the page to be detected is determined according to the ratio of the number of target page elements to the number of candidate page elements. Based on the comparison results between the abnormal display area ratio and the set threshold, the display status of the page to be detected is determined.
4. The method according to claim 1, wherein, Determining the target page element corresponding to the candidate page element includes: Remove replaceable page elements from the candidate page elements to obtain filtered page elements; The page element that appears most frequently among the filtered page elements is taken as the target page element.
5. The method according to claim 4, wherein, Determining the display state of the page to be detected based on the candidate page elements and the target page elements includes: The abnormal display area ratio of the page to be detected is determined based on the ratio of the number of target page elements to the number of candidate page elements. Based on the comparison results between the abnormal display area ratio and the set threshold, the display status of the page to be detected is determined.
6. The method according to any one of claims 1-5, wherein, Identify candidate page elements corresponding to the page to be detected, including: Select coordinate points from the page to be detected; The page element corresponding to the coordinate point is selected as a candidate page element.
7. The method according to claim 6, wherein, Selecting coordinate points from the page to be detected includes: The page to be detected is equally divided into at least two grids; Randomly select coordinate points from the grid.
8. The method according to any one of claims 1-7, wherein, The timing for determining the candidate page elements includes: After the page to be detected has been loaded for a set period of time, and a target event associated with the page to be detected is detected, the target event includes an event associated with triggering a display anomaly, and the page to be detected is a web page to be detected.
9. A display status determination device, comprising: The first determining module is configured to determine the candidate page elements and the target page elements corresponding to the page to be detected, wherein the target page elements are selected from the candidate page elements; The second determining module is configured to determine the display state of the page to be detected based on the candidate page element and the target page element, wherein the display state indicates whether the page to be detected is displaying abnormally.
10. An electronic device, comprising: One or more processing devices; A storage device is configured to store one or more programs, wherein When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the display state determination method as described in any one of claims 1-8.
11. A storage medium containing computer-executable instructions, wherein, The computer-executable instructions, when executed by a computer processor, are used to perform the display state determination method as described in any one of claims 1-8.
Citation Information
Patent Citations
Method and device for processing page exception
CN115470027A
White screen detection method and device, medium and computing equipment
CN115878474A
White screen detection method and device and electronic equipment
CN117112955A
White screen detection method, white screen detection module, terminal equipment and storage medium
CN117271015A