CN117762421A - Web front-end performance optimization method and system based on meta learning - Google Patents

Web front-end performance optimization method and system based on meta learning Download PDF

Info

Publication number
CN117762421A
CN117762421A CN202311805824.1A CN202311805824A CN117762421A CN 117762421 A CN117762421 A CN 117762421A CN 202311805824 A CN202311805824 A CN 202311805824A CN 117762421 A CN117762421 A CN 117762421A
Authority
CN
China
Prior art keywords
optimization
performance
performance data
data
learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311805824.1A
Other languages
Chinese (zh)
Inventor
袁赟
马思峻
郑荣
陈国润
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Ideal Information Industry Group Co Ltd
Original Assignee
Shanghai Ideal Information Industry Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Ideal Information Industry Group Co Ltd filed Critical Shanghai Ideal Information Industry Group Co Ltd
Priority to CN202311805824.1A priority Critical patent/CN117762421A/en
Publication of CN117762421A publication Critical patent/CN117762421A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The web front-end performance optimization method and system based on meta-learning are provided, and the performance data at least comprises dynamic performance data and static performance data by acquiring the web front-end performance data; extracting features of the performance data to obtain an input feature vector, wherein the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors; inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end; executing an optimization strategy and acquiring feedback evaluation of a user; when the feedback evaluation meets the preset condition, the optimization strategy is used as a target optimization strategy, and when the feedback evaluation is not more than the preset condition, the optimization strategy is updated, and the method provided by the invention not only reduces the technical pressure of a developer, reduces the complexity and time consumption of the optimization work, but also greatly reduces the uncertainty of the optimization effect.

Description

