Page loading performance attribution method, device, apparatus and storage medium
By comparing the loading performance statistics of the target page at different time periods, influencing factors were identified and optimized, thus solving the problem of accuracy in webpage loading performance analysis and improving user experience.
Patent Information
- Application Number
- CN202111625411.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Existing technologies struggle to accurately analyze and optimize webpage loading performance, leading to a decline in user experience.
By comparing the loading performance statistics of the target page at different time periods, influencing factors can be identified and optimized, including the analysis of metrics such as first byte time, script loading time, and number of data interfaces.
It enables accurate analysis and optimization of webpage loading performance, improving the user's website browsing experience.
Smart Images

Figure CN114328154B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to the technical field of webpage performance monitoring. BACKGROUND
[0002] Webpage performance directly affects user retention, page conversion and user experience for business. Page loading performance is a core factor in the page performance system, and is a prerequisite factor for subsequent interaction and smooth interaction. Therefore, it is particularly important to measure and improve page loading performance. SUMMARY
[0003] The present disclosure provides a page loading performance attribution method, device, equipment and storage medium.
[0004] According to an aspect of the present disclosure, a page loading performance attribution method is provided, comprising:
[0005] determining a comparison result between a loading performance statistical indicator of a target page in an i th time period and a loading performance statistical indicator of the target page in an i+k th time period;
[0006] based on the comparison result and a type of the loading performance statistical indicator, determining an influencing factor of loading performance of the target page in the i+k th time period, wherein i and k are positive integers.
[0007] According to another aspect of the present disclosure, a page loading performance attribution device is provided, comprising:
[0008] a determination module configured to determine a comparison result between a loading performance statistical indicator of a target page in an i th time period and a loading performance statistical indicator of the target page in an i+k th time period;
[0009] an attribution module configured to determine, based on the comparison result and a type of the loading performance statistical indicator, an influencing factor of loading performance of the target page in the i+k th time period, wherein i and k are positive integers.
[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising:
[0011] at least one processor; and
[0012] a memory in communication with the at least one processor; wherein
[0013] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the page loading performance attribution methods in the embodiments of the present disclosure.
[0014] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform any one of the page loading performance attribution methods according to the embodiments of the present disclosure.
[0015] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements any one of the page loading performance attribution methods according to the embodiments of the present disclosure.
[0016] One of the above-mentioned embodiments has the following advantages or beneficial effects:
[0017] Based on the comparison result of the loading performance statistical indicators in the i+k time period and the loading performance statistical indicators in the i time period, the loading performance of the target page in the i+k time period is determined, and then the influence factors of the loading performance of the target page in the i+k time period are determined according to the comparison result and the type of the loading performance statistical indicators, so that the loading performance of the target page can be accurately analyzed, and the corresponding influence factors can be determined, so that the developer can optimize the target page according to the influence factors, and then improve the user experience when browsing the website.
[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0020] Figure 1 is a flowchart of page loading performance attribution according to an embodiment of the present disclosure;
[0021] Figure 2 is a flowchart of a page loading performance attribution method according to an embodiment of the present disclosure;
[0022] Figure 3 is a schematic diagram of obtaining a script loading time-consuming parameter according to an embodiment of the present disclosure;
[0023] Figure 4 is a schematic diagram of obtaining a data interface parameter according to an embodiment of the present disclosure;
[0024] Figure 5 is a block diagram of a page loading performance attribution device according to an embodiment of the present disclosure;
[0025] Figure 6 is a block diagram of a page loading performance attribution device according to an embodiment of the present disclosure;
[0026] Figure 7 is a block diagram of an electronic device for implementing the attribution method of the page loading performance according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, in which various details of the embodiments of the present disclosure are set forth to assist in the understanding of the present disclosure. It will be apparent to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, the description set forth herein with reference to the accompanying drawings is merely exemplary. Accordingly, it should be understood that the present disclosure can be practiced with modification and alteration.
[0028] Figure 1 is a flowchart of the attribution method of the page loading performance according to an embodiment of the present disclosure. As shown in Figure 1 , the method can include:
[0029] S101, determining a comparison result between a loading performance statistical indicator of a target page in an i-th time period and a loading performance statistical indicator of the target page in an i+k-th time period, where i and k are positive integers.
[0030] S102, determining an influencing factor of the loading performance of the target page in the i+k-th time period based on the comparison result and a type of the loading performance statistical indicator.
[0031] In step S101, the target page is generally a web page for loading text, images, animations, videos, etc. The length of each time period is the same, and the length can be set according to actual needs, for example, 3 hours, 6 hours, or one day.
[0032] The loading performance statistical indicator is used to reflect the loading performance of the target page in the i-th time period. The loading performance statistical indicator can be a single value or multiple values, for example, reflecting the loading performance of the target page in the i-th time period by the average or the mode, or reflecting the loading performance of the target page in the i-th time period by a trend chart formed by multiple values. Correspondingly, the comparison result between the loading performance statistical indicator of the target page in the i-th time period and the loading performance statistical indicator of the target page in the i+k-th time period can be a single value or multiple values.
[0033] In step S102, each loading performance statistical indicator corresponds to a type, and each type corresponds to at least one influencing factor of the loading performance of the target page. The type can be set according to the attribute of the loading performance statistical indicator, or can be defined according to actual needs.
[0034] In the technical solution of the present disclosure, based on a comparison result of the loading performance statistical index in the i+k time period and the loading performance statistical index in the i time period, the loading performance of the target page in the i+k time period is determined, and then based on the comparison result and the type of the loading performance statistical index, the influence factor of the loading performance of the target page in the i+k time period is determined, so that the loading performance of the target page can be accurately analyzed, and the corresponding influence factor can be determined, so that the developer can optimize the target page according to the influence factor, and then the user experience when browsing the website can be improved.
[0035] In an embodiment, based on the comparison result and the type of the loading performance statistical index, the influence factor of the loading performance of the target page in the i+k time period is determined, including:
[0036] In the case that the comparison result meets the preset condition, the influence factor of the loading performance of the target page in the i+k time period is determined according to the type of the loading performance statistical index and the preset mapping relationship.
[0037] Exemplarily, the preset condition is a condition indicating that the loading performance of the target page in the i+k time period is lower than the loading performance of the target page in the i time period. Then, the preset condition can be that if the loading performance statistical index in the i+k time period is subtracted from the loading performance statistical index in the i time period, the comparison result is greater than 0; it can also be that the loading performance statistical index in the i+k time period is greater than the loading performance statistical index in the i time period; it can also be that the ratio of the loading performance statistical index in the i+k time period to the loading performance statistical index in the i time period is greater than 1, and the like.
[0038] Exemplarily, the loading performance statistical index can include a first byte time statistical index, a script loading time consumption statistical index, and a data interface statistical index. The preset mapping relationship can pre-store the corresponding relationship between each type of loading performance statistical index and the influence factor.
[0039] In the embodiment, the preset mapping relationship can include: the influence factor corresponding to the first byte time statistical indicator is that the number of pre-jumps is large or the performance of the server is poor, wherein the pre-jump can be a redirection caused by network page authentication and the like. The preset mapping relationship can also include: the influence factor corresponding to the script loading time consumption statistical indicator is that the script size is large, the number of loaded files is large, or the script depends on a data interface. Specifically, the script loading time consumption statistical indicator includes: a first statistical indicator corresponding to the script request time before the first data interface access and a second statistical indicator corresponding to the script request time before the last data interface access. Further, the preset mapping relationship can also include: the influence factor corresponding to the first statistical indicator is that the script size is large or the number of loaded files is large, and the influence factor corresponding to the second statistical indicator is that the number of loaded files is large or the script depends on a data interface. It should be noted that since the script request occurring after the first data interface access can depend on the first data interface access, the time consumption of these scripts is counted into the second statistical indicator, which can cause the second statistical indicator to be large. Therefore, the reason why the second statistical indicator does not meet the preset condition can be that the script depends on a data interface. The influence factor corresponding to the data interface statistical indicator is that the number of data interfaces is large, the performance of the interface service is poor, or the data volume is large. The influence of the loading performance of the target page is considered from multiple aspects of the server, the data interface, and the resource itself, thereby determining the relationship between the loading performance statistical indicator and multiple influence factors, and further determining the corresponding influence factor according to different loading performance statistical indicators.
[0040] In the embodiment, different optimization schemes can be determined according to different influence factors. For example, the script depending on a data interface can consider early first access or script parallelism, the large number of data interfaces can consider multiple data interface parallelism, the large number of loaded files can consider multiple loaded file parallelism, and the large script size can consider early script segmentation, thereby determining the target page optimization scheme from multiple aspects through the influence factor, and improving the loading performance of the target page.
[0041] In an implementation manner, as shown in FIG. 8, the manner of obtaining the loading performance statistical indicator of the i th time period includes the following steps. Figure 2
[0042] S201, obtaining the loading performance parameter of each loading resource in the i th time period.
[0043] S202, determining the loading performance statistical indicator of the i th time period based on the loading performance parameter of each loading resource in the i th time period.
[0044] Exemplarily, the flow of loading the target page is as follows: taking a single-page application (SPA) as an example, first, the main file (index.html) of the website homepage is loaded, then resources (such as pictures, styles, script (JavaScript, JS) frameworks, and script languages (JavaScript, JS)) in the main file are loaded, after the script framework is parsed, the corresponding route is matched, and the access (XML Http Request, XHR) interface, script language, picture, and style of the corresponding route are loaded.
[0045] Exemplarily, if multiple resources are loaded in the ith time period, multiple loading performance parameters exist, and then the multiple loading performance parameters can be taken as the loading performance statistical indicators, or the multiple loading performance parameters can be pre-designed (such as taking an average or a mode) to obtain a target value, and the target value can be taken as the loading performance statistical indicator. In the case of taking the multiple loading performance parameters as the loading performance statistical indicators, the multiple loading performance parameters in the loading performance statistical indicators in the ith+k time period can be compared with the multiple loading performance parameters in the loading performance statistical indicators in the ith time period one by one, and the multiple results obtained can be taken as the comparison results; or the multiple loading performance parameters in the loading performance statistical indicators in the ith+k time period can be compared with the multiple loading performance parameters in the loading performance statistical indicators in the ith time period one by one, and then the multiple results can be calculated according to the weights, and one result obtained by the calculation can be taken as the comparison result. In the case of taking the target value as the loading performance statistical indicator, the target value in the loading performance statistical indicators in the ith+k time period can be compared with the target value in the loading performance statistical indicators in the ith time period, and the comparison result is obtained.
[0046] Exemplarily, the loading performance parameters can include a script loading time parameter, a data interface parameter, and a first byte time parameter.
[0047] Exemplarily, the first-byte time parameter is the total time from sending a page request to receiving the first byte of response data, including: Domain Name Server (DNS) resolution time, Transmission Control Protocol (TCP) connection time, Hyper Text Transfer Protocol (HTTP) request sending time, and time for obtaining the first byte of response message, and the first-byte time parameter is the basis for all subsequent resource loading, and can reflect the response speed of the website server. For example, the data interface of the target page adopts a navigation timing interface (Performance Navigation Timing Application Programming Interface) under the Web specification, and since the navigation timing interface can help website developers detect Real User Data (RUM), the first-byte time parameter can be collected through the navigation timing interface under the Web front-end specification.
[0048] Exemplarily, the script loading time parameter is the total span of script loading, which includes the sum of the time consumption of each stage in the script loading process. It should be noted that the overlapping part is not counted repeatedly in actual calculation, and the script interruption time is not counted.
[0049] In this embodiment, multiple resources can be loaded in the ith time period, and the corresponding script loading time parameter, data interface parameter and first-byte time parameter can be obtained for each resource loading. Therefore, there are multiple script loading time parameters, multiple data interface parameters and multiple first-byte time parameters in the ith time period. According to the multiple script loading time parameters, multiple data interface parameters and multiple first-byte time parameters, the corresponding script loading time statistical indicators, data interface statistical indicators and first-byte time statistical indicators are obtained. It should be noted that the average of multiple parameters or the mode of multiple parameters can be taken as the statistical indicators, and the trend chart formed by multiple parameters can also be taken as the statistical indicators. As can be seen, the loading performance statistical indicators determined according to the loading performance of each resource loading in the ith time period can more accurately reflect the loading performance of the target page in the ith time period.
[0050] In one embodiment, the loading performance parameter includes a script loading time parameter; the loading performance parameter of each resource loading in the ith time period is obtained, including:
[0051] The script request time before the first data interface access of the mth resource loading is determined according to the first accessed data interface of the mth resource loading in the ith time period;
[0052] determine the script request time before the first data interface access of the mth resource loading according to the script request time before the last data interface access of the mth resource loading;
[0053] determine the script loading time consumption parameter of the mth resource loading according to the script request time before the first data interface access of the mth resource loading and the script request time before the last data interface access of the mth resource loading; wherein m is a positive integer.
[0054] In the embodiment, as shown in Figure 3 the first accessed data interface A of the mth resource loading and the last accessed data interface B of the mth resource loading are determined first. Since the data interface is a navigation timing interface based on the Web specification, the first interface request time corresponding to the first accessed data interface can be determined according to the first accessed data interface, and the script request time T1 before the first accessed data interface is determined according to the first interface request time. The last interface request time corresponding to the last accessed data interface is determined based on the last accessed data interface, and the script request time T2 before the last accessed data interface is determined according to the last interface request time. It should be noted that the overlapping part will not be counted repeatedly, and the discontinuous time will not be counted. The script request time before the first data interface access of the mth resource loading and the script request time before the last data interface access of the mth resource loading are taken as the script loading time consumption parameter of the mth resource loading, and the script loading time consumption parameter is determined from two aspects of the script request time before the first data interface access and the script request time before the last data interface access, so that the loading performance of the target page is determined more comprehensively.
[0055] determine the script loading time consumption parameter of the mth resource loading according to the script request time before the first data interface access of the mth resource loading and the script request time before the last data interface access of the mth resource loading; wherein m is a positive integer.
[0056] In an embodiment, the loading performance parameter includes a data interface parameter; the loading performance parameter of each resource loading in the ith time period is obtained, including:
[0057] obtain at least one event triggered by the nth resource loading in the ith time period and the number of corresponding data interfaces;
[0058] determine the response time corresponding to the at least one event triggered by the nth resource loading based on the at least one event triggered by the nth resource loading;
[0059] obtaining a data interface parameter of the nth loaded resource in the ith time period based on the response time and the number of data interfaces, wherein n is a positive integer.
[0060] Exemplarily, the nth loaded resource can trigger a plurality of events, which can be that the user selects to trigger a plurality of events in succession by a plurality of operations on the page, or which can be that the user only performs one operation, but the one operation needs to trigger a plurality of events.
[0061] In the embodiment, as shown in Figure 4 Since the data interface is a navigation timing interface based on the Web specification, the corresponding data interface of each event can be detected, so that the number of data interfaces of each event can be calculated, for example, event C corresponds to 4 data interfaces, event D corresponds to 6 data interfaces, and event E corresponds to 3 data interfaces. According to the triggering sequence of each event in the plurality of events, the data interfaces are sorted, for example, a waterfall analysis table can be used, so that the access time corresponding to each data interface can be directly determined, the longest access time of the data interface in each event is taken as the response time T3, T4, T5 of the event, and then the plurality of response times are added to obtain the total time of the data interface, the number of corresponding data interfaces of each event is added to obtain the total number of data interfaces, and the total time of the data interface and the total number of data interfaces are taken as the data interface parameter, so that the problem of the page loading performance can be determined according to the interface parameter, and the user's experience of browsing the page can be improved.
[0062] In an embodiment, the method described above further includes:
[0063] According to the influencing factor of the loading performance of the target page in the ith+k time period, the to-be-loaded resource after the ith+k time period is processed.
[0064] Exemplarily, if the influencing factor of the loading performance of the target page in the ith+k time period is that the script size is large, then when facing the to-be-loaded resource after the ith+k time period, the script can be segmented in advance; or if the influencing factor of the loading performance of the target page in the ith+k time period is that the number of loaded files is large, then the files in the to-be-loaded resource after the ith+k time period can be directly parallel, so as to achieve the purpose that the developer can optimize the target page according to the influencing factor.
[0065] Figure 5 is a block diagram of a page loading performance attribution device according to an embodiment of the present disclosure. As shown in Figure 5 The device can include:
[0066] The determination module 501 is used to determine the comparison result between the loading performance statistics of the target page in the i-th time period and the loading performance statistics of the target page in the i+k-th time period;
[0067] Attribution module 502 is used to determine the factors affecting the loading performance of the target page in the (i+k)th time period based on the comparison results and the type of loading performance statistics, where i and k are positive integers.
[0068] In one implementation, the attribution module 502 is further configured to:
[0069] If the comparison results meet the preset conditions, the factors affecting the loading performance of the target page in the (i+k)th time period are determined according to the type of loading performance statistics and the preset mapping relationship.
[0070] Figure 6 This is a block diagram of an attribution apparatus for page load performance according to another embodiment of the present disclosure. Figure 6 As shown, the device may include:
[0071] In one embodiment, the above-described apparatus further includes:
[0072] The acquisition module 601 is used to acquire the loading performance parameters of each resource loading within the i-th time period;
[0073] The first processing module 602 is used to determine the loading performance statistics for the i-th time period based on the loading performance parameters of each resource loading within the i-th time period.
[0074] The determination module 603 is used to determine the comparison result between the loading performance statistics of the target page in the i-th time period and the loading performance statistics of the target page in the i+k-th time period;
[0075] Attribution module 604 is used to determine the factors affecting the loading performance of the target page in the (i+k)th time period based on the comparison results and the type of loading performance statistics, where i and k are positive integers.
[0076] In one implementation, such as Figure 6 As shown, the loading performance parameters include script loading time parameters; the acquisition module 601 is also used for:
[0077] The script request time before the first data interface access of the m-th resource loading is determined based on the first access data interface of the m-th resource loading within the i-th time period.
[0078] The script request time before the last data interface access in the m-th resource loading is determined based on the last accessed data interface in the m-th resource loading.
[0079] According to the script request time before the first data interface access of the mth time of loading the resource and the script request time before the last data interface access of the mth time of loading the resource, a script loading time consumption parameter of the mth time of loading the resource is obtained; wherein m is a positive integer.
[0080] In an implementation manner, as shown in Figure 6 The loading performance parameter includes a data interface parameter; the obtaining module 601 is further configured to:
[0081] obtain at least one event triggered by the nth time of loading the resource in the ith time period and a corresponding data interface quantity;
[0082] determine a response time corresponding to the at least one event triggered by the nth time of loading the resource based on the at least one event triggered by the nth time of loading the resource;
[0083] obtain a data interface parameter of the nth time of loading the resource in the ith time period based on the response time and the data interface quantity; wherein n is a positive integer.
[0084] In an implementation manner, as shown in Figure 6 The apparatus further includes:
[0085] The second processing module 605 is configured to process the to-be-loaded resource after the ith+k time period of the target page based on an influencing factor of the loading performance of the target page in the ith+k time period.
[0086] In this way, the apparatus of the embodiment of the disclosure determines the loading performance of the target page in the ith+k time period based on the comparison result of the loading performance statistical index in the ith+k time period and the loading performance statistical index in the ith time period, and determines the influencing factor of the loading performance of the target page in the ith+k time period according to the comparison result and the type of the loading performance statistical index, so as to accurately analyze the loading performance of the target page and determine the corresponding influencing factor, so that the developer can optimize the target page according to the influencing factor, and thus improve the user experience when browsing the website.
[0087] In the technical solution of the disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0088] According to the embodiments of the disclosure, the disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0089] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0090] As shown in Figure 7 The device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 702 or a computer program loaded into a random access memory (RAM) 703 from a storage unit 708. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0091] Various components in the device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, a magneto-optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0092] The computing unit 701 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs various methods and processes described above, such as the attribution method of page load performance. For example, in some embodiments, the attribution method of page load performance can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the attribution method of page load performance described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the attribution method of page load performance by any other suitable means, such as by means of firmware.
[0093] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation 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 special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0094] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0095] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, 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.
[0096] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.
[0097] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0098] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0099] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.
[0100] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. 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 replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for attributing page loading performance, comprising: determining a comparison result between a loading performance statistical indicator of a target page in an i-th time period and a loading performance statistical indicator of the target page in an i+k-th time period, wherein i and k are positive integers; determining an influencing factor of loading performance of the target page in the i+k-th time period based on the comparison result and a type of the loading performance statistical indicator; wherein the loading performance statistical indicator of the i-th time period is obtained in the following manner: obtaining a loading performance parameter of each loading resource in the i-th time period; determining the loading performance statistical indicator of the i-th time period based on the loading performance parameter of each loading resource in the i-th time period; wherein the loading performance statistical indicator of the i-th time period is determined in the following manner: obtaining a target value by pre-designing the loading performance parameter of each loading resource, and taking the target value as the loading performance statistical indicator in the i-th time period; wherein the loading performance parameter comprises a script loading time consumption parameter, and the loading performance parameter of each loading resource in the i-th time period is obtained in the following manner: determining a first interface request time corresponding to a first accessed data interface of an m-th loading resource in the i-th time period according to the first accessed data interface; determining a script request time before a first data interface access of the m-th loading resource according to the first interface request time; determining a last interface request time corresponding to a last accessed data interface of the m-th loading resource according to the last accessed data interface; determining a script request time before a last data interface access of the m-th loading resource according to the last interface request time; obtaining a script loading time consumption parameter of the m-th loading resource according to the script request time before the first data interface access of the m-th loading resource and the script request time before the last data interface access of the m-th loading resource, wherein m is a positive integer.
2. The method of claim 1, wherein, The determining of the influencing factor of loading performance of the target page in the i+k-th time period based on the comparison result and the type of the loading performance statistical indicator comprises: in a case where the comparison result satisfies a preset condition, determining the influencing factor of loading performance of the target page in the i+k-th time period according to the type of the loading performance statistical indicator and a preset mapping relationship.
3. The method of claim 1, wherein the loading performance parameter comprises a data interface parameter, and the loading performance parameter of each loading resource in the i-th time period is obtained in the following manner: obtaining at least one event triggered by an n-th loading resource in the i-th time period and a corresponding data interface quantity; determining a response time corresponding to the at least one event triggered by the n-th loading resource based on the at least one event; obtaining a data interface parameter of the n-th loading resource in the i-th time period based on the response time and the data interface quantity, wherein n is a positive integer.
4. The method of any one of claims 1-3, further comprising: processing a resource to be loaded after the i+k time period of the target page according to an influencing factor of a loading performance of the target page in the i+k time period.
5. An apparatus for attributing a loading performance of a page, comprising: a determining module configured to determine a comparison result between a loading performance statistical indicator of a target page in an i time period and a loading performance statistical indicator of the target page in an i+k time period, i and k being positive integers; an attributing module configured to determine an influencing factor of a loading performance of the target page in the i+k time period based on the comparison result and a type of the loading performance statistical indicator; an obtaining module configured to obtain a loading performance parameter of each loading resource in the i time period; a first processing module configured to obtain a loading performance parameter of each loading resource in the i time period; determine the loading performance statistical indicator of the i time period based on the loading performance parameter of each loading resource in the i time period; wherein the determination of the loading performance statistical indicator of the i time period comprises: obtaining a target value of the loading performance parameter of each loading resource by a pre-designed calculation, and taking the target value as the loading performance statistical indicator of the i time period; wherein the loading performance parameter comprises a script loading time consumption parameter; the obtaining module is further configured to: determine a first interface request time corresponding to a first accessed data interface of an mth loading resource in the i time period according to the first accessed data interface; determine a script request time before a first data interface access of the mth loading resource according to the first interface request time; determine a last interface request time corresponding to a last accessed data interface of the mth loading resource according to the last accessed data interface; determine a script request time before a last data interface access of the mth loading resource according to the last interface request time; obtain a script loading time consumption parameter of the mth loading resource according to the script request time before the first data interface access of the mth loading resource and the script request time before the last data interface access of the mth loading resource, m being a positive integer.
6. The apparatus of claim 5, wherein, the attributing module is further configured to: determine an influencing factor of a loading performance of the target page in the i+k time period according to a type of the loading performance statistical indicator and a pre-set mapping relationship in a case where the comparison result meets a pre-set condition.
7. The apparatus of claim 5, wherein the loading performance parameter comprises a data interface parameter; and the obtaining module is further configured to: obtain at least one event triggered by an nth loading resource in the i time period and a corresponding data interface number; determine a response time corresponding to the at least one event triggered by the nth loading resource based on the at least one event triggered by the nth loading resource. Based on the response time and the number of data interfaces, a data interface parameter of the nth loaded resource in the ith time period is obtained; wherein n is a positive integer.
8. The apparatus of any one of claims 5-7, further comprising: a second processing module configured to process the to-be-loaded resources of the target page after the ith+k time period according to the influencing factors of the loading performance of the target page in the ith+k time period.
9. An electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-4.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-4.
Citation Information
Patent Citations
Webpage optimization method and device, storage medium and electronic equipment
CN112182454A