Web page performance evaluation method and evaluation device, electronic device, and storage medium

By filtering and assembling web page performance indicator parameters and reporting them to the server under preset event types, the problems of inaccurate web page performance evaluation results and data loss are solved, and more accurate evaluation results are achieved.

CN115629947BActive Publication Date: 2025-08-19CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211247570.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2025-08-19
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

In the prior art, the accuracy of web page performance evaluation results is low, resulting in insufficient persuasion, and data loss is easily caused by network fluctuations or user-triggered events during data collection.

Method used

By filtering and assembling performance indicator parameters, improve the uniqueness and stability of parameters, and report cached data to the server when a matching preset event type is detected to avoid data loss.

Benefits of technology

Improve the accuracy and completeness of web performance evaluation results, reduce data loss, and ensure the reliability of evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115629947B_ABST
    Figure CN115629947B_ABST
Patent Text Reader

Abstract

The web page performance evaluation method and evaluation device, electronic device, and storage medium proposed in this application relate to the field of computer technology. The method includes: obtaining original performance indicator parameters of a target web page; filtering and processing the original performance indicator parameters to obtain at least one filtered performance indicator parameter; assembling the filtered performance indicator parameters to obtain assembled performance indicator parameters, and storing the assembled performance indicator parameters in a preset cache; if the current event category belongs to a preset web page event type, reading the assembled performance indicator parameters from the preset cache to obtain target assembled parameters, and reporting the target assembled parameters to a preset database; wherein the preset database is stored on a server; if the data reporting state is the first state, the target web page is evaluated for performance based on the target assembly parameters retrieved from the preset database to obtain a web page performance evaluation result. This embodiment can reduce data loss, thereby obtaining a more accurate web page performance evaluation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a web page performance evaluation method and evaluation device, electronic equipment, and storage medium. Background Art

[0002] Currently, web page performance significantly impacts user experience, necessitating performance evaluation and optimization. Related technologies typically collect performance metrics and parameters from web pages, analyze and calculate them, and generate performance evaluation results. However, this often results in low accuracy, making these results less convincing. Therefore, developing a web page performance evaluation method that improves the accuracy of performance evaluation results has become a pressing technical challenge. Summary of the Invention

[0003] The main purpose of the embodiments of the present application is to provide a web page performance evaluation method and evaluation device, electronic device, and storage medium, which can improve the accuracy of performance evaluation results.

[0004] To achieve the above objectives, a first aspect of an embodiment of the present application provides a web page performance evaluation method, the method comprising:

[0005] Obtaining original performance index parameters of the target webpage; wherein the original performance index parameters are used to characterize the webpage performance of the target webpage;

[0006] Obtaining the performance indicator category of the original performance indicator parameter, and obtaining a performance screening condition according to the performance indicator category; wherein, if the performance indicator categories of any two of the original performance indicator parameters are different, any two of the performance screening conditions are different;

[0007] Filtering the original performance indicator parameter according to the performance filtering condition to obtain at least one filtered performance indicator parameter;

[0008] Assembling the screening performance index parameters to obtain assembly performance index parameters, and storing the assembly performance index parameters in a preset cache; wherein the data formats of any two of the assembly performance index parameters are the same;

[0009] Acquire a triggering event of the target webpage, detect an event category of the triggering event, and obtain a current event category of the triggering event;

[0010] If the current event category belongs to a preset webpage event type, the assembly performance indicator parameter is read from the preset cache to obtain a target assembly parameter, and the target assembly parameter is reported to a preset database; wherein the preset database is stored in a server;

[0011] Detecting a data reporting status of the target assembly parameter; the data reporting status includes a first status, the first status being used to indicate that the target assembly parameter has been reported to the preset database;

[0012] If the data reporting state is the first state, the target assembly parameters are retrieved from the preset database, and a performance evaluation is performed on the target webpage according to the retrieved target assembly parameters to obtain a webpage performance evaluation result.

[0013] In some embodiments, assembling the screening performance indicator parameters to obtain assembled performance indicator parameters includes:

[0014] Obtaining a callback function of the original performance indicator parameter; wherein the callback functions of any two original performance indicator parameters are different, and the data formats of any two callback functions are the same;

[0015] The screening performance indicator parameter is processed by callback function to obtain the assembly performance indicator parameter.

[0016] In some embodiments, before reporting the target assembly parameters to a preset database, the method further includes:

[0017] Detecting the amount of stored data in the preset cache to obtain the current amount of stored data in the preset cache;

[0018] If the current storage data volume is greater than or equal to a preset storage data volume threshold, the assembly performance indicator parameter is read from the preset cache to obtain the target assembly parameter.

[0019] In some embodiments, after the assembly performance indicator parameters are read from the preset cache to obtain the target assembly parameters, the preset cache is cleared.

[0020] In some embodiments, the data reporting state further includes a second state, and after reporting the target assembly parameters to a preset database, the method further includes:

[0021] If the data reporting state is the second state, the target assembly parameters are stored in a preset local database; wherein the second state is used to indicate that the target assembly parameters have not been reported to the preset database, and the local database is stored locally in the web terminal;

[0022] Obtaining the access duration of the target webpage, and if the access duration is greater than a preset access duration threshold, performing a data check on the local database to obtain a second check result;

[0023] If the second inspection result is that the local database includes the target assembly parameters, the target assembly parameters are read from the local database, and the read target assembly parameters are reported to the preset database.

[0024] In some embodiments, performing performance evaluation on the target webpage according to the retrieved target assembly parameters to obtain a webpage performance evaluation result includes:

[0025] The target assembly parameters are screened according to a preset system type to obtain at least one target performance indicator parameter; wherein the system type of any two target performance indicator parameters is the same;

[0026] Obtaining the indicator type of the target performance indicator parameter;

[0027] Calculating the performance scores of the target performance indicator parameters belonging to the same indicator type to obtain a target performance score;

[0028] The preset evaluation mapping relationship is searched according to the indicator type and the target performance score to obtain the web page performance evaluation result.

[0029] In some embodiments, updating the target webpage performance evaluation result specifically includes:

[0030] Comparing the target performance score with a preset recommendation score threshold, screening web pages whose target performance scores are less than the recommendation score threshold, and obtaining at least one web page to be optimized;

[0031] Performing a check on the web page to be optimized to obtain a check result; wherein the check includes at least one of the following: preloading detection and lazy loading detection;

[0032] The target webpage performance evaluation result is updated according to the screening result.

[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a web page performance evaluation device, the device comprising:

[0034] An indicator parameter collection module is used to obtain original performance indicator parameters of a target webpage; wherein the original performance indicator parameters are used to characterize the webpage performance of the target webpage;

[0035] a screening condition acquisition module, configured to acquire the performance indicator category of the original performance indicator parameter and acquire the performance screening condition according to the performance indicator category; wherein, if the performance indicator categories of any two original performance indicator parameters are different, any two performance screening conditions are different;

[0036] a screening processing module, configured to screen the original performance indicator parameters according to the performance screening condition to obtain at least one screened performance indicator parameter;

[0037] A data assembly module is used to assemble the screening performance index parameters to obtain assembly performance index parameters, and store the assembly performance index parameters in a preset cache; wherein the data format of any two of the assembly performance index parameters is the same;

[0038] An event detection module, configured to obtain a triggering event of the target webpage, detect an event category of the triggering event, and obtain a current event category of the triggering event;

[0039] a data reporting module configured to read the assembly performance indicator parameters from the preset cache to obtain target assembly parameters if the current event category belongs to a preset webpage event type, and report the target assembly parameters to a preset database;

[0040] A status detection module, configured to detect a data reporting status of the target assembly parameter; the data reporting status includes a first status, the first status being used to indicate that the target assembly parameter has been reported to the preset database;

[0041] The performance evaluation module is configured to retrieve the target assembly parameters from the preset database if the data reporting state is the first state, and perform performance evaluation on the target web page according to the retrieved target assembly parameters to obtain a web page performance evaluation result.

[0042] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0043] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the method described in the first aspect is implemented.

[0044] The web page performance evaluation method and evaluation device, electronic device, and storage medium proposed in this application obtain original performance indicator parameters of a target web page; filter and process the original performance indicator parameters according to performance filtering conditions to obtain at least one filtered performance indicator parameter; assemble the filtered performance indicator parameters to obtain assembled performance indicator parameters, and store the assembled performance indicator parameters in a preset cache; obtain a triggering event of the target web page, detect the event category of the triggering event, and obtain the current event category of the triggering event; if the current event category belongs to a preset web page event type, read the assembled performance indicator parameters from the preset cache to obtain target assembled parameters, and report the target assembled parameters to a preset database; wherein the preset database is stored in a server; detect the data reporting status of the target assembled parameters; if the data reporting status is a first state, retrieve the target assembled parameters from the preset database, and perform performance evaluation on the target web page based on the retrieved target assembled parameters to obtain a web page performance evaluation result. This embodiment can reduce data loss and improve the collection completeness of the target assembly parameters, thereby obtaining a more accurate web page performance evaluation result. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of a web page performance evaluation method provided by an embodiment of the present application;

[0046] Figure 2 yes Figure 1 Flowchart of step S104 in FIG.

[0047] Figure 3 is a flowchart of a web page performance evaluation method provided by another embodiment of the present application;

[0048] Figure 4 is a flowchart of a web page performance evaluation method provided by another embodiment of the present application;

[0049] Figure 5 yes Figure 1 Flowchart of step S108 in FIG.

[0050] Figure 6 is a flowchart of a web page performance evaluation method provided by another embodiment of the present application;

[0051] Figure 7 is a flowchart of a web page performance evaluation method provided by another embodiment of the present application;

[0052] Figure 8 This is a module structure diagram of the web page performance evaluation device provided by an embodiment of the present application;

