Page loading time consumption detection method and device, equipment and storage medium

By determining the loading start point during the launch operation of the target page and determining the loading end point based on the time points of page element changes within the visible area, the problem of inaccurate detection of H5 page loading time in existing technologies is solved, achieving effective detection in the iOS system and improving the accuracy and comprehensiveness of detection.

CN121635985APending Publication Date: 2026-03-10BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, browser-provided page performance testing tools have poor compatibility when testing H5 page loading time, are incompatible with corresponding iOS apps, and can only obtain the rendering time of H5 pages, resulting in inaccurate testing.

Method used

By responding to the launch operation of the target page, the launch time is determined as the loading start point, and the loading end point is determined based on the time points of changes in page elements within the visible area, especially the loading end point of the first screen page, and the loading time is calculated.

Benefits of technology

It improves the accuracy of page load time detection, making the detection results match the real user experience, and can be effectively applied in iOS systems to comprehensively obtain container loading and rendering time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635985A_ABST
    Figure CN121635985A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a page loading time consumption detection method and device, equipment and a storage medium. Comprising the following steps: in response to a starting operation for a target page, determining a starting time point of the target page as a loading starting point; determining a loading end point based on the change time point of the page element in the visual area; wherein the visual area is an area corresponding to a first screen page of the target page; and determining the loading time consumption of the target page according to the loading end point and the loading start point. According to the page loading time consumption detection method provided by the embodiment of the invention, the starting time point of the target page is determined as the loading starting point, and the loading ending point is determined according to the change time points of the page elements in the visual area, so that the loading time consumption of the target page is determined, and the accuracy of page loading time consumption detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for detecting page loading time. Background Technology

[0002] Loading web pages via applications (APPs) is a significant application scenario in application development, known as hybrid application development. In this context, the web page can be an HTML5 (H5) page. When loading web pages through an APP, the loading time is a crucial indicator of page performance. Currently, browser-provided page performance testing tools are used to obtain web page loading times, but this method suffers from poor versatility and low accuracy. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and storage medium for detecting page loading time, which can improve the accuracy of page loading time detection.

[0004] In a first aspect, embodiments of this disclosure provide a method for detecting page loading time, comprising:

[0005] In response to a launch operation targeting a target page, the launch time of the target page is determined as the loading start point;

[0006] The loading end point is determined based on the time points of changes in page elements within the visible area; wherein, the visible area is the area corresponding to the first screen of the target page;

[0007] The loading time of the target page is determined based on the loading end point and the loading start point.

[0008] Secondly, embodiments of this disclosure also provide a device for detecting page loading time, comprising:

[0009] The loading start point determination module is used to determine the launch time point of the target page as the loading start point in response to the launch operation for the target page;

[0010] The loading end point determination module is used to determine the loading end point based on the time points of changes in page elements within the visible area; wherein, the visible area is the area corresponding to the first screen of the target page;

[0011] The loading time determination module is used to determine the loading time of the target page based on the loading end point and the loading start point.

[0012] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0013] One or more processors;

[0014] Storage device for storing one or more programs.

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the page loading time detection method as described in the embodiments of this disclosure.

[0016] 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 page loading time detection method as described in embodiments of this disclosure.

[0017] This disclosure provides a method, apparatus, device, and storage medium for detecting page loading time. In response to a launch operation on a target page, the launch time of the target page is determined as the loading start point; the loading end point is determined based on the change time points of page elements within the visible area; wherein the visible area is the area corresponding to the first screen of the target page; and the loading time of the target page is determined based on the loading end point and the loading start point. The page loading time detection method provided in this disclosure determines the loading start point of the target page and the loading end point based on the change time points of page elements within the visible area, thereby determining the loading time of the target page and improving the accuracy of page loading time detection. Attached Figure Description

[0018] 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.

[0019] Figure 1 This is a flowchart illustrating a method for detecting page loading time provided in an embodiment of this disclosure;

[0020] Figure 2 This is an example diagram illustrating the determination of a loading end point in one embodiment of this disclosure;

[0021] Figure 3 This is a flowchart illustrating how to determine page loading time in one embodiment of this disclosure;

[0022] Figure 4 This is a schematic diagram of the structure of a page loading time detection device provided in an embodiment of this disclosure;

[0023] Figure 5This 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] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0031] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0032] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0033] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0034] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0035] Currently, using browser-provided page performance testing tools (such as the Performance API) to obtain the loading time of H5 pages has the following drawbacks:

[0036] 1. This type of page performance testing tool is only compatible with Android apps and not with iOS apps, resulting in poor compatibility.

