Interface loading duration determination method and device, electronic equipment and storage medium

By determining the rendering time of buried point elements in the target interface and calculating the interface loading time, the problem of inaccurate interface loading time evaluation in the prior art is solved, and a more accurate user experience evaluation is achieved.

CN120196524APending Publication Date: 2025-06-24DUOYI NETWORK CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510256803.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art cannot accurately determine the interface loading time, resulting in inaccurate and reliable user experience evaluation.

Method used

By responding to the interface loading request of the target interface, determine the start rendering time and end rendering time of the target buried point element in the target interface, calculate the element loading time and determine the interface loading time.

Benefits of technology

It can obtain the interface loading time more accurately, solving the accuracy and reliability of user experience evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196524A_ABST
    Figure CN120196524A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an interface loading duration determination method and device, electronic equipment and a storage medium. The method comprises the steps that in response to an interface loading request of a target interface, the rendering starting time and the rendering ending time of a target burying point element in the target interface are determined; and based on the rendering starting time and the rendering ending time, determining the element loading duration of the target burying point element, and based on the element loading duration, determining the interface loading duration. According to the technical scheme provided by the embodiment of the invention, the technical problem that the interface loading duration cannot be accurately determined in related technologies is solved, and the interface loading duration can be more accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer processing technologies, and in particular, to a method, apparatus, electronic device, and storage medium for determining the interface loading duration. Background Art

[0002] With the rapid development of Internet technologies, users' requirements for the response speed of web pages and application programs are increasing day by day. As one of the important indicators for measuring the user experience, the interface loading duration usually directly affects user satisfaction and retention rate.

[0003] In related technologies, the interface loading duration is often evaluated through user feedback. However, this method has subjectivity and uncertainty, making the evaluation results of the loading duration based on user feedback often inaccurate and unreliable. Therefore, a method for determining the interface loading duration is proposed, which can more accurately determine the loading duration of the interface. Summary of the Invention

[0004] The present invention provides a method, apparatus, electronic device, and storage medium for determining the interface loading duration, so as to more accurately obtain the interface loading duration.

[0005] According to one aspect of the present invention, a method for determining the interface loading duration is provided. The method includes:

[0006] In response to an interface loading request for a target interface, determining the start rendering time and the end rendering time of a target buried point element in the target interface;

[0007] Based on the start rendering time and the end rendering time, determining the element loading duration of the target buried point element, and determining the interface loading duration based on the element loading duration.

[0008] According to another aspect of the present invention, an apparatus for determining the interface loading duration is provided. The apparatus includes:

[0009] An interface loading request response module, configured to, in response to an interface loading request for a target interface, determine the start rendering time and the end rendering time of a target buried point element in the target interface;

[0010] An interface loading duration determination module, configured to determine the element loading duration of the target buried point element based on the start rendering time and the end rendering time, and determine the interface loading duration based on the element loading duration.

[0011] According to another aspect of the present invention, an electronic device is provided. The electronic device includes:

[0012] One or more processors;

[0013] A storage device for storing one or more programs,

[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the interface loading duration determination method as described in any one of the embodiments of the present disclosure.

[0015] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the interface loading duration determination method described in any one of the embodiments of the present invention when executed.

[0016] The technical solution of the embodiment of the present invention determines the start rendering time and the end rendering time of the target buried point element in the target interface in response to an interface loading request for the target interface. Based on the start rendering time and the end rendering time, the element loading duration of the target buried point element is determined, and based on the element loading duration, the interface loading duration is determined. The technical solution of the embodiment of the present invention solves the technical problem that the related art cannot accurately determine the interface loading duration, and realizes that the interface loading duration can be obtained more accurately.

[0017] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0019] Figure 1 It is a flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention;

[0020] Figure 2 It is a flowchart of a process for loading an interface provided by an embodiment of the present invention;

[0021] Figure 3 It is an example diagram for calculating the time consumption of interface switching provided by an embodiment of the present invention;

[0022] Figure 4 It is a flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention;

[0023] Figure 5A timing diagram for determining the end rendering time of a target buried point element provided by an embodiment of the present invention;

[0024] Figure 6 A schematic flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention;

[0025] Figure 7 A schematic flowchart of a method for determining the element loading duration of the first screen interface provided by an embodiment of the present invention;

[0026] Figure 8 A schematic flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention;

[0027] Figure 9 An example diagram of the interface address information of a method for determining the interface loading duration provided by an embodiment of the present invention;

