Front-end performance intelligent optimization method and device, electronic equipment and storage medium
By obtaining front-end user interaction behavior data in real time and using machine learning models to analyze, generating and verifying optimization strategies, the analysis limitations and insufficient intelligence of traditional front-end optimization methods are solved, and the front-end performance automation optimization and device compatibility are achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202510442886.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-11
AI Technical Summary
The traditional front-end optimization method has analysis limitations, insufficient intelligence, and insufficient device compatibility, making it difficult to capture performance problems in dynamic user interaction in real time, and the optimization strategy lacks automation and intelligent support.
Through integrated monitoring scripts, front-end user interaction behavior data is obtained in real time, pre-trained machine learning models are used to analyze performance bottlenecks, generate and verify optimization strategies, and automatically adjust optimization strategies according to the device operation environment, and use optimization tools to execute optimization instructions.
Real-time accurate capture and automated optimization of front-end performance issues is achieved, tuning efficiency is improved, ensuring optimal performance in different devices and network environments, and improving user experience consistency.
Smart Images

Figure CN120295879A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer software technology and can be applied to the fields of digital healthcare / financial technology. In particular, it relates to a method, device, electronic device, and storage medium for intelligent optimization of front-end performance. Background Art
[0002] In today's digital age, front-end performance is crucial for user experience and business success. As the functions of front-end applications become increasingly complex and page elements become more abundant, front-end performance problems continue to emerge. For example, in the front-end page of certain insurance sales systems, as the product information in the product list becomes richer, the loading time of the front-end page of the insurance product list increases, thereby reducing the user experience. In the financial field, a certain front-end real-time trading page lags when scrolling due to dynamically loading a large amount of exchange rate data and transaction records, affecting the user operation experience. In the medical scenario, a certain hospital's electronic medical record system times out when loading the page due to embedding a large number of patient imaging materials, resulting in a decline in doctors' operation efficiency. Currently, there are various front-end performance monitoring and optimization tools on the market. As an open-source automation tool, Google Lighthouse can evaluate the quality and performance of Web applications, generate reports, and give improvement suggestions, but it mainly focuses on static performance analysis and is difficult to capture performance problems in dynamic user interactions in real time. For example, the memory leak problem that occurs when doctors quickly switch patient images in the hospital's electronic medical record system cannot be captured. New Relic Browser can provide performance data such as page load time and JavaScript errors, and also supports real-time user monitoring. However, in terms of performance tuning, it lacks automation and intelligence capabilities, and developers still need to operate manually. SpeedCurve can monitor front-end performance metrics in real time and conduct comparative analysis with competitors, but it is difficult to provide adapted optimization solutions for diverse environmental characteristics in cross-device and different network environments. For example, the resource loading strategy of a bank's front-end web page cannot be automatically adjusted in a 5G / 4G network environment. As an error monitoring platform, Sentry can effectively capture and analyze front-end errors, helping developers locate performance problems, but there is a problem that the data presentation is too technical, making it difficult for non-professional developers to understand and operate. Summary of the Invention
[0003] The main technical problems to be solved in the embodiments of this application are the limitations in analysis, lack of intelligence, and lack of device compatibility in traditional front-end optimization methods.
[0004] To solve the above technical problems, the first technical solution adopted in the embodiments of this application is: to provide an intelligent optimization method for front-end performance, including: obtaining real-time interaction behavior data of front-end users through a monitoring script pre-integrated in the target front-end application; using a pre-trained first machine learning model to analyze the interaction behavior data to obtain first performance bottleneck prediction data; using a preset second machine learning model to analyze the first performance bottleneck prediction data to obtain first performance bottleneck correlation factor data; generating an optimization strategy and validating the optimization strategy in sequence according to the first performance bottleneck correlation factor data through a preset optimization strategy generation engine to obtain a first optimization strategy to be executed; obtaining device running environment data of front-end users, and optimizing the first optimization strategy to be executed according to the device running environment data to obtain a second optimization strategy to be executed; matching different optimization strategy execution tools according to the second optimization strategy to be executed, converting the second optimization strategy to be executed into an optimization strategy automatic execution instruction, and using the optimization strategy execution tool to execute the optimization strategy automatic execution instruction.
[0005] Optionally, after the step of obtaining real-time interaction behavior data of front-end users through a monitoring script pre-integrated in the front end, it includes: clustering the obtained interaction behavior data to obtain interaction behavior clustering result data; when there is a first interaction behavior clustering with an interaction frequency greater than a preset first interaction frequency in the interaction behavior clustering result data, reducing the acquisition time interval of the interaction behavior data corresponding to the first interaction behavior clustering in the monitoring script; when there is a second interaction behavior clustering with an interaction frequency less than a preset second interaction frequency in the interaction behavior clustering result data, increasing the acquisition time interval of the interaction behavior data corresponding to the second interaction behavior clustering in the monitoring script.
[0006] Optionally, the step of using a pre-trained first machine learning model to analyze the interaction behavior data to obtain first performance bottleneck prediction data includes: performing data preprocessing operations of format conversion, missing value and outlier processing, and normalization on the interaction behavior data in sequence to obtain interaction behavior data to be analyzed; extracting first interaction behavior feature data from the interaction behavior data to be analyzed, and processing the first interaction behavior feature data through a preset classification prediction model to obtain the first performance bottleneck prediction data; combining the interaction behavior data and the first performance bottleneck prediction data group into a first model optimization data pair, and using the first model optimization data pair to optimize the first machine learning model.
[0007] Optionally, the step of analyzing the first performance bottleneck prediction data using a preset second machine learning model to obtain first performance bottleneck correlation factor data includes: parsing the first performance bottleneck prediction data to obtain first dependent variable data, and matching first independent variable data corresponding to the first dependent variable data from a preset front-end performance optimization variable library, where the second machine learning model is a regression model; sending the first dependent variable data and the first independent variable data to the regression model, and calculating a first regression coefficient through the least squares method preset in the regression model; performing a significance test calculation on the first regression coefficient to obtain a coefficient probability value corresponding to the first regression coefficient; traversing the coefficient probability values, and if the traversed coefficient probability value is greater than a preset coefficient probability threshold, setting the first independent variable data corresponding to the traversed coefficient probability value as the first performance bottleneck correlation factor data.
[0008] Optionally, the step of generating and verifying an optimization strategy in sequence according to the first performance bottleneck correlation factor data by a preset optimization strategy generation engine to obtain a first optimization strategy to be executed includes: using the first performance bottleneck correlation factor data to search a preset front-end performance optimization knowledge base in the optimization strategy generation engine to obtain first front-end optimization factor data; generating at least one first front-end performance optimization strategy according to the first front-end optimization factor data and preset front-end performance optimization rules; calculating a front-end performance optimization prediction score for each of the first front-end performance optimization strategies according to historical optimization record data corresponding to the first front-end optimization factor data; setting the first front-end performance optimization strategy corresponding to the maximum front-end performance optimization prediction score as the front-end performance optimization strategy to be verified; executing the front-end performance optimization strategy to be verified in a preset optimization strategy verification virtual environment, and calculating a corresponding front-end performance optimization simulation score; if the front-end performance optimization simulation score is greater than a preset front-end performance optimization simulation score threshold, setting the front-end performance optimization strategy to be verified as the first optimization strategy to be executed.
[0009] Optionally, the step of obtaining device operation environment data of a front-end user and optimizing the first optimization strategy to be executed according to the device operation environment data to obtain a second optimization strategy to be executed includes: parsing the device operation environment data to obtain hardware device data and network environment data corresponding to the target front-end application; calculating corresponding hardware performance scores and network environment scores according to the hardware device performance data and the network environment data; parsing the first optimization strategy to be executed to obtain front-end performance parameters to be optimized; and adjusting the data of the front-end performance parameters to be optimized according to the hardware performance scores, the network environment scores, and preset optimization parameter adjustment rules to obtain the second optimization strategy to be executed.
[0010] Optionally, the step of matching different optimization strategy execution tools according to the second to-be-executed optimization strategy and converting the second to-be-executed optimization strategy into an optimization strategy automatic execution instruction includes: according to the second to-be-executed optimization strategy, matching a corresponding target front-end optimization tool from a preset optimization tool library; splitting the second to-be-executed optimization strategy into to-be-executed optimization sub-strategies corresponding to different target front-end optimization tools; and converting different to-be-executed optimization sub-strategies into optimization strategy automatic execution instructions executable by different target front-end optimization tools.
[0011] To solve the above technical problems, the second technical solution adopted in the embodiments of the present application is: to provide a front-end performance intelligent optimization device, including: an interaction behavior data acquisition module, configured to obtain the interaction behavior data of front-end users in real time through a monitoring script pre-integrated in a target front-end application; a performance bottleneck analysis data module, configured to analyze the interaction behavior data using a pre-trained first machine learning model to obtain first performance bottleneck prediction data; a performance bottleneck correlation factor module, configured to analyze the first performance bottleneck prediction data using a preset second machine learning model to obtain first performance bottleneck correlation factor data; a first optimization strategy module, configured to generate and verify an optimization strategy in sequence according to the first performance bottleneck correlation factor data through a preset optimization strategy generation engine to obtain a first to-be-executed optimization strategy; a second optimization strategy module, configured to obtain the device operation environment data of front-end users and optimize the first to-be-executed optimization strategy according to the device operation environment data to obtain a second to-be-executed optimization strategy; a strategy automatic execution module, configured to match different optimization strategy execution tools according to the second to-be-executed optimization strategy, convert the second to-be-executed optimization strategy into an optimization strategy automatic execution instruction, and use the optimization strategy execution tool to execute the optimization strategy automatic execution instruction.
[0012] To solve the above technical problems, the third technical solution adopted in the embodiments of the present application is: to provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the front-end performance intelligent optimization method as described above.
[0013] To solve the above technical problems, the fourth technical solution adopted in the embodiments of the present application is: to provide a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device is enabled to execute the front-end performance intelligent optimization method as described above.
[0014] Different from the related technologies, this application obtains real-time front-end user interaction behavior data, accurately captures performance problems in actual use, ensures the accuracy of performance data, and provides reliable support for subsequent optimization. It has a high degree of intelligence and automation. The machine learning model and optimization strategy generation engine automatically complete analysis, strategy generation and verification, and can also match tools to achieve automatic execution, reducing manual operations and dependence on professional knowledge, and greatly improving the tuning efficiency. It has environmental self-adaptability and optimizes strategies based on device operating environment data, enabling the system to provide the best performance under different hardware and network conditions and ensuring a consistent user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] One or more embodiments are exemplarily illustrated by corresponding drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings represent similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.
[0016] Figure 1 It is a schematic diagram of the operating environment of the front-end performance intelligent optimization method provided by an embodiment of this application.
[0017] Figure 2 It is a schematic diagram of the execution process of the front-end performance intelligent optimization method provided by an embodiment of this application.
[0018] Figure 3 It is a schematic diagram of the execution process of obtaining performance bottleneck prediction data in the front-end performance intelligent optimization method provided by an embodiment of this application.
[0019] Figure 4 It is a schematic diagram of the execution process of obtaining performance bottleneck correlation factor data in the front-end performance intelligent optimization method provided by an embodiment of this application.
[0020] Figure 5 It is a schematic diagram of the execution process of obtaining the first to-be-executed optimization strategy in the front-end performance intelligent optimization method provided by an embodiment of this application.
[0021] Figure 6 It is a schematic diagram of the execution process of obtaining the second to-be-executed optimization strategy in the front-end performance intelligent optimization method provided by an embodiment of this application.
[0022] Figure 7 It is a schematic diagram of the execution process of obtaining the automatic execution instruction of the optimization strategy in the front-end performance intelligent optimization method provided by an embodiment of this application.
[0023] Figure 8 It is a schematic diagram of the system structure of the front-end performance intelligent optimization device provided by an embodiment of this application.
[0024] Figure 9It is a schematic diagram of the hardware structure of an electronic device that implements the intelligent optimization method for front-end performance provided by an embodiment of the present application. Detailed implementation manners
[0025] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0026] It should be noted that if there is no conflict, the various features in the embodiments of the present application can be combined with each other, and all are within the protection scope of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different module division from that in the device schematic diagram or a different order from that in the flowchart.
[0027] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing specific implementation manners and are not used to limit the present application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0028] For ease of understanding of this embodiment, first, a detailed introduction to an intelligent optimization method for front-end performance disclosed in the embodiments of the present application will be given. Please refer to Figure 1 , Figure 1 is a schematic diagram of the operating environment of the intelligent optimization method for front-end performance provided by an embodiment of the present application. As shown in Figure 1 , the execution entity of the intelligent optimization method for front-end performance provided by the embodiments of the present application is generally an electronic device with a certain computing ability, such as a computer device. In some possible implementation manners, the intelligent optimization method for front-end performance can be implemented by a processor calling computer-readable instructions stored in a memory. Among them, Figure 1 the computer device in Figure 1 can be a server. The server can be an independent server or 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, Content Delivery Network (CDN), and big data and artificial intelligence platforms. It can be understood that
[0029] Please continue to refer to Figure 2 , Figure 2It is a schematic execution flow diagram of the intelligent front-end performance optimization method provided by the embodiments of this application. As Figure 2 shown, it includes the following steps:
[0030] S1. Real-time obtain the interaction behavior data of front-end users through the monitoring script pre-integrated in the target front-end application.
[0031] Among them, the above-mentioned interaction behavior data can be data such as clicks, scrolls, and form inputs of user operations, and data associated with the interaction behavior can also be obtained through the monitoring script. For example, after the user clicks on a page, the rendering time of the entire page, the resource loading time, etc. For example, when a front-end user enters the insurance details introduction page, the rendering time of the insurance details page is obtained through a pre-set monitoring script. Another example is that in the medical system, the loading time of the front-end page resources (such as pictures) of the prescription template sub-page in the entire front-end page is recorded after the doctor clicks the "prescription issuance" button.
[0032] As an optional implementation method, after the above step S1 is executed, cluster the obtained interaction behavior data to obtain interaction behavior clustering result data. When there is a first interaction behavior cluster in the interaction behavior clustering result data whose interaction frequency is greater than the preset first interaction frequency, reduce the acquisition time interval of the interaction behavior data corresponding to the first interaction behavior cluster in the monitoring script. When there is a second interaction behavior cluster in the interaction behavior clustering result data whose interaction frequency is less than the preset second interaction frequency, increase the acquisition time interval of the interaction behavior data corresponding to the second interaction behavior cluster in the monitoring script.
[0033] For example, in the front-end system in the financial field, monitor the interaction frequency data related to user stock trading, such as the frequency of entering the trading page, viewing individual stock details, sliding the K-line chart, and clicking the order placement button, and use the K-Means algorithm to obtain the clustering result. Set the first interaction frequency to more than 50 times of entering the trading page per hour, and the second interaction frequency to less than 3 times of entering the trading page per week. If there is a cluster in the clustering result that is greater than the first frequency, such as professional high-frequency trading users, in order to accurately capture their behaviors, reduce the corresponding data acquisition interval from 15 minutes to 5 minutes. If there is a cluster with a frequency less than the second frequency, such as new users, in order to avoid ineffective acquisition, extend the acquisition interval from 15 minutes to 1 hour. Another example is that in the front-end of a medical service website, collect the interaction frequency data such as user query diagnosis and appointment registration, and use the DBSCAN algorithm to obtain the clustering result. Set the first interaction frequency to more than 10 times of entering the symptom query page per day, and the second interaction frequency to less than 1 time of clicking the appointment registration page per month. If there is a cluster in the clustering result that is greater than the first frequency, such as patients with urgent conditions to timely understand their conditions, reduce the acquisition interval from 30 minutes to 10 minutes. If there is a cluster in the clustering result that is less than the second frequency, such as ordinary users, in order to reasonably use resources, the acquisition interval can be extended from 30 minutes to 2 hours.
[0034] S2. Analyze the interaction behavior data using a pre-trained first machine learning model to obtain first performance bottleneck prediction data.
[0035] As an alternative implementation, please continue to refer to Figure 3 , Figure 3 which is a schematic execution flow diagram for obtaining performance bottleneck prediction data in the intelligent front-end performance optimization method provided in the embodiments of this application. As shown in Figure 3 , it includes the following steps S21 to S23.
[0036] S21. Perform data preprocessing operations on the interaction behavior data in sequence, including format conversion, missing value and outlier processing, and normalization, to obtain interaction behavior data to be analyzed.
[0037] S22. Extract first interaction behavior feature data from the interaction behavior data to be analyzed, and process the first interaction behavior feature data through a preset classification prediction model to obtain first performance bottleneck prediction data.
[0038] For example, in an insurance business platform, after completing data preprocessing on user interaction behavior data (such as the frequency of entering insurance product details pages, querying insurance terms, submitting claims applications, and consulting customer service), features closely related to front-end performance bottlenecks are extracted from the interaction behavior data to be analyzed. For example, during a promotional event, the average loading time for users to enter the details pages of popular insurance products is extracted to reflect the efficiency of the front-end system in displaying product information under high traffic. Another example is to extract the delay time for page content expansion when users query complex insurance terms to judge the performance of the front-end system in processing complex text displays. Also, for example, during the peak period of users submitting claims applications, the response time of the submit button and the number of failed claim submissions are extracted to measure the stability of the front-end system in processing key business processes. Assume that the preset classification prediction model is constructed based on the random forest algorithm. The extracted interaction behavior feature data is input into the model, and the decision trees inside the model will classify and judge the performance bottleneck situation according to different values of the feature data. For example, if during a promotional event, the average loading time of the details pages of popular insurance products exceeds 3 seconds and occurs frequently, the page expansion delay often exceeds 2 seconds when users query complex insurance terms, and at the same time, during the peak period of claim applications, the response time of the submit button exceeds 1 second and the claim submission failure rate reaches 5%, the model can comprehensively analyze these features and determine that there is a performance bottleneck such as insufficient server resources or network congestion, predicting that problems such as slow page loading, service response delay, and even partial function unavailability may occur in the front-end system during promotional events or claim peaks.
[0039] S23. Combine the interactive behavior data and the first performance bottleneck prediction data group into a first model optimization data pair, and use the first model optimization data pair to optimize the first machine learning model.
[0040] Among them, through the above steps S21 to S23, the features that can be closely associated with the front-end performance bottleneck are screened, the front-end system performance can be deeply analyzed, and then with the help of the random forest algorithm model, the front-end performance bottleneck can be accurately classified and judged according to the features, and potential problems can be warned in advance. Combine the interactive behavior and the performance bottleneck prediction data into an optimization data pair, continuously optimize the first machine learning model, and promote the steady improvement of the performance of the first machine learning model in processing user interaction data, and improve the accuracy of predicting the front-end performance bottleneck.
[0041] S3. Analyze the first performance bottleneck prediction data using a preset second machine learning model to obtain first performance bottleneck associated factor data.
[0042] As an alternative implementation, please continue to refer to Figure 4 , Figure 4 is a schematic execution flow diagram for obtaining the performance bottleneck associated factor data in the front-end performance intelligent optimization method provided by the embodiment of the present application. As shown in Figure 4 , it includes the following steps S31 to S34.
[0043] S31. Analyze the first performance bottleneck prediction data to obtain first dependent variable data, and match the first independent variable data corresponding to the first dependent variable data from a preset front-end performance optimization variable library. Among them, the second machine learning model is a regression model.
[0044] For example, in a medical service website, assume that the first performance bottleneck prediction data shows that during the period when patients query inspection reports in a concentrated manner, the loading delay time of the report page often exceeds 5 seconds. The first dependent variable data obtained after analysis is "page loading delay during the peak period of inspection report query". There are variables such as server data reading speed, page caching mechanism, and image resource loading strategy in the preset front-end performance optimization variable library. For the dependent variable "page loading delay during the peak period of inspection report query", the first independent variable data that may be matched are: the server data reading speed has decreased by 40% during the peak period because of slow reading caused by a large number of concurrent requests, or in terms of the page caching mechanism, the caching update frequency of the inspection report page is too low, only once every 12 hours, so that many patients need to reload a large amount of data when querying, or in terms of the image resource loading strategy, the medical image pictures in the report are directly loaded with high-resolution original images without proper compression and progressive loading, which increases the page loading burden.
[0045] S32. Send the first dependent variable data and the first independent variable data to the regression model, and calculate the first regression coefficient through the least squares method preset in the regression model.
[0046] Among them, the least squares method finds the best function match for the data by minimizing the sum of the squares of the errors. In step S32, the first dependent variable data and the first independent variable data are sent to the regression model, and the model uses the least squares method to process these data. The purpose is to determine the influence degree of each independent variable on the dependent variable, and the first regression coefficient is the quantitative manifestation of this influence degree. The positive or negative of the coefficient indicates whether the independent variable and the dependent variable are positively or negatively correlated, and the absolute value of the coefficient reflects the strength of the influence of the independent variable on the dependent variable.
[0047] For example, continuing with the previous example in the medical field, the first dependent variable data is "page loading delay during the peak period of inspection report queries". The corresponding first independent variable data includes: the server data reading speed decreased by 40% during the peak period, the cache update frequency of the inspection report page is too low (only once every 12 hours), and the medical image pictures in the report are directly loaded with high-resolution original images without proper compression and progressive loading. Sending these first dependent variable data and first independent variable data to the regression model, inside the regression model, the relationship between the independent variables such as the proportion of the decrease in the server data reading speed, the cache update frequency, and the picture loading strategy and the dependent variable of page loading delay will be analyzed. For example, after calculation by the least squares method, the first regression coefficient of the server data reading speed may be 0.6, which indicates that the server data reading speed is positively correlated with the page loading delay, and for every 1% decrease in the server data reading speed, assuming other conditions remain unchanged, the page loading delay may increase by 0.6 unit time. For the page cache update frequency, the first regression coefficient obtained may be -0.4, meaning that the cache update frequency is negatively correlated with the page loading delay, that is, for every 1 increase in the cache update frequency (assuming the number of updates per unit time increases), the page loading delay may decrease by 0.4 unit time. And the first regression coefficient of the picture resource loading strategy may be 0.5, indicating that the picture loading strategy has a positive impact on the page loading delay, and an inappropriate picture loading strategy (such as directly loading high-resolution original images) will aggravate the page loading delay situation. Through these first regression coefficients, the influence degree of each independent variable on the dependent variable of page loading delay can be clearly understood, providing strong data support for subsequent targeted optimization of the front-end performance.
[0048] S33. Conduct a significance test calculation on the first regression coefficient to obtain the coefficient probability value corresponding to the first regression coefficient.
[0049] S34. Traverse the coefficient probability values. If the traversed coefficient probability value is greater than the preset coefficient probability threshold, set the first independent variable data corresponding to the traversed coefficient probability value as the first performance bottleneck correlation factor data.
[0050] For example, in the front-end system of a medical service website, continuing with the above example, perform a significance test calculation on the regression coefficients. Using statistical methods such as t-test, the coefficient probability value of the server data reading speed is obtained as 0.02, the coefficient probability value of the cache update frequency is 0.06, and the coefficient probability value of the image loading strategy is 0.04. The preset coefficient probability threshold is 0.05. After comparison, only the coefficient probability value of 0.06 for the cache update frequency is greater than this threshold. Therefore, the first independent variable data that the cache update frequency of the test report page is only once every 12 hours is determined as the first performance bottleneck correlation factor data.
[0051] Among them, through the above steps S31 to S34, starting from the performance bottleneck prediction data, accurately analyze the dependent variable, match the relevant independent variables, and construct a comprehensive and targeted front-end performance impact factor system. Calculate the regression coefficients through the least squares method of the regression model to quantify the influence degree of each factor on the performance bottleneck, so that complex performance problems can be measured numerically. The significance test and the calculation and comparison of the coefficient probability values further screen out the key influencing factors to avoid deviation in the optimization direction. Efficiently identify the core performance bottleneck correlation factors, provide data support for the formulation of front-end performance optimization strategies, and greatly improve the optimization efficiency and effect.
[0052] S4. Through a preset optimization strategy generation engine, generate and verify optimization strategies in sequence according to the first performance bottleneck correlation factor data to obtain the first to-be-executed optimization strategy.
[0053] As an alternative implementation, please continue to refer to Figure 5 , Figure 5 is a schematic execution flow diagram for obtaining the first to-be-executed optimization strategy in the front-end performance intelligent optimization method provided by the embodiments of the present application. As shown in Figure 5 , it includes the following steps S41 to S46.
[0054] S41. Use the first performance bottleneck correlation factor data to search the preset front-end performance optimization knowledge base in the optimization strategy generation engine to obtain the first front-end optimization factor data.
[0055] Among them, the pre-set front-end performance optimization knowledge base in the above optimization strategy generation engine is a collection that stores a large amount of knowledge and historical experience related to front-end performance optimization. This knowledge base contains information such as solutions to various front-end performance problems and the relationships between different factors and performance. For example, the knowledge base may record cache strategies for different types of pages and data such as the impact of cache update frequency on page loading speed. In step S41, relevant front-end optimization factor data can be found through search. Continuing with the above medical service website as an example, when searching in the knowledge base using "low cache update frequency of the test report page", front-end optimization factor data such as "increase the cache update frequency to once per hour" and "adopt an intelligent cache update algorithm to dynamically adjust the cache update time according to the peak user query time" may be obtained.
[0056] S42. Generate at least one first front-end performance optimization strategy based on the first front-end optimization factor data and the pre-set front-end performance optimization rules.
[0057] S43. Calculate the front-end performance optimization prediction scores for each first front-end performance optimization strategy according to the historical optimization record data corresponding to the first front-end optimization factor data.
[0058] S44. Set the first front-end performance optimization strategy corresponding to the maximum front-end performance optimization prediction score as the front-end performance optimization strategy to be verified.
[0059] Among them, the above front-end performance optimization prediction score quantifies and evaluates the possible effects of different optimization strategies based on historical optimization record data in the front-end performance optimization process, intuitively compares the advantages and disadvantages of each front-end optimization strategy, and by selecting the strategy with the highest prediction score as the strategy to be verified, it can avoid resource waste caused by blind attempts and improve the accuracy and success rate of the optimization strategy.
[0060] For example, in the financial field, taking a securities trading platform as an example, when there is a problem of slow response during the trading peak period on the platform, according to the front-end performance optimization rules, multiple optimization strategies such as upgrading server hardware and optimizing trading algorithms will be generated. By calculating the front-end performance optimization prediction scores, it can be clearly seen the possible performance improvement range and cost investment of each strategy. For example, although upgrading server hardware can significantly improve performance, the cost is high; while optimizing the trading algorithm has a relatively low cost and good historical optimization effects, and the prediction score is relatively high. Selecting the strategy with a high prediction score as the strategy to be verified can ensure the smoothness of trading while minimizing costs and avoiding unnecessary resource consumption.
[0061] For example, in the medical field, for a medical imaging diagnosis system, if there is a problem of slow image loading in the system, optimization strategies such as optimizing the image storage architecture and adopting a more efficient image compression algorithm will be generated. The front-end performance optimization prediction score can evaluate the expected effect of each strategy on improving the image loading speed based on historical optimization data. For example, optimizing the image storage architecture may quickly improve performance in the short term, but requires a large upfront investment; while adopting a more efficient image compression algorithm has a lower cost and certain optimization potential, and the prediction score is higher. Selecting the strategy with a high prediction score for verification and implementation can quickly improve the system performance at a lower cost, ensure that doctors can obtain image data in a timely manner for diagnosis, and improve medical efficiency and quality.
[0062] S45. Execute the front-end performance optimization strategy to be verified in a preset virtual environment for optimizing strategy verification, and calculate the corresponding front-end performance optimization simulation score.
[0063] S46. If the front-end performance optimization simulation score is greater than the preset front-end performance optimization simulation score threshold, set the front-end performance optimization strategy to be verified as the first optimization strategy to be executed.
[0064] Among them, through the above steps S41 to S46, obtaining the front-end optimization factor data by searching the knowledge base through the first performance bottleneck correlation factor data can accurately locate potential optimization directions, generate strategies based on the optimization factor data and rules, ensure the diversity and pertinence of the optimization strategies, execute the strategy to be verified in a virtual environment and calculate the simulation score, further verify the feasibility and effectiveness of the strategy, and only when the simulation score exceeds the threshold is it determined as the strategy to be executed, greatly reducing the risk of actual implementation, ensuring the reasonable utilization of optimization resources, and comprehensively improving the front-end performance.
[0065] S5. Obtain the device running environment data of the front-end user, and optimize the first optimization strategy to be executed according to the device running environment data to obtain the second optimization strategy to be executed.
[0066] As an alternative implementation, please continue to refer to Figure 6 , Figure 6 is the execution process schematic diagram of obtaining the second optimization strategy to be executed in the front-end performance intelligent optimization method provided by the embodiment of the present application. As shown in Figure 6 , it includes the following steps S51 to S54.
[0067] S51. Analyze the device running environment data to obtain the hardware device data and network environment data corresponding to the target front-end application.
[0068] For example, through step S51, the device type of the target front-end application can be detected, such as a mobile device, a desktop device, etc., and the network environment can also be detected, such as 4G, WIFI, etc.
[0069] S52. Calculate the corresponding hardware performance score and network environment score based on the hardware device performance data and network environment data.
[0070] Among them, through the pre-set evaluation criteria and calculation methods, various performance indicators of the hardware device (such as processor performance, memory size, storage speed, etc.) and relevant parameters of the network environment (such as network bandwidth, latency, stability, etc.) are converted into specific scores, namely the hardware performance score and the network environment score. These scores can intuitively reflect the support degree of the hardware device and the network environment for the operation of the front-end application, providing a quantitative basis for subsequent judgment of the performance of the front-end application in the current environment and formulating targeted optimization strategies.
[0071] S53. Analyze the first optimization strategy to be executed to obtain the front-end performance parameters to be optimized.
[0072] S54. According to the hardware performance score, network environment score, and the pre-set optimization parameter adjustment rules, adjust the data of the front-end performance parameters to be optimized to obtain the second optimization strategy to be executed.
[0073] For example, in the medical field, an online medical diagnosis system originally planned to execute the first optimization strategy of improving the resolution of image transmission to assist doctors in more accurate diagnosis for the convenience of patients in remote areas. After analyzing the device operation environment data, it was found that the local area uses old mobile devices with poor processor performance and small memory, and the network is an unstable 4G network. The calculated hardware performance score is 45 points and the network environment score is 55 points. In view of this, according to the pre-set rules, the front-end performance parameters to be optimized (image resolution, transmission frame rate) are adjusted. Considering the limitations of the device and the network, the image resolution is reduced from high resolution to medium resolution, and the transmission frame rate is also appropriately reduced. Finally, the second optimization strategy to be executed is obtained. Although the image quality has decreased to a certain extent compared with the original plan, it can stably transmit images under the existing conditions and ensure the development of remote diagnosis services.
[0074] For example, in the financial field, a securities trading client plans to implement the first optimization strategy to be executed, that is, to increase the frequency of market data push so that investors can keep abreast of market dynamics in a timely manner. After analyzing the operation environment of investors' devices, it is found that some ordinary investors use mobile devices with ordinary configurations and are often in an unstable WIFI environment in public places. The hardware performance score is 40 points and the network environment score is 35 points. According to the optimization parameter adjustment rules, the front-end performance parameter to be optimized (data push interval) is adjusted. Due to the poor device and network, if data is pushed at a high frequency as originally planned, the client is likely to freeze or even crash. Therefore, the data push interval is extended from the original 1 second to 5 seconds, and the second optimization strategy to be executed is obtained. While ensuring the stable operation of the client, it can also enable investors to obtain the necessary market information.
[0075] Among them, through the above steps S51 to S54, by parsing and evaluating the device operation environment data, the hardware and network conditions are quantified. Combining the parameters to be optimized parsed from the first optimization strategy to be executed, targeted adjustments are made according to preset rules, thereby generating the second optimization strategy to be executed adapted to the actual environment. This avoids the disconnection between the optimization strategy and the actual environment, ensures that the strategy not only conforms to the device performance and network conditions, but also can maximize the improvement of the front-end performance. In practical application examples, whether it is an online diagnosis system in the medical field or a securities trading client in the financial field, this series of steps can avoid formulating unrealistic optimization strategies without considering the actual situation of the device and network, reducing resource waste. At the same time, adjusting the optimization parameters according to the actual situation can enable the front-end application to achieve the best performance under the existing device and network conditions, improving the user experience and ensuring the stable operation of the business.
[0076] S6. Match different optimization strategy execution tools according to the second optimization strategy to be executed, convert the second optimization strategy to be executed into an optimization strategy automatic execution instruction, and use the optimization strategy execution tool to execute the optimization strategy automatic execution instruction.
[0077] As an optional implementation manner, please continue to refer to Figure 7 , Figure 7 which is a schematic diagram of the execution process for obtaining the optimization strategy automatic execution instruction in the front-end performance intelligent optimization method provided by the embodiments of the present application. As shown in Figure 7 , it includes the following steps S61 to S63.
[0078] S61. According to the second optimization strategy to be executed, match the corresponding target front-end optimization tool from the preset optimization tool library.
[0079] S62. Split the second optimization strategy to be executed into sub-optimization strategies to be executed corresponding to different target front-end optimization tools.
[0080] S63. Convert different sub-optimization strategies to be executed into optimization strategy automatic execution instructions executable by different target front-end optimization tools.
[0081] Among them, through the above steps S61 to S63, by matching appropriate optimization tools, splitting the strategy and converting it into an automatic execution instruction, users can achieve automatic optimization of the front-end performance according to specific requirements. In different scenarios such as medical and financial fields, users can flexibly configure the tool parameters to let the tool automatically complete the optimization task, which not only improves the accuracy and efficiency of the optimization, but also reduces the risks and costs brought by manual intervention. The automatic optimization method makes the front-end performance optimization more intelligent and efficient.
[0082] In addition, in order to enable users to easily solve front-end performance problems, the embodiments of the present application provide a very convenient "one-click optimization" function. Users do not need to deeply understand complex optimization technologies and operation processes. They only need to click a button, and the pre-configured optimization strategies and tools will be automatically called to comprehensively process the identified resources that need to be optimized. For example, for image resources, the system will automatically compress and convert the format to minimize the file size as much as possible while ensuring the visual effect; for code files, code compression, merging, and optimization will be performed to remove redundant code and improve the execution efficiency of the code. On the second hand, the system also provides interactive optimization guidance to assist users in deeply understanding the sources and impacts of performance problems. The key performance indicators and potential problems of front-end performance are presented in intuitive forms such as charts and graphs. For example, the loading time distribution of each resource during the page loading process is shown through a timeline chart, allowing users to directly see which resources take too long to load; a heat map is used to display the performance bottlenecks in different areas of the page, and the darker the color, the more serious the performance problem in that area. In addition, the system will also provide comparison charts before and after optimization, which will detail the changes in various performance indicators before and after optimization, such as page loading time, resource occupancy rate, response speed, etc. Through intuitive comparison, users can clearly see the actual effects brought by optimization, so as to better evaluate the effectiveness of optimization strategies.
[0083] The front-end performance intelligent optimization method provided by the embodiments of the present application can accurately capture performance problems in the actual usage scenarios of users by using the pre-integrated monitoring script to obtain front-end user interaction behavior data in real time, making the performance data more accurate, timely discovering potential performance bottlenecks, and providing a reliable basis for subsequent optimization. The pre-trained machine learning model analyzes the interaction behavior and performance bottleneck prediction data, and the optimization strategy generation engine automatically generates and validates optimization strategies, and can also match tools to convert the strategies into automatic execution instructions. The whole process reduces manual operations and dependence on professional knowledge, greatly improves the tuning efficiency, and makes front-end performance optimization efficient and convenient. By obtaining the device running environment data of front-end users to optimize the to-be-executed strategies, the system can provide the best performance under different hardware devices and network conditions, ensuring the consistency of user experience. No matter what device the user uses and what network environment they are in, they can enjoy smooth front-end services. In addition, it shows the resources that need to be optimized and their impacts in an intuitive way, provides a "one-click optimization" function and interactive optimization guidance, simplifies the performance optimization suggestions, and non-professional users can easily understand and implement performance tuning, expanding the scope of application of the system and enabling more people to benefit from the improvement of front-end performance.
[0084] Please continue to refer to Figure 8 , Figure 8 which is the system structure schematic diagram of the front-end performance intelligent optimization device provided by the embodiments of the present application, as Figure 8As shown in the figure, the front-end performance intelligent optimization device 80 includes: an interaction behavior data acquisition module 81, a performance bottleneck analysis data module 82, a performance bottleneck correlation factor module 83, a first optimization strategy module 84, a second optimization strategy module 85, and a strategy automatic execution module 86.
[0085] The interaction behavior data acquisition module 81 is used to obtain the interaction behavior data of front-end users in real time through a monitoring script pre-integrated in the target front-end application.
[0086] The performance bottleneck analysis data module 82 is used to analyze the interaction behavior data using a pre-trained first machine learning model to obtain first performance bottleneck prediction data.
[0087] The performance bottleneck correlation factor module 83 is used to analyze the first performance bottleneck prediction data using a preset second machine learning model to obtain first performance bottleneck correlation factor data.
[0088] The first optimization strategy module 84 is used to generate and verify optimization strategies in sequence according to the first performance bottleneck correlation factor data through a preset optimization strategy generation engine to obtain a first optimization strategy to be executed.
[0089] The second optimization strategy module 85 is used to obtain the device operation environment data of front-end users and optimize the first optimization strategy to be executed according to the device operation environment data to obtain a second optimization strategy to be executed.
[0090] The strategy automatic execution module 86 is used to match different optimization strategy execution tools according to the second optimization strategy to be executed, convert the second optimization strategy to be executed into an optimization strategy automatic execution instruction, and use the optimization strategy execution tool to execute the optimization strategy automatic execution instruction.
[0091] As an optional implementation manner, the interaction behavior data acquisition module 81 is further specifically used to cluster the acquired interaction behavior data to obtain interaction behavior clustering result data; when there is a first interaction behavior clustering with an interaction frequency greater than a preset first interaction frequency in the interaction behavior clustering result data, reduce the acquisition time interval of the interaction behavior data corresponding to the first interaction behavior clustering in the monitoring script; when there is a second interaction behavior clustering with an interaction frequency less than a preset second interaction frequency in the interaction behavior clustering result data, increase the acquisition time interval of the interaction behavior data corresponding to the second interaction behavior clustering in the monitoring script.
[0092] As an alternative implementation, the performance bottleneck analysis data module 82 is specifically configured to perform data preprocessing operations of format conversion, missing value and outlier processing, and normalization on the interaction behavior data in sequence to obtain interaction behavior data to be analyzed; extract first interaction behavior feature data from the interaction behavior data to be analyzed, and process the first interaction behavior feature data through a preset classification prediction model to obtain the first performance bottleneck prediction data; combine the interaction behavior data and the first performance bottleneck prediction data into a first model optimization data pair, and use the first model optimization data pair to optimize the first machine learning model.
[0093] As an alternative implementation, the performance bottleneck correlation factor module 83 is specifically configured to analyze the first performance bottleneck prediction data to obtain first dependent variable data, and match the first independent variable data corresponding to the first dependent variable data from a preset front-end performance optimization variable library, where the second machine learning model is a regression model; send the first dependent variable data and the first independent variable data to the regression model, and calculate a first regression coefficient through the least squares method preset in the regression model; perform a significance test calculation on the first regression coefficient to obtain a coefficient probability value corresponding to the first regression coefficient; traverse the coefficient probability values, and if the traversed coefficient probability value is greater than a preset coefficient probability threshold, set the first independent variable data corresponding to the traversed coefficient probability value as the first performance bottleneck correlation factor data.
[0094] As an alternative implementation, the first optimization strategy module 84 is specifically configured to use the first performance bottleneck correlation factor data to search a preset front-end performance optimization knowledge base in the optimization strategy generation engine to obtain first front-end optimization factor data; generate at least one first front-end performance optimization strategy according to the first front-end optimization factor data and preset front-end performance optimization rules; calculate a front-end performance optimization prediction score for each of the first front-end performance optimization strategies according to historical optimization record data corresponding to the first front-end optimization factor data; set the first front-end performance optimization strategy corresponding to the maximum front-end performance optimization prediction score as the front-end performance optimization strategy to be verified; execute the front-end performance optimization strategy to be verified in a preset optimization strategy verification virtual environment, and calculate a corresponding front-end performance optimization simulation score; if the front-end performance optimization simulation score is greater than a preset front-end performance optimization simulation score threshold, set the front-end performance optimization strategy to be verified as the first optimization strategy to be executed.
[0095] As an alternative implementation, the second optimization strategy module 85 is specifically configured to parse the device operating environment data to obtain the hardware device data and network environment data corresponding to the target front-end application; calculate the corresponding hardware performance score and network environment score according to the hardware device performance data and the network environment data; parse the first to-be-executed optimization strategy to obtain the front-end performance parameters to be optimized; and adjust the data of the front-end performance parameters to be optimized according to the hardware performance score, the network environment score, and a preset optimization parameter adjustment rule to obtain the second to-be-executed optimization strategy.
[0096] As an alternative implementation, the policy automatic execution module 86 is specifically configured to match a corresponding target front-end optimization tool from a preset optimization tool library according to the second to-be-executed optimization strategy; split the second to-be-executed optimization strategy into to-be-executed optimization sub-strategies corresponding to different target front-end optimization tools; and convert different to-be-executed optimization sub-strategies into optimization strategy automatic execution instructions executable by different target front-end optimization tools.
[0097] It should be noted that the above front-end performance intelligent optimization device can execute the front-end performance intelligent optimization method provided in the embodiments of the present application, and has functional modules and beneficial effects corresponding to the execution of the method. For technical details not described in detail in the embodiments of the front-end performance intelligent optimization device, reference may be made to the front-end performance intelligent optimization method provided in the embodiments of the present application.
[0098] Please continue to refer to Figure 9 , Figure 9 which is a schematic hardware structure diagram of an electronic device for executing the front-end performance intelligent optimization method provided in the embodiments of the present application. As shown in Figure 9 the electronic device 900 includes:
[0099] One or more processors 910 and a memory 920. Figure 9 Here, one processor 910 is taken as an example.
[0100] The processor 910 and the memory 920 can be connected through a bus or other means. Figure 9 Here, the connection through a bus is taken as an example.
[0101] The memory 920, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions / modules corresponding to the front-end performance intelligent optimization method in the embodiments of the present application. The processor 910 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 920, that is, implements the front-end performance intelligent optimization method in the above method embodiments.
[0102] The memory 920 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the front-end performance intelligent optimization device, etc. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 920 may optionally include a memory remotely provided with respect to the processor 910, and these remote memories may be connected to the front-end performance intelligent optimization device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0103] The one or more modules are stored in the memory 920 and, when executed by the one or more processors 910, perform the front-end performance intelligent optimization method in any of the above method embodiments. For example, perform the Figure 2 method steps S1 to S6 in the above description, Figure 3 method steps S21 to S23 in the above description, Figure 4 method steps S31 to S34 in the above description, Figure 5 method steps S41 to S46 in the above description, Figure 6 method steps S51 to S54 in the above description, Figure 7 method steps S61 to S63 in the above description, to implement Figure 8 the functions of the modules 81-86 in the above description.
[0104] The above product can execute the method provided in the embodiments of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, reference may be made to the method provided in the embodiments of the present application.
[0105] The embodiments of the present application provide a non-volatile computer-readable storage medium storing computer-executable instructions, which when executed by one or more processors, such as Figure 9 one of the processors 910 above, can enable the above one or more processors to execute the front-end performance intelligent optimization method in any of the above method embodiments. For example, perform the Figure 2 method steps S1 to S6 in the above description, Figure 3 method steps S21 to S23 in the above description, Figure 4 method steps S31 to S34 in the above description, Figure 5 method steps S41 to S46 in the above description, Figure 6 method steps S51 to S54 in the above description, Figure 7 method steps S61 to S63 in the above description, to implementFigure 8 Functions of the modules 81-86 in
[0106] The embodiments of the present application provide a computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by the electronic device, enabling the electronic device to execute the front-end performance intelligent optimization method in any of the above method embodiments, for example, executing the Figure 2 method steps S1 to S6 in Figure 3 method steps S21 to S23 in Figure 4 method steps S31 to S34 in Figure 5 method steps S41 to S46 in Figure 6 method steps S51 to S54 in Figure 7 method steps S61 to S63 in Figure 8 to implement the functions of the modules 81-86 in
[0107] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] Through the description of the above embodiments, those of ordinary skill in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, and the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above. For the sake of brevity, they are not provided in detail; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An intelligent optimization method for front-end performance, characterized in that, Including: Real-time obtaining the interaction behavior data of front-end users through a monitoring script pre-integrated in the target front-end application; Using a pre-trained first machine learning model to analyze the interaction behavior data to obtain first performance bottleneck prediction data; Using a preset second machine learning model to analyze the first performance bottleneck prediction data to obtain first performance bottleneck correlation factor data; Generating an optimization strategy and validating the optimization strategy in sequence by a preset optimization strategy generation engine according to the first performance bottleneck correlation factor data to obtain a first optimization strategy to be executed; Obtaining the device running environment data of front-end users, and optimizing the first optimization strategy to be executed according to the device running environment data to obtain a second optimization strategy to be executed; Matching different optimization strategy execution tools according to the second optimization strategy to be executed, converting the second optimization strategy to be executed into an optimization strategy automatic execution instruction, and using the optimization strategy execution tool to execute the optimization strategy automatic execution instruction.
2. The intelligent optimization method for front-end performance according to claim 1, wherein After the step of real-time obtaining the interaction behavior data of front-end users through a monitoring script pre-integrated in the target front-end application, including: Clustering the obtained interaction behavior data to obtain interaction behavior clustering result data; When there is a first interaction behavior clustering with an interaction frequency greater than a preset first interaction frequency in the interaction behavior clustering result data, reducing the acquisition time interval of the interaction behavior data corresponding to the first interaction behavior clustering in the monitoring script; When there is a second interaction behavior clustering with an interaction frequency less than a preset second interaction frequency in the interaction behavior clustering result data, increasing the acquisition time interval of the interaction behavior data corresponding to the second interaction behavior clustering in the monitoring script.
3. The intelligent optimization method for front-end performance according to claim 1, wherein The step of using a pre-trained first machine learning model to analyze the interaction behavior data to obtain first performance bottleneck prediction data includes: Performing data preprocessing operations of format conversion, missing value and outlier processing, and normalization on the interaction behavior data in sequence to obtain interaction behavior data to be analyzed; Extracting first interaction behavior feature data from the interaction behavior data to be analyzed, and processing the first interaction behavior feature data through a preset classification prediction model to obtain the first performance bottleneck prediction data; Combining the interaction behavior data and the first performance bottleneck prediction data group into a first model optimization data pair, and using the first model optimization data pair to optimize the first machine learning model.
4. The front-end performance intelligent optimization method according to claim 1, wherein The step of using a preset second machine learning model to analyze the first performance bottleneck prediction data to obtain first performance bottleneck correlation factor data includes: Parsing the first performance bottleneck prediction data to obtain first dependent variable data, and matching the first independent variable data corresponding to the first dependent variable data from a preset front-end performance optimization variable library, where the second machine learning model is a regression model; Sending the first dependent variable data and the first independent variable data to the regression model, and calculating a first regression coefficient through the preset least squares method in the regression model; Performing a significance test calculation on the first regression coefficient to obtain a coefficient probability value corresponding to the first regression coefficient; Traverse the coefficient probability values. If the traversed coefficient probability value is greater than the preset coefficient probability threshold, set the first independent variable data corresponding to the traversed coefficient probability value as the first performance bottleneck associated factor data.
5. The intelligent optimization method for front-end performance according to claim 1, wherein The step of generating and verifying an optimization strategy in sequence by the preset optimization strategy generation engine according to the first performance bottleneck associated factor data to obtain the first optimization strategy to be executed includes: Use the first performance bottleneck associated factor data to search the preset front-end performance optimization knowledge base in the optimization strategy generation engine to obtain the first front-end optimization factor data; Generate at least one first front-end performance optimization strategy according to the first front-end optimization factor data and the preset front-end performance optimization rules; Calculate the front-end performance optimization prediction score of each first front-end performance optimization strategy according to the historical optimization record data corresponding to the first front-end optimization factor data; Set the first front-end performance optimization strategy corresponding to the maximum front-end performance optimization prediction score as the front-end performance optimization strategy to be verified; Execute the front-end performance optimization strategy to be verified in the preset optimization strategy verification virtual environment and calculate the corresponding front-end performance optimization simulation score; If the front-end performance optimization simulation score is greater than the preset front-end performance optimization simulation score threshold, set the front-end performance optimization strategy to be verified as the first optimization strategy to be executed.
6. The front-end performance intelligent optimization method according to claim 1, wherein The step of obtaining the device operating environment data of the front-end user and optimizing the first optimization strategy to be executed according to the device operating environment data to obtain the second optimization strategy to be executed includes: Parse the device operating environment data to obtain the hardware device data and network environment data corresponding to the target front-end application; Calculate the corresponding hardware performance score and network environment score according to the hardware device performance data and the network environment data; Parse the first optimization strategy to be executed to obtain the front-end performance parameters to be optimized; Adjust the data of the front-end performance parameters to be optimized according to the hardware performance score, the network environment score, and the preset optimization parameter adjustment rules to obtain the second optimization strategy to be executed.
7. The intelligent optimization method for front-end performance according to claim 1, wherein The step of matching different optimization strategy execution tools according to the second optimization strategy to be executed and converting the second optimization strategy to be executed into an optimization strategy automatic execution instruction includes: Match the corresponding target front-end optimization tool from the preset optimization tool library according to the second optimization strategy to be executed; Split the second optimization strategy to be executed into sub-optimization strategies to be executed corresponding to different target front-end optimization tools; Convert different sub-optimization strategies to be executed into optimization strategy automatic execution instructions executable by different target front-end optimization tools.
8. An intelligent front-end performance optimization device, characterized in that, Includes: An interaction behavior data acquisition module for real-time acquisition of the interaction behavior data of the front-end user through a monitoring script pre-integrated in the target front-end application; A performance bottleneck analysis data module for analyzing the interaction behavior data using a pre-trained first machine learning model to obtain first performance bottleneck prediction data; A performance bottleneck correlation factor module, configured to analyze the first performance bottleneck prediction data by using a preset second machine learning model to obtain first performance bottleneck correlation factor data; A first optimization strategy module, configured to generate and verify an optimization strategy in sequence according to the first performance bottleneck correlation factor data by using a preset optimization strategy generation engine to obtain a first to-be-executed optimization strategy; A second optimization strategy module, configured to obtain device operation environment data of a front-end user, and optimize the first to-be-executed optimization strategy according to the device operation environment data to obtain a second to-be-executed optimization strategy; A strategy automatic execution module, configured to match different optimization strategy execution tools according to the second to-be-executed optimization strategy, convert the second to-be-executed optimization strategy into an optimization strategy automatic execution instruction, and use the optimization strategy execution tool to execute the optimization strategy automatic execution instruction.
9. An electronic device, characterized in that, Comprising: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the front-end performance intelligent optimization method according to any one of claims 1-7.
10. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device executes the front-end performance intelligent optimization method according to any one of claims 1-7.
Citation Information
Cited By
Resource level detection method and device of third-party script, equipment and storage medium
CN121637188A