[0053] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0055] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0057] Currently, the performance of web pages has a significant impact on user experience, so it is necessary to evaluate the performance of web pages and optimize them. In related technologies, performance indicator parameters of web pages are generally collected, analyzed and calculated, and performance evaluation results are obtained. However, there is a problem of low accuracy of performance evaluation results, resulting in weak persuasiveness of performance evaluation results. For example, performance indicator parameters are obtained through web pages, and the performance indicator parameters are aggregated, analyzed, and processed to obtain web page evaluation results. During the performance indicator collection process, due to network fluctuations or user triggers of the web page, the web page may be switched or hidden, resulting in the loss of collected data, which in turn affects the web page evaluation results.

[0058] Therefore, how to provide a web page performance evaluation method that can improve the accuracy of performance evaluation results has become a technical problem that needs to be solved urgently.

[0059] Based on this, the main purpose of the embodiments of the present application is to provide a web page performance evaluation method, web page performance evaluation device, electronic device, and storage medium. By screening and assembling parameters during the collection process of performance indicator parameters, the uniqueness and stability of the parameters are improved. By detecting trigger events on the web page and, if a preset event type is detected, reporting the parameters collected in the preset cache to the preset database, parameter loss can be avoided. This embodiment can improve the completeness of parameter collection, thereby obtaining more accurate web page performance evaluation results.

[0060] The web page performance evaluation method provided in the embodiments of the present application is applied to the server side, and can also be software running on the terminal or server side. The server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers. It can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the web page performance evaluation method, etc., but is not limited to the above forms.

[0061] The present application can be used in many general or special computer system environments or configurations. For example: server computers, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0062] The embodiments of the present application provide a web page performance evaluation method and a web page performance evaluation device, an electronic device, and a storage medium, which are specifically illustrated by the following embodiments. First, the web page performance evaluation method in the embodiments of the present application is described.

[0063] Figure 1 This is an optional flowchart of the web page performance evaluation method provided in an embodiment of the present application, which may include but is not limited to steps S101 to S108.

[0064] Step S101, obtaining original performance index parameters of a target webpage; wherein the original performance index parameters are used to characterize the webpage performance of the target webpage;

[0065] Step S102: obtaining the performance indicator category of the original performance indicator parameter, and obtaining the performance screening condition according to the performance indicator category; wherein, if the performance indicator categories of any two original performance indicator parameters are different, any two performance screening conditions are different;

[0066] Step S103, filtering the original performance indicator parameters according to the performance filtering conditions to obtain at least one filtered performance indicator parameter;

[0067] Step S104, assembling the screening performance index parameters to obtain assembled performance index parameters, and storing the assembled performance index parameters in a preset cache; wherein the data format of any two assembled performance index parameters is the same;

[0068] Step S105, obtaining a triggering event of the target webpage, detecting the event category of the triggering event, and obtaining the current event category of the triggering event;

[0069] Step S106: If the current event category belongs to a preset webpage event type, then the assembly performance indicator parameters are read from the preset cache to obtain target assembly parameters, and the target assembly parameters are reported to a preset database; wherein the preset database is stored in the server;

[0070] Step S107, detecting the data reporting status of the target assembly parameters; the data reporting status includes a first status, and the first status is used to indicate that the target assembly parameters have been reported to the preset database;

[0071] Step S108 : If the data reporting state is the first state, the target assembly parameters are retrieved from the preset database, and the performance of the target web page is evaluated based on the retrieved target assembly parameters to obtain a web page performance evaluation result.

[0072] In steps S101 to S108 shown in the embodiment of the present application, during the collection process of performance indicator parameters, the uniqueness of the screened performance indicator parameters is improved by screening the performance indicator parameters. By assembling the screened performance indicator parameters, the assembled performance indicator data in the same data format is made more stable. By detecting the triggering event of the web page, and when it is detected that it meets the preset event type, the parameters collected in the preset cache library are reported to the preset database, which can avoid parameter loss. In summary, this embodiment can reduce data loss and improve the completeness of parameter collection, so that the obtained web page performance evaluation results are more accurate.

[0073] In step S101 of some embodiments, a web page is a basic element constituting a website, and a website is composed of at least one web page. The target web page of an embodiment of the present application refers to one of the web pages in the website. In one example, an access request of a target object is received, a target web page is determined from at least one web page according to the access request, and the target web page is loaded to obtain raw performance index parameters. Raw performance indicators are used to characterize the web page performance of the target web page. For example, raw performance indicators include cumulative layout shift (Cls), first contentful paint (Fcp), first input delay (Fid), largest contentful paint (Lcp), the number of milliseconds spent before receiving the first byte of the response (Time to first byte, Ttfb), etc.