[0028] Figure 10 A schematic structural diagram of a device for determining the interface loading duration provided by an embodiment of the present invention;

[0029] Figure 11 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0030] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0032] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to users and the authorization of users should be obtained through appropriate means in accordance with relevant laws and regulations.

[0033] For example, when responding to an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the technical solutions of the present disclosure according to the prompt message.

[0034] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0035] It is understandable that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation manner of the present disclosure, and other manners that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0036] It is understandable that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.

[0037] Figure 1 FIG. is a schematic flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention. This embodiment is applicable to the situation of determining the loading duration of an interface. This method can be executed by an interface loading duration determination device, and the interface loading duration determination device can be implemented in the form of hardware and / or software. The interface loading duration determination device can be configured in an electronic device such as a computer or a server. As Figure 1 shown, the method of this embodiment includes:

[0038] S110. In response to an interface loading request of a target interface, determine the start rendering time and the end rendering time of a target buried point element in the target interface.

[0039] Among them, the target interface can be understood as a visual interface for which the interface loading duration is to be determined. In the embodiment of the present invention, the target interface can be the first screen interface and non-first screen interfaces. Briefly, see Figure 2, the interface loading may include the loading of the first-screen interface and / or the loading of non-first-screen interfaces. Among them, the first-screen interface, that is, the first screen of a web page or an application, is the first interface that can be seen without the user's operation when the user first loads the interface. The non-first-screen interface, relative to the first-screen interface, is an interface that can be displayed and processed only after receiving an interface trigger operation. In the embodiments of the present invention, the non-first-screen interface can be obtained based on the first-screen interface. Exemplarily, after receiving a first interface trigger operation acting on the first-screen interface, the non-first-screen interface can be displayed. In short, the non-first-screen interface is obtained by switching from the first-screen interface. In the embodiments of the present invention, the non-first-screen interface can be obtained based on the non-first-screen interface. Exemplarily, the non-first-screen interface includes a first non-first-screen interface and a second non-first-screen interface. After receiving a second interface trigger operation acting on the first non-first-screen interface, a second non-first-screen interface related to the first non-first-screen interface can be displayed, that is, the second non-first-screen interface obtained by switching from the first non-first-screen interface. In the embodiments of the present invention, the target interface can be the first-screen interface loaded based on a browser, or a non-first-screen interface loaded based on a browser obtained by interface switching. Optionally, the target interface can be a to-be-loaded interface of a browser on a mobile terminal, or a to-be-loaded interface of a browser on a computer (PC) side.

[0040] Among them, the interface loading request can be understood as a request for loading the target interface. In the embodiments of the present invention, the target interface may include one or more interface elements. The user can set an interface element of the target interface as the target buried-point element according to actual needs to determine the interface loading duration of the target interface through the rendering duration of the target buried-point element. The target buried-point element can be understood as a buried-point element preset for the target interface. In the embodiments of the present invention, the number of target buried-point elements is one. Exemplarily, the target buried-point element can be any one of a text element, a control element, a form element, etc. In the technical solution of the embodiments of the present invention, all element types of interface elements can be supported as buried-point elements to accurately count the time required for the first-screen page and / or the non-first-screen page to be fully presented to the user from the start of loading. In the embodiments of the present invention, the start rendering time can be understood as the moment when the rendering of the target buried-point element starts. The end rendering time can be understood as the moment when the rendering of the target buried-point element ends, that is, the moment when the target buried-point element completes rendering. It should be noted that the end rendering time is the time node when the target buried-point element has been presented in the target interface.

[0041] Specifically, after receiving an interface loading request for a target interface, the target buried point element in the target interface can be determined. After determining the target buried point element in the target interface, the target interface can be loaded, and during the loading process of the target interface, when the target buried point element starts to be rendered, a timestamp can be recorded as the start rendering time. After the target buried point element is rendered, another timestamp can be recorded as the end rendering time. That is, the start rendering time and the end rendering time of the target buried point element in the target interface are obtained.

[0042] In an embodiment of the present invention, before determining the start rendering time and the end rendering time of the target buried point element in the target interface, the method may further include: in response to a buried point element configuration operation for the interface element, obtaining the target buried point element in the target interface. Among them, the buried point element configuration operation can be understood as a configuration operation for the target buried point element of the target interface. Specifically, after receiving a buried point element configuration operation for an interface element in the target interface, the target buried point element in the target interface can be obtained based on the buried point element configuration operation. Optionally, in response to a buried point element configuration operation for the interface element, obtaining the target buried point element in the target interface includes: in response to an interface element selection operation, determining the selected interface element in the target interface; adding a buried point attribute to the selected interface element and setting a buried point attribute value; using the interface element with the added buried point attribute and the set buried point attribute value as the target buried point element in the target interface.