[0037] 2. Page loading time generally includes two parts: container loading time and H5 page rendering time. However, this method can only obtain the H5 page rendering time, losing the container loading time, which makes the detected page loading time inaccurate.

[0038] Figure 1 This is a flowchart illustrating a method for detecting page loading time according to an embodiment of the present disclosure. This embodiment is applicable to situations where page loading time is detected. The method can be executed by a page loading time detection device, which can be implemented in software and / or hardware, or optionally, by an electronic device, such as a mobile terminal, a PC, or a server.

[0039] like Figure 1 As shown, the method includes:

[0040] S110, in response to a launch operation for the target page, determines the launch time of the target page as the loading start point.

[0041] The target page can be a web page, such as an H5 page, launched through an application. Specifically, the launch time of the target page can be determined as the loading start point in two ways: when the application detects that a user has launched the target page, the system time at which the target page launches is recorded, and this system time is determined as the loading start point; or, the launch time of the target page is recorded as 0, and a timer is started, i.e., the loading start point is recorded as 0.

[0042] In this embodiment, the user launches the target page by clicking a preset icon of the application. When the launch of the target page is detected, the application loads a container to host the target page. After the container is loaded, it begins to fetch the resources required by the target page and injects the fetched resources into the loaded container to perform subsequent page rendering operations within the container. The application and the target page can communicate bidirectionally via a preset communication channel. For example, this data channel can be a JSBridge. In this embodiment, the communication method between the application and the target page can refer to existing methods of bidirectional data communication via a preset communication channel, and is not limited here.

[0043] In this application scenario, after the container has finished loading, a piece of script code (such as JS code) can be injected into the target page. This script code is used to determine the loading end point based on the detected changes in page elements and send the determined loading end point to the application.

[0044] S120, determine the loading end point based on the time point of change of page elements within the visible area.

[0045] Here, page elements can be Document Object Model (DOM) elements. The visible area is the area corresponding to the first screen of the target page. The first screen of the target page can be understood as the part of the page that is displayed after the target page is first loaded, that is, the part that the user sees first; or it can also be understood as the part that the user can see without scrolling when the target page is first opened. In this embodiment, the loading time of the first screen (also called the first screen time) is used to characterize the loading time of the target page. This is because, from the perspective of user experience, when the content fills the area of ​​the first screen, the user can see the main content of the target page and make his or her own selections. The speed at which the first screen loads directly affects the user's experience of the target page.

[0046] In this context, a DOM element can be understood as an element node on the corresponding DOM tree of the target page; this DOM element can be any node on the DOM tree. The time point of change of a DOM element can be understood as the point in time when a DOM element changes. Changes to DOM elements can include the addition or removal of DOM elements, changes in attributes, and changes in text content. In this embodiment, changes to DOM elements can be detected through a preset page detection interface. Whenever a DOM element changes, this page detection interface can detect it, thereby determining the loading end point based on the detected changes to the DOM elements.

[0047] Specifically, determining the loading end point based on the change time of page elements within the visible area can be achieved by: obtaining the change time of the last changed page element within the visible area and determining that change time as the loading end point. The last changed page element within the visible area satisfies the following condition: if no further changes to page elements within the visible area are detected within a preset time period after a change occurs, that page is determined as the last changed page element within the visible area. The preset time period is set in advance.

[0048] Optionally, the method for determining the loading end point based on the change time of page elements within the visible area can be: obtaining the detected changes of page elements; determining whether the page elements are within the visible area; if the page elements are within the visible area, recording the change time of the page elements, and determining the loading end point based on the change time of the DOM elements.

[0049] Changes to page elements can be detected using a pre-defined page detection interface, such as the MutationObserver API. This embodiment does not limit the detection principle or method for DOM element changes; existing page detection interface implementations can be referenced. Determining whether a page element is within the visible area can be done by: obtaining the position and size (including width and height) of the DOM element, and then determining whether the top of the DOM element is within the visible area based on its position and size. If the top of the DOM element is within the visible area, then the DOM element is within the visible area. Alternatively, determining whether a DOM element is within the visible area can be done by: obtaining the top and bottom coordinates of the visible area and the center coordinates of the DOM element; and then determining whether the DOM element is within the visible area based on the center coordinates of the DOM element, the top coordinates of the visible area, and the bottom coordinates of the visible area. The center coordinates of the DOM element include the X and Y coordinates. If both the X and Y coordinates of the center coordinates of the DOM element are less than the top coordinates of the display window and greater than the bottom coordinates of the display window, then the DOM element is within the visible area.

