Page anomaly detection methods, devices, electronic equipment and storage media

By creating a heartbeat connection between the web worker process and the page process in the user terminal, the problem of low accuracy in page anomaly detection in the existing technology is solved, achieving more efficient and accurate page anomaly detection, reducing false alarm rate and saving resources.

CN116866234BActive Publication Date: 2026-07-31SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI BILIBILI TECH CO LTD
Filing Date
2023-08-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in detecting page anomalies, especially when a page has been inactive for a long time and has been paused by the browser, when the user manually terminates the browser process, or when the computer is reopened after hibernation. These technologies can easily misidentify normal pages as crashed pages.

Method used

Create a web worker process to establish a heartbeat connection with the page process of the page to be inspected. Determine if there are any abnormalities on the page through heartbeat requests and responses, including page crashes and freezes, and distinguish the type of abnormality based on response duration and number of retries.

Benefits of technology

It improves the accuracy and efficiency of page anomaly detection, reduces the false alarm rate, saves system resources, and performs local storage and reporting in abnormal situations to ensure the accuracy and stability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116866234B_ABST
    Figure CN116866234B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, electronic device, and storage medium for detecting page anomalies. The method includes: creating a web worker process corresponding to the page to be detected; establishing a heartbeat connection between the web worker process and the page process of the page to be detected; the web worker process sending a heartbeat request to the page process of the page to be detected, and determining whether the page to be detected has an anomaly based on the page process's heartbeat response to the heartbeat request. This solution achieves anomaly detection of the page to be detected based on the heartbeat connection between the web worker process and the page process of the page to be detected. Since the web worker process and the page process of the page to be detected are independent of each other, anomalies in the page process do not affect the normal operation of the web worker process, thereby improving the accuracy of anomaly detection. Moreover, this solution achieves anomaly detection of the page to be detected through the interaction between two processes in the user terminal, thereby saving bandwidth resources and improving the efficiency of page anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, specifically to a method, apparatus, electronic device, and storage medium for detecting page anomalies. Background Technology

[0002] Web pages are an essential component of internet services, allowing users to interact with information. However, in some cases, web pages may experience lag or crashes, negatively impacting user experience. Therefore, detecting these anomalies is of paramount importance.

[0003] The commonly used page anomaly detection method in the current technology is based on the built-in detection script. That is, the detection script is embedded in the page to be detected. The page process of the page to be detected executes the detection script to determine whether the page has an anomaly. However, when the page has an anomaly, the page process often cannot accurately execute the detection script, resulting in poor page detection accuracy. Especially when the page has been inactive for a long time and is suspended by the browser, the user manually terminates the browser process, or the computer is opened after hibernation, it is easy to misidentify a normal page as a crashed page. Summary of the Invention

[0004] In view of the technical problem of low accuracy in page anomaly detection in the prior art, embodiments of the present invention are proposed to provide a page anomaly detection method, apparatus, electronic device and storage medium that overcomes or at least partially solves the above problems.

[0005] According to a first aspect of the present invention, a page anomaly detection method is provided, comprising:

[0006] Create a web worker process corresponding to the page to be tested;

[0007] Establish a heartbeat connection between the web worker process and the page process of the page to be detected;

[0008] The web worker process sends a heartbeat request to the page process of the page to be detected, and determines whether there is any abnormality in the page to be detected based on the heartbeat response of the page process to the heartbeat request.

[0009] In an optional implementation, creating the web worker process corresponding to the page to be detected further includes: creating multiple web shared worker processes corresponding to the pages to be detected;

[0010] The step of establishing a heartbeat connection between the web worker process and the page process of the page to be detected further includes: establishing heartbeat connections between the web shared worker process and the page processes of the multiple pages to be detected, respectively;

[0011] The web worker process sends a heartbeat request to the page process of the page to be detected, and determines whether the page to be detected is abnormal based on the heartbeat response of the page process to the heartbeat request. This further includes: the web shared worker process sends a heartbeat request to the page process of the page to be detected respectively, and determines whether the page to be detected is abnormal based on the heartbeat response of any page process to the heartbeat request.

[0012] In one optional implementation, the plurality of pages to be detected are pages from the same origin.

[0013] In an optional implementation, determining whether the page to be detected is abnormal based on the page process's heartbeat response to the heartbeat request further includes:

[0014] Based on the response time corresponding to the heartbeat response of the page process, it is determined whether the page to be detected has any abnormalities.

[0015] In one optional implementation, determining whether the page to be detected is abnormal based on the response duration corresponding to the heartbeat response of the page process further includes:

[0016] If the response time corresponding to the heartbeat response of the page process exceeds the first preset threshold, it is determined that the page to be detected is abnormal, and the abnormality type of the page to be detected is determined according to the response time corresponding to the heartbeat response of the page process.

[0017] The abnormal types of the page to be detected include: page crashes and / or page freezes.

[0018] In an optional implementation, determining the anomaly type of the page to be detected based on the response duration corresponding to the heartbeat response of the page process further includes:

[0019] If the response time of the heartbeat response of the page process exceeds the second preset threshold, the abnormal type of the page to be detected is determined to be page crash.

[0020] If the response time corresponding to the heartbeat response of the page process does not exceed the second preset threshold, then the abnormal type of the page to be detected is determined to be page lag.

[0021] In an optional implementation, the web worker process sending a heartbeat request to the page process of the page to be detected further includes: the web worker process sending a heartbeat request to the page process of the page to be detected according to a first cycle;

[0022] The step of determining the anomaly type of the page to be detected based on the response duration corresponding to the heartbeat response of the page process further includes: determining whether the heartbeat response of the page process has been received according to the second cycle;

