A method and apparatus for optimizing the loading of page interactive components

By analyzing user habits and attributes of interactive components using clustering algorithms, components with low dependency were converted into text components, solving the problem of page lag caused by too many interactive components, thus improving page loading speed and user experience.

CN118535817BActive Publication Date: 2026-11-17中国邮政储蓄银行股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410714297.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2026-11-17
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

The lag issue caused by too many interactive components on the front-end page is addressed by existing technical solutions, which require significant modifications, are difficult to generalize, or fail to reduce rendering time.

Method used

By analyzing user habits and inherent component attributes, interactive components are segmented using clustering algorithms. Components with low dependency are converted into text components to reduce the number of initial renders. Components are then restored by combining interactive event listening.

Benefits of technology

It improves page loading speed, enhances user experience, has a wide range of applications, does not depend on business rules or code design, and avoids unnecessary interactive components consuming resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535817B_ABST
    Figure CN118535817B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for optimizing the loading of interactive components on a webpage. The method includes: obtaining user habits and a set of interactive components on a front-end page; obtaining the feature vector of each interactive component's usage habits; performing initial clustering on the set of interactive components; obtaining the inherent attribute feature vector of each interactive component in a set of commonly used component clusters; performing secondary clustering on the set of commonly used component clusters using the same clustering algorithm to determine the set of sub-clusters with the highest dependency; for each target interactive component in a newly added page, calculating the distance between the inherent attribute feature vector of each target interactive component and the center vector of the set of sub-clusters with the highest dependency using Euclidean distance; if the distance value of the target interactive component is greater than a preset distance threshold, it is converted into a text component type for display, thereby reducing the number of interactive components rendered initially and solving the problem of front-end page lag caused by too many interactive components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of front-end page design technology, and specifically to a method and apparatus for optimizing the loading of page interactive components. Background Technology

[0002] In front-end page design and development, form data display and input are frequently involved. Different types of components consume different amounts of hardware resources for rendering; interactive components (input boxes, selection boxes, etc.) consume more resources, while text components consume less. In mainstream front-end frameworks, interactive components are monitored through two-way data binding. If a page has too many interactive components, especially when interactive components are bound to a model, if one of their properties changes, all elements bound to that model on the page need to be re-rendered. Rendering a large number of elements simultaneously will consume a lot of resources, causing page lag and affecting the user experience.

[0003] Currently, there are three main technical solutions to address front-end page lag caused by an excessive number of interactive components. The first is through data-bound model splitting. This involves breaking down the entire form input component into multiple smaller components, each bound to a different model. When a component is updated, only the bound local area needs to be updated, not the entire page. The second solution optimizes page display by using multiple tabs or setting display conditions to reduce the number of components loaded per page. The third solution uses preloading. For example, content is pre-loaded into the cache before the front-end page is displayed. During the model page display, this content is retrieved from the cache and displayed directly, reducing model page loading time and thus data transfer time, improving the user experience.

[0004] The first technical solution reduces the rendering area of ​​interactive components by splitting the data model. This solution can alleviate lag issues to some extent, but it requires high-level logical coding and planning during the design phase. For the already released version, it requires a major refactoring and extensive modifications. The second solution uses pre-defined conditions to reduce the display area of ​​interactive components. This solution is highly coupled with page design and specific transaction rules, making it difficult to form a universal technical solution. The third solution, a pre-loading mode, cannot reduce the rendering time when converting the model page into the actual page, and for pages with many interactive components, lag will still occur. Summary of the Invention

[0005] To address the technical problem of page lag caused by an excessive number of interactive components, this invention provides a method and apparatus for optimizing the loading of page interactive components.

[0006] According to a first aspect of the present invention, a method for optimizing the loading of page interaction components is provided, comprising the following steps:

[0007] Statistics are compiled on user usage of various interactive components on the front-end page over a period of time to obtain user habits and the set of interactive components within the statistical scope;

[0008] Based on the user usage habits and UI page layout design specifications, extract user usage habit features to obtain the usage habit feature vector of each interactive component in the interactive component set;