[0074] In some embodiments, in step S102, any two raw performance indicator parameters have different performance indicator categories, and thus any two performance filtering conditions determined based on the performance indicator categories are different. Taking Lcp as an example, a parameter Lcp is generated upon the target webpage's initial loading, and its performance indicator category is Class A. However, during subsequent loading of the target webpage, larger elements may appear. If such a larger element appears, the previously generated Lcp parameter will be discarded, and only the most recent Lcp will be retained. This constitutes a Class A "filtering condition." Taking Cls as an example, a parameter Cls is generated upon the target webpage's initial loading, and its performance indicator category is Class B. Since Cls measures the sum of all single layout shift scores that occurred during the target webpage's lifetime, whenever a layout shift occurs during the target webpage's loading process, the current layout shift score is obtained. The current layout shift score is then summed with the previous layout shift score to obtain the target layout shift score, and the previous layout shift score is discarded. This constitutes a Class B "filtering condition." It is understood that the same applies to other raw performance indicator parameters such as Fid and Fcp; different performance indicator categories result in different filtering conditions.

[0075] In step S103 of some embodiments, the original performance indicator parameters are screened according to the performance screening conditions to obtain at least one screened performance indicator parameter. In the embodiment of the present application, after the original performance indicator parameters are screened according to the screening conditions, the screened performance indicator parameters obtained are unique and more real-time.

[0076] In step S104 of some embodiments, after obtaining the assembly performance index parameters, they are to be organized into the same format. In one example, the data format includes a type name and a parameter value. In another example, the data format includes a type name, a parameter value, and a device system. In another example, the data format includes a type name, a parameter value, a device system, and a device model. The assembly performance index parameters are stored in a preset cache so that when the preset cache reads different assembly performance index parameters, the type name can be used as a keyword to read the data, thereby improving data reading efficiency. Moreover, the assembly performance index parameters are all in the same data format in the preset cache, which can also improve the stability of data storage. In one example, the preset cache is specifically a cache array, and the assembly performance index parameters are stored in the cache array to improve the efficiency of data storage. The preset cache can also be a cache queue, and it is sufficient to cache data. The embodiments of the present application do not limit the specific storage form.

[0077] It should be noted that while the preset cache can improve data storage and retrieval efficiency compared to a database, it is highly susceptible to changes in the target webpage, leading to data loss. For example, if the target webpage is switching pages or hiding pages, the assembly performance indicator parameters stored in the preset cache will be cleared, replaced, or partially lost. Therefore, it is necessary to monitor events on the target webpage to ensure that the assembly performance indicator parameters in the preset cache are retained in a timely manner.

[0078] See also Figure 2 In some other embodiments, step S104 may include but is not limited to steps S201 to S202:

[0079] Step S201, obtaining a callback function of the original performance indicator parameter; wherein the callback functions of any two original performance indicator parameters are different, and the data formats of any two callback functions are the same;

[0080] Step S202 : performing callback processing on the screening performance indicator parameters through a callback function to obtain assembly performance indicator parameters.

[0081] In steps S201 to S202 illustrated in the embodiment of this application, each raw performance indicator parameter corresponds to a callback function, which can be retrieved based on the performance indicator category. Any two callback functions may be different, but their data formats are the same. The goal is to process any two different raw performance indicator parameters into assembly performance indicator parameters with the same data format. Each callback function has different indicator triggering conditions, and the corresponding callback function is called under these triggering conditions to obtain the latest assembly performance indicator parameters. Taking Lcp as an example, if a target webpage loads a larger element than the previous one, Lcp will be updated, and the Class A callback function will be triggered. According to the Class A callback function, the current Lcp will be processed as the latest Class A assembly performance indicator parameter. Taking Cls as an example, if the target webpage experiences layout shifts during loading, Cls will be updated, and the Class B callback function will be triggered. According to the Class B callback function, the current Cls will be processed as the latest Class B assembly performance indicator parameter. While the data formats of the Class A and Class B assembly performance indicator parameters are the same, the specific values of the parameters differ.

[0082] In step S105 of some embodiments, the target web page will be accompanied by multiple trigger events during the loading process. A trigger event may refer to a trigger event obtained by a click operation or a sliding operation of the target object, or may refer to a trigger event automatically generated by the target web page at a certain time. The trigger event includes multiple event categories, such as a page switching category, a page hiding category, a page jump category, a page refresh category, etc. The event category of the trigger event is detected to obtain the current event category. It can be understood that the current event category is one of the page switching category, the page hiding category, the page jump category, and the page refresh category. In addition, among the multiple event categories, the occurrence of some event categories will cause the loss of preset cache data, such as the page switching category and the page hiding category. Therefore, a web page event type is configured. If a certain event category belongs to a web page event type, it means that the preset cache data is extremely easy to be lost, and the preset cache data needs to be further retained.

[0083] In some embodiments, in step S106, if the current event category belongs to a preset webpage event type, this indicates that the triggering event will affect the data security of the preset cache. Therefore, embodiments of the present application read assembly performance indicator parameters from the preset cache to obtain target assembly parameters, and report the target assembly parameters to a preset database; the preset database is stored on a server. This data reporting method avoids data loss in the preset cache, which could affect the completeness of performance indicator parameter collection.

[0084] It should be noted that in step S106, if the current event category belongs to the preset web event type, data reporting is performed. However, if the current event category does not belong to the preset web event type, the assembly performance indicator parameters are stored in the preset cache. When the storage data volume reaches the preset storage data volume threshold, it means that the assembly performance indicator parameters have been collected and data reporting should be performed actively. Therefore, please refer to Figure 3 In other embodiments, before reporting the target assembly parameters to the preset database, the web page performance evaluation method may further include but is not limited to steps S301 to S302:

[0085] Step S301: detecting the amount of data stored in the preset cache to obtain the current amount of data stored in the preset cache;

[0086] Step S302: If the current storage data volume is greater than or equal to a preset storage data volume threshold, then the assembly performance indicator parameters are read from the preset cache to obtain target assembly parameters.

[0087] Steps S301 to S302 shown in the embodiment of the present application can check the data volume of the preset cache before the target assembly parameters are reported to the preset database, further improving the collection completeness of the performance indicator parameters, thereby further improving the accuracy of subsequent web page performance evaluation results.

[0088] In one embodiment, after the assembly performance index parameters are read from the preset cache to obtain the target assembly parameters, the preset cache is cleared. It is understandable that clearing the preset cache reduces the parameter repetition rate of the next data report. It should also be noted that after the assembly performance index parameters are read from the preset cache to obtain the target assembly parameters, the preset cache may not be cleared. In this case, it is necessary to add filtering of the target assembly parameters at the preset database to avoid the repetition rate of the target assembly parameters. In addition, if the preset cache is not cleared and the target assembly parameters are not filtered at the preset database, the accuracy of the web page performance evaluation results may be affected by the repetition of the target assembly parameters, but this impact can also be ignored.

[0089] It should be noted that, due to fluctuations in the network or other interference, the target assembly parameters may fail to be reported to the preset database. Whether the reporting is successful can be determined by detecting the data reporting status of the target assembly parameters.

[0090] In some embodiments, in step S107, a data reporting status of the target assembly parameter is detected; the data reporting status includes a first status, which indicates that the target assembly parameter has been reported to a preset database. The data reporting status also includes a second status, which indicates that the target assembly parameter has not been reported to the preset database.

[0091] In another embodiment, see Figure 4 After step S107, the web page performance evaluation method may further include but is not limited to steps S401 to S403:

[0092] Step S401: If the data reporting state is the second state, the target assembly parameters are stored in a preset local database; wherein the second state is used to indicate that the target assembly parameters have not been reported to the preset database, and the local database is stored locally in the web terminal;

[0093] Step S402: Obtain the access duration of the target webpage. If the access duration is greater than a preset access duration threshold, perform a data check on the local database to obtain a second check result.

[0094] Step S403: If the second check result is that the local database includes the target assembly parameters, the target assembly parameters are read from the local database, and the read target assembly parameters are reported to the preset database.

[0095] In steps S401 to S403 shown in the embodiment of the present application, since the preset database is stored in the server, when reporting data to the preset database, it may be affected by network fluctuations or other factors, resulting in reporting failure. If the report fails, the data reporting state is the second state. In the second state, the embodiment of the present application first stores the target assembly parameters in the local database. Since the local database is stored locally on the web terminal, data loss due to failure to report data to the preset database is avoided. In addition, when the access time of the target web page is greater than the preset access time threshold, the target assembly parameters stored in the local database are reported to the preset database. This embodiment stores the target assembly data that failed to be reported in the local database, and reports it again when the access time is greater than the access time threshold, thereby improving the reporting success rate of the target assembly parameters, thereby improving the collection completeness of the target assembly parameters, and further improving the accuracy of the web page performance evaluation results.

[0096] It should be noted that after the target assembly parameters are read from the local database and reported to the preset database, the data reporting status is detected. At this point, the data reporting status may still be in the second state. In one example, the target assembly parameters are read from the local database again and reported to the preset database until the data reporting status returns to the first state, at which point reporting is stopped. In another example, even if the data reporting status is in the second state, re-reporting is not performed.

[0097] In step S108 of some embodiments, if the data reporting state is the first state, it means that the target assembly parameters have been stored in the preset database. Therefore, the target assembly parameters can be taken out from the preset database, and the performance of the target web page can be evaluated based on the taken out target assembly parameters to obtain the web page performance evaluation results. It should be noted that in the relevant technology, the assembly performance index parameters can be directly obtained from the preset cache as the target assembly parameters, and the performance of the target web page can be evaluated based on the target assembly parameters. However, since the preset cache is only a cache space, the amount of data stored is limited and is easily affected by the triggering event of the target web page, and the accuracy of the web page performance evaluation results obtained is relatively low. The present application reports the data of the preset cache when a triggering event occurs, so that more complete assembly performance index parameters can be collected as much as possible, and the possibility of data loss is smaller. Therefore, the web page performance evaluation results obtained in the embodiment of the present application are more accurate.

[0098] See also Figure 5 In some embodiments, step S108 may include but is not limited to steps S501 to S504:

[0099] Step S501, screening target assembly parameters according to a preset system type to obtain at least one target performance index parameter; wherein, any two target performance index parameters have the same system type;

[0100] Step S502, obtaining the indicator type of the target performance indicator parameter;

[0101] Step S503, calculating the performance score of the target performance indicator parameters belonging to the same indicator type to obtain the target performance score;

[0102] Step S504: searching the preset evaluation mapping relationship according to the indicator type and the target performance score to obtain the web page performance evaluation result.

[0103] In steps S501 to S504 of the embodiment of the present application, the target assembly parameters include a type name, a parameter value, and a device system. Multiple target performance indicator parameters of the same system type can be obtained by pre-setting the pairing relationship between the system type and the device system. The indicator type of the target performance indicator parameter can be determined by the type name. The target performance score and indicator type can be used to determine the performance of the target webpage under the same indicator type. An evaluation mapping relationship can be pre-configured, so that the preset evaluation mapping relationship can be searched based on the indicator type and the target performance score to obtain the webpage performance evaluation result.

[0104] In one example, referring to Table 1, the preset evaluation mapping relationship is specifically an evaluation mapping relationship table. It should be noted that indicator types correspond one-to-one to indicator names. Therefore, the evaluation mapping relationship table may store a mapping relationship between an indicator name, a target performance score, and a webpage evaluation result. The evaluation mapping relationship table may also store a mapping relationship between an indicator type, a target performance score, and a webpage evaluation result.

[0105]

[0106] Table 1

[0107] See also Figure 6 In some other embodiments, after step S504, the web page performance evaluation method may further include updating the target web page performance evaluation result, specifically including steps S601 to S603:

[0108] Step S601: Compare the target performance score with a preset recommendation score threshold, filter web pages whose target performance score is less than the recommendation score threshold, and obtain at least one web page to be optimized;

[0109] Step S602: Check the web page to be optimized to obtain a check result; wherein the check includes at least one of the following: preload detection and lazy load detection;

[0110] Step S603: Update the target webpage performance evaluation result according to the screening result.

[0111] In steps S601 to S603 shown in the embodiment of the present application, at least one web page to be optimized can be determined by comparing the target performance score with the recommended score threshold. A screening result can be obtained by screening the web page to be optimized. The screening result is used to indicate whether optimization items exist for the web page to be optimized, and the optimization items include preloading and lazy loading. The web page performance evaluation result is updated based on the screening result so that the target object can also learn the reason for the poor performance of the web page to be optimized from the updated web page performance evaluation result, thereby improving the user experience of the target object.

[0112] It should be noted that preloading is also called advance loading. For example, when accessing a page, images are loaded in advance, and when the user needs to view them, they can be rendered directly from the local cache. Since the images are preloaded into the browser, they are guaranteed to be published quickly and seamlessly, resulting in a better user experience. Lazy loading is also called deferred loading. For example, when accessing a page, the background image path of the img element or other elements is first replaced with the path of a 1*1px image (this only requires one request, commonly known as a placeholder image). Only when the image appears in the browser's visible area is the actual path of the image set to display. This is image lazy loading.

[0113] In one example, classification is performed according to the indicator type to obtain target performance scores belonging to the same indicator type; and ascending sorting is performed according to the target performance scores. 75% of the target performance score can be taken as a comparison threshold, compared with the recommended score threshold, and at least one web page to be optimized (also referred to as a non-optimal page) is screened out; the web page to be optimized is screened, such as preloading detection and / or lazy loading detection, etc., to obtain a screening result. The screening results include preloading optimized, preloading not optimized, lazy loading optimized, lazy loading not optimized, etc. The target web page performance evaluation results are updated according to the screening results, with the aim of providing the target object with the reasons for the poor performance of the web page to be optimized based on the screening results. For example, if the screening result is that preloading is not optimized, then the content of "preloading is not optimized" is added to the web page performance evaluation result, so that the target object can optimize the target web page based on the updated web page performance evaluation result.

[0114] In some embodiments, step S602 specifically includes the following steps:

[0115] Get the visits of at least two web pages to be optimized;

[0116] At least two web pages to be optimized are screened and processed in descending order of visit volume to obtain a screening result.

[0117] Specifically, when the target assembly parameters are reported to the preset database, they carry the web page address of the target web page. The page addresses are classified and counted to obtain the number of visits to each target web page. Based on the number of visits to each target web page, the number of visits to at least two web pages to be optimized can be obtained. This embodiment prioritizes the web pages to be optimized with the largest number of visits, so that performance issues of pages to be optimized with large numbers of visits and low target performance scores are analyzed first, thereby reducing the impact of these pages to be optimized on the target object.

[0118] In one embodiment, see Figure 7 After step S108, the web page performance evaluation method may further include but is not limited to the following steps S701 to S703:

[0119] Step S701: Outputting the webpage performance evaluation results in a table format to obtain table data; wherein the table data includes performance evaluation information of at least one target webpage;

[0120] Step S702, obtaining a target performance score from the performance evaluation information;

[0121] Step S703 : color-mark the performance evaluation information whose target performance score is less than the recommended score threshold, so as to update the table data.

[0122] In steps S701 to S703 illustrated in the embodiment of the present application, by color-marking the performance evaluation information whose target performance score is less than the recommended score threshold, tabular data that is convenient for reminding the target object is obtained, so that the target object can more quickly locate the performance evaluation information with a lower target performance score. In one example, the degree of deviation from the optimality of the web page to be optimized is determined based on the size relationship between the target performance score and the recommended score threshold, and the performance evaluation information is marked yellow and / or red based on the degree of deviation from the optimality. In one example, the performance evaluation information whose target performance score is less than the recommended score threshold is marked yellow or red, and the updated tabular data is output. In another example, the performance evaluation information whose target performance score is less than the recommended score threshold is marked yellow, and the performance evaluation information whose target performance score is less than the preset minimum threshold is marked red, and the updated tabular data is output.

[0123] See also Figure 8 The embodiment of the present application also provides a web page performance evaluation device, which can implement the above web page performance evaluation method. Figure 8The module structure block diagram of the web page performance evaluation device provided in the embodiment of the present application includes: an indicator parameter collection module 801, a screening condition acquisition module 802, a screening processing module 803, a data assembly module 804, an event detection module 805, a data reporting module 806, a status detection module 807 and a performance evaluation module. Among them, the indicator parameter collection module 801 is used to obtain the original performance indicator parameters of the target web page; wherein the original performance indicator parameters are used to characterize the web page performance of the target web page; the screening condition acquisition module 802 is used to obtain the performance indicator category of the original performance indicator parameters, and obtain the performance screening conditions according to the performance indicator category; wherein the performance indicator categories of any two original performance indicator parameters are different, and any two performance screening conditions are different; the screening processing module 803 is used to screen the original performance indicator parameters according to the performance screening conditions to obtain at least one screening performance indicator parameter; the data assembly module 804 is used to assemble the screening performance indicator parameters to obtain assembled performance indicator parameters, and store the assembled performance indicator parameters in a preset cache; wherein the performance indicator categories of any two assembled performance indicator parameters are different. The data format is the same; the event detection module 805 is used to obtain the triggering event of the target web page, and detect the event category of the triggering event to obtain the current event category of the triggering event; the data reporting module 806 is used to read the assembly performance indicator parameters from the preset cache to obtain the target assembly parameters if the current event category belongs to the preset web page event type, and report the target assembly parameters to the preset database; the status detection module 807 is used to detect the data reporting status of the target assembly parameters; the data reporting status includes a first status, and the first status is used to indicate that the target assembly parameters have been reported to the preset database; the performance evaluation module 808 is used to retrieve the target assembly parameters from the preset database if the data reporting status is the first status, and perform performance evaluation on the target web page based on the retrieved target assembly parameters to obtain a web page performance evaluation result.

[0124] In some other embodiments, the web page performance evaluation apparatus further includes a result updating module, which is used to update the target web page performance evaluation result.

[0125] It should be noted that the specific implementation of the web page performance evaluation device is substantially the same as the specific embodiment of the web page performance evaluation method described above, and will not be described in detail herein.

[0126] The present application also provides an electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, the webpage performance evaluation method described above is implemented. The electronic device can be any intelligent terminal, including a tablet computer and an in-vehicle computer.

[0127] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:

[0128] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0129] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the web page performance evaluation method of the embodiments of this application.

[0130] Input / output interface 903, used to implement information input and output;

[0131] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0132] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );

[0133] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0134] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned web page performance evaluation method.

[0135] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0136] The web page performance evaluation method, web page performance evaluation device, electronic device and storage medium provided in the embodiments of the present application improve the uniqueness of the screened performance indicator parameters by screening the performance indicator parameters during the collection process of the performance indicator parameters. The screened performance indicator parameters are assembled so that the assembled performance indicator data in the same data format is more stable. By detecting the triggering event of the web page and, when it is detected that it meets the preset event type, the parameters collected in the preset cache library are reported to the preset database, which can avoid parameter loss. In summary, this embodiment can reduce data loss and improve the completeness of parameter collection, so that the obtained web page performance evaluation results are more accurate.

[0137] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0138] It will be understood by those skilled in the art that Figure 1-7 The technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figures, or a combination of certain steps, or different steps.

[0139] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0140] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0141] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0142] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0143] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0144] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0145] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0147] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A web page performance evaluation method, applied to a web page terminal, characterized in that: The method comprises: Obtaining original performance index parameters of the target webpage; wherein the original performance index parameters are used to characterize the webpage performance of the target webpage, and each original performance index parameter corresponds to a callback function; Obtaining the performance indicator category of the original performance indicator parameter, and obtaining a performance screening condition according to the performance indicator category; wherein, if the performance indicator categories of any two of the original performance indicator parameters are different, any two of the performance screening conditions are different; Filtering the original performance indicator parameter according to the performance filtering condition to obtain at least one filtered performance indicator parameter; Acquire the callback function according to the performance indicator category; wherein the callback functions of any two original performance indicator parameters are different, and the data formats of any two callback functions are the same; Performing callback processing on each of the screening performance indicator parameters through the callback function to obtain assembly performance indicator parameters in the same data format, and storing the assembly performance indicator parameters in a preset cache; wherein the data formats of any two of the assembly performance indicator parameters are the same; Acquire a triggering event of the target webpage, detect an event category of the triggering event, and obtain a current event category of the triggering event; If the current event category belongs to a preset webpage event type, the assembly performance indicator parameter is read from the preset cache to obtain a target assembly parameter, and the target assembly parameter is reported to a preset database; wherein the preset database is stored in a server; Detecting a data reporting status of the target assembly parameter; the data reporting status includes a first status, the first status being used to indicate that the target assembly parameter has been reported to the preset database; If the data reporting state is the first state, the target assembly parameters are retrieved from the preset database, and a performance evaluation is performed on the target webpage according to the retrieved target assembly parameters to obtain a webpage performance evaluation result.

2. The method according to claim 1, characterized in that Before reporting the target assembly parameters to a preset database, the method further includes: Detecting the amount of stored data in the preset cache to obtain the current amount of stored data in the preset cache; If the current storage data volume is greater than or equal to a preset storage data volume threshold, the assembly performance indicator parameter is read from the preset cache to obtain the target assembly parameter.

3. The method according to claim 1, characterized in that After the assembly performance indicator parameters are read from the preset cache to obtain the target assembly parameters, the preset cache is cleared.

4. The method according to claim 1, wherein The data reporting state further includes a second state, after the target assembly parameters are reported to a preset database, the method further includes: If the data reporting state is the second state, the target assembly parameters are stored in a preset local database; wherein the second state is used to indicate that the target assembly parameters have not been reported to the preset database, and the local database is stored locally in the web terminal; Obtaining the access duration of the target webpage, and if the access duration is greater than a preset access duration threshold, performing a data check on the local database to obtain a second check result; If the second inspection result is that the local database includes the target assembly parameters, the target assembly parameters are read from the local database, and the read target assembly parameters are reported to the preset database.

5. The method according to any one of claims 1 to 4, characterized in that The performing performance evaluation on the target webpage according to the retrieved target assembly parameters to obtain a webpage performance evaluation result includes: The target assembly parameters are screened according to a preset system type to obtain at least one target performance indicator parameter; wherein the system type of any two target performance indicator parameters is the same; Obtaining the indicator type of the target performance indicator parameter; Calculating the performance scores of the target performance indicator parameters belonging to the same indicator type to obtain a target performance score; The preset evaluation mapping relationship is searched according to the indicator type and the target performance score to obtain the web page performance evaluation result.

6. The method according to claim 5, characterized in that The method further includes: updating the webpage performance evaluation result, specifically including: Comparing the target performance score with a preset recommendation score threshold, screening web pages whose target performance scores are less than the recommendation score threshold, and obtaining at least one web page to be optimized; Performing a check on the web page to be optimized to obtain a check result; wherein the check includes at least one of the following: preloading detection and lazy loading detection; The web page performance evaluation result is updated according to the investigation result.

7. A web page performance evaluation device, characterized in that: The device comprises: An indicator parameter collection module is used to obtain original performance indicator parameters of a target webpage; wherein the original performance indicator parameters are used to characterize the webpage performance of the target webpage, and each original performance indicator parameter corresponds to a callback function; a screening condition acquisition module, configured to acquire the performance indicator category of the original performance indicator parameter and acquire the performance screening condition according to the performance indicator category; wherein, if the performance indicator categories of any two original performance indicator parameters are different, any two performance screening conditions are different; a screening processing module, configured to screen the original performance indicator parameters according to the performance screening condition to obtain at least one screened performance indicator parameter; A data assembly module, configured to obtain the callback function according to the performance indicator category; wherein the callback functions of any two original performance indicator parameters are different, and the data formats of any two callback functions are the same; The callback function is used to perform callback processing on the screening performance index parameter to obtain the assembly performance index parameter in the same data format, and the assembly performance index parameter is stored in a preset cache; wherein the data format of any two assembly performance index parameters is the same; An event detection module, configured to obtain a triggering event of the target webpage, detect an event category of the triggering event, and obtain a current event category of the triggering event; a data reporting module configured to read the assembly performance indicator parameters from the preset cache to obtain target assembly parameters if the current event category belongs to a preset webpage event type, and report the target assembly parameters to a preset database; A status detection module, configured to detect a data reporting status of the target assembly parameter; the data reporting status includes a first status, the first status being used to indicate that the target assembly parameter has been reported to the preset database; The performance evaluation module is configured to retrieve the target assembly parameters from the preset database if the data reporting state is the first state, and perform performance evaluation on the target web page according to the retrieved target assembly parameters to obtain a web page performance evaluation result.

8. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the web page performance evaluation method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the web page performance evaluation method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • A performance evaluation method and a terminal of a web application based on big data analysis

    CN109240912A

  • Webpage performance analysis method, terminal equipment and computer readable storage medium

    CN109840195A