[0023] If a heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than the initial number; if the number of retries is less than the initial number, the anomaly type of the page to be detected is determined to be page lag; and after determining whether the number of retries corresponding to the page process is less than the initial number, the number of retries corresponding to the page process is reset to the initial number.

[0024] If no heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than a preset threshold. If the number of retries is less than the preset threshold, the anomaly type of the page to be detected is determined to be page crash. If the number of retries is greater than or equal to the preset threshold, the number of retries corresponding to the page process is updated to the difference between the current number of retries and 1.

[0025] In an optional implementation, after determining that the anomaly type of the page to be detected is a page crash, the method further includes:

[0026] The web worker process deletes the heartbeat connection with the page process of the page to be inspected.

[0027] In an optional implementation, if the web worker process determines that the page to be detected is abnormal, the method further includes: recording the abnormal data of the page to be detected in a local storage database.

[0028] After the page to be detected returns to normal, the page process of the page to be detected retrieves the abnormal data from the local storage database and reports the abnormal data to the server.

[0029] In one optional implementation, after reporting the abnormal data to the server, the method further includes: the page process of the page to be detected clearing the reported abnormal data in the local storage database.

[0030] According to a second aspect of the present invention, a page anomaly detection device is provided, comprising:

[0031] The execution module is used to create the web worker process corresponding to the page to be inspected.

[0032] A web worker process is used to establish a heartbeat connection with the page process of the page to be inspected; and the web worker process sends a heartbeat request to the page process of the page to be inspected, and determines whether there is an anomaly in the page to be inspected based on the heartbeat response of the page process to the heartbeat request.

[0033] The page process is used to send heartbeat responses to the web worker process.

[0034] In one optional implementation, the execution module is used to: create multiple webshared worker processes corresponding to the pages to be detected;

[0035] The web shared worker process is used to: establish heartbeat connections between the web shared worker process and the page processes of the plurality of pages to be detected; the web shared worker process sends heartbeat requests to the page processes of the pages to be detected, and determines whether the page to be detected is abnormal based on the heartbeat response of any page process to the heartbeat request.

[0036] In one optional implementation, the plurality of pages to be detected are pages from the same origin.

[0037] In one optional implementation, the web worker process is used to: determine whether the page to be detected is abnormal based on the response duration corresponding to the heartbeat response of the page process.

[0038] In one optional implementation, the web worker process is used to: determine that the page to be detected is abnormal if the response duration corresponding to the heartbeat response of the page process exceeds a first preset threshold, and determine the type of abnormality of the page to be detected based on the response duration corresponding to the heartbeat response of the page process.

[0039] The abnormal types of the page to be detected include: page crashes and / or page freezes.

[0040] In one optional implementation, the web worker process is used to: determine the anomaly type of the page to be detected as page crash if the response time corresponding to the heartbeat response of the page process exceeds a second preset threshold.

[0041] If the response time corresponding to the heartbeat response of the page process does not exceed the second preset threshold, then the abnormal type of the page to be detected is determined to be page lag.

[0042] In one alternative implementation, the web worker process is used to: send heartbeat requests to the page process of the page to be detected according to a first cycle;

[0043] The second cycle determines whether a heartbeat response from the page process has been received.

[0044] If a heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than the initial number; if the number of retries is less than the initial number, the anomaly type of the page to be detected is determined to be page lag; and after determining whether the number of retries corresponding to the page process is less than the initial number, the number of retries corresponding to the page process is reset to the initial number.

[0045] If no heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than a preset threshold. If the number of retries is less than the preset threshold, the anomaly type of the page to be detected is determined to be page crash. If the number of retries is greater than or equal to the preset threshold, the number of retries corresponding to the page process is updated to the difference between the current number of retries and 1.

[0046] In one alternative implementation, the web worker process is configured to: after determining that the anomaly type of the page to be detected is a page crash, the web worker process deletes the heartbeat connection with the page process of the page to be detected.

[0047] In one optional implementation, the web worker process is used to: if it is determined that the page to be detected is abnormal, record the abnormal data of the page to be detected in a local storage database;

[0048] The page process is used to: retrieve the abnormal data from the local storage database after the page to be detected returns to normal, and report the abnormal data to the server.

[0049] In one optional implementation, the page process is configured to: after reporting the abnormal data to the server, clear the reported abnormal data in the local storage database.

[0050] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0051] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described page anomaly detection method.

[0052] According to a fourth aspect of the present invention, a computer storage medium is provided, the storage medium storing at least one executable instruction, the executable instruction causing a processor to perform the operation corresponding to the above-described page anomaly detection method.

[0053] This invention creates a web worker process for the page to be detected and establishes a heartbeat connection between the web worker process and the page process of the page to be detected. The heartbeat response of the page process determines whether there are any anomalies in the page to be detected, thus achieving anomaly detection. Furthermore, the web worker process and the page process of the page to be detected are independent of each other; anomalies in the page process do not affect the normal operation of the web worker process. Therefore, even when the page to be detected is running abnormally, the web worker process can still perform anomaly detection, reducing the false positive rate and improving the accuracy of anomaly detection. Moreover, the web worker process is unaffected by user operations; even if the page is inactive for a long time and the browser pauses execution, the user manually terminates the browser process, or the computer is reopened after hibernation, no false positives will occur, further improving the accuracy of anomaly detection. Furthermore, this invention achieves anomaly detection of the page to be detected through the interaction between two processes in the user terminal, thereby saving bandwidth resources and improving the efficiency of anomaly detection.

[0054] In this embodiment of the invention, multiple web shared worker processes corresponding to pages to be detected are created. Anomaly detection of multiple pages to be detected is performed through a single web shared worker process. On the one hand, this avoids the web shared worker process being recycled when a page to be detected crashes, thereby ensuring the accuracy and stability of anomaly detection of the pages to be detected. On the other hand, it also reduces the number of web workers created, saving system resources.