[0009] Based on the usage habit feature vector of each interactive component, the interactive component set is initially clustered using a partition-based clustering algorithm, and divided into two cluster sets: frequently used components and infrequently used components.

[0010] Extract the inherent attribute features of components from the set of commonly used component clusters, and obtain the inherent attribute feature vector of each interactive component in the set of commonly used component clusters;

[0011] Based on the inherent attribute feature vector of each interactive component, the common component cluster set is clustered twice using the same clustering algorithm, further divided into three sub-cluster sets, and the sub-cluster set with the highest degree of dependence is determined from the three sub-cluster sets.

[0012] For each target interactive component in the newly added page, the inherent attribute feature vector of each target interactive component is obtained by vectorization according to the inherent attribute features of the component. The distance between the inherent attribute feature vector of each target interactive component and the center vector of the sub-cluster set with the greatest dependence is calculated using Euclidean distance.

[0013] When loading each target interactive component, if the distance value of the target interactive component is greater than a preset distance threshold, the target interactive component will be converted into a text component type for display.

[0014] According to a second aspect of the present invention, a page interaction component loading optimization apparatus is provided, comprising:

[0015] The statistics unit is used to count the usage of various interactive components on the front-end page by users over a period of time, and to obtain user habits and the set of interactive components within the statistical scope.

[0016] The habit feature extraction unit is used to extract user habit features based on the user's usage habits and UI page layout design specifications, and obtain the usage habit feature vector of each interactive component in the interactive component set.

[0017] The initial clustering unit is used to perform initial clustering of the set of interactive components based on the usage habit feature vector of each interactive component, using a partition-based clustering algorithm to divide it into two cluster sets: frequently used components and infrequently used components.

[0018] The inherent feature extraction unit is used to extract the inherent attribute features of components from the set of commonly used component clusters, and obtain the inherent attribute feature vector of each interactive component in the set of commonly used component clusters;

[0019] The secondary clustering unit is used to perform secondary clustering on the common component cluster set based on the inherent attribute feature vector of each interactive component, using the same clustering algorithm, to further divide it into three sub-cluster sets, and determine the sub-cluster set with the highest degree of dependence from the three sub-cluster sets;

[0020] The distance calculation unit is used to vectorize the inherent attribute feature vector of each target interactive component in the new page according to the inherent attribute features of the component, and to calculate the distance value between the inherent attribute feature vector of each target interactive component and the center vector of the sub-cluster set with the greatest dependence using Euclidean distance.

[0021] The component type conversion unit is used to convert the target interactive component into a text component type for display when loading each target interactive component if the distance value of the target interactive component is greater than a preset distance threshold.

[0022] According to a third aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing one or more programs that, when the programs are executed, control the device on which the computer-readable storage medium is located to perform the aforementioned method.

[0023] According to a fourth aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the aforementioned method.

[0024] The page interaction component loading optimization method and apparatus provided in this invention, by statistically analyzing user usage of various interactive components on a front-end page over a period of time, obtains user usage habit characteristics and component inherent attribute characteristics. Based on a secondary clustering process, it can predict the user dependency level of each interactive component in a newly added page. According to the dependency level of each interactive component, interactive components with lower dependency levels are converted into text components, thereby reducing the number of interactive components rendered initially. This solves the technical problem of front-end page lag caused by too many interactive components, and improves page loading speed. Compared with conventional methods, the method and apparatus of this invention have the following advantages and beneficial effects:

[0025] 1) Wide applicability. This method does not depend on the specific rules of the business system, nor on the code design during development. It does not require splitting the data model and does not disrupt the existing code logic of the developers.

[0026] 2) Significantly improved user experience. Replacing low-reliability interactive components with text components avoids unnecessary interaction consuming hardware resources, thereby improving system smoothness. Attached Figure Description

[0027] The accompanying drawings, which form part of this specification, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0028] Figure 1 A flowchart illustrating a page interaction component loading optimization method according to an embodiment of the present invention is shown;