[0050] Specifically, if the detected changed DOM element is within the visible area, the time point of the change will be recorded; if the detected changed DOM element is not within the visible area, it will be ignored. Thus, the loading end point is determined based on the time points of changes of DOM elements within the visible area.

[0051] Optionally, the loading end point can be determined based on the time point of page element change: determine whether a change in the next page element in the visible area is detected within a first preset time period after the time point of page element change; if no change in the next page element in the visible area is detected within the first preset time period after the time point of page element change, then the time point of page element change is determined as the loading end point.

[0052] The first preset duration can be an observation duration determined by the developers based on data analysis of front-end page rendering scenarios and back-end interface calls for multiple businesses. This first preset duration can be set to any value between 2 and 5 seconds, for example, 3 seconds.

[0053] In this embodiment, after detecting a change in a DOM element within the visible area, the detection of further changes in DOM elements continues. If no further changes in a DOM element within the visible area are detected within a first preset time period following the change, this DOM element can be considered the last DOM element to change within the visible area. The time point of this DOM element's change can be used as the time point when the first screen of the page has finished loading, thus determining the time point of the DOM element's change as the loading end point. If another change in a DOM element within the visible area is detected within the first preset time period following the change, it indicates that the DOM elements within the visible area have not finished loading. The process then returns to executing the recorded time point of the DOM element's change within the visible area and determines whether a change in the next DOM element within the visible area is detected within the first preset time period after that time point, until the loading end point is determined. For example, Figure 2 This is an example diagram illustrating the determination of the loading end point in this embodiment, such as... Figure 2 As shown, after the container is loaded, the time points of changes of the detected DOM elements in the visible area are obtained, and the time point of the last DOM element that changes in the visible area is determined as the loading end point.

[0054] In this embodiment, the time point of change of the DOM element can be represented by the system time point when the DOM element changes, or by the time point reached by the timer in the above embodiment.

[0055] In this application scenario, the following situation may occur: when the user perceives that the first screen page has finished loading, the target page will be triggered. However, at this time, the time point corresponding to the first preset duration after the last DOM element in the visible area has changed has not yet been reached. In this case, the loading end point will be determined in advance.

[0056] Optionally, the loading end point can be determined based on the time of change of page elements within the visible area as follows: if a triggering operation targeting the target page is detected, determine the time elapsed between the triggering operation and the most recently detected change of page elements within the visible area; determine the loading end point based on the time elapsed and the most recently detected change of page elements within the visible area.

[0057] The triggering operation can include any of the following: clicking on the target page, swiping, closing the target page, or hiding the target page (also known as bringing the target page to the background). The most recently detected changes to DOM elements within the visible area can be understood as the most recently detected changes to DOM elements within the visible area before the triggering operation.

[0058] One way to determine the time interval between the trigger operation and the change of the DOM element in the most recently detected visible area is to define the time interval between the time point corresponding to the trigger operation and the time point of the change of the DOM element in the most recently detected visible area as the time interval between the trigger operation and the change of the DOM element in the most recently detected visible area.

[0059] One method for determining the loading end point based on the duration and the time point of the most recently detected change of DOM elements in the visible area is as follows: determine whether the duration between the trigger operation and the most recently detected change of DOM elements in the visible area meets a preset condition. If it does, then the time point of the most recently detected change of DOM elements in the visible area is determined as the loading end point. If it does not meet the condition, return to execute the change time point of the DOM elements recorded in the visible area, and determine whether the operation of detecting the change of the next DOM element in the visible area is detected within the first preset duration after the change time point of that DOM element. Alternatively, return to execute the operation of detecting the trigger operation for the target page, until the loading end point is determined.

[0060] Optionally, the loading end point can be determined based on the duration and the time point of change of the most recently detected page element in the visible area: determine whether the duration of the trigger operation from the time point of change of the most recently detected page element in the visible area is greater than a second preset duration; if the duration of the trigger operation from the time point of change of the most recently detected page element in the visible area is greater than the second preset duration, then the time point of change of the most recently detected page element in the visible area is determined as the loading end point.

[0061] The second preset duration is less than the first preset duration and can be set to a value 1-2 seconds prior, for example, 1 second. In this embodiment, if the duration between the trigger operation and the most recently detected change in the DOM element within the visible area is greater than the second preset duration, the most recently detected change in the visible area can be determined as the change of the last DOM element within the visible area, indicating that the first screen page has been loaded. In this case, the time point of the most recently detected change in the visible area is determined as the loading end point. If the duration between the trigger operation and the most recently detected change in the visible area is less than or equal to the second preset duration, the most recently detected change in the visible area is not the change of the last DOM element within the visible area, indicating that the first screen page has not been loaded. The user's trigger operation is invalid. In this case, the system returns to the execution of the time point of the change in the DOM element recorded in the visible area and determines whether the operation of detecting the change of the next DOM element in the visible area is detected within the first preset duration after the time point of the change in that DOM element. Alternatively, the system returns to the execution of the operation of detecting the trigger operation for the target page until the loading end point is determined.