[0055] In this embodiment of the invention, multiple pages to be detected corresponding to the same web shared worker process are pages from the same origin, thereby simplifying the information interaction process between the web shared worker process and the pages to be detected, ensuring the security of information interaction, and improving the stability of the application.

[0056] In this embodiment of the invention, the response time corresponding to the heartbeat response of the page process is used to determine whether there is an anomaly on the page to be detected, which helps to improve the detection efficiency of page anomalies.

[0057] This invention distinguishes the anomaly type of the page to be detected based on the response time, thereby differentiating between page crashes and page lags. This facilitates subsequent anomaly handling for different anomaly types and improves the accuracy of anomaly handling.

[0058] In this embodiment of the invention, the exception type of a page is determined based on the response time corresponding to the heartbeat response of the page process, thereby improving the efficiency of exception type determination.

[0059] In this embodiment of the invention, the system periodically detects whether a heartbeat response is received from the page process, and combines this with the number of retries corresponding to the page process to distinguish between page crashes and page freezes, thereby improving the efficiency of identifying page anomaly types.

[0060] In this embodiment of the invention, after determining that the anomaly type of the page to be detected is a page crash, the web worker process deletes the heartbeat connection with the page process of the page to be detected, thereby saving system resources.

[0061] In this embodiment of the invention, when an anomaly is detected on the page to be detected, the web worker process first stores the abnormal data in the local database on the front end, thus realizing the local storage of abnormal data. After the page to be detected returns to normal, the abnormal data is extracted from the local database on the front end and reported to the server, thus realizing the reporting of abnormal data and facilitating subsequent analysis and processing of abnormal data.

[0062] In this embodiment of the invention, after reporting abnormal data to the server, the page process clears the reported abnormal data in the local storage database, thereby saving system resources and bandwidth resources, and avoiding interference with subsequent abnormal data analysis.

[0063] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more obvious and understandable, specific implementation methods of the embodiments of the present invention are described below. Attached Figure Description

[0064] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0065] Figure 1 A flowchart illustrating a page anomaly detection method provided in Embodiment 1 of the present invention is shown.

[0066] Figure 2 A flowchart illustrating a page anomaly detection method provided in Embodiment 2 of the present invention is shown.

[0067] Figure 3This diagram illustrates an information interaction between a web shared worker process and a page process according to Embodiment 2 of the present invention.

[0068] Figure 4 A flowchart illustrating a page anomaly detection method provided in Embodiment 3 of the present invention is shown.

[0069] Figure 5 A flowchart illustrating a page anomaly detection method provided in Embodiment 4 of the present invention is shown.

[0070] Figure 6 A flowchart illustrating a page anomaly detection method provided in Embodiment 5 of the present invention is shown;

[0071] Figure 7 A flowchart illustrating a page anomaly detection method provided in Embodiment Six of the present invention is shown;

[0072] Figure 8 This figure shows a schematic diagram of a page anomaly detection device provided in Embodiment 7 of the present invention;

[0073] Figure 9 A schematic diagram of the structure of an electronic device provided in Embodiment 8 of the present invention is shown. Detailed Implementation

[0074] Exemplary embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the embodiments of the present invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this understanding of the embodiments of the present invention will be thorough and complete, and will fully convey the scope of the embodiments of the present invention to those skilled in the art.

[0075] Example 1

[0076] Figure 1 The diagram shows a flowchart of a page anomaly detection method provided in Embodiment 1 of the present invention.

[0077] The page anomaly detection method provided in this embodiment can be executed on the user terminal side where the web page is displayed.

[0078] Specifically, such as Figure 1 As shown, the method includes the following steps:

[0079] Step S110: Create the web worker process corresponding to the page to be tested.

[0080] The page to be detected is the page to be subjected to anomaly detection. Specifically, this page can be a web page on a user's terminal, such as a page in a browser, or a web page in an internet application, etc. This embodiment of the invention determines whether the page to be detected has any anomalies by detecting it. The anomalies described in this embodiment mainly include page crashes and / or page freezes. A page crash specifically occurs when an error happens while loading or running the page to be detected, causing the page to fail to display correctly or its functions to malfunction; a page crash specifically occurs when the page to be detected fails to respond to user actions for a short period of time, such as failing to respond to user clicks or scrolling, or animations and / or videos failing to play properly, etc.

[0081] Current technology involves embedding a JavaScript detection script within the page to be detected. This script is then executed by the page's process to detect whether the page has crashed or experienced other abnormal conditions. However, when the page crashes, the page's process cannot execute the detection script correctly, resulting in low detection accuracy.

[0082] Therefore, this embodiment of the invention creates a web worker process for anomaly detection of the page to be detected, that is, creates a web worker process corresponding to the page to be detected. A web worker process is a special type of background process used to perform tasks outside the main thread of the web page. Thus, whether the page to be detected is abnormal or not does not affect the normal operation of the web worker process.

[0083] Step S120: Establish a heartbeat connection between the web worker process and the page process of the page to be detected.

[0084] Each page to be tested is handled by an independent rendering process, which is the page process of the page being tested. This page process is responsible for parsing HTML, CSS, JavaScript, and other files into images that can be displayed on the screen for user viewing and interaction, and can also exchange data with the server. The web worker process and the page process are two independent processes in the application containing the page being tested on the user's terminal. An error in the page process does not block the data processing of the web worker process.

[0085] In this embodiment of the invention, a heartbeat connection is established between two processes of the same application on the user terminal, specifically between a web worker process and the page process of its corresponding page to be detected. If the web worker process corresponds to multiple pages to be detected, then heartbeat connections are established between the web worker process and the page process of each corresponding page to be detected.

[0086] In the specific implementation process, for any web worker process, the page process identifier of the page to be detected corresponding to the web worker process can be written into the heartbeat connection list of the web worker process, so that the subsequent web worker process can send heartbeat requests based on the heartbeat connection list.

[0087] In step S130, the web worker process sends a heartbeat request to the page process of the page to be inspected, and determines whether there is any abnormality in the page to be inspected based on the heartbeat response of the page process to the heartbeat request.

[0088] After the web worker process establishes a heartbeat connection with the page process of the page to be inspected, the web worker process will send a heartbeat request to the page process of the page to be inspected according to the corresponding request rules. Specifically, it will send a heartbeat request to any page process that has established a heartbeat connection with the web worker process.

[0089] The page process receives heartbeat requests from the web worker process. If the page under test is functioning normally, the page process will promptly send a heartbeat response to the web worker process. If the page under test is malfunctioning (e.g., crashes or freezes), the page process will not send a heartbeat response. Therefore, the web worker process can determine whether the page under test is malfunctioning based on the page process's heartbeat response. Specifically, it can determine whether the page has crashed or is freezing.

[0090] In one optional implementation, the web worker process specifically determines whether the page to be detected is abnormal based on the response time corresponding to the heartbeat response of the page process. For example, if the response time exceeds a first preset threshold, it is determined that the page to be detected is abnormal; conversely, if the response time does not exceed the first preset threshold, it is determined that the page to be detected is not abnormal.

[0091] Therefore, the page anomaly detection method provided in this embodiment of the invention creates a web worker process for the page to be detected and establishes a heartbeat connection between the web worker process and the page process of the page to be detected. The heartbeat response of the page process determines whether the page to be detected is abnormal, thus achieving anomaly detection. Furthermore, the web worker process and the page process of the page to be detected are independent of each other; anomalies in the page process do not affect the normal operation of the web worker process. Therefore, even if the page to be detected is running abnormally, the web worker process can still perform anomaly detection, reducing the false alarm rate and improving the accuracy of anomaly detection. Moreover, the web worker process is not affected by user operations; even if the page is inactive for a long time and the browser pauses execution, the user manually terminates the browser process, or the computer is reopened after hibernation, no false alarms will occur, further improving the accuracy of anomaly detection. Furthermore, this embodiment of the invention achieves anomaly detection of the page to be detected through the interaction between two processes in the user terminal, thereby saving bandwidth resources and improving the efficiency of anomaly detection.

[0092] Example 2

[0093] Figure 2 The diagram shows a flowchart of a page anomaly detection method provided in Embodiment 2 of the present invention.

[0094] The page anomaly detection method provided in this embodiment can be executed on the user terminal side where the web page is displayed.

[0095] Specifically, such as Figure 2 As shown, the method includes the following steps:

[0096] Step S210: Create web shared worker processes corresponding to multiple pages to be detected.

[0097] In actual implementation, if a dedicated web worker (also known as a regular web worker) process is created for each page to be detected, meaning one page to be detected corresponds to one dedicated web worker process, and there is a one-to-one correspondence between the page to be detected and the dedicated web worker process, then when the page to be detected crashes, some browsers will reclaim the dedicated web worker process corresponding to the crashed page in order to achieve system optimization, thus failing to guarantee the accuracy and stability of the anomaly detection of the page to be detected.

[0098] Therefore, this embodiment of the invention creates multiple web shared worker processes corresponding to the pages to be detected, and uses a single web shared worker process to perform anomaly detection on multiple pages. Specifically, the web worker process in this embodiment is a web shared worker process, a special type of web worker process that allows multiple scripts to run in a browser and share data between different JavaScript runtime environments (such as different tabs, windows, or iframes). Since one web shared worker process corresponds to multiple pages to be detected, the crash of a page to be detected will not trigger the recycling of that web shared worker process, ensuring the accuracy and stability of anomaly detection for the pages to be detected. Furthermore, it can reduce the number of web workers created, saving system resources.

[0099] In this context, multiple pages to be inspected corresponding to the same web shared worker process are considered to be of the same origin, meaning they share the same protocol, domain name, and port number. This simplifies the information exchange process between the web shared worker process and the pages to be inspected, ensures the security of information exchange, and improves application stability.

[0100] Step S220: Establish heartbeat connections between the web shared worker process and the page processes of multiple pages to be detected.

[0101] Identify the page processes corresponding to each page to be detected for each web shared worker process, and establish heartbeat connections between the web shared worker process and each page process.

[0102] In step S230, the web shared worker process sends heartbeat requests to the page processes of each page to be detected, and determines whether there is an anomaly on the page to be detected based on the heartbeat response of any page process to the heartbeat request.

[0103] The web shared worker sends heartbeat requests to each page process with which it has established a heartbeat connection according to the corresponding detection rules. For any page process, it determines whether the page process has crashed or frozen based on the corresponding heartbeat.

[0104] by Figure 3 For example, Figure 3This diagram illustrates information interaction between a web shared worker process and a page process, as provided in Embodiment 2 of the present invention. Figure 3 As shown, the web shared worker process establishes heartbeat connections with the page processes of page 1, page 2, and page 3 to be inspected, respectively. The web shared worker process sends heartbeat requests to the page processes of the pages to be inspected, and the page processes of the pages to be inspected send heartbeat responses back to the web shared worker process. The web shared worker process determines whether page 1, page 2, or page 3 has any anomalies based on the heartbeat responses of the page processes of page 1, page 2, and page 3.

[0105] Therefore, the page anomaly detection method provided in this embodiment of the invention creates multiple web shared worker processes corresponding to multiple pages to be detected, and uses one web shared worker process to perform anomaly detection on multiple pages to be detected. On the one hand, this can avoid the web shared worker process being recycled when a page to be detected crashes, thereby ensuring the accuracy and stability of the anomaly detection of the page to be detected; on the other hand, it can also reduce the number of web workers created and save system resources.

