Page performance optimization method and device, equipment and storage medium
By calculating the target trigger probability of page events and constructing a topology graph, related components are identified and optimized. This solves the problem of low efficiency in manual event management in existing technologies, achieves fast and accurate page performance optimization, and improves user experience.
Patent Information
- Application Number
- CN202510966682.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-10-17
AI Technical Summary
Existing page performance optimization methods rely on manual event management, which is inefficient, slows down optimization, and results in a poor user experience.
By acquiring event and historical event data of the page within a preset time window, the target trigger probability of the event is calculated, the components associated with the event are identified, a topology graph is constructed, and the components are optimized based on the probability and the topology graph.
It enables fast and accurate page performance optimization, avoids incorrect optimization of important components, and improves user experience and overall page performance.
Smart Images

Figure CN120804451A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of page performance optimization, and particularly relates to a page performance optimization method, device, equipment and storage medium. BACKGROUND
[0002] In the current Internet era, user experience has become one of the key indicators for measuring the success of a Web application. Page performance directly affects user satisfaction, retention rate and conversion rate. In a large Vue single-page application, as the complexity of components increases, each second increase in page loading time may lead to a jump rate increase of more than 7%, and the frequent creation / destruction of dynamic components leads to the accumulation of unbound events.
[0003] The existing solution is usually to manually manage events, manually unbind or release optimization, but this way is very inefficient, seriously affecting the optimization speed and bringing bad experience to users. SUMMARY
[0004] Therefore, the present application provides a page performance optimization method, device, equipment and storage medium to solve the problem that the existing solution is usually to manually manage events, manually unbind or release optimization, but this way is very inefficient, seriously affecting the optimization speed and bringing bad experience to users.
[0005] To achieve the above purpose, the present scheme is as follows:
[0006] In a first aspect, a page performance optimization method comprises:
[0007] Obtaining various events triggered by a page within a preset time window and historical triggering event data of the page;
[0008] Calculating target triggering probabilities of various events based on the various events and the historical triggering event data;
[0009] For each type of event, identifying various components associated with the event in the page;
[0010] Constructing a topology graph corresponding to the event from the various components;
[0011] According to the target triggering probabilities of various events and the topology graph, releasing optimization is performed on various components associated with various events.
[0012] Preferably, the target triggering probabilities of various events are calculated based on the various events and the historical triggering event data, comprising:
[0013] For each type of event, calculating the total number of times of triggering of the event within the preset time window to calculate the triggering frequency;
[0014] calculate a historical triggering probability of the event type from the historical triggering event data;
[0015] obtain a current scene of the page, and assign weights to the triggering frequency and the historical triggering probability according to the current scene of the page;
[0016] weight and sum the triggering frequency and the historical triggering probability according to the respective weights to obtain a total probability score as a target triggering probability.
[0017] Preferably, the constructing of the topological graph corresponding to the event type by each of the components comprises:
[0018] obtain event attributes of the event type for the event type;
[0019] determine parent-child component relationships and / or sibling component relationships between each of the components according to the attributes;
[0020] obtain a triggering sequence when the page triggers events of various types within the preset time window;
[0021] construct a topological graph based on the parent-child component relationships and / or sibling component relationships and the triggering sequence between each of the components.
[0022] Preferably, the constructing of the topological graph based on the parent-child component relationships and / or sibling component relationships and the triggering sequence between each of the components comprises:
[0023] use each of the components as a node;
[0024] construct a component dependency chain using the parent-child component relationships and / or sibling component relationships between each of the components;
[0025] assign a direction to the component dependency chain according to the triggering sequence, so as to serve as a directed edge;
[0026] combine each of the nodes and each of the directed edges to form a topological graph.
[0027] Preferably, the releasing optimization of each of the components associated with each of the event types according to the target triggering probability of each of the event types and the topological graph comprises:
[0028] determine an event level of each of the event types according to the target triggering probability;
[0029] select a releasing optimization strategy according to the event level;
[0030] delineate a releasing optimization range from the topological graph according to the selected releasing optimization strategy;
[0031] determining each component to be optimized included in the release optimization range, so as to perform release optimization on each of the components to be optimized according to the release optimization strategy.
[0032] Preferably, the determining of the event level of each type of event according to the target trigger probability comprises:
[0033] For each type of event, comparing the target trigger probability of the type of event with a preset first trigger threshold and a second trigger threshold;
[0034] If the target trigger probability is not less than the first trigger threshold, determining that the event level of the type of event is high-frequency trigger;
[0035] If the target trigger probability is less than the first trigger threshold and not less than the second trigger threshold, determining that the event level of the type of event is medium-frequency trigger;
[0036] If the target trigger probability is less than the second trigger threshold, determining that the event level of the type of event is low-frequency trigger.
[0037] Preferably, the selecting of the release optimization strategy according to the event level comprises:
[0038] If the event level of the type of event is high-frequency trigger, selecting the least frequently used strategy;
[0039] If the event level of the type of event is medium-frequency trigger, selecting the timeout strategy;
[0040] If the event level of the type of event is low-frequency trigger, selecting the least frequently used history strategy.
[0041] In a second aspect, a page performance optimization apparatus comprises:
[0042] an acquisition module configured to acquire each type of event triggered by a page within a preset time window and historical trigger event data of the page;
[0043] a target trigger probability calculation module configured to calculate a target trigger probability of each type of event based on each type of event and the historical trigger event data;
[0044] an identification module configured to identify, for each type of event, each component associated with the type of event in the page;
[0045] a topology graph construction module configured to construct a topology graph corresponding to the type of event from each of the components;
[0046] a release optimization module configured to perform release optimization on each of the components associated with each type of event according to the target trigger probability of each type of event and the topology graph.
[0047] In a third aspect, a page performance optimization device includes a memory and a processor;
[0048] The memory is configured to store a program;
[0049] The processor is configured to execute the program to implement the steps of the page performance optimization method according to any one of the first aspect.
[0050] In a fourth aspect, a storage medium stores a computer program, which, when executed by a processor, implements the steps of the page performance optimization method according to any one of the first aspect.
[0051] From the above technical solution, the present application obtains various events triggered by a page within a preset time window and historical triggering event data of the page; calculates target triggering probabilities of various events based on the events and the historical triggering event data; identifies, for each type of event, various components associated with the event in the page; constructs a topology graph corresponding to the event from the various components; and performs release optimization on various components associated with each type of event according to the target triggering probabilities of various events and the topology graph. The present application cuts in from the triggering information of the page, analyzes the target triggering probabilities of various events based on the triggering events within the preset time window and the historical triggering event data, and can clearly understand the event triggering condition from the target triggering probabilities, so that dynamic optimization can be performed. The optimization of the event is based on the components, and the components associated with the event in the page are identified. Since the components are associated with each other, a topology graph corresponding to the event can be constructed from the various components. According to the target triggering probabilities and the topology graph, the various components associated with the event can be quickly released and optimized, the optimization accuracy can be improved, important components and components with high triggering probabilities can be prevented from being optimized, and the overall page operation can be affected. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.
[0053] Figure 1 An optional flowchart of a page performance optimization method provided by the embodiments of the present application;
[0054] Figure 2 A structural schematic diagram of a page performance optimization device provided by the embodiments of the present application;
[0055] Figure 3 A schematic diagram of the structure of a page performance optimization device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0057] In today's internet age, user experience has become a key indicator of web application success. Page performance directly impacts user satisfaction, retention, and conversion rates. In large-scale Vue single-page applications, as component complexity increases, every additional second of page load time can lead to a bounce rate increase of over 7%. Furthermore, the frequent creation and destruction of dynamic components leads to a buildup of unbound events.
[0058] The existing solution is usually to manually unbind or release the optimization through manual event management, but this method is very inefficient, seriously affects the optimization speed, and brings a bad experience to users.
[0059] To address the aforementioned shortcomings of the prior art, embodiments of the present invention provide a page performance optimization method that can be applied to various computer terminals or smart terminals. The method can be executed by a processor or server in the computer terminal or smart terminal. The present invention can be used in a wide variety of general-purpose or specialized computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, and distributed computing environments that include any of the above.
[0060] The method flow chart of the method is as follows Figure 1 As shown, specifically including:
[0061] S1: Acquire various events triggered by a page within a preset time window and historical triggering event data of the page.
[0062] Specifically, an event listener can be set for each type of event, and a unique fingerprint (Event Fingerprint) can be set for the event listener. The unique fingerprint includes the component path (such as UserProfile / EditButton), event type (click / scroll), trigger probability label, etc. MD5 can be used as the fingerprint generation algorithm, so that the anonymous function can be tracked through the unique fingerprint identification.
[0063] The preset time window is set to avoid full data collection, reduce performance analysis overhead, and reduce redundant monitoring.
[0064] S2: Calculate the target triggering probability of each type of event based on the events and historical triggering event data.
[0065] For each type of event, the target triggering probability of the event can be calculated from two aspects: one is to analyze its triggering situation within the preset time window, and the other is to analyze its triggering situation in the historical triggering event data. That is, one is the current triggering situation and the other is the historical triggering situation.
[0066] Therefore, the target triggering probability of each type of event can be accurately calculated by combining the triggering situations of the two aspects, not only based on historical data, but also not only based on current data, and both aspects are considered.
[0067] S3: For each type of event, identify each component associated with the event in the page.
[0068] In order to realize accurate dependency analysis and establish the mapping relationship between events and components, it directly affects the accuracy of subsequent topology construction and optimization strategy, ensuring that the optimization measures can accurately act on the key part affecting performance, rather than blind optimization of the entire page.
[0069] It can be understood that one type of event may directly or indirectly associate or affect multiple components. Because the association range needs to be clear, for one type of event, in one example, the components associated with it in the page include direct components, parent components, child components, and dependent components, which can represent buttons clicked by users, pop-ups where buttons are located, drop-down menus triggered by buttons, and data query modules called by buttons.
[0070] In addition, it can also be analyzed which aspects of the page can be optimized by these components, such as direct components can optimize resource loading and rendering, parent components can avoid rendering blocking, dependent components can optimize data request caching strategies,
[0071] S4: Build a topology graph corresponding to the type of event from each component.
[0072] Through the topology graph, the hierarchy, loading order, and dependent resources between components can be clearly defined, and some key paths (such as component chains for first screen rendering) are also included in the topology graph, which can also identify the end point of optimization.
[0073] S5: According to the target triggering probability of each type of event and the topology graph, release optimization is performed on each component associated with each type of event.
[0074] In this step, each component associated with the event can be optimized respectively for the target trigger probability and the topology graph.
[0075] For the target trigger probability: for example, for the components corresponding to high probability events, preloading the components or keeping them in the memory, reducing the interaction delay; for low probability events, delaying loading or releasing the component resources, reducing the memory occupation.
[0076] For the topology graph: the components with deep dependencies in the topology graph can be loaded on demand.
[0077] As can be seen from the above technical solution, the application obtains various events triggered by a page within a preset time window and historical trigger event data of the page; calculates target trigger probabilities of various events based on the various events and the historical trigger event data; for each type of event, identifies various components associated with the event in the page; constructs a topology graph corresponding to the event from the various components; and releases and optimizes various components associated with each type of event according to the target trigger probabilities of various events and the topology graph. The application cuts in from the trigger information of the page, analyzes the target trigger probabilities of various events according to the trigger events within the preset time window and the historical trigger event data, and can clearly understand the event trigger condition from the target trigger probability, so that dynamic optimization can be performed. The optimization of the event is based on the components, and the components are associated with the event in the page. Since the components are associated with each other, a topology graph corresponding to the event can be constructed from the various components. According to the target trigger probability and the topology graph, the various components associated with the event can be quickly released and optimized, the optimization accuracy can be improved, important components and components with high trigger probability can be prevented from being optimized, and the overall page operation can be affected.
[0078] In the method provided by the embodiment of the application, the process of calculating the target trigger probability of each type of event based on the various events and the historical trigger event data is described as follows:
[0079] For each type of event, the total number of triggers of the event within the preset time window is calculated to calculate the trigger frequency.
[0080] The historical trigger probability of the event is calculated from the historical trigger event data.
[0081] The current scenario of the page is obtained, and the trigger frequency and the historical trigger probability are respectively assigned weights according to the current scenario of the page.
[0082] The trigger frequency and the historical trigger probability are weighted and summed according to respective corresponding weights to obtain a total probability score as a target trigger probability.
[0083] Specifically, the above process calculates the trigger frequency in combination with the total number of triggers in a preset time window, and then calculates the historical trigger probability of the event from historical trigger event data, combines the trigger frequency and the historical trigger probability, and comprehensively analyzes the total trigger situation, which can avoid accidental high triggering at the moment and can also avoid the situation where high triggering is actually needed.
[0084] Therefore, the current scene of the page needs to be obtained, and respective weights are set according to specific scenes, so that the scene can be matched, and the performance optimization demand of the page can be better met. Finally, the trigger frequency and the historical trigger probability are weighted and summed according to the weights to obtain a target trigger probability.
[0085] The process of constructing the topology graph corresponding to the event by each component in the application will be described in detail below.
[0086] For the event, the event attribute of the event is obtained;
[0087] The parent-child component relationship and / or sibling component relationship between each component are determined according to the attribute;
[0088] The trigger sequence of the page when triggering each type of event in the preset time window is obtained;
[0089] The topology graph is constructed based on the parent-child component relationship and / or sibling component relationship between each component and the trigger sequence.
[0090] Specifically, since the time attributes of each type of event are different, the parent-child component relationship and / or sibling component relationship between the components corresponding to events with different attributes are also different. Therefore, the event attribute of the event is first obtained. In addition, another important parameter is the trigger sequence of each type of event in the preset time window. The trigger sequence can indirectly indicate the relationship between events. The influence of different relationships between events on the corresponding components is also different. For example, the components corresponding to two different types of events are repeated. Therefore, the construction of the topology graph cannot be separated from the parent-child component relationship and / or sibling component relationship between the components and the trigger sequence of the event. This can help to construct an accurate topology graph, which is conducive to subsequent release optimization.
[0091] The following embodiments explain the steps of constructing the topology graph based on the parent-child component relationship and / or sibling component relationship between each component and the trigger sequence in the application in detail.
[0092] Each component is taken as a node;
[0093] a component dependency chain is constructed by using the parent-child component relationship and / or the brother component relationship between the components;
[0094] directions are given to the component dependency chain as directed edges according to the trigger sequence;
[0095] the nodes and the directed edges are combined to form a topology graph.
[0096] Specifically, it can be understood that the trigger sequence of the events can cover and indicate the trigger sequence of the components, so each component can be taken as a node to construct a basic framework of the topology graph, the edges between the nodes are determined by the trigger sequence, a component dependency chain is constructed by using the parent-child component relationship and / or the brother component relationship between the components, and then directions are given to the component dependency chain according to the trigger sequence, that is, each directed edge is obtained, and the nodes and the directed edges are combined to obtain the topology graph.
[0097] The above embodiment describes the steps of constructing the topology graph based on the parent-child component relationship and / or the brother component relationship between the components and the trigger sequence in the present application, and the steps of releasing and optimizing each component associated with each type of event according to the target trigger probability and the topology graph of each type of event in the present application are explained in detail as follows.
[0098] determining an event level of each type of event according to the target trigger probability;
[0099] selecting a release optimization strategy according to the event level;
[0100] defining a release optimization range from the topology graph according to the selected release optimization strategy;
[0101] determining each component to be optimized included in the release optimization range to release and optimize each component to be optimized according to the release optimization strategy.
[0102] The process of determining the event level of each type of event according to the target trigger probability in the above process includes:
[0103] comparing the target trigger probability of each type of event with a preset first trigger threshold and a second trigger threshold;
[0104] if the target trigger probability is not less than the first trigger threshold, the event level of the event is determined to be high-frequency trigger;
[0105] if the target trigger probability is less than the first trigger threshold and not less than the second trigger threshold, the event level of the event is determined to be medium-frequency trigger;
[0106] If the target trigger probability is less than the second trigger threshold, the event level of the type of event is determined as low-frequency trigger.
[0107] Specifically, the first trigger threshold can be set as 0.8, and the second trigger threshold can be set as 0.3. The high-frequency trigger event can be, for example, a "confirmation button", an "input box focus", and the like. Such an event can also be referred to as a hot event. The medium-frequency trigger event can be, for example, a "tab switching", a "scroll loading", and the like. Such an event can also be referred to as a warm event. The low-frequency trigger event can be, for example, a "page bottom feedback button", a "report export", a "monthly audit", and the like. Such an event can also be referred to as a cold event.
[0108] Thus, the release optimization strategy can be selected according to different event levels. For example, the release optimization strategy for a hot event can be preloading to memory, the release optimization strategy for a warm event can be delayed binding, and the release optimization strategy for a cold event can be virtualized storage.
[0109] In addition to selecting the release optimization strategy, the range of release optimization needs to be determined from the topology graph. The range of release optimization refers to components in the range that are to be released and optimized.
[0110] Further, the process of selecting the release optimization strategy according to the event level can include the following steps:
[0111] If the event level of the type of event is high-frequency trigger, the least frequently used strategy is selected.
[0112] If the event level of the type of event is medium-frequency trigger, the timeout strategy is selected.
[0113] If the event level of the type of event is low-frequency trigger, the least frequently used strategy is selected.
[0114] Specifically, for the components corresponding to the high-frequency trigger event, the components can be stored in the memory. However, the memory size is relatively small. The selected release optimization strategy is the least frequently used strategy, that is, LRU (Least Recently Used). The core idea is to preferentially eliminate the least frequently used data when the cache space is insufficient, so as to retain the frequently used data and improve the cache hit rate.
[0115] For the components corresponding to the medium-frequency trigger event, the components can be stored in the browser session storage location SessionStorage. The capacity size is moderate, which can balance the performance and storage pressure. The selected release optimization strategy is the timeout strategy, that is, the timeout automatic release, for example, the release optimization is released within 30 seconds by default.
[0116] For the components corresponding to the events triggered at low frequencies, they can be stored in a large database such as IndexedDB, which has a large capacity and supports mass time storage, and the corresponding selected release optimization strategy is the strategy of eliminating the least frequent history, that is, the improved version of the traditional LRU algorithm, that is, LRU-K, which can more accurately judge the "hotness" of the data by recording the last K access history of the data item, thereby optimizing the cache eviction strategy.
[0117] Further, the lazy loading process can also be implemented, and the lazy loading is considered before the release optimization, for example, only hot events are bound when the component is mounted, warm events are loaded and bound from the browser session storage location when triggered for the first time, cold events are loaded asynchronously from IndexedDB after being triggered, and are upgraded to the multi-level cache after being bound.
[0118] After the release optimization, the garbage collection and state synchronization mechanism can also be started, for example, after the release optimization of the component, the listener is automatically removed according to the fingerprint obtained above, the memory leakage is eliminated, and the processing function sequence of the cold event is stored in IndexedDB to support recovery after page refresh.
[0119] With Figure 1 Corresponding to the method, the embodiment of the application also provides a page performance optimization device for implementing the method. Figure 1 The page performance optimization device provided by the embodiment of the application can be used in a computer terminal or various mobile devices, and can be combined with Figure 2 The page performance optimization device will be introduced as follows, as shown in the figure, the device can include: Figure 2
[0120] The acquisition module 10 is configured to acquire various events triggered in a preset time window and historical triggering event data of the page.
[0121] The target triggering probability calculation module 20 is configured to calculate the target triggering probability of each type of event based on the various events and the historical triggering event data.
[0122] The identification module 30 is configured to identify, for each type of event, each component associated with the type of event in the page.
[0123] The topology graph construction module 40 is configured to construct a topology graph corresponding to the type of event from each component.
[0124] The release optimization module 50 is used to release and optimize each component associated with each type of event according to the target triggering probability of each type of event and the topology graph.
[0125] Further, the embodiment of the present application provides a page performance optimization device. Figure 3 The hardware structure block diagram of the page performance optimization device is shown, and the hardware structure of the page performance optimization device can include at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04. Figure 3
[0126] In the embodiment of the present application, the number of the processor 01, the communication interface 02, the memory 03 and the communication bus 04 is at least one, and the processor 01, the communication interface 02 and the memory 03 complete the communication with each other through the communication bus 04.
[0127] The processor 01 can be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiment of the present application, etc.
[0128] The memory 03 can include a high-speed RAM memory, and can also include a non-volatile memory, etc., for example, at least one disk memory.
[0129] The memory stores a program, and the processor can invoke the program stored in the memory, and the program is used for executing the following page performance optimization method, comprising:
[0130] Obtaining various events triggered by a page within a preset time window and historical triggering event data of the page;
[0131] Calculating target triggering probabilities of various events based on the various events and the historical triggering event data;
[0132] For each type of event, identifying various components associated with the type of event in the page;
[0133] Constructing a topology graph corresponding to the type of event by various components;
[0134] According to the target triggering probabilities of various events and the topology graph, respectively, releasing and optimizing various components associated with various events.
[0135] Optionally, the refinement function and the extension function of the program can refer to the description of the page performance optimization method in the method embodiment.
[0136] The embodiment of the application further provides a storage medium, which can store a program suitable for processor execution, and when the program runs, controls a device where the storage medium is located to execute the following page performance optimization method, comprising:
[0137] Obtaining various events triggered by a page within a preset time window and historical triggering event data of the page;
[0138] Calculating target triggering probabilities of various events based on the various events and the historical triggering event data;
[0139] For each type of event, identifying various components associated with the type of event in the page;
[0140] Constructing a topology graph corresponding to the type of event by various components;
[0141] According to the target triggering probabilities of various events and the topology graph, respectively, releasing and optimizing various components associated with various events.
[0142] Specifically, the storage medium can be a computer readable storage medium, which can be an electronic storage such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM.
[0143] Optionally, the refinement function and the extension function of the program can refer to the description of the page performance optimization method in the method embodiment.
[0144] In addition, each functional module in various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the functions are realized in the form of a software functional module and sold or used as an independent product, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present disclosure.
[0145] Finally, it should be noted that, in this document, relational terms such as first and second and the like can only be used to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between or among the entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0146] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between various embodiments can be referred to each other.
[0147] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A page performance optimization method, characterized in that: include: Obtain various events triggered by a page within a preset time window and historical trigger event data of the page; Calculating target trigger probabilities for each type of event based on the events and historical trigger event data; For each type of event, identify the components associated with the event on the page; A topology map corresponding to the event is constructed by each of the components; According to the target trigger probability and topology diagram of each type of event, each component associated with each type of event is released and optimized.
2. The method according to claim 1, characterized in that The calculating of the target trigger probability of each type of event based on the events and historical trigger event data includes: For each type of event, calculate the total number of times the event is triggered within the preset time window to calculate the trigger frequency; Calculating the historical trigger probability of such an event from the historical trigger event data; Obtain the current scene of the page, and assign weights to the trigger frequency and the historical trigger probability respectively according to the current scene of the page; The trigger frequency and the historical trigger probability are weighted and summed according to their corresponding weights to obtain a total probability score as the target trigger probability.
3. The method according to claim 1, characterized in that The topology graph corresponding to the event of this type is constructed by each of the components, including: For this type of event, obtain the event attributes of this type of event; Determine the parent-child component relationship and / or sibling component relationship between each of the components according to the attributes; Obtaining the triggering order of various events when the page triggers them within the preset time window; A topology diagram is constructed based on the parent-child component relationship and / or sibling component relationship and the triggering sequence between the components.
4. The method according to claim 3, characterized in that The constructing of a topology graph based on the parent-child component relationship and / or sibling component relationship and triggering sequence between the components includes: Taking each of the components as each node; Utilizing the parent-child component relationship and / or sibling component relationship between each of the components to build a component dependency chain; According to the triggering order, directions are assigned to the component dependency chains as directed edges; Each of the nodes and each of the directed edges are combined to form a topological graph.
5. The method according to claim 1, wherein The release optimization is performed on each component associated with each event according to the target trigger probability and topology of each event, including: Determining the event level of each type of event according to the target trigger probability; Selecting a release optimization strategy according to the event level; Delineating a release optimization range from the topology map according to the selected release optimization strategy; Determine each component to be optimized included in the release optimization range, and perform release optimization on each component to be optimized according to the release optimization strategy.
6. The method according to claim 5, characterized in that Determining the event level of each type of event according to the target trigger probability includes: For each type of event, comparing the target trigger probability of the event with a preset first trigger threshold and a second trigger threshold; If the target trigger probability is not less than the first trigger threshold, determining that the event level of this type of event is a high-frequency trigger; If the target trigger probability is less than the first trigger threshold and not less than the second trigger threshold, then the event level of this type of event is determined to be medium frequency trigger; If the target trigger probability is less than the second trigger threshold, the event level of this type of event is determined to be a low-frequency trigger.
7. The method according to any one of claims 5 or 6, characterized in that The selecting and releasing optimization strategy according to the event level includes: If the event level of this type of event is high-frequency triggering, the strategy with the least frequency of use is eliminated; If the event level of this type of event is medium frequency trigger, the elimination timeout strategy is selected; If the event level of this type of event is low-frequency triggering, the strategy with the lowest historical elimination frequency is selected.
8. A page performance optimization device, characterized in that: include: An acquisition module is used to acquire various events triggered by a page within a preset time window and historical triggering event data of the page; A target trigger probability calculation module is used to calculate the target trigger probability of each type of event based on the events and historical trigger event data; An identification module, configured to identify, for each type of event, components associated with the event on the page; A topology map construction module, configured to construct a topology map corresponding to the event of this type using the various components; The release optimization module is used to perform release optimization on each component associated with each type of event according to the target trigger probability and topology diagram of each type of event.
9. A page performance optimization device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the page performance optimization method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the page performance optimization method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
A content display page display method and device, a medium and equipment
CN113836454A
Page performance optimization method and device, computer equipment and readable storage medium
CN115905754A
Resource pre-caching method and related device
CN116955867A
Intelligent caching method and device for loading front-end resources as required, equipment and medium
CN119691305A
Page display method and apparatus, and device and storage medium
WO2023056850A1
Cited By
Side effect recovery method and device, equipment and storage medium
CN121636374A