[0062] In this embodiment, the time point of change of the DOM element in the most recently detected visible area can be represented by the system time point when the DOM element changes, or by the time point reached by the timer in the above embodiment.

[0063] In this embodiment, when a trigger operation is detected targeting the target page, if the time elapsed between the trigger operation and the change of the DOM element in the most recently detected visible area is greater than a second preset time elapsed, then the time point of the change of the DOM element in the most recently detected visible area is determined as the loading end point. That is, the loading end point is determined in advance without waiting for the first preset time elapsed, which can save time in determining the loading end point and thus improve the efficiency of determining the loading end point.

[0064] S130, determine the loading time of the target page based on the loading end point and loading start point.

[0065] In this embodiment, the method for determining the loading time of the target page based on the loading end point and the loading start point can be: determining the interval between the loading end point and the loading start point; and determining the interval as the loading time of the target page.

[0066] One way to determine the time interval between the loading end point and the loading start point is to subtract the loading start point from the loading end point to obtain the time interval between the loading end point and the loading start point.

[0067] Optionally, after determining the loading time of the target page based on the loading end point and loading start point, the following steps are also included: reporting the loading time of the target page.

[0068] The page loading time determined by the scheme in this embodiment can match the actual user experience time.

[0069] In this embodiment, after obtaining the loading time of the target page, the application reports the loading time to the server, so that the server can further analyze the loading time and provide a basis for subsequent page optimization.

[0070] In this embodiment, the loading time of the H5 page is detected through data communication between the application (APP) and the H5 page. For example, Figure 3 This is a flowchart for determining page loading time in this embodiment, such as... Figure 3 As shown, the method includes the following steps:

[0071] When a user launches an H5 page through the app, the app determines the launch time of the H5 page as the loading start point.

[0072] The app loads the container and injects data into the channel;

[0073] The loaded container accesses H5 page resources;

[0074] The app injects script code into the H5 page to determine the loading end point;

[0075] Detect changes to DOM elements within the first screen of the page;

[0076] Run the above script code to determine the loading end point based on the time of change of DOM elements in the first screen page, and send the loading end point to the APP through the data channel;

[0077] The app subtracts the start point from the end point of loading to obtain the loading time.

[0078] The app will report the loading time to the server.

[0079] The technical solution of this disclosure embodiment, in response to a launch operation on a target page, determines the launch time point of the target page as the loading start point; determines the loading end point based on the change time points of page elements within the visible area; wherein, the visible area is the area corresponding to the first screen of the target page; and determines the loading time of the target page based on the loading end point and the loading start point. The page loading time detection method provided in this disclosure embodiment determines the loading start point of the target page and the loading end point based on the change time points of page elements within the visible area, thereby determining the loading time of the target page, which can improve the accuracy of page loading time detection.

[0080] Figure 4 This is a schematic diagram of the structure of a page loading time detection device provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, the device includes:

[0081] The loading start point determination module 410 is used to determine the launch time point of the target page as the loading start point in response to the launch operation for the target page;

[0082] The loading end point determination module 420 is used to determine the loading end point based on the time points of changes in page elements within the visible area; wherein, the visible area is the area corresponding to the first screen of the target page;

[0083] The loading time determination module 430 is used to determine the loading time of the target page based on the loading end point and the loading start point.

[0084] Optionally, the loading end-point determination module 420 is also used for:

[0085] Get the detected changes to DOM elements;

[0086] Determine whether the page element is within the visible area;

[0087] If the page element is within the visible area, the time point of change of the page element is recorded, and the loading end point is determined based on the time point of change of the page element.

[0088] Optionally, the loading end-point determination module 420 is also used for:

[0089] Determine whether a change in the next page element within the visible area is detected within a first preset time period after the change time of the page element;

[0090] If no change in the next page element within the visible area is detected within a first preset time period after the change time of the page element, the change time of the page element is determined as the loading end point.

[0091] Optionally, the loading end-point determination module 420 is also used for:

[0092] If a triggering operation is detected targeting the target page, determine the time elapsed since the triggering operation occurred, relative to the change in the page element within the most recently detected visible area.