[0106] Example 3

[0107] Figure 4 The diagram shows a flowchart of a page anomaly detection method provided in Embodiment 3 of the present invention.

[0108] The page anomaly detection method provided in this embodiment can be executed on the user terminal side where the web page is displayed.

[0109] Specifically, such as Figure 4 As shown, the method includes the following steps:

[0110] Step S410: Create a web worker process corresponding to the page to be detected, and establish a heartbeat connection between the web worker process and the page process of the page to be detected.

[0111] In step S420, the web worker process sends a heartbeat request to the page process of the page to be detected.

[0112] In step S430, the web worker process determines whether the response time corresponding to the heartbeat response of the page to be detected exceeds the first preset threshold; if yes, then proceed to step S440; if no, then proceed to step S470.

[0113] This invention determines whether a page to be detected has any anomalies based on the response time corresponding to the heartbeat response of the page process. Specifically, the response time corresponding to the heartbeat response of the page process is the time elapsed between the web worker process sending a heartbeat request and receiving the heartbeat response from the page process.

[0114] Specifically, the web worker process determines whether the response time of the heartbeat response of the page to be detected exceeds a first preset threshold. If the response time of the heartbeat response of the page process exceeds the first preset threshold, it is determined that the page to be detected is abnormal, and step S440 can be further executed to determine the type of abnormality of the page to be detected. If the response time of the heartbeat response of the page process does not exceed the first preset threshold, it is determined that the page to be detected is not abnormal.

[0115] In step S440, the web worker process determines whether the response time corresponding to the heartbeat response of the page to be detected exceeds the second preset threshold; if yes, then proceed to step S450; if no, then proceed to step S460.

[0116] If an anomaly is determined in the page to be tested, the anomaly type of the page to be tested is further determined based on the response time corresponding to the heartbeat response of the page process; the anomaly type of the page to be tested includes: page crash and / or page lag.

[0117] Specifically, the web worker process determines whether the response time of the heartbeat response of the page to be detected exceeds a second preset threshold. This second preset threshold is greater than a first preset threshold. For example, the first preset threshold can be 6 seconds, the second preset threshold can be 18 seconds, and so on.

[0118] If the web worker process determines that the response time of the heartbeat response of the page to be detected exceeds the second preset threshold, then step S450 is executed; if the web worker process determines that the response time of the heartbeat response of the page to be detected exceeds the first preset threshold but does not exceed the second preset threshold, then step S460 is executed.

[0119] Step S450: Determine the anomaly type of the page to be detected as a page crash.

[0120] If the response time of the heartbeat response of the page process exceeds the second preset threshold, it indicates that the page under test has been in an unresponsive state for a long time, and it is determined that the page under test has crashed.

[0121] In one alternative implementation, after determining that the anomaly type of the page to be detected is a page crash, the web worker process deletes the heartbeat connection with the page process of the page to be detected, so that the web worker process no longer sends heartbeat requests to the page process of the page to be detected, thus saving system resources.

[0122] Step S460: Determine the anomaly type of the page to be detected as page lag.

[0123] If the web worker process determines that the response time of the heartbeat response of the page to be tested exceeds the first preset threshold but does not exceed the second preset threshold, it indicates that the page to be tested is in an unresponsive state for a short period of time, and thus it is determined that the page to be tested has experienced page lag.

[0124] Step S470: Confirm that the page to be tested is functioning normally.

[0125] If the response time of the heartbeat response of the page to be tested does not exceed the first preset threshold, it is determined that the page to be tested is currently running normally.

[0126] Therefore, the page anomaly detection method provided in this embodiment of the invention determines whether the page to be detected is abnormal based on the response time of the heartbeat response of the page, thereby improving the efficiency of anomaly detection of the page to be detected; and further distinguishes the anomaly type of the page to be detected based on the response time, thereby distinguishing between page crash and page lag, which facilitates subsequent anomaly handling for different anomaly types and improves the accuracy of anomaly handling.

[0127] Example 4

[0128] Figure 5 The diagram shows a flowchart of a page anomaly detection method provided in Embodiment 4 of the present invention.

[0129] The page anomaly detection method provided in this embodiment can be executed on the user terminal side where the web page is displayed.

[0130] Specifically, such as Figure 5 As shown, the method includes the following steps:

[0131] Step S510: Create a web worker process corresponding to the page to be detected, and establish a heartbeat connection between the web worker process and the page process of the page to be detected.

[0132] The following section uses a single page to be inspected as an example to illustrate the process of determining the anomaly type of that page. In actual implementation, if the web worker process corresponds to multiple pages to be inspected, the anomaly type determination process for each page is the same and can be achieved through steps S520-S590.

[0133] In step S520, the web worker process sends a heartbeat request to the page process of the page to be tested according to the first cycle.

[0134] The web worker process periodically sends heartbeat requests to the page process of the page being monitored; this period is the first period. For example, the web worker process can send a heartbeat request to the corresponding page process every 2 seconds.

[0135] In step S530, the web worker process determines whether it has received a heartbeat response from the page process according to the second cycle; if yes, proceed to step S540; if no, proceed to step S570.

[0136] The web worker process periodically checks whether it has received a heartbeat response from the page process. This period is specifically the second period, which is longer than the first period. For example, the second period can be once every 6 seconds, so the web worker determines whether it has received a heartbeat response from the page process every 6 seconds.

[0137] If the execution time of this step has reached the second cycle since the last one, determine whether a heartbeat response from the page process has been received. If a heartbeat response from the page process has been received, proceed to step S540; otherwise, proceed to step S570.