[0043] Among them, the interface element selection operation can be understood as an operation for selecting an interface element in the target interface to select the target buried point element. In an embodiment of the present invention, the target buried point element can be flexibly set in the target interface through the interface selection operation. The buried point attribute can be a fixed identifier. In an embodiment of the present invention, adding a buried point attribute to the interface element and setting the buried point attribute value can make the interface element the target buried point element, so that during the interface loading process, the target buried point element can be accurately located, so as to obtain the start rendering time and the end rendering time of the target buried point element in the target interface.

[0044] S120. Based on the start rendering time and the end rendering time, determine the element loading duration of the target buried point element, and determine the interface loading duration based on the element loading duration.

[0045] Among them, the element loading duration can be understood as the loading duration of the target buried element. The interface loading duration can be understood as the loading duration of the target interface. In an embodiment of the present invention, the element loading duration of the target buried element is determined based on the start rendering time and the end rendering time. Specifically, it can be that the time difference between the start rendering time and the end rendering time is calculated, that is, the element loading duration of the target buried element is obtained by subtracting the start rendering time from the end rendering time. In an embodiment of the present invention, the interface loading duration is determined based on the element loading duration. Specifically, it can be that the element loading duration is determined as the interface loading duration.

[0046] It should be noted that since the burying point attribute may be set in an interface element generated using a loop, there are multiple interface elements with the same burying point element in the interface. In order to ensure that the target interface only sets a burying point element with a unique burying point attribute as the target burying point element to determine the interface loading time. In an embodiment of the present invention, a burying point element mapping data table can be maintained for each interface. In actual applications, burying point elements with the same burying point attributes in an interface are only allowed to be collected once, and the collected burying point attributes are recorded in the burying point element mapping table. When the burying point elements with the same burying point attributes are loaded subsequently, the collection will no longer be triggered; after switching pages, the burying point element mapping table can be reset to perform a new round of collection.

[0047] It should also be noted that see Figure 3 , when the target interface is a tab in a hidden state, the browser may stop or delay loading some or all interface elements in the page. The interface elements start or continue to be rendered on the interface after receiving the operation that triggers the display of the tab. In this case, if the time it takes for the interface element to be fully loaded is counted, the time spent waiting for the operation that triggers the display of the tab will often be included, resulting in a longer result for the final statistics of the time it takes for the buried element to be fully loaded. In addition, when the interface state of the tab is in a hidden state, although the interface elements of the tab may stop updating, network requests and task queues will continue to proceed normally. In short, when the tab is in a hidden state, even if the time it takes for the tab to be hidden is removed, the statistical result of the element loading time of the target buried element is still too large.

[0048] Based on this, when the hidden duration of the tab page is relatively long, the interface state of the tab page may enter a frozen state. It should be noted that after the interface state of the tab page enters the frozen state, the freezable tasks in the task queue will be suspended, and the system call resources will also be restricted. In this process, it is rather cumbersome to split out the consumption time of the time-consuming part of the fully loaded buried point elements. Therefore, during the rendering of the buried point elements, if the interface state of the tab page is in the hidden state, the collection behavior of the buried point elements will no longer be triggered. When the interface state of the tab page switches from the hidden state to the display state and the browser switches pages again, the next round of collection of the buried point elements can be started.

[0049] In the embodiments of the present invention, there are various ways to determine whether the interface state of the tab page is in the hidden state. For example, the event of the visibility state of the tab page can be listened to, and the triggering of this event can indicate that the tab page has switched the display state. Or, the state of the hidden attribute (document.hidden) of the tab page can be checked. If it is true, it means that the tab page is in the hidden state during the initialization stage. It should be noted that the related operations for hiding the tab page can include navigating to a new tab page, switching to other tab pages, minimizing the browser, the interface state of the tab page being hidden when it is opened, and closing the tab page or the browser.