[0093] The loading end point is determined based on the duration and the time point of change of page elements in the most recently detected visible area.

[0094] Optionally, the loading end-point determination module 420 is also used for:

[0095] Determine whether the time elapsed since the triggering operation occurred is greater than a second preset time elapsed than the time elapsed since the change of the page element in the nearest detected visible area.

[0096] If the time elapsed between the triggering operation and the change in the page element within the most recently detected visible area is greater than a second preset time elapsed, then the time point of the change in the page element within the most recently detected visible area is determined as the loading end point.

[0097] Optionally, the loading time determination module 430 is also used for:

[0098] Determine the time interval between the loading end point and the loading start point;

[0099] The interval duration is determined as the loading time of the target page.

[0100] Optionally, it also includes: a loading time reporting module, used for:

[0101] The loading time of the target page shall be reported.

[0102] The page loading time detection device provided in this disclosure can execute the page loading time detection method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0103] 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.

[0104] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 5 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 5The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is 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 vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0105] like Figure 5 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.

[0106] 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 5 An electronic device 500 with various devices is shown; however, 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.

[0107] 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.

[0108] 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.

[0109] The electronic device provided in this embodiment and the page loading time detection 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.

[0110] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the page loading time detection method provided in the above embodiments.

[0111] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, 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 be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0112] 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 peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0113] 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.

[0114] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0115] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine the opening time of the target page as the loading start point in response to an operation to open the target page; determine the loading end point based on the change time points of DOM elements within the visible area; wherein the visible area is the area corresponding to the first screen of the target page; and determine the loading time of the target page based on the loading end point and the loading start point.

[0116] 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0117] 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.

[0118] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0119] 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.

[0120] 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.

[0121] 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.

[0122] 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.

[0123] 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 detecting page load time consumption, characterized in that, The method comprises: determining a starting time point of a target page as a loading starting point in response to a starting operation for the target page; determining a loading ending point based on a change time point of a page element in a visible region, wherein the visible region is a region corresponding to a first page of the target page; determining a loading time consumption of the target page according to the loading ending point and the loading starting point.

2. The method of claim 1, wherein, The method of determining the loading ending point based on the change time point of the page element in the visible region comprises: obtaining a detected change of the page element; determining whether the page element is in the visible region; if the page element is in the visible region, recording the change time point of the page element, and determining the loading ending point based on the change time point of the page element.

3. The method of claim 2, wherein, The method of determining the loading ending point based on the change time point of the page element comprises: determining whether a change of a next page element in the visible region is detected within a first preset time period after the change time point of the page element; if the change of the next page element in the visible region is not detected within the first preset time period after the change time point of the page element, determining the change time point of the page element as the loading ending point.

4. The method according to claim 1 or 3, characterized in that, The method of determining the loading ending point based on the change time point of the page element in the visible region comprises: if a trigger operation for the target page is detected, determining a time period from the trigger operation to a change of a nearest detected page element in the visible region; determining the loading ending point based on the time period and the change time point of the nearest detected page element in the visible region.

5. The method of claim 4, wherein, The method of determining the loading ending point based on the time period and the change time point of the nearest detected page element in the visible region comprises: determining whether the time period from the trigger operation to the change of the nearest detected page element in the visible region is greater than a second preset time period; if the time period from the trigger operation to the change of the nearest detected page element in the visible region is greater than the second preset time period, determining the change time point of the nearest detected page element in the visible region as the loading ending point.

6. The method of claim 1, wherein, The method of determining the loading time consumption of the target page according to the loading ending point and the loading starting point comprises: determining an interval time period between the loading ending point and the loading starting point; determining the interval time period as the loading time consumption of the target page.

7. The method according to claim 1 or 6, characterized in that, After determining the loading time consumption of the target page according to the loading ending point and the loading starting point, the method further comprises: reporting the loading time consumption of the target page.

8. A device for detecting page loading time, characterized in that, The method comprises: a loading starting point determination module configured to determine a starting time point of a target page as a loading starting point in response to a starting operation for the target page; a loading ending point determination module configured to determine a loading ending point based on a change time point of a page element in a visible region, wherein the visible region is a region corresponding to a first page of the target page; a loading time consumption determination module configured to determine a loading time consumption of the target page according to the loading ending point and the loading starting point.

9. An electronic device, comprising: The electronic device comprises: one or more processors; a storage device configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement a method for detecting page load latency as claimed in any one of claims 1-7.

10. A storage medium containing computer-executable instructions for performing a method for detecting page load latency as claimed in any one of claims 1-7 when executed by a computer processor.