[0138] Step S540: Determine whether the number of retries corresponding to the page process is less than the initial number; if yes, proceed to step S550; if no, proceed to step S560.

[0139] To improve the efficiency of distinguishing between page crashes and page freezes, this embodiment of the invention allocates a number of retries to the page process. This number of retries is initially set. For example, in the initial state, the number of retries for the page process is 3. Subsequently, each time a heartbeat response from the page process is not received, the number of retries is decreased by one.

[0140] If the web worker process confirms that it has received a heartbeat response from the page process, indicating that the current page process is running normally, it then checks whether the current retries of the page process are less than the initial number to determine whether the page process has been running normally in the previous period. Furthermore, after determining whether the retries of the page process are less than the initial number, the retries of the page process are reset to the initial number. For example, if a heartbeat response is received from page process A, and page process A's retries are 2 (less than the initial number 3), then step S550 is executed; if a heartbeat response is received from page process A, and page process A's retries are 3 (equal to the initial number 3), then step S560 is executed.

[0141] Step S550: Determine the anomaly type of the page to be detected as page lag.

[0142] If a heartbeat response is received from the page process and the number of retries for the page process is less than the initial number, it indicates that the page process is running normally, but it ran abnormally in a previous period, thus determining that the page to be tested had previously experienced page lag.

[0143] Step S560: Confirm that the page to be tested is functioning normally.

[0144] If a heartbeat response is received from the page process and the number of retries for that page process is equal to the initial number, it indicates that the current page process is running normally and the previous page process was running abnormally, thus determining that the page to be tested is running normally.

[0145] Step S570: Determine whether the number of retries corresponding to the page process is less than the preset threshold; if yes, proceed to step S580; if no, proceed to step S590.

[0146] If the web worker process determines that it has not received a heartbeat response from the page process, it indicates that the current page process is running abnormally. At this point, it checks whether the current retries count of the page process is less than a preset threshold. This preset threshold is less than the initial count; for example, the preset threshold could be 1. The smaller the current retries count, the more times the page process has been judged to be running abnormally. Therefore, if the retries count corresponding to the page process is less than the preset threshold, step S580 is executed; if the retries count corresponding to the page process is greater than or equal to the preset threshold, step S590 is executed.

[0147] Step S580: Determine the anomaly type of the page to be detected as a page crash.

[0148] If no heartbeat response is received from the page process, and the number of retries for the page process is less than the preset threshold, it indicates that the current page process is running abnormally, and the page process has been in an abnormal state for multiple cycles, thus determining that the page to be detected has crashed.

[0149] Step S590: Update the retry count corresponding to the page process to the difference between the current retry count and 1.

[0150] If no heartbeat response is received from the page process, and the page process's retries count is greater than or equal to a preset threshold, it indicates that the current page process is malfunctioning. Furthermore, since the page process has not been in an abnormal state for an extended period, a further round of checks is required to determine whether the page process has crashed or experienced a freeze. The updated retries count is then decremented by 1 from the current page process's retries count.

[0151] Therefore, the page anomaly detection method provided in this embodiment of the invention periodically detects whether a heartbeat response is received from the page process, and combines the number of retries corresponding to the page process to distinguish between page crashes and page freezes, thereby improving the efficiency of page anomaly type identification.

[0152] Example 5

[0153] Figure 6 The diagram shows a flowchart of a page anomaly detection method provided in Embodiment 5 of the present invention.

[0154] The page anomaly detection method provided in this embodiment can be executed on the user terminal side where the web page is displayed.

[0155] Specifically, such as Figure 6 As shown, the method includes the following steps:

[0156] Step S610: Create a web worker process corresponding to the page to be detected, establish a heartbeat connection between the web worker process and the page process of the page to be detected, and send a heartbeat request to the page process of the page to be detected.

[0157] In step S620, the web worker process determines whether there is an anomaly on the page to be detected; if so, step S630 is executed.

[0158] Specifically, the web worker process determines whether there is an abnormal process on the page to be detected based on the page process's heartbeat response to the heartbeat request.

[0159] In step S630, the web worker process records the abnormal data of the page to be detected in the local storage database.

[0160] When a web worker process determines that a page being inspected contains an anomaly, it records the anomaly data obtained during the inspection in a local storage database, such as IndexedDB. IndexedDB is a JavaScript-based browser-side database system that allows large amounts of structured data to be stored on the client side, and can be read and modified even when the user is offline.

[0161] Specifically, the web worker process generates different exception data based on the different exception types of the page being inspected. For example, if the exception type of the page being inspected is a page crash, then page crash data is generated; if the exception type of the page being inspected is a page freeze, then page freeze data is generated. Furthermore, to facilitate the analysis and handling of exceptions on the page being inspected, this exception data, in addition to containing the exception type of the page being inspected, also contains the corresponding time information, such as the start time of the page crash, the start and end times of the page freeze, etc.

[0162] In step S640, after the page to be tested returns to normal, the page process of the page to be tested retrieves the abnormal data from the local storage database and reports the abnormal data to the server.

[0163] When a page crashes, the page process can retrieve the abnormal data from the local storage database and report it to the server after the page is reopened. When a page freezes, the abnormal data can be reported after the freeze ends or after the page is reopened. This embodiment of the invention does not limit the reporting of abnormal data.

[0164] In one optional implementation, after reporting abnormal data to the server, the page process of the page to be detected clears the reported abnormal data from the local storage database, thereby avoiding repeated reporting of data. This saves system resources and bandwidth resources, and avoids interference with subsequent abnormal data analysis.

[0165] Therefore, in the page anomaly detection method provided by the embodiments of the present invention, when it is determined that there is an anomaly in the page to be detected, the web worker process first stores the abnormal data in the local database of the front end, so as to realize the storage of abnormal data locally. After the page to be detected is restored to normal, the abnormal data is extracted from the local database of the front end and reported to the server, so as to realize the reporting of abnormal data, which facilitates the subsequent analysis and processing of abnormal data.

[0166] Example 6

[0167] Figure 7The diagram shows a flowchart of a page anomaly detection method provided in Embodiment Six of the present invention.

[0168] The page anomaly detection method provided in this embodiment can be executed on the user terminal side where the web page is displayed.

[0169] Specifically, such as Figure 7 As shown, this anomaly detection method is implemented through interaction between indexedDB, the page process, and the web worker process. It includes an initialization process, an anomaly data detection and reporting process, and a heartbeat detection anomaly data recording process.

[0170] When the page process detects a user entering the page, it initializes the indexedDB connection and checks if a data table already exists in indexedDB. If not, it creates the corresponding data table. This data table is used to record abnormal data on the page.

[0171] After the data table exists in the indexdDB, the data is read and the page process traverses the data to determine if there is a crash record in the data table. If so, a page crash is reported and the crash record is deleted from the indexdDB. The data is also traversed to determine if there is a lag record in the data table. If so, a page lag is reported and the lag record is deleted from the indexdDB.

[0172] After a user enters the page, the system can also create a web shared worker, initialize a connection with IndexedDB, and determine if a data table has already been created; if not, it will create the data table. Furthermore, a page connection list will be established, recording page processes that have established heartbeat connections with this web shared worker.

[0173] The web shared worker sends heartbeat requests in a loop (e.g., once every 2 seconds) to check if the page process is responding. If there is no response, the page process cannot send response information; if there is a response, the page process sends response information.

[0174] After the page process sends the response information, the latest response time of the page process is updated. If it is in the process of retrying (i.e., the current retry count is not the initial count), the retry count is reset to the initial count. If it is not in the process of retrying, no reset process is required.

[0175] The web shared worker iterates through the response times of all pages every 6 seconds. If it does not receive a response from a page, it determines that the page has timed out and checks whether the number of retries for that page is less than the threshold. If so, it determines that a page crash has occurred, deletes the connection to that page, and records the page crash in the indexdDB. If the number of retries is less than the threshold, it records a page freeze after deducting 1 from the number of retries.

[0176] If the user closes the page, a close message is sent, which allows the web shared worker to remove the page from the connection pool, i.e., delete the heartbeat connection with the page.

[0177] Therefore, the page anomaly detection method provided in this embodiment of the invention can reduce the false alarm rate of anomaly detection and improve the anomaly detection accuracy of the page to be detected; moreover, it can save bandwidth resources and improve the efficiency of anomaly detection.

[0178] Example 7

[0179] Figure 8 A schematic diagram of a page anomaly detection device provided in Embodiment 7 of the present invention is shown. Figure 8 As shown, the device 800 includes: an execution module 810, a web worker process 820, and a page process 830.

[0180] Execution module 810 is used to create the web worker process corresponding to the page to be detected;

[0181] Web worker process 820 is used to establish a heartbeat connection with the page process of the page to be detected; and the web worker process sends a heartbeat request to the page process of the page to be detected, and determines whether there is an anomaly in the page to be detected based on the heartbeat response of the page process to the heartbeat request.

[0182] Page process 830 is used to send heartbeat responses to the web worker process.

[0183] In one optional implementation, the execution module is used to: create multiple webshared worker processes corresponding to the pages to be detected;

[0184] The web shared worker process is used to: establish heartbeat connections between the web shared worker process and the page processes of the plurality of pages to be detected; the web shared worker process sends heartbeat requests to the page processes of the pages to be detected, and determines whether the page to be detected is abnormal based on the heartbeat response of any page process to the heartbeat request.

[0185] In one optional implementation, the plurality of pages to be detected are pages from the same origin.

[0186] In one optional implementation, the web worker process is used to: determine whether the page to be detected is abnormal based on the response duration corresponding to the heartbeat response of the page process.

[0187] In one optional implementation, the web worker process is used to: determine that the page to be detected is abnormal if the response duration corresponding to the heartbeat response of the page process exceeds a first preset threshold, and determine the type of abnormality of the page to be detected based on the response duration corresponding to the heartbeat response of the page process.

[0188] The abnormal types of the page to be detected include: page crashes and / or page freezes.

[0189] In one optional implementation, the web worker process is used to: determine the anomaly type of the page to be detected as page crash if the response time corresponding to the heartbeat response of the page process exceeds a second preset threshold.

[0190] If the response time corresponding to the heartbeat response of the page process does not exceed the second preset threshold, then the abnormal type of the page to be detected is determined to be page lag.

[0191] In one alternative implementation, the web worker process is used to: send heartbeat requests to the page process of the page to be detected according to a first cycle;

[0192] The second cycle determines whether a heartbeat response from the page process has been received.

[0193] If a heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than the initial number; if the number of retries is less than the initial number, the anomaly type of the page to be detected is determined to be page lag; and after determining whether the number of retries corresponding to the page process is less than the initial number, the number of retries corresponding to the page process is reset to the initial number.

[0194] If no heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than a preset threshold. If the number of retries is less than the preset threshold, the anomaly type of the page to be detected is determined to be page crash. If the number of retries is greater than or equal to the preset threshold, the number of retries corresponding to the page process is updated to the difference between the current number of retries and 1.

[0195] In one alternative implementation, the web worker process is configured to: after determining that the anomaly type of the page to be detected is a page crash, the web worker process deletes the heartbeat connection with the page process of the page to be detected.

[0196] In one optional implementation, the web worker process is used to: if it is determined that the page to be detected is abnormal, record the abnormal data of the page to be detected in a local storage database;

[0197] The page process is used to: retrieve the abnormal data from the local storage database after the page to be detected returns to normal, and report the abnormal data to the server.

[0198] In one optional implementation, the page process is configured to: after reporting the abnormal data to the server, clear the reported abnormal data in the local storage database.

[0199] Therefore, the page anomaly detection device provided in this embodiment of the invention can reduce the false alarm rate of anomaly detection and improve the anomaly detection accuracy of the page to be detected; it can also save bandwidth resources and improve the efficiency of anomaly detection.

[0200] Example 8

[0201] Figure 9 A schematic diagram of an electronic device according to Embodiment 8 of the present invention is shown. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.

[0202] like Figure 9 As shown, the electronic device may include: a processor 902, a communications interface 904, a memory 906, and a communications bus 908.

[0203] The processor 902, communication interface 904, and memory 906 communicate with each other via communication bus 908. Communication interface 904 is used to communicate with other network elements such as clients or other servers. The processor 902 executes program 910, specifically performing the relevant steps described in the embodiment of the page anomaly detection method.

[0204] Specifically, program 910 may include program code that includes computer operation instructions.

[0205] Processor 902 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0206] Memory 906 is used to store program 910. Memory 906 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device. Specifically, program 910 can be used to cause processor 902 to execute the page fault detection method in any of the above method embodiments.

[0207] Example 9

[0208] Embodiment 9 of the present invention provides a non-volatile computer storage medium storing at least one executable instruction that can execute the page anomaly detection method in any of the above method embodiments.

[0209] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the embodiments of the present invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the embodiments of the present invention.

[0210] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0211] Similarly, it should be understood that, in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0212] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0213] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the embodiments of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0214] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0215] It should be noted that the above embodiments are illustrative of the present invention and not restrictive of the present invention, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the present invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A method of page anomaly detection, the method comprising: include: Create a web worker process corresponding to the page to be tested; Establish a heartbeat connection between the web worker process and the page process of the page to be detected; The web worker process sends a heartbeat request to the page process of the page to be detected according to a first cycle; and determines whether it receives a heartbeat response from the page process according to a second cycle; wherein the second cycle is longer than the first cycle; If a heartbeat response is received from the page process and the number of retries is less than the initial number, the anomaly type of the page to be detected is determined to be page lag. After determining that the number of retries corresponding to the page process is less than the initial number, the number of retries corresponding to the page process is reset to the initial number.

2. The method of claim 1, wherein, The step of creating the web worker process corresponding to the page to be detected further includes: creating multiple web shared worker processes corresponding to the pages to be detected; The step of establishing a heartbeat connection between the web worker process and the page process of the page to be detected further includes: establishing heartbeat connections between the web shared worker process and the page processes of the multiple pages to be detected, respectively; The web worker process sending heartbeat requests to the page process of the page to be detected according to the first cycle includes: the web shared worker process sending heartbeat requests to the page process of the page to be detected respectively.

3. The method of claim 2, wherein, The multiple pages to be detected are pages from the same origin.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: If the response time corresponding to the heartbeat response of the page process exceeds the first preset threshold, it is determined that the page to be detected is abnormal, and the abnormality type of the page to be detected is determined according to the response time corresponding to the heartbeat response of the page process. The abnormal types of the page to be detected include: page crashes and / or page freezes.

5. The method of claim 4, wherein, The step of determining the anomaly type of the page to be detected based on the response duration corresponding to the heartbeat response of the page process further includes: If the response time of the heartbeat response of the page process exceeds the second preset threshold, the abnormal type of the page to be detected is determined to be page crash. If the response time corresponding to the heartbeat response of the page process does not exceed the second preset threshold, then the abnormal type of the page to be detected is determined to be page lag.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: If no heartbeat response is received from the page process, it is determined whether the number of retries corresponding to the page process is less than a preset threshold. If the number of retries is less than the preset threshold, the anomaly type of the page to be detected is determined to be page crash. If the number of retries is greater than or equal to the preset threshold, the number of retries corresponding to the page process is updated to the difference between the current number of retries and 1.

7. The method of claim 6, wherein, After determining that the anomaly type of the page to be detected is a page crash, the method further includes: The web worker process deletes the heartbeat connection with the page process of the page to be inspected.

8. The method according to any one of claims 1-3, characterized by, The method further includes: if the webworker process determines that the page to be detected is abnormal, then the abnormal data of the page to be detected is recorded in the local storage database; After the page to be detected returns to normal, the page process of the page to be detected retrieves the abnormal data from the local storage database and reports the abnormal data to the server.

9. The method of claim 8, wherein, After reporting the abnormal data to the server, the method further includes: the page process of the page to be detected clearing the reported abnormal data in the local storage database.

10. A page anomaly detection apparatus characterized by comprising: include: The execution module is used to create the web worker process corresponding to the page to be inspected. A web worker process is used to establish a heartbeat connection with the page process of the page to be detected; and the web worker process sends a heartbeat request to the page process of the page to be detected according to a first cycle, and determines whether it receives a heartbeat response from the page process according to a second cycle; wherein the second cycle is longer than the first cycle; if a heartbeat response from the page process is received and the number of retries is less than the initial number, the abnormal type of the page to be detected is determined to be page lag, and after determining that the number of retries corresponding to the page process is less than the initial number, the number of retries corresponding to the page process is reset to the initial number; The page process is used to send heartbeat responses to the web worker process.

11. An electronic device, comprising: include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the page anomaly detection method as described in any one of claims 1-9.

12. A computer storage medium, characterized in that The storage medium stores at least one executable instruction, which causes the processor to perform the operation corresponding to the page anomaly detection method as described in any one of claims 1-9.

13. A computer program product, characterized in that, The computer program product is used to perform the operations corresponding to the page anomaly detection method as described in any one of claims 1-9.