Web front-end performance optimization method and system based on meta learning
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a web front-end performance optimization method and system based on meta learning.
Background
With the continuous development of Web technologies, front-end technology has become an important part of Web application development. However, as user expectations for Web application response speed and operating efficiency continue to rise, front-end performance optimization becomes increasingly important. While developers can employ various techniques to optimize front-end performance, such as code compression, picture optimization, use of CDNs, reduction of HTTP requests, etc., these all require a developer to have a great deal of experience and technical knowledge. In addition, because the characteristics of each Web application are different, one optimization scheme may be significant on one application and may not be significant on another application.
In addition, front-end performance optimization is a complex task that requires consideration of many factors, including network bandwidth, server performance, browser performance, user device performance, etc. This makes manual optimization time consuming and complex. Current solutions are mostly optimized based on fixed rules and experiences, which may not be applicable to all Web applications.
Many solutions have been proposed in the industry to address the above problems. For example, performance optimization using automation tools, load balancing using cloud services, or employing more highly configured hardware. However, these methods have drawbacks. Automated tools often can only be optimized for some common problems, and cannot handle complex or specific performance problems. Load balancing using cloud services increases operational complexity and also increases cost. While the use of higher-configured hardware is not universal, the key to the problem sometimes lies in the optimization of the software itself.
Disclosure of Invention
In view of the foregoing problems of the prior art, it is an object of the present invention to provide a web front-end performance optimization method and system based on meta-learning, so as to improve efficiency of web front-end performance optimization.
In order to solve the technical problems, the specific technical scheme is as follows:
in one aspect, provided herein is a method of web front-end performance optimization based on meta-learning, the method comprising:
acquiring web front-end performance data, wherein the performance data at least comprises dynamic performance data and static performance data;
extracting features of the performance data to obtain an input feature vector, wherein the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors;
inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end;
executing the optimization strategy and acquiring feedback evaluation of a user;
and when the feedback evaluation meets the preset condition, taking the optimization strategy as a target optimization strategy, and when the feedback evaluation is not satisfied with the preset condition, updating the optimization strategy.
Further, obtaining web front end performance data includes:
constructing a static performance data acquisition program based on a Lighthouse framework;
and constructing a dynamic data acquisition program based on the Agent probe.
Further, the construction of the Agent probe-based dynamic data acquisition program comprises the following steps:
packaging Navigation Timing Api a self-defined monitoring event into a web front-end code segment to obtain first dynamic performance data, wherein the first dynamic performance data at least comprises page loading time, screen rendering time and user interaction delay;
the network request callback function is rewritten to obtain the network request callback time.
Further, performing feature extraction on the performance data to obtain an input feature vector, including:
clustering the performance data according to a preset clustering method, and removing abnormal data to obtain updated performance data;
converting the updated performance data into text data;
respectively obtaining a position vector representation, a paragraph vector representation and a word sense vector representation of each text data according to a Bert-Transform-FC data extraction model;
and performing splicing processing on the position vector representation, the paragraph vector representation and the word sense vector representation to obtain the input feature vector.
Further, the performance optimization model based on meta learning is obtained through training:
acquiring historical performance data of a web front end and corresponding performance labels to form a training set;
initializing performance optimization model parameters based on meta-learning;
the training set is brought into an initialized performance optimization model based on meta learning, and loss is calculated through a preset loss function;
and according to the loss obtained by calculation, updating the parameters of the performance optimization model by combining the self-adaptive gradient descent, and obtaining the final converged performance optimization model based on meta-learning.
Further, the parameters of the performance optimization model are updated according to the following rules:
wherein Parameter indicates Parameter, renewal indicates that update is needed, not update indicates that update is not needed, and change indicates Parameter continuous update times.
Further, the preset loss function is:
wherein,indicating the predicted result, y indicating the true result, sin indicating the sin function, eval indicating the loss function result.
Further, executing the optimization strategy, and acquiring feedback evaluation of the user, including:
the evaluation popup window is fed back to the user and/or according to the operation behavior information of the user, so that the feedback evaluation of the user is obtained;
and adjusting the performance optimization strategy based on meta learning according to the feedback evaluation to obtain an adjusted model.
In another aspect, there is provided herein a web front-end performance optimization apparatus based on meta-learning, the apparatus comprising:
the data acquisition module is used for acquiring web front-end performance data, wherein the performance data at least comprises dynamic performance data and static performance data;
the feature vector obtaining module is used for carrying out feature extraction on the performance data to obtain an input feature vector, and the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors;
the optimization module is used for inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end;
the feedback module is used for executing the optimization strategy and acquiring feedback evaluation of the user;
and the feedback processing module is used for taking the optimization strategy as a target optimization strategy when the feedback evaluation meets a preset condition, and updating the optimization strategy when the feedback evaluation is not satisfied with the preset condition.
Finally, there is also provided a computer system comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method as described above when executing the computer program.
By adopting the technical scheme, the web front-end performance optimization method and the web front-end performance optimization system based on meta-learning at least comprise dynamic performance data and static performance data by acquiring the web front-end performance data; extracting features of the performance data to obtain an input feature vector, wherein the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors; inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end; executing the optimization strategy and acquiring feedback evaluation of a user; when the feedback evaluation meets the preset condition, the optimization strategy is used as a target optimization strategy, and when the feedback evaluation is not satisfied with the preset condition, the optimization strategy is updated, and compared with the traditional optimization method based on fixed rules and experience, the optimization method provided by the invention has more remarkable optimization effect and stronger adaptability. The optimization scheme automatically generated by the system not only reduces the technical pressure of a developer and reduces the complexity and time consumption of the optimization work, but also greatly reduces the uncertainty of the optimization effect.
The foregoing and other objects, features and advantages will be apparent from the following more particular description of preferred embodiments, as illustrated in the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments herein or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments herein and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 illustrates a schematic step diagram of a web front-end performance optimization method based on meta-learning provided by embodiments herein;
FIG. 2 illustrates a schematic frame of a method provided by embodiments herein;
FIG. 3 is a schematic diagram of a web front-end performance optimization apparatus based on meta-learning according to an embodiment of the present disclosure;
FIG. 4 shows a schematic diagram of a computer system provided by embodiments herein.
Description of the drawings:
310. a data acquisition module; 320. a feature vector obtaining module; 330. an optimization module; 340. a feedback module; 350. and a feedback processing module.
Detailed Description
The following description of the embodiments of the present disclosure will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the disclosure. All other embodiments, based on the embodiments herein, which a person of ordinary skill in the art would obtain without undue burden, are within the scope of protection herein.
It should be noted that the terms "first," "second," and the like in the description and claims herein and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or device.
First, the terms herein are explained as follows:
FEO (Front-End Optimization), a series of strategies and techniques aimed at reducing the loading time of Web applications, including but not limited to reducing HTTP requests, using CDN, optimizing the compression of pictures and CSS/JS, etc.
The Web Front-end performance optimization (Web Front-end Performance Optimization) refers to a process of improving the loading speed, the running speed and the response speed of Web application by technical means and strategies, so that better user experience is provided.
In the prior art, front-end performance optimization is a complex task, and many factors need to be considered, including network bandwidth, server performance, browser performance, user equipment performance, and the like. This makes manual optimization time consuming and complex. Current solutions are mostly optimized based on fixed rules and experiences, which may not be applicable to all Web applications.
In order to solve the above problems, embodiments herein provide a web front-end performance optimization method based on meta-learning, which can improve efficiency of web front-end performance optimization. FIG. 1 is a schematic diagram of the steps of a web front end performance optimization method based on meta-learning provided by embodiments herein, which provides the method operational steps described in the examples or flowcharts, but may include more or fewer operational steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When a system or apparatus product in practice is executed, it may be executed sequentially or in parallel according to the method shown in the embodiments or the drawings. As shown in fig. 1, the method may include:
s101: acquiring web front-end performance data, wherein the performance data at least comprises dynamic performance data and static performance data;
s102: extracting features of the performance data to obtain an input feature vector, wherein the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors;
s103: inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end;
s104: executing the optimization strategy and acquiring feedback evaluation of a user;
s105: and when the feedback evaluation meets the preset condition, taking the optimization strategy as a target optimization strategy, and when the feedback evaluation is not satisfied with the preset condition, updating the optimization strategy.
It can be understood that, in the embodiment of the present disclosure, by using learning capability of meta learning, a customized optimization scheme can be provided for specific characteristics of each Web application, and compared with a conventional optimization method based on fixed rules and experience, the optimization method has more remarkable optimization effect and stronger adaptability. The optimization scheme automatically generated by the system not only reduces the technical pressure of a developer and reduces the complexity and time consumption of the optimization work, but also greatly reduces the uncertainty of the optimization effect. In addition, the system not only can adapt to the current Web application program, but also has good expansibility, can continuously optimize along with the development of Web technology, and meets the future higher performance requirements. Thus, the front end performance optimization tool/system of the present application has significant advantages and effects over the prior art.
Fig. 2 is a schematic diagram of the method.
In an embodiment of the present disclosure, acquiring web front end performance data includes:
constructing a static performance data acquisition program based on a Lighthouse framework;
and constructing a dynamic data acquisition program based on the Agent probe.
Further, the construction of the Agent probe-based dynamic data acquisition program comprises the following steps:
packaging Navigation Timing Api a self-defined monitoring event into a web front-end code segment to obtain first dynamic performance data, wherein the first dynamic performance data at least comprises page loading time, screen rendering time and user interaction delay;
the network request callback function is rewritten to obtain the network request callback time.
It will be appreciated that the real-time data collection is performed herein by probes, which are pieces of code deployed at the front end, whose function is to monitor and collect various real-time performance information of the page. Static Web data is acquired through a Lighthouse tool, and the tool provides a performance index method for acquiring various aspects such as webpage loading speed, accessibility, search engine optimality and the like. Taking the example of obtaining the callback time of the network request, the process of rewriting may be: and rewriting a window. Fetch and window. Pro type. The method to obtain the fetch callback time. Specifically, a counter, thenCounter, is first defined for each of the then calls. It initializes to 0 and increases by 1 each time the then method is called once. For distinguishing between different then. Then, the original fetch is reserved, rewritten to orignalfatch, and the rewritten fetch method adds the requested URL to the response object after the response is acquired, and then returns the response. The purpose of this is to obtain the request URL in the subsequent then method. Then save the original method of the Prototype.the and rewrite, the then method after the rewrite receives the onFulfilled and onRejected two parameters, if onFulfilled is a function, then create a new newOnfullfilded function to calculate the execution time of the function, newOnfullfilded first obtains the current time and then execute the original onFulfilled function, because JavaScript is a single thread language, the asynchronous operation is processed by executing setTimeout (0) in the newOnfullfilded function, so that when all functions in the call stack are executed, the function code in setTimeout (0) in newOnfullfilded is executed, and then after the fetch request is obtained, the logic code in the function executes the time.
In an embodiment of the present disclosure, feature extraction is performed on the performance data to obtain an input feature vector, including:
clustering the performance data according to a preset clustering method, and removing abnormal data to obtain updated performance data;
converting the updated performance data into text data;
respectively obtaining word sense vector representation, position vector representation and paragraph vector representation of each text data according to a Bert-Transform-FC data extraction model;
and performing splicing processing on the position vector representation, the paragraph vector representation and the word sense vector representation to obtain the input feature vector.
It can be understood that, the abnormal data in the data can be removed through cluster analysis to improve the accuracy and reliability of the optimization strategy, and the specific clustering method is not limited in the embodiment of the present specification, further, the collected performance data can be subjected to text conversion, multi-dimensional vector extraction can be conveniently performed through text data, for example, word sense vector representation of the text data can be obtained through a Bert model, position vector representation of the text data can be obtained through a Transform model, paragraph vector representation of the text data can be obtained through an FC model, and corresponding features can be obtained through other algorithms, for example, a machine learning algorithm, a neural network model and the like.
After obtaining the word sense vector representation, the position vector representation, and the paragraph vector representation of each text, feature fusion may be performed, for example, a specific calculation formula may be extracted by the Bert-Transform-FC data:
input=concat(WeEmbedding+PeEmbedding+SeEmbedding)
wherein input represents the converted input data, assembled represents the original word vector, we represents the word sense vector, pe represents the position vector, se represents the paragraph vector, and concat represents the splice for splicing the converted vectors together.
According to the embodiment of the specification, the text conversion is carried out on the performance data, then the fusion is carried out from 3 angles to obtain the input vector, firstly, the word meaning of the extracted data is considered, secondly, the position of the data is considered, finally, the paragraph of the data is considered, 3 pieces of the data are combined together by using a concat function, and the word vector input is carried out by comprehensively considering a plurality of factors, so that the data information can be extracted to a greater degree.
For example, for the case of slow loading of web page data, it is necessary to extract key information as much as possible to predict whether it is network cause or slow loading of data due to the server.
In the embodiment of the present specification, the meta-learning-based performance optimization model is obtained through step training:
acquiring historical performance data of a web front end and corresponding performance labels to form a training set;
initializing performance optimization model parameters based on meta-learning;
the training set is brought into an initialized performance optimization model based on meta learning, and loss is calculated through a preset loss function;
and according to the loss obtained by calculation, updating the parameters of the performance optimization model by combining the self-adaptive gradient descent, and obtaining the final converged performance optimization model based on meta-learning.
The preset loss function is an evaluation function of the model, and may be the following formula:
wherein the method comprises the steps ofRepresenting the predicted result, y representing the true result, sin representing the sin function, eval representing the evaluation result.
Different from the prior art, the model evaluation formula proposed at this time is adjusted by calculating the difference between the true value and the predicted value and using a sin function, if the difference between the two data is too large, the data is converted into 1, if the difference between the two data is not large, the data is converted into-1, and finally, the evaluation effect of the model can be calculated by calculating the sum of the two data.
For example, there is a certain gap between the actual cause of the data anomaly and the prediction result, and the prediction accuracy of the current model can be obtained by using the formula proposed in this time.
Further, the embodiment of the specification can update the parameters of the model through Adam adaptive gradient descent, and can update rules during specific update by the following steps:
wherein Parameter indicates Parameter, renewal indicates that update is needed, not update indicates that update is not needed, and change indicates Parameter continuous update times.
In comparison with the prior art, the method and the device for controlling the parameter updating quantity are different from the prior art, the parameter updating is controlled in a mode that the parameter updating quantity is controlled, if one parameter is continuously updated for more than 5 times, the parameter updating is selected to be performed later, and if one parameter is continuously not updated for 3 times, the parameter updating is stopped, and the model training is faster through controlling the parameter updating quantity.
In the embodiment of the present specification, executing the optimization strategy and obtaining the feedback evaluation of the user includes:
the evaluation popup window is fed back to the user and/or according to the operation behavior information of the user, so that the feedback evaluation of the user is obtained;
and adjusting the performance optimization strategy based on meta learning according to the feedback evaluation to obtain an adjusted model.
It may be understood that, in the embodiment of the present disclosure, further optimization may be further performed on the model according to the reflection or evaluation of the user on the optimized web front end, so as to improve accuracy of model output, for example, an evaluation questionnaire may be output to a display interface of the user in a popup window form periodically or after each optimization, optionally, evaluation may be performed in dimensions such as smoothness of running of the optimized web page, or automatic evaluation may be performed by collecting browsing behaviors of the user, for example, behaviors such as page residence time, click rate, etc., and specific evaluation manners may be various, which are not further described in the embodiment of the present disclosure.
In the embodiment of the present disclosure, when the feedback evaluation satisfies a preset condition, the optimization strategy is taken as a target optimization strategy, and when the feedback evaluation is not satisfied with the preset condition, the optimization strategy is updated. The preset condition can be forward evaluation of the user or based on the behavior of the user
According to the embodiment of the specification, through introducing meta learning and deep learning technologies, automatic and intelligent webpage loading speed and resource consumption optimization are realized. The system collects performance data and resource consumption data, performs data processing and feature extraction by using a meta learning model and a deep learning method, performs parameter adjustment by using an adaptive gradient descent and other optimization algorithms, and then implements a performance optimization strategy including model deployment, model prediction and user feedback so as to continuously improve performance and user experience. The method and the device can adapt to different network conditions and user requirements, and bring innovative solutions to the field of webpage performance optimization.
On the basis of the above-mentioned providing method, the embodiment of the present disclosure further provides a web front-end performance optimization device based on meta-learning, as shown in fig. 3, where the device includes:
a data acquisition module 310, configured to acquire web front-end performance data, where the performance data includes at least dynamic performance data and static performance data;
the feature vector obtaining module 320 is configured to perform feature extraction on the performance data to obtain an input feature vector, where the input feature vector is obtained by splicing a word sense vector, a position vector and a paragraph vector;
the optimizing module 330 is configured to input the input feature vector into a performance optimizing model based on meta learning, so as to obtain an optimizing policy for the web front end;
the feedback module 340 is configured to execute the optimization strategy and obtain a feedback evaluation of the user;
and the feedback processing module 350 is configured to take the optimization strategy as a target optimization strategy when the feedback evaluation meets a preset condition, and update the optimization strategy when the feedback evaluation is not satisfied with the preset condition.
The beneficial effects obtained by the device are consistent with those obtained by the method, and the embodiments of the present disclosure are not repeated.
In some other embodiments of the present disclosure, a Web front-end performance optimization system based on meta-learning is further provided, which is specifically as follows:
performance monitoring module
The module is applied to Web front-end data acquisition. The method is mainly realized by introducing a performance monitoring Agent probe based on a Lighthouse or browser bottom layer API. The probe can collect and monitor performance indexes including page loading time, first screen rendering time, user interaction delay and the like in real time through the package Navigation Timing Api and the custom monitoring event. In addition, the embodiment modifies the underlying implementation of the fetch to collect the time of the network request callback and thereby monitor the code execution time. These collected performance data will be used for training of meta-learning algorithms and updating of optimization strategies.
(II) Performance optimization Module
The module is applied to the optimization of the performance of the Web front end. It learns and applies optimization strategies mainly through meta-learning algorithms. The optimization strategy learns from the historical performance data, and performs intelligent optimization on multiple dimensions such as adjustment of resource loading priority, concurrency management of network requests, optimization of DOM rendering and the like. In this way, the performance optimization module is able to generate personalized optimization strategies from historical performance data. The invention introduces the idea of meta learning and provides the innovation points of online meta learning: the model performs task learning and optimization after receiving the collected data samples, so that the model is better suitable for dynamic changes of data. In the aspect of code implementation, an intelligent and self-adaptive front-end performance optimization method is provided through a series of innovative steps of automatic clustering classification, data processing, bert-transform-FC data extraction, adam self-adaptive gradient descent, parameter updating proportion control, evaluation index optimization and the like.
Front-end performance optimization is a complex field, and meta-learning only gives performance optimization suggestions through collected data and past experience, and in practical application, performance optimization is needed to be carried out according to specific situations.
(III) user feedback module
The module is mainly responsible for collecting and processing user feedback and is used for evaluating the effect of the optimization strategy. User feedback may be derived directly from the user's ratings, or may be obtained by analyzing the user's behavior (e.g., page dwell time, click-through rate, etc.). These feedback will be used as input to the meta-learning algorithm for further optimization of performance.
(IV) policy update Module
The module is mainly responsible for updating the optimization strategy according to the results of the performance monitoring module and the user feedback module. Once the new policy is generated, the performance optimization module will optimize Web front-end performance using the new policy.
6. The present application has advantages and effects over the prior art.
By utilizing the strong learning capability of meta learning, a customized optimization scheme can be provided for the specific characteristics of each Web application program, and compared with the traditional optimization method based on fixed rules and experience, the optimization method has more remarkable optimization effect and stronger adaptability. The optimization scheme automatically generated by the system not only reduces the technical pressure of a developer and reduces the complexity and time consumption of the optimization work, but also greatly reduces the uncertainty of the optimization effect. Meanwhile, compared with an optimization scheme using cloud services and high-configuration hardware, the optimization method based on the software can effectively control cost while improving performance. In addition, the system not only can adapt to the current Web application program, but also has good expansibility, can continuously optimize along with the development of Web technology, and meets the future higher performance requirements. Thus, the front end performance optimization tool/system of the present application has significant advantages and effects over the prior art.
The embodiment provides a computer system, and an internal structure diagram thereof can be shown in fig. 4. The computer system includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer system is configured to provide computing and control capabilities. The memory of the computer system includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer system is used for communicating with an external terminal through a network connection.
Those skilled in the art will appreciate that the structures shown in FIG. 4 are block diagrams only and do not constitute a limitation of the computer device on which the present aspects apply, and that a particular computer device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer system is provided, including a memory having a computer program stored therein and a processor, which when executing the computer program performs the steps of the method embodiments described above.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random AccessMemory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
It should also be understood that in embodiments herein, the term "and/or" is merely one relationship that describes an associated object, meaning that three relationships may exist. For example, a and/or B may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the elements may be selected according to actual needs to achieve the objectives of the embodiments herein.
Specific examples are set forth herein to illustrate the principles and embodiments herein and are merely illustrative of the methods herein and their core ideas; also, as will be apparent to those of ordinary skill in the art in light of the teachings herein, many variations are possible in the specific embodiments and in the scope of use, and nothing in this specification should be construed as a limitation on the invention.