[0050] The technical solution of the embodiments of the present invention determines the start rendering time and the end rendering time of the target buried point element in the target interface in response to the interface loading request of the target interface. Based on the start rendering time and the end rendering time, the element loading duration of the target buried point element is determined, and based on the element loading duration, the interface loading duration is determined. The technical solution of the embodiments of the present invention solves the technical problem that the related art cannot accurately determine the interface loading duration, and realizes that the interface loading duration can be obtained more accurately.

[0051] Figure 4 It is a schematic flowchart of a method for determining the interface loading duration provided by the embodiments of the present invention. On the basis of the foregoing embodiments, optionally, the target buried point element is configured with a preset element animation; the determining the end rendering time of the target buried point element in the target interface includes: when the preset element animation is executed, determining the animation trigger time of the preset element animation, and using the animation trigger time as the end rendering time of the target buried point element in the target interface. Among them, the same or similar technical features as those in the above embodiments will not be described in detail here.

[0052] As Figure 4 shown, the method of this embodiment specifically includes:

[0053] S210. In response to an interface loading request of a target interface, determine the start rendering time of a target buried point element in the target interface, where the target buried point element is configured with a preset element animation.

[0054] Among them, the preset element animation can be understood as a pre-set animation. In the embodiments of the present invention, the preset element animation of the target buried point element can be an element animation displayed on the target interface or a hidden element animation. In the embodiments of the present invention, when the number of target interfaces is multiple, the preset element animations of the target buried point elements in each target interface can be the same or different. In the embodiments of the present invention, the preset element animation can be implemented based on Cascading Style Sheets (CSS) styles.

[0055] In order to improve the accuracy of determining the interface loading duration, in the embodiments of the present invention, the method further includes: determining whether the target buried point element is configured with animation delay execution attribute information. If so, a prompt message for prompting to replace the target buried point element can be generated and the prompt message can be displayed to facilitate prompting to replace the target buried point element of the target interface. Optionally, the prompt message can be image information and / or text information. It can be understood that when the target buried point element is configured with animation delay execution attribute information, the animation-delay style may cause the rendering end timestamp counted in the animation delay execution event to be counted later, resulting in an overestimated complete loading time of the element.

[0056] S220. When the preset element animation is executed, determine the animation trigger time of the preset element animation, and use the animation trigger time as the end rendering time of the target buried point element in the target interface.

[0057] Among them, the animation trigger time can be understood as the time when the preset element animation of the target buried point element is triggered and executed. Specifically, when the preset element animation is executed, the timestamp when the preset element animation is triggered can be recorded as the animation trigger time. Then, the animation trigger time can be used as the end rendering time of the target buried point element in the target interface.

[0058] In the embodiments of the present invention, after the target buried point element finishes rendering, the preset element animation will be immediately executed, triggering the animation start event of the target buried point element itself and bubbling to the document layer of the target interface. Therefore, the trigger time of the animation start event of the target buried point element can be listened to in the document layer of the target interface, that is, the animation trigger time of the preset element animation can be obtained, that is, the end rendering time of the target buried point element can be obtained.

[0059] Specifically, seeFigure 5 , in the browser rendering engine, when the target buried point element and the preset element animation are processed and presented on the screen, a timestamp is recorded. In the next time loop callback, that is, when the animation start event is called, this timestamp will be passed in. Therefore, we can use the rendering end timestamp provided when the animation is executed to accurately represent the time when the buried point element finishes rendering. It should be noted that although the execution of animation-related events (such as the animation start event) is affected by the task queue, since the rendering end timestamp is provided during the animation execution, even if the animation start event is blocked, it will not affect the rendering end time of the target buried point element.

[0060] S230. Based on the start rendering time and the end rendering time, determine the element loading duration of the target buried point element, and determine the interface loading duration based on the element loading duration.

[0061] The technical solution of the embodiment of the present invention realizes the function of accurately obtaining the end rendering time of the target buried point by determining the animation trigger time of the preset element animation when the preset element animation is executed and using the animation trigger time as the end rendering time of the target buried point element in the target interface.

[0062] Figure 6 It is a schematic flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention. On the basis of the foregoing embodiment, optionally, the target interface is the first screen interface loaded based on the browser; the determining the start rendering time of the target buried point element in the target interface in response to the interface loading request of the target interface includes: in response to the first loading request of the first screen interface, obtaining the creation time of the browser context and using the creation time as the start rendering time of the target buried point element in the target interface. Technical features that are the same or similar to those in the above embodiment will not be described in detail here.

[0063] As Figure 6 shown, the method of this embodiment specifically includes:

[0064] S310. In response to the first loading request of the first screen interface, obtain the creation time of the browser context, use the creation time as the start rendering time of the target buried point element in the target interface, and determine the end rendering time of the target buried point element in the target interface.

[0065] Among them, the first-screen interface loaded based on the browser can be understood as the interface loaded when first entering the system through the browser. It should be noted that when first entering the system through the browser, the page usually loads a lot of resources, such as the system framework, dependency packages, other page resource files, etc. The first loading request can be understood as the request for loading the first-screen interface through the browser. In the embodiments of the present invention, the browser context can be understood as the environment in which the browser displays the document.

[0066] In the embodiments of the present invention, in response to the first loading request of the first-screen interface, obtaining the creation time of the browser context includes: in response to the first loading request of the first-screen interface, creating a browser context and recording the creation time of the browser context. Specifically, the creation time of the browser context can be obtained through the method for obtaining the creation time of the browser context, that is, performance.now(), at this time, performance.now() is equal to 0.

[0067] It should be noted that since the first-screen interface can be obtained through multiple redirects. Exemplarily, see Figure 7 , the system is the interface that accesses the http: / / system.com link and then redirects to the interface of the http: / / system.com / # / home link. At this time, two page switches are triggered, and the complete loading duration of the target buried point element is from the time of the last page switch to the rendering time, making the actual statistical duration of the complete loading duration of the buried point element relatively small. Therefore, when loading the first-screen interface through the browser and the first-screen interface is obtained through multiple redirects, the start rendering time of the target buried point element in the first-screen interface can be the time of first entering the first-screen interface, that is, performance.now() is equal to 0.

[0068] On this basis, the first-screen interface can be determined whether it is obtained through multiple redirects in the following ways: Method 1: The address when the window.onload event is triggered can be recorded as the first-screen address. When a page switch is triggered, if the current address is the same as the first-screen address, it can be determined that this interface is the first-screen page. Method 2: When a trigger operation for the interface element in the target interface is received, it can be determined that the first-screen interface has finished loading, and the interface rendered after the subsequent interface switch is triggered is a non-first-screen interface.

[0069] S320. Based on the start rendering time and the end rendering time, determine the element loading duration of the target buried point element, and determine the interface loading duration based on the element loading duration.

[0070] In the technical solution of the embodiment of the present invention, in response to the first loading request of the first screen interface, the creation time of the browser context is obtained, and the creation time is used as the start rendering time of the target buried point element in the target interface, so that when the target page is the first screen interface loaded by the browser, the start rendering time of the target interface can be accurately obtained.

[0071] Figure 8 FIG. is a schematic flowchart of a method for determining the interface loading duration provided by an embodiment of the present invention. On the basis of the foregoing embodiment, optionally, the target interface is a non-first screen interface loaded by a browser obtained by interface switching; the determining the start rendering time of the target buried point element in the target interface in response to the interface loading request of the target interface includes: in response to the second loading request for the non-first screen interface, determining the interface switching time of the non-first screen interface, and using the interface switching time as the start rendering time of the target buried point element. Among them, the same or similar technical features as those in the above embodiment will not be described in detail here.

[0072] As Figure 8 shown, the method of this embodiment specifically includes:

[0073] S410. In response to the second loading request for the non-first screen interface loaded by the browser obtained by interface switching, determine the interface switching time of the non-first screen interface, and use the interface switching time as the start rendering time of the target buried point element, and determine the end rendering time of the target buried point element in the target interface.

[0074] Among them, the secondary loading request can be understood as a request for loading a non-first screen interface obtained by interface switching through a browser. Other interfaces obtained by interface switching can be obtained by switching from the first screen interface, or can be obtained by switching from the previous non-first screen interface. The interface switching time can be understood as the specific time point for switching from one interface to another interface.

[0075] Specifically, after receiving the second loading request for the non-first screen interface loaded by the browser obtained by interface switching, the interface switching moment of the non-first screen interface, that is, the interface switching time of the non-first screen interface, can be determined, and the interface switching time is used as the start rendering time of the target buried point element.

[0076] It should be noted that interface switching usually occurs after receiving a user-triggered click operation, and its essence is to trigger a click event. Since when the user triggers a click event, the system will execute corresponding tasks, which may be synchronous or asynchronous. During the execution of the tasks, the page usually does not switch immediately, so the user can still see the old page. That is to say, at this time, the old page has not completely "disappeared". For example, when the user clicks the jump button, the web page prompts "Jumping" and displays a loading style, and after waiting for a period of time, it will switch to the target page. In terms of the interface effect, the waiting during this period still stays on the old page and the page switching has not started yet, so it should not be included in the statistical data. Therefore, the time consumed from triggering the click event to interface switching can be not included in the complete loading time of the buried point element.

[0077] In the embodiment of the present invention, the following method is used to determine whether a non-first-screen interface is obtained by interface switching, including: determining the first address information of the non-first-screen interface, and determining the second address information of the interface before the non-first-screen interface is switched; comparing the first address information and the second address information, and determining whether the non-first-screen interface is obtained by interface switching according to the result of the information comparison. Among them, the first address information can be understood as the address link information of the non-first-screen interface. The second address information can be understood as the address link information of the interface before the non-first-screen interface is switched. In the embodiment of the present invention, when the non-first-screen interface is obtained by switching from the first-screen interface, the second address information is the address link information of the first-screen interface. When the non-first-screen interface is obtained by switching from another non-first-screen interface, the second address information is the address link information of another non-first-screen interface.

[0078] It should be noted that since the switching of the interface is necessarily accompanied by a change in the interface address information (URL), but a change in the URL does not necessarily mean interface switching, and it may also be just a modification of the routing parameters. Exemplarily, such as Figure 9As shown, when the protocol, domain name, and port parts in the URL change, the interface will be refreshed and the resource will be requested again. The collection process will be reset, and the first-screen buried-point elements will be counted without considering the impact of URL changes. Among them, when the path part and the hash part change, it is necessary to determine whether a page switch occurs according to the system framework and the front-end routing mode. For example, in common front-end frameworks such as VUE and React, there are two routing modes, hash and history, to control the interface switch. Among them, in the hash mode, the hash-path change is used to switch the routing interface; in the history mode, mainly the path part is switched to switch the routing interface, and it is allowed to splice routing parameters in the path part. Therefore, it is difficult to distinguish from the URL change rule whether it is a routing interface switch or just a modification of routing parameters when the interface switches. Therefore, when the URL of the interface changes, it can be regarded as an interface switch, and the start rendering time of the target buried-point element can be recorded.

[0079] Based on this, in the embodiment of the present invention, determining whether the non-first-screen interface is obtained by an interface switch according to the information comparison result may specifically include: in the case where the information comparison between the first address information and the second address information is inconsistent, it may be determined that the non-first-screen interface is obtained by an interface switch. In the case where the information comparison between the first address information and the second address information is consistent, it may be determined that the non-first-screen interface is not obtained by an interface switch.

[0080] S420. Based on the start rendering time and the end rendering time, determine the element loading duration of the target buried-point element, and determine the interface loading duration based on the element loading duration.

[0081] The technical solution of the embodiment of the present invention determines the interface switch time of the non-first-screen interface in response to a second loading request for the non-first-screen interface, and uses the interface switch time as the start rendering time of the target buried-point element, so as to accurately obtain the start rendering time of the target interface when the target page is a non-first-screen interface obtained by an interface switch.

[0082] Figure 10 It is a schematic structural diagram of a device for determining the interface loading duration provided by an embodiment of the present invention. As Figure 10 shown, the device includes: a request response module 510 and a loading duration determination module 520.

[0083] Among them, the request response module 510 is configured to determine the start rendering time and the end rendering time of the target buried point element in the target interface in response to an interface loading request of the target interface; the loading duration determination module 520 is configured to determine the element loading duration of the target buried point element based on the start rendering time and the end rendering time, and determine the interface loading duration based on the element loading duration.

[0084] In the technical solution of the embodiment of the present invention, the request response module responds to an interface loading request of the target interface to determine the start rendering time and the end rendering time of the target buried point element in the target interface; the loading duration determination module determines the element loading duration of the target buried point element based on the start rendering time and the end rendering time, and determines the interface loading duration based on the element loading duration. The technical solution of the embodiment of the present invention solves the technical problem that the interface loading duration cannot be accurately determined in the related art, and realizes that the interface loading duration can be obtained more accurately.

[0085] Optionally, the target buried point element is configured with a preset element animation; the request response module 510 includes an end rendering time determination unit; among them, the end rendering time determination unit is configured to determine the animation trigger time of the preset element animation when the preset element animation is executed, and use the animation trigger time as the end rendering time of the target buried point element in the target interface.

[0086] Optionally, the device further includes a buried point element detection module; among them, the buried point element detection module is configured to determine whether the target buried point element is configured with animation delay execution attribute information, and if so, generate a prompt message for prompting to replace the target buried point element, and display the prompt message.

[0087] Optionally, the target interface is the first screen interface loaded based on the browser; the request response module 510 includes a first start rendering time determination unit; the first start rendering time determination unit is configured to obtain the creation time of the browser context in response to a first loading request of the first screen interface, and use the creation time as the start rendering time of the target buried point element in the target interface.

[0088] Optionally, the target interface is a non-first screen interface loaded based on the browser obtained by interface switching; the request response module 510 includes a second start rendering time determination unit; the second start rendering time determination unit is configured to determine the interface switching time of the non-first screen interface in response to a second loading request for the non-first screen interface, and use the interface switching time as the start rendering time of the target buried point element.

[0089] Optionally, the device further includes an interface switching determination module; wherein, the interface switching determination module is configured to determine the first address information of the non-first-screen interface, and determine the second address information before the non-first-screen interface is switched; compare the first address information and the second address information, and determine whether the non-first-screen interface is obtained by interface switching according to the result of the information comparison.

[0090] Optionally, the device further includes a buried point element configuration module; wherein, the buried point element configuration module is configured to obtain the target buried point element in the target interface in response to a buried point element configuration operation on the interface element before determining the start rendering time and the end rendering time of the target buried point element in the target interface.

[0091] The interface loading duration determination device provided by the embodiments of the present invention can execute the interface loading duration determination method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

[0092] It should be noted that the various units and modules included in the above interface loading duration determination 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 the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present invention.

[0093] Figure 11 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0094] As Figure 11As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0095] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0096] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the interface loading duration determination method.

[0097] In some embodiments, the interface loading duration determination method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the interface loading duration determination method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the interface loading duration determination method by any other appropriate means (e.g., by means of firmware).

[0098] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0099] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0100] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0102] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0103] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0104] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0105] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for determining the interface loading time, characterized in that: include: In response to an interface loading request of a target interface, determining a start rendering time and an end rendering time of a target embedding element in the target interface; Based on the start rendering time and the end rendering time, the element loading duration of the target embedding element is determined, and based on the element loading duration, the interface loading duration is determined.

2. The method according to claim 1, characterized in that The target embedding element is configured with a preset element animation; and determining the end rendering time of the target embedding element in the target interface includes: When the preset element animation is executed, the animation trigger time of the preset element animation is determined, and the animation trigger time is used as the end rendering time of the target buried point element in the target interface.

3. The method according to claim 2, characterized in that The method further comprises: Determine whether the target burying point element is configured with animation delay execution attribute information. If so, generate prompt information for prompting to replace the target burying point element and display the prompt information.

4. The method according to claim 1, characterized in that: The target interface is the first screen interface loaded based on the browser; The step of responding to the interface loading request of the target interface and determining the start rendering time of the target embedding element in the target interface includes: In response to the first loading request of the first screen interface, the creation time of the browser context is obtained, and the creation time is used as the start rendering time of the target embedding element in the target interface.

5. The method according to claim 1, characterized in that The target interface is a non-first screen interface loaded based on the browser obtained by switching the interface; The step of responding to the interface loading request of the target interface and determining the start rendering time of the target embedding element in the target interface includes: In response to a second loading request for the non-first screen interface, an interface switching time of the non-first screen interface is determined, and the interface switching time is used as the start rendering time of the target embedding element.

6. The method according to claim 5, characterized in that Whether a non-first screen interface is obtained by interface switching is determined by the following methods, including: Determine the first address information of the non-first screen interface, and determine the second address information before the non-first screen interface is switched; The first address information and the second address information are compared, and it is determined whether the non-first screen interface is obtained by interface switching according to the information comparison result.

7. The method according to claim 1, characterized in that Before determining the start rendering time and the end rendering time of the target embedding element in the target interface, the method further includes: In response to the burying point element configuration operation for the interface element, a target burying point element in the target interface is obtained.

8. A device for determining interface loading time, characterized in that: include: An interface loading request response module is used to respond to the interface loading request of the target interface and determine the start rendering time and end rendering time of the target embedding element in the target interface; The interface loading duration determination module is used to determine the element loading duration of the target buried element based on the start rendering time and the end rendering time, and determine the interface loading duration based on the element loading duration.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the interface loading duration as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the interface loading duration according to any one of claims 1 to 7 when executed.