[0029] Figure 2 This diagram illustrates the structure of a page interaction component loading optimization device according to an embodiment of the present invention.

[0030] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation

[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification and claims of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products, or devices.

[0033] The design concept of this invention is to obtain a set of commonly used component clusters by statistically analyzing users' usage habits of various interactive components over a period of time and using the feature vectors of these usage habits. Based on the set of commonly used component clusters, the inherent attribute feature vectors of the interactive components are extracted. By performing secondary clustering on the set of commonly used component clusters, the set of sub-clusters with the highest degree of dependency is obtained. For each target interactive component in the new page, the user dependency degree of the new component is obtained by calculating the Euclidean distance with the set of sub-clusters. Based on this result, the layout of the new components is optimized, and interactive components with low dependency degree are transformed into text components, thereby improving page loading speed.

[0034] Example 1

[0035] According to a first aspect of the invention, see [link to first aspect]. Figure 1 As shown in the figure, an embodiment of the present invention provides a method for optimizing the loading of page interaction components, including the following steps:

[0036] S1: Statistically analyze user usage of various interactive components on the front-end page over a period of time to obtain user habits and the set of interactive components within the statistical scope.

[0037] For a live system, setting up listeners for interactive actions on each interactive component and recording the duration of each interaction can reveal user habits regarding the various interactive components on the front-end page after a period of time. Statistics are then compiled on all interactive components on the front-end page, including input boxes, dropdown lists, date input boxes, etc., resulting in a set D of interactive components within the statistical scope.

[0038] S2 extracts user habit features based on user habits and UI page layout design specifications, and obtains the user habit feature vector of each interactive component in the interactive component set.

[0039] According to user usage habits and UI page layout design specifications, commonly used interactive components should have the following characteristics: long user focus time, high click frequency, long component life cycle, prominent position, etc. Therefore, extracting user usage habit features mainly includes the following information: a. The duration that the user uses the interactive component, that is, the total time the user's actions are focused on the component within the statistical time period; b. The duration that the interactive component exists on the page, that is, the total existence period of the component within the statistical time period; c. The frequency of the user operating the interactive component per unit time (times / unit duration); d. The position of the interactive component on the page, the reference point can be selected according to the specific business system, generally taking the top-left corner of the page as the coordinate origin to obtain the position coordinates of the component. Based on the user usage habit features, a usage habit feature vector Xi={xi1, xi2, xi3, xi4} is constructed for each interactive component in the interactive component set, where xi1 represents the usage duration, xi2 represents the existence duration, xi3 represents the operation frequency, and xi4 represents the component position.

[0040] In S3, according to the usage habit feature vector of each interactive component, a partition-based clustering algorithm is used to perform initial clustering on the interactive component set, which is divided into two cluster sets: commonly used components and non-commonly used components.

[0041] This step is to filter out the cluster set of commonly used components from the interactive component set D, and a partition-based clustering algorithm can be adopted. The idea of the algorithm is: for the interactive component set D, which contains N sub-data, the data set is divided into K clusters, where K<N, each cluster contains at least one sub-data, and there is no intersection between clusters. It is required that the data in the cluster have a high similarity, while the similarity between clusters is low, and the similarity between sub-data can be measured by Euclidean distance.

[0042] Based on the aforementioned clustering algorithm idea, it is defined that there are n data objects in the interactive component set D={X1, X2, X3, ..., Xn}, wherein each object is represented by p-dimensional attributes as: Xi={xi1, xi2, xi3, ...xip}. The distance between objects Xi and Xj is expressed as:

[0043]

[0044] In order to filter out the set of commonly used components, K=2 is set, and combined with the usage habit feature vector of each interactive component extracted in step S2, two clusters, namely the commonly used component cluster and the non-commonly used component cluster, are obtained through the clustering algorithm, that is

[0045] In S4, the inherent attribute features of the components are extracted from the commonly used component cluster set, and the inherent attribute feature vector of each interactive component in the commonly used component cluster set is obtained.

[0046] The user habit features used in the initial clustering process of step S3 mentioned above do not exist for the target interactive components in the newly added page. Therefore, it is necessary to establish the association between the inherent attribute features of the components (i.e., attributes other than user habit features) and common component clusters. The steps are as follows:

[0047] The result vector of the initial clustering is Assume α1 represents a cluster with high user dependency. Extract inherent component attribute features from the α1 cluster set, including: whether it is required, whether it is grayed out, validation method, component type (e.g., text input box, date input box, dropdown list), input length, and page path, to obtain the component inherent attribute vector P (required, grayed out, validation, type, length, path). Based on these inherent attribute features, construct the inherent attribute feature vector P for each interactive component in the commonly used component cluster set.

[0048] S5. Based on the inherent attribute feature vector of each interactive component, the same clustering algorithm is used to perform secondary clustering on the common component cluster set, further dividing it into three sub-cluster sets, and determining the sub-cluster set with the highest degree of dependence from the three sub-cluster sets.

[0049] Using the same clustering algorithm as step S3 above, a second clustering is performed on the common component cluster set. Here, K=3 is set, resulting in three sub-cluster vector sets S={s1,s2,s3}. The distance between the intrinsic attribute feature vector of the centroid of the common component cluster set and the centroid vector of each of the three sub-cluster sets is calculated using Euclidean distance. Assuming the distance values ​​are ordered as s3>s2>s1, the sub-cluster set s1 corresponding to the smallest distance value is determined as the sub-cluster set with the highest dependency.

[0050] It should be noted that step S3, the initial clustering, constructs a set of commonly used component clusters using a partition-based clustering algorithm, such as K-means. Regardless of the clustering algorithm used in step S3, the secondary clustering in step S5 must use the same distance algorithm. However, the focus of this invention is not on the selection of a specific clustering algorithm, but rather on performing initial clustering based on user usage habits and then secondary clustering based on the inherent attribute characteristics of components. Based on this, the user dependency level of each newly added interactive component is predicted, providing a basis for the special rendering of infrequently used components.

[0051] S6. For each target interactive component in the newly added page, vectorize the inherent attribute features of each target interactive component according to the inherent attribute features of the component to obtain the inherent attribute feature vector of each target interactive component, and use Euclidean distance to calculate the distance value between the inherent attribute feature vector of each target interactive component and the center vector of the sub-cluster set with the greatest dependence.

[0052] For each target interactive component in the newly added page, the inherent attribute features (mandatory status, verification method, component type, etc.) extracted in step S4 are vectorized to initialize the inherent attribute feature vector t = {t1, t2, t3, t4, t5, t6} for each target interactive component. The distance between the vector value of each target interactive component and the vector value of the set of sub-clusters s1 with the highest dependency level determined in step S5 is calculated using Euclidean distance. Based on this distance value, the user dependency level of each target interactive component can be predicted; the smaller the distance value, the greater the user dependency level, and vice versa.

[0053] S7. When loading each target interactive component, if the distance value of the target interactive component is greater than the preset distance threshold, the target interactive component is converted into a text component type for display.

[0054] Set distance threshold This distance threshold The size can be set according to system performance. For example, the distance value between the two initial central clusters obtained in step S3 can be set as the distance threshold. When loading the target interactive component of the newly added page, the distance value of a certain target interactive component... When the distance value of a target interactive component is high, it indicates that the user has a high degree of dependence on that target interactive component. In this case, the component will be rendered according to its own type. If the user's dependence on the target interactive component is not high or low, the component will be converted into a text component type, providing only display functionality. This reduces the number of interactive components rendered initially, improves page rendering speed, and avoids lag caused by too many interactive components needing to be rendered simultaneously when adding a new page.

[0055] According to some embodiments of the present invention, the method of the present invention further includes: adding an interaction event listener to each target interactive component that has been converted into a text component type; once a user interaction behavior is listened to, a restoration operation is triggered to restore the converted text component into an interactive component.

[0056] For each target interactive component converted to a text component type, add listeners for interactive events such as click or focus. When a user interaction is detected, most elements on the page have generally been rendered, and component activation will be processed quickly. At this point, the component is restored to an interactive component, replacing the current text component. This will not affect the smoothness of the system's page operation.

[0057] Taking a business backend management system as an example, when loading a page containing 45 interactive components, the average homepage rendering time was 1633.9ms before optimization. After optimization using the solution of this embodiment, the 45 interactive components are divided into 10 frequently used interactive components and 35 infrequently used interactive components. When the page loads, the infrequently used interactive components are converted into text components for display, reducing the overall page rendering time to 532ms; when the user interacts, a restore operation is triggered, and the rendering time is controlled within 20ms. It is evident that the solution of this embodiment can significantly shorten the initial rendering time of a system containing a large number of interactive components, avoiding lag caused by too many interactive components needing to be rendered simultaneously on newly added pages.

[0058] According to some embodiments of the present invention, the method of the present invention further includes: sorting all target interactive components in the newly added page from smallest to largest according to the distance value, obtaining a sorting result of the dependency degree of all target interactive components from largest to smallest, and optimizing the layout of the target interactive components in the newly added page based on the dependency degree sorting result.

[0059] As previously explained, the calculated distance values ​​can predict the user dependency level of each target interactive component. A smaller distance value indicates a higher user dependency level, and vice versa. Therefore, the target interactive components can be sorted from smallest to largest based on their distance values, resulting in a descending order of their dependency levels. Target interactive components with higher dependency levels are placed in more prominent positions on the page, such as in the center of the view. Target interactive components with lower dependency levels are placed off-center, thus optimizing the layout of the interactive component set.

[0060] In summary, the page interaction component loading optimization method provided by this invention, by statistically analyzing user usage of various interactive components on the front-end page over a period of time, obtains user usage habit characteristics and component inherent attribute characteristics. Based on a secondary clustering process, it can predict the user dependency level of each interactive component in a newly added page. According to the user dependency level of each interactive component, by converting interactive components with lower dependency levels into text components, the number of interactive components rendered initially can be reduced, thereby improving page loading speed. By adding interaction event listeners to each target interactive component converted into a text component type, the converted text component is restored to an interactive component when user interaction behavior is detected, thus not affecting the smoothness of page operation. Furthermore, the dependency level of interactive components in a newly added page can be sorted according to distance values, and the layout of the newly added page can be optimized based on the dependency level sorting results. Compared with conventional methods, the method of this invention has the following advantages and beneficial effects:

[0061] 1) Wide applicability. This method does not depend on the specific rules of the business system, nor on the code design during development. It does not require splitting the data model and does not disrupt the existing code logic of the developers.

[0062] 2) Significantly improved user experience. This method can arrange interactive components according to user dependence, providing a reference for page design and making it easier for users to prioritize components with high dependence; it transforms interactive components with low dependence into text components, avoiding meaningless interactive components from consuming hardware resources, thereby improving the smoothness of system operation.

[0063] Example 2

[0064] According to a second aspect of the invention, such as Figure 2 As shown in the figure, an embodiment of the present invention provides a page interaction component loading optimization device, comprising:

[0065] Statistical unit 21 is used to count the usage of various interactive components on the front-end page by users over a period of time, and to obtain user usage habits and the set of interactive components within the statistical scope;

[0066] The habit feature extraction unit 22 is used to extract user habit features based on the user usage habits and UI page layout design specifications, and obtain the usage habit feature vector of each interactive component in the interactive component set.

[0067] The initial clustering unit 23 is used to perform initial clustering of the set of interactive components based on the usage habit feature vector of each interactive component, using a partition-based clustering algorithm to divide it into two cluster sets: frequently used components and infrequently used components.

[0068] The inherent feature extraction unit 24 is used to extract the inherent attribute features of components from the set of commonly used component clusters, and obtain the inherent attribute feature vector of each interactive component in the set of commonly used component clusters;

[0069] The secondary clustering unit 25 is used to perform secondary clustering on the common component cluster set according to the inherent attribute feature vector of each interactive component, using the same clustering algorithm, to further divide it into three sub-cluster sets, and determine the sub-cluster set with the highest degree of dependence from the three sub-cluster sets;

[0070] The distance calculation unit 26 is used to vectorize the inherent attribute feature vector of each target interactive component in the new page according to the inherent attribute features of the component, and calculate the distance value between the inherent attribute feature vector of each target interactive component and the center vector of the sub-cluster set with the greatest dependence using Euclidean distance.

[0071] The component type conversion unit 27 is used to convert the target interactive component into a text component type for display when loading each target interactive component if the distance value of the target interactive component is greater than a preset distance threshold.

[0072] According to some embodiments of the present invention, such as Figure 2 As shown, the apparatus in this embodiment of the invention further includes:

[0073] The component type restoration unit 28 is used to add an interaction event listener to each target interactive component that has been converted into a text component type. Once a user interaction behavior is detected, the restoration operation is triggered to restore the converted text component into an interactive component.

[0074] According to some embodiments of the present invention, such as Figure 2 As shown, the apparatus in this embodiment of the invention further includes:

[0075] The layout optimization unit 29 is used to sort all target interactive components in the new page from smallest to largest according to the distance value, obtain the sorting result of the dependency degree of all target interactive components from largest to smallest, and optimize the layout of the target interactive components in the new page based on the dependency degree sorting result.

[0076] According to some embodiments of the present invention, the aforementioned secondary clustering unit 25 is specifically used for:

[0077] The distance between the intrinsic attribute feature vector of the center point of the common component cluster set and the center vector of the three sub-cluster sets is calculated using Euclidean distance. The sub-cluster set corresponding to the minimum distance value is determined as the sub-cluster set with the highest degree of dependence.

[0078] It is understood that device embodiment 2 has the same inventive concept as the aforementioned method embodiment 1. Figure 2 The implementation methods of each unit in the illustrated device embodiment can be found in the aforementioned method embodiment 1, and will not be repeated here. It should also be noted that the unit names described in device embodiment 2 do not necessarily constitute a limitation on the unit itself under certain circumstances.

[0079] Example 3

[0080] According to a third aspect of the present invention, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method described in the aforementioned embodiment 1.

[0081] The computer-readable storage medium of this invention can be any tangible medium containing a stored program. Furthermore, the computer-readable storage medium of this invention can be located in any computer terminal within a group of computer terminals in a computer network, or in any communication device within a group of communication devices.

[0082] Example 4

[0083] According to a fourth aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of the present invention.

[0084] The following is for reference. Figure 3 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present invention. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0085] like Figure 3 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0086] Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented or possessed alternatively. In particular, according to embodiments of the invention, the processes described in the flowcharts above can be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments of the invention.

[0087] Finally, it should be noted that:

[0088] The sequence numbers of the embodiments in this invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the foregoing embodiments of this invention, the descriptions of each embodiment have different focuses; parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The embodiments of this invention can be implemented using hardware, software, firmware, or a combination thereof.

[0089] In the several embodiments provided by this invention, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, units, or modules, and may be electrical or other forms.

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

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods, apparatus, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings, depending on the functions involved. Furthermore, it should be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0092] Furthermore, the aforementioned integrated unit can be implemented either in hardware or as a software functional unit. Moreover, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

Claims

1. A method for optimizing the loading of page interactive components, characterized in that, include: Statistics are compiled on user usage of various interactive components on the front-end page over a period of time to obtain user habits and the set of interactive components within the statistical scope; Based on the user usage habits and UI page layout design specifications, extract user usage habit features to obtain the usage habit feature vector of each interactive component in the interactive component set; Based on the usage habit feature vector of each interactive component, the interactive component set is initially clustered using a partition-based clustering algorithm, and divided into two cluster sets: frequently used components and infrequently used components. Extract the inherent attribute features of components from the set of commonly used component clusters, and obtain the inherent attribute feature vector of each interactive component in the set of commonly used component clusters; Based on the inherent attribute feature vector of each interactive component, the common component cluster set is clustered twice using the same clustering algorithm, further divided into three sub-cluster sets, and the sub-cluster set with the highest degree of dependence is determined from the three sub-cluster sets. For each target interactive component in the newly added page, the inherent attribute feature vector of each target interactive component is obtained by vectorization according to the inherent attribute features of the component. The distance between the inherent attribute feature vector of each target interactive component and the center vector of the sub-cluster set with the greatest dependence is calculated using Euclidean distance. When loading each target interactive component, if the distance value of the target interactive component is greater than a preset distance threshold, the target interactive component will be converted into a text component type for display.

2. The method according to claim 1, characterized in that, Also includes: Add an interaction event listener to each target interactive component that is converted into a text component type. Once a user interaction is detected, trigger a restore operation to restore the converted text component back into an interactive component.

3. The method according to claim 2, characterized in that, Also includes: Based on the distance values, all target interactive components on the new page are sorted from smallest to largest to obtain a sorting result of the dependency degree of all target interactive components from largest to smallest. Based on the dependency degree sorting result, the layout of the target interactive components on the new page is optimized.

4. The method according to claim 1, characterized in that, The step of determining the set of sub-clusters with the highest dependency from the three sub-cluster sets includes: The distance between the intrinsic attribute feature vector of the center point of the common component cluster set and the center vector of the three sub-cluster sets is calculated using Euclidean distance. The sub-cluster set corresponding to the minimum distance value is determined as the sub-cluster set with the highest degree of dependence.

5. A page interaction component loading optimization device, characterized in that, include: The statistics unit is used to count the usage of various interactive components on the front-end page by users over a period of time, and to obtain user habits and the set of interactive components within the statistical scope. The habit feature extraction unit is used to extract user habit features based on the user's usage habits and UI page layout design specifications, and obtain the usage habit feature vector of each interactive component in the interactive component set. The initial clustering unit is used to perform initial clustering of the set of interactive components based on the usage habit feature vector of each interactive component, using a partition-based clustering algorithm to divide it into two cluster sets: frequently used components and infrequently used components. The inherent feature extraction unit is used to extract the inherent attribute features of components from the set of commonly used component clusters, and obtain the inherent attribute feature vector of each interactive component in the set of commonly used component clusters; The secondary clustering unit is used to perform secondary clustering on the common component cluster set based on the inherent attribute feature vector of each interactive component, using the same clustering algorithm, to further divide it into three sub-cluster sets, and determine the sub-cluster set with the highest degree of dependence from the three sub-cluster sets; The distance calculation unit is used to vectorize the inherent attribute feature vector of each target interactive component in the new page according to the inherent attribute features of the component, and to calculate the distance value between the inherent attribute feature vector of each target interactive component and the center vector of the sub-cluster set with the greatest dependence using Euclidean distance. The component type conversion unit is used to convert the target interactive component into a text component type for display when loading each target interactive component if the distance value of the target interactive component is greater than a preset distance threshold.

6. The apparatus according to claim 5, characterized in that, Also includes: The component type restoration unit is used to add interaction event listeners to each target interactive component that has been converted into a text component type. Once a user interaction is detected, a restoration operation is triggered to restore the converted text component back into an interactive component.

7. The apparatus according to claim 6, characterized in that, Also includes: The layout optimization unit is used to sort all target interactive components in the new page from smallest to largest according to the distance value, obtain the dependency ranking of all target interactive components from largest to smallest, and optimize the layout of the target interactive components in the new page based on the dependency ranking.

8. The apparatus according to claim 5, characterized in that, The secondary clustering unit is specifically used for: The distance between the intrinsic attribute feature vector of the center point of the common component cluster set and the center vector of the three sub-cluster sets is calculated using Euclidean distance. The sub-cluster set corresponding to the minimum distance value is determined as the sub-cluster set with the highest degree of dependence.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the method as described in any one of claims 1 to 4.

10. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Page display method, device and system, electronic equipment and storage medium

    CN112130719A

  • Data acquisition method and device, computer equipment and storage medium

    CN115563423A