Claims (10)

1. A web front-end performance optimization method based on meta-learning, the method comprising:
acquiring web front-end performance data, wherein the performance data at least comprises dynamic performance data and static performance data;
extracting features of the performance data to obtain an input feature vector, wherein the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors;
inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end;
executing the optimization strategy and acquiring feedback evaluation of a user;
and when the feedback evaluation meets the preset condition, taking the optimization strategy as a target optimization strategy, and when the feedback evaluation is not satisfied with the preset condition, updating the optimization strategy.
2. The method of claim 1, wherein obtaining web front-end performance data comprises:
constructing a static performance data acquisition program based on a Lighthouse framework;
and constructing a dynamic data acquisition program based on the Agent probe.
3. The method of claim 2, wherein the constructing an Agent probe-based dynamic data acquisition program comprises:
packaging Navigation Timing Api a self-defined monitoring event into a web front-end code segment to obtain first dynamic performance data, wherein the first dynamic performance data at least comprises page loading time, screen rendering time and user interaction delay;
the network request callback function is rewritten to obtain the network request callback time.
4. The method of claim 1, wherein performing feature extraction on the performance data to obtain an input feature vector comprises:
clustering the performance data according to a preset clustering method, and removing abnormal data to obtain updated performance data;
converting the updated performance data into text data;
respectively obtaining word sense vector representation, position vector representation and paragraph vector representation of each text data according to a Bert-Transform-FC data extraction model;
and performing splicing processing on the position vector representation, the paragraph vector representation and the word sense vector representation to obtain the input feature vector.
5. The method according to claim 1, wherein the meta-learning based performance optimization model is obtained by training:
acquiring historical performance data of a web front end and corresponding performance labels to form a training set;
initializing performance optimization model parameters based on meta-learning;
the training set is brought into an initialized performance optimization model based on meta learning, and loss is calculated through a preset loss function;
and according to the loss obtained by calculation, updating the parameters of the performance optimization model by combining the self-adaptive gradient descent, and obtaining the final converged performance optimization model based on meta-learning.
6. The method of claim 5, wherein the parameters of the performance optimization model are updated according to the following rules:
wherein Parameter indicates Parameter, renewal indicates that update is needed, not update indicates that update is not needed, and change indicates Parameter continuous update times.
7. The method of claim 5, wherein the predetermined loss function is:
wherein,indicating the predicted result, y indicating the true result, sin indicating the sin function, eval indicating the loss function result.
8. The method of claim 1, wherein executing the optimization strategy and obtaining feedback evaluations of the user comprises:
the evaluation popup window is fed back to the user and/or according to the operation behavior information of the user, so that the feedback evaluation of the user is obtained;
and adjusting the performance optimization strategy based on meta learning according to the feedback evaluation to obtain an adjusted model.
9. A web front-end performance optimization apparatus based on meta-learning, the apparatus comprising:
the data acquisition module is used for acquiring web front-end performance data, wherein the performance data at least comprises dynamic performance data and static performance data;
the feature vector obtaining module is used for carrying out feature extraction on the performance data to obtain an input feature vector, and the input feature vector is obtained by splicing word sense vectors, position vectors and paragraph vectors;
the optimization module is used for inputting the input feature vector into a performance optimization model based on meta learning to obtain an optimization strategy aiming at the web front end;
the feedback module is used for executing the optimization strategy and acquiring feedback evaluation of the user;
and the feedback processing module is used for taking the optimization strategy as a target optimization strategy when the feedback evaluation meets a preset condition, and updating the optimization strategy when the feedback evaluation is not satisfied with the preset condition.
10. A computer system comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 8 when the computer program is executed.
CN202311805824.1A 2023-12-25 2023-12-25 Web front-end performance optimization method and system based on meta learning Pending CN117762421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311805824.1A CN117762421A (en) 2023-12-25 2023-12-25 Web front-end performance optimization method and system based on meta learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311805824.1A CN117762421A (en) 2023-12-25 2023-12-25 Web front-end performance optimization method and system based on meta learning

Publications (1)

Publication Number Publication Date
CN117762421A true CN117762421A (en) 2024-03-26

Family

ID=90312306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311805824.1A Pending CN117762421A (en) 2023-12-25 2023-12-25 Web front-end performance optimization method and system based on meta learning

Country Status (1)

Country Link
CN (1) CN117762421A (en)

Similar Documents

Publication Publication Date Title
US11386128B2 (en) Automatic feature learning from a relational database for predictive modelling
US11227188B2 (en) Computer system for building, training and productionizing machine learning models
US10360500B2 (en) Two-phase distributed neural network training system
AU2020385264B2 (en) Fusing multimodal data using recurrent neural networks
US20180203918A1 (en) Automatic feature extraction from a relational database
WO2019015631A1 (en) Method for generating combined features for machine learning samples and system
EP3493109A1 (en) System and methods for faster processor comparisons of visual graph features
JP2011198191A (en) Kernel regression system, method, and program
CN111930518B (en) Knowledge graph representation learning-oriented distributed framework construction method
US10956214B2 (en) Time frame bounded execution of computational algorithms
CN113037577B (en) Network traffic prediction method, device and computer readable storage medium
CN113094116B (en) Deep learning application cloud configuration recommendation method and system based on load characteristic analysis
US20130006888A1 (en) Autotagging Business Processes
WO2019104304A1 (en) Accelerated simulation setup process using prior knowledge extraction for problem matching
Prakash et al. Big data preprocessing for modern world: opportunities and challenges
CN113641525A (en) Variable exception recovery method, apparatus, medium, and computer program product
CN117762421A (en) Web front-end performance optimization method and system based on meta learning
CN109711555A (en) A kind of method and system of predetermined depth learning model single-wheel iteration time
Poornima et al. Prediction of Water Consumption Using Machine Learning Algorithm
US20220300821A1 (en) Hybrid model and architecture search for automated machine learning systems
CN117377951A (en) Advanced response processing in Web data collection
US11115440B2 (en) Dynamic threat intelligence detection and control system
KR102576226B1 (en) Caching system that can predict and resolve server overload through artificial intelligence algorithms
CN117539948B (en) Service data retrieval method and device based on deep neural network
US20240144052A1 (en) Automated decision optimization for maintenance of physical assets

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination