A method for dynamically adjusting priority of UI elements based on user behavior prediction

By using a Transformer-based user behavior prediction model and a multi-dimensional scoring mechanism, the priority of UI elements and resource allocation are dynamically adjusted, solving the problem of the disconnect between resource allocation and interaction logic in existing technologies, and achieving more efficient and personalized user interface optimization.

CN122284876APending Publication Date: 2026-06-26LIANKE YUNCHUANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIANKE YUNCHUANG (BEIJING) TECH CO LTD
Filing Date
2026-04-23
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies lack the ability to predict the temporal correlations and intent evolution inherent in the dynamic sequences of user behavior, leading to a disconnect between resource allocation and interaction logic. Especially in resource-constrained scenarios, low-probability interaction elements consume critical resources, while high-probability elements suffer from insufficient resources, resulting in a poor user experience.

Method used

We employ a Transformer-based machine learning model to predict user behavior, and combine it with a multi-dimensional scoring mechanism to dynamically adjust the priority and resource allocation of UI elements. Through real-time environmental monitoring and closed-loop optimization, we can proactively adjust the priority and resource allocation of UI elements.

Benefits of technology

It significantly improves interaction efficiency and user experience smoothness, increases resource utilization, provides highly personalized interface loading strategies, and enhances the system's robustness and adaptability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284876A_ABST
    Figure CN122284876A_ABST
Patent Text Reader

Abstract

This invention discloses a method for dynamically adjusting the priority of UI elements based on user behavior prediction, comprising the following steps: S101. System initialization and baseline establishment; S102. Real-time data acquisition and preprocessing; S103. User behavior prediction; S104. Multi-dimensional priority scoring; S105. Adaptive resource scheduling and rendering execution; S106. Performance monitoring and closed-loop optimization. This invention can proactively predict user behavior and dynamically and intelligently adjust the priority, resource allocation, and rendering strategy of UI elements accordingly, thereby achieving a shift from "passive response" to "active prediction," significantly improving interaction efficiency, resource utilization, and personalized user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of user interface optimization and front-end performance technology, specifically to a method for dynamically adjusting the priority of UI elements based on user behavior prediction. Background Technology

[0002] With the increasing richness of application functions and the high degree of personalization of user behavior, traditional static UI templates are no longer sufficient to meet the interface adaptation needs of different users in different usage scenarios. Currently, the intelligent and adaptive capabilities of user interfaces have become key to improving user experience, and known technologies mainly focus on the following areas: (1) UI interaction technology based on intent recognition: These technologies identify user intent by analyzing direct user input (such as clicks and swipes) and then adjust the display of UI elements accordingly. For example, they can parse user commands through natural language processing or gesture recognition, associate them with preset UI elements and entity parameters, and dynamically construct the interface. However, these solutions heavily rely on real-time input and environmental data. The UI adjustment is triggered by the current user input and the instantaneous environmental state. The system only responds based on the behavior and environmental snapshot at the moment of input, without analyzing long-term user behavior patterns or predicting possible future interaction paths to pre-adjust the priority of UI elements.

[0003] (2) User behavior data analysis technology: This technology is widely used for interface optimization. The system collects users' historical interaction data (such as click frequency, usage duration, and operation sequence) to identify user preference patterns and adjust the order of menu items or content recommendations accordingly. However, its optimization dimensions are relatively singular, mainly focusing on resource loading order, and it does not apply the behavioral analysis results to adjust the visual hierarchy, layout structure, or ease of interaction of UI elements themselves. Even if a user frequently uses a certain function, the position, size, and accessibility of the corresponding UI element in the interface remain unchanged.

[0004] (3) Dynamic loading technology based on network environment and resource priority This type of technology prioritizes UI resources (such as images, scripts, and stylesheets) based on real-time network performance assessments, classifying them into critical, high-priority, and secondary resources, and dynamically adjusts loading strategies to improve user experience in weak network environments. However, its environment adaptation strategy is somewhat fragmented; the network adaptive mechanism only unidirectionally determines the resource loading strategy and fails to work in conjunction with user behavior prediction to influence the overall UI presentation decision.

[0005] In summary, the core problems shared by existing technologies are: static prediction, lacking the ability to predict the temporal relationships and intent evolution inherent in the dynamic sequences of user behavior; and a disconnect between resource allocation and interaction logic, where in resource-constrained scenarios, low-probability interaction elements may consume critical resources, while high-probability elements suffer from resource shortages. Therefore, there is an urgent need in this field for a dynamic adjustment scheme that can proactively predict user intent and achieve deep coordination between resources and interactions to address these technical deficiencies. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a method for dynamically adjusting the priority of UI elements based on user behavior prediction. This method can predict user behavior in advance and adjust the priority, resource allocation and rendering strategy of UI elements dynamically and intelligently accordingly, thereby realizing the transformation from "passive response" to "active prediction", significantly improving interaction efficiency, resource utilization and personalized user experience.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows.

[0008] A method for dynamically adjusting the priority of UI elements based on user behavior prediction includes the following steps: S101. System Initialization and Baseline Establishment: Initialize system modules, load the pre-trained user behavior sequence prediction model; collect and establish an environmental baseline of device performance parameters and network status; start user behavior monitoring and system performance monitoring. S102. Real-time data acquisition and preprocessing: Real-time acquisition of user interaction event sequences and conversion into standardized behavioral data; periodic or trigger-based updates of environmental parameters; S103. User Behavior Prediction: Based on behavioral data and environmental parameters, extract predictive features; input the extracted predictive features into the user behavior sequence prediction model, and output the predicted probability distribution of each UI element for the user's next operation; S104. Multi-dimensional priority scoring: For each UI element, calculate its score in different dimensions, and according to the preset weighting rules, merge the scores of different dimensions to calculate the comprehensive priority score of each UI element, and update the priority ranking of UI elements accordingly. S105. Adaptive Resource Scheduling and Rendering Execution: Based on the score range of the comprehensive priority score, a loading strategy is matched for each UI element; at the same time, the environmental resource allocation parameters are dynamically adjusted according to real-time environmental parameters; according to the updated priority sorting, resources are scheduled first and high-priority UI elements are rendered. S106. Performance monitoring and closed-loop optimization.

[0009] Preferably, in step S101, the system adopts a layered design, including the following logical modules: The data acquisition layer module includes a behavior tracker and an environment monitor. The behavior tracker is used to collect user interaction event sequences in real time and process the collected interaction event sequences to form standardized behavior data. The environment monitor is used to collect environmental parameters in real time, including device performance parameters and network status information. Prediction Calculation Layer Module: Includes a behavior predictor with a built-in machine learning model based on the Transformer architecture. It receives standardized behavior data and real-time environmental parameters output by the data acquisition layer module, runs the user behavior sequence prediction model, and outputs the predicted probability distribution of each UI element for the user's next operation. Priority scoring layer module: includes an element scorer and a priority queue; the element scorer is used to receive the element operation prediction probability distribution from the prediction calculation layer module, and calculate a comprehensive priority score for each UI element by combining four dimensions of indicators: prediction probability, element business importance, estimated loading cost, and user historical preferences; the priority queue is used to sort the comprehensive priority scores of each UI element in descending order. Resource scheduling layer module: includes a resource scheduler, which dynamically allocates environmental resources based on the sorted comprehensive priority score and real-time environmental parameters, determines the loading strategy of each element, and generates UI element rendering instructions; The execution feedback layer module includes a rendering executor and a performance monitor. The rendering executor executes UI element rendering instructions to complete page rendering. The performance monitor monitors key system performance indicators and compares them with the predicted probability distribution results, feeding error signals and performance data back to the prediction calculation layer module to drive incremental model optimization.

[0010] Preferably, in step S101, the system module is initialized, including the behavior predictor, element scorer, resource scheduler and performance monitor; the user behavior sequence prediction model is a machine learning model based on the Transformer architecture, and its configuration includes a mapping dictionary of UI element identifiers and model input indices, and a fixed-length behavior sequence N for model input.

[0011] Preferably, in step S102, a sliding window mechanism is also used to manage behavioral data in order to control the data scale and timeliness. Specifically, the sliding window mechanism is used to maintain the most recent M behavioral data records, and old records that exceed the window length are automatically removed. The standardized behavioral data includes at least the behavior type, the identifier of the UI element being operated on, the timestamp, and the location information.

[0012] Preferably, in step S103, the extracted prediction features include temporal features and element association features extracted from behavioral data, as well as device performance features and network quality features extracted from environmental parameters; the temporal features include session time period, day of the week, and session duration; the element association features include behavior type sequence, operated UI element identifier sequence, and interaction frequency statistics for specific UI elements; the device performance features include normalized values ​​of memory size and CPU core count, and an identifier indicating whether the device type is a mobile terminal; the network quality features include network speed mapping values ​​and an identifier indicating whether it is in a low bandwidth state. The user behavior sequence prediction model focuses on key behavior associations through a multi-head attention mechanism and outputs the predicted probability distribution of each UI element for the user's next operation. Step S103 also includes temporarily storing the predicted probability distribution results output by the model for closed-loop optimization in the subsequent step S106.

[0013] Preferably, in step S104, the scores for different dimensions include a predicted probability score, a preset business importance score, a loading cost score estimated based on the real-time environment, and a preference score based on historical user data; the comprehensive priority score is calculated using the following weighted formula: Overall priority score = W1 × prediction probability score + W2 × business importance score + W3 × loading cost score + W4 × preference score, where W1, W2, W3 and W4 are preset weight coefficients, and W1+W2+W3+W4=1; The priority ranking of the UI elements is updated in descending order based on the overall priority score of each UI element.

[0014] Preferably, in step S104, the scores for different dimensions are calculated as follows: Prediction probability score: The probability value of the UI element being operated is directly taken from the output of the user behavior sequence prediction model as the score; Importance Score: Based on the type attribute of the UI element, a preset base score of business importance is matched as the score; Loading cost score = 1 - (estimated loading time / T_max), where estimated loading time = UI element data size / (current network bandwidth × device performance factor), and T_max is the preset maximum tolerable loading time constant; Preference Score: Based on the local historical access count of the UI element, the score is obtained by normalizing the data and mapping it to a range of 0 to 1.

[0015] Preferably, in step S105, the loading strategy includes immediate loading, preloading, and lazy loading, and the specific rules for matching the loading strategy to the UI element are as follows: If the overall priority score of a UI element is greater than the first score threshold, then the immediate loading strategy will be matched for it. If the overall priority score of a UI element is between the first score threshold and the second score threshold, then a strategy of preloading critical resources will be matched for it. If the overall priority score of a UI element is less than the second score threshold, then a lazy loading strategy based on the visibility API will be matched for it. In step S105, the environmental resource allocation parameters are dynamically adjusted, including dynamically adjusting the number of concurrent tasks loading UI resources based on the current number of device CPU cores and network bandwidth level, and UI elements with high priority scores occupy concurrent resources first. In step S105, while rendering is being performed, layout offset is reduced by precisely controlling the CSS hierarchy and the insertion order of DOM elements.

[0016] Preferably, step S106 specifically involves: monitoring key performance indicators of the system, comparing the actual user interaction events with the predicted probability distribution results of step S103, and calculating the error signal and prediction accuracy; when the prediction accuracy is lower than a preset threshold N times consecutively, triggering a multi-level fallback mechanism to ensure basic user experience; using the error signal and the latest behavioral data, performing online incremental learning on the user behavior sequence prediction model, and dynamically optimizing the rating weight parameters in step S104.

[0017] Preferably, the multi-level rollback mechanism in step S106 includes: Level 1 rollback: When the prediction accuracy is lower than the accuracy threshold for N consecutive times, rollback is performed to prioritize and allocate resources based on heuristic rules such as "first screen elements first" and "core function buttons first". Level 2 rollback: When the system's key performance indicators are still lower than the preset standards after Level 1 rollback is triggered, the loading will be rolled back to a fixed priority order based on static configuration. The online incremental learning in step S106 refers to fine-tuning the attention weight parameters of the user behavior sequence prediction model using error signals and the latest behavioral data, without having to retrain the complete model.

[0018] Due to the adoption of the above technical solutions, the technical progress achieved by this invention is as follows.

[0019] This invention achieves a shift from passive response to proactive prediction, significantly improving interaction efficiency and user experience smoothness: Corresponding technical measures: Use a Transformer-based sequence model to predict user behavior in advance, and complete the priority adjustment and resource preloading of high-probability UI elements before the user actually operates.

[0020] Technical Effects: This invention fundamentally solves the operational delays and interface lag issues caused by lag in existing technologies, significantly reducing user-perceived loading and operation waiting times, resulting in a smoother interaction process. This invention also provides a deeper level of personalized user experience: The corresponding technical approach is to dynamically predict based on the real-time behavior sequence of individual users and to make a comprehensive score based on their long-term historical preferences, rather than relying on static, group-based rules.

[0021] Technical effect: It generates highly customized interface loading and presentation strategies for different users and even different stages of the same user's session, effectively avoiding the "one-size-fits-all" optimization strategy and significantly improving user satisfaction and engagement.

[0022] This invention achieves global optimization of system resource utilization efficiency: Corresponding technical measures: Introduce the "loading cost" dimension into the priority scoring and link it with real-time environmental monitoring to dynamically adjust resource scheduling strategies.

[0023] Technical effect: It ensures that limited environmental resources (network bandwidth, CPU computing power) are accurately allocated to the UI elements that users need most and that have the highest value, reducing ineffective resource consumption overall. Especially in resource-constrained environments, the system used by users can still maintain smooth operation.

[0024] This invention enhances the robustness and adaptability of the system when facing complex and ever-changing environments and user behaviors: Corresponding technical measures: A complete closed-loop system was designed, which has incremental learning capabilities based on real-time feedback and a multi-level fault rollback mechanism.

[0025] Technical benefits: The system can adapt to various complex environments, from high-end to low-end devices and from excellent to weak networks. When user behavior patterns change abruptly or temporary failures are predicted, it automatically degrades to a stable strategy, ensuring the continuity and stability of services. Attached Figure Description

[0026] Figure 1 This is a flowchart of the present invention; Figure 2 This is a schematic diagram of the system layered architecture of the present invention. Detailed Implementation

[0027] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0028] A method for dynamically adjusting the priority of UI elements based on user behavior prediction, combined with Figure 1As shown, the linear process and closed-loop optimization based on "initialization → data collection → prediction → scoring → scheduling → feedback" includes the following steps: S101. System Initialization and Baseline Establishment: Initialize system modules, load pre-trained user behavior sequence prediction models; collect and establish environmental baselines for device performance parameters and network status; start user behavior monitoring and system performance monitoring.

[0029] like Figure 2 As shown, the system implements a closed loop of "data acquisition → behavior prediction → priority scoring → resource scheduling → rendering execution → feedback optimization". It adopts a layered design to achieve logical decoupling, and the collaborative work of each module ensures dynamic adjustment effects. Specifically, it includes the following logical modules: The data acquisition layer module includes a behavior tracker and an environment monitor. The behavior tracker is used to collect user interaction event sequences (clicks, scrolling, etc.) in real time and process the collected interaction event sequences to form standardized behavior data. The environment monitor is used to collect environmental parameters in real time, including device performance parameters and network status information. Prediction Calculation Layer Module: Includes a behavior predictor with a built-in machine learning model based on the Transformer architecture. It receives standardized behavior data and real-time environmental parameters output by the data acquisition layer module, runs the user behavior sequence prediction model, and outputs the predicted probability distribution of each UI element for the user's next operation, i.e., the element operation probability distribution.

[0030] Priority scoring layer module: includes element scorer and priority queue; element scorer is used to receive the element operation prediction probability distribution from prediction calculation layer module, and calculate a comprehensive priority score for each UI element by combining four dimensions of indicators: prediction probability, element business importance, estimated loading cost, and user historical preference; priority queue is used to sort the comprehensive priority scores of each UI element in descending order.

[0031] Resource scheduling layer module: includes a resource scheduler, which dynamically allocates environmental resources (CPU, network bandwidth, etc.) based on the sorted comprehensive priority score and real-time environmental parameters, and determines the loading strategy of each element (immediate loading, preloading, lazy loading), and generates UI element rendering instructions (i.e., loading + resource allocation instructions).

[0032] The execution feedback layer module includes a rendering executor and a performance monitor. The rendering executor executes UI element rendering instructions to complete page rendering. The performance monitor monitors key system performance indicators and compares them with the predicted probability distribution results, feeding error signals and performance data back to the prediction calculation layer module to drive incremental model optimization.

[0033] This step is specifically as follows: Initialize system modules: Specifically, create the UIElementPrioritySystem main object, initialize the behavior predictor, element scorer, resource scheduler and performance monitor, and complete the configuration of inter-module communication interfaces; Model and parameter loading: The behavior predictor loads the pre-trained user behavior sequence prediction model, which is a machine learning model based on the Transformer architecture. Its configuration includes a mapping dictionary between UI element identifiers and model input indices, as well as a fixed-length behavior sequence N (N=10) for model input; the element scorer initializes the weights of the four-dimensional indicators (e.g., W1=0.4, W2=0.25, W3=0.2, W4=0.15).

[0034] Environment baseline establishment: Call getDeviceInfo() to collect hardware parameters such as device memory, number of CPU cores, and screen size; call getNetworkInfo() to collect network parameters such as network valid type, downlink bandwidth, and RTT, and store them as the initial environment baseline.

[0035] The monitoring mechanism is activated: the setupBehaviorTracking() function is called to register click, scroll, hover and other behavior listener events (mouse movement events are throttled to 500ms). The performance monitor is activated to monitor metrics such as FCP, LCP, FID, and CLS.

[0036] S102. Real-time Data Acquisition and Preprocessing: Real-time acquisition of user interaction event sequences and conversion into standardized behavioral data; periodic or trigger-based updates of environmental parameters. Details are as follows: Data Acquisition and Preprocessing: When a user interacts with an event, the `recordAction()` method is triggered, converting the sequence of interaction events into standardized behavioral data containing information such as "behavior type - identifier of the UI element being interacted with - timestamp - location," as detailed below: {type:"click",elementId:"search-btn",timestamp:1731234567890,position:{x:200,y:300}}) Sliding window management: In this step, a sliding window mechanism is also used to manage behavioral data, thereby controlling the data scale and timeliness. Specifically, the sliding window mechanism is used to maintain the most recent M (e.g., 100) behavioral data records. Old records that exceed the window length are automatically removed, ensuring data timeliness while controlling the amount of data processed (reducing computational overhead). Environmental parameter updates: The network status is updated periodically by calling getNetworkInfo() every 2 seconds. When device information changes (such as connecting an external monitor or switching WiFi), the data is resampled to ensure the real-time nature of environmental parameters.

[0037] S103. User Behavior Prediction: Based on behavioral data and environmental parameters, extract predictive features; input the extracted predictive features into the user behavior sequence prediction model, and output the predicted probability distribution of each UI element for the user's next operation. Details are as follows: Predictive Feature Extraction: The behavior predictor calls the `extractFeatures()` method to extract temporal and element-related features from the behavior data, and device performance and network quality features from the environmental parameters. Specifically, temporal features include session time period, day of the week, and session duration; element-related features include behavior type sequences, sequences of operated UI element identifiers, and interaction frequency statistics for specific UI elements (click / scroll / hover frequency, etc.); device performance features include normalized values ​​of memory size and CPU core count, and an identifier indicating whether the device type is a mobile device; network quality features include network speed mapping values ​​and an identifier indicating whether it is in a low-bandwidth state.

[0038] Model inference: After the predicted features are converted into vectors, they are input into the user behavior sequence prediction model. The model focuses on key behavioral associations through a multi-head attention mechanism (such as "click on the product list → hover over product A" implies that the next step may be to click on product A), and outputs the predicted probability distribution of each UI element of the user's next operation.

[0039] Incremental learning preparation: Temporarily store the predicted probability distribution results output by the model for closed-loop optimization in subsequent step S106.

[0040] S104. Multi-dimensional Priority Scoring: For each UI element, scores are calculated for different dimensions. Based on a preset weighting rule, the scores from different dimensions are combined to calculate a comprehensive priority score for each UI element, and the priority ranking of the UI elements is updated accordingly. Details are as follows: Score Calculation for Different Dimensions: The element scorer calls the `calculateScore()` method to calculate the score for each dimension, including the predicted probability score, the preset business importance score, the loading cost score estimated based on the real-time environment, and the preference score based on historical user data. The calculation methods for the scores of different dimensions are as follows: Prediction probability score: The probability value of the UI element being operated is directly taken from the output of the user behavior sequence prediction model as the score; Importance Score: Based on the type attribute of the UI element, a preset base score of business importance is matched as the score; Loading cost score = 1 - (estimated loading time / T_max), where estimated loading time = UI element data size / (current network bandwidth × device performance factor), and T_max is the preset maximum tolerable loading time constant, such as 10; Preference Score: Based on the local historical access count of the UI element, the score is obtained by normalizing the data and mapping it to a range of 0 to 1.

[0041] Overall priority score calculation: Specifically, it is calculated using the following weighted formula: The overall priority score is calculated as follows: W1 × Predicted Probability Score + W2 × Business Importance Score + W3 × Loading Cost Score + W4 × Preference Score, where W1, W2, W3, and W4 are preset weighting coefficients, and W1 + W2 + W3 + W4 = 1. For example, the score of a certain element is 0.7 × 0.4 + 0.85 × 0.25 + 0.9 × 0.2 + 0.8 × 0.15 = 0.7825.

[0042] UI element priority sorting update: The priority queue is reordered according to the overall priority score, and updated in descending order of the overall priority score of each UI element. The element with the highest score is placed at the head of the queue to provide a sorting basis for scheduling.

[0043] S105. Adaptive Resource Scheduling and Rendering Execution: Based on the overall priority score range, a loading strategy is matched for each UI element; simultaneously, environmental resource allocation parameters are dynamically adjusted according to real-time environmental parameters; resources are scheduled first and high-priority UI elements are rendered according to the updated priority order. Details are as follows: Loading strategy matching: Loading strategies include immediate loading, preloading, and lazy loading. The resource scheduler divides the strategy into three levels based on the overall priority score. The specific rules for matching loading strategies for UI elements are as follows: If the overall priority score of a UI element is greater than the first score threshold (e.g., >0.8), then the immediate loading strategy will be matched to load the complete resources (scripts, styles, data). If the overall priority score of a UI element is between the first and second score thresholds (e.g., 0.5-0.8), then a strategy for preloading critical resources will be matched for it (e.g., using link rel="preload" to load scripts). If the overall priority score of a UI element is less than the second score threshold (e.g., <0.5), then it will be matched with a lazy loading strategy based on the visibility API (i.e., loading after the Intersection Observer monitors visibility).

[0044] Dynamically adjust environmental resource allocation parameters: Based on environmental parameters (current device CPU core count and network bandwidth level), dynamically adjust the number of concurrent tasks for loading UI resources (e.g., 6 concurrent tasks for 4-core CPU + 4G network, 3 concurrent tasks for 2-core CPU + 2G network), and prioritize UI elements with high priority scores to occupy concurrent resources to avoid loading delays caused by resource contention.

[0045] Rendering execution: Calling the renderElement() method triggers the front-end framework to render, with UI elements of higher priority scores being rendered first. At the same time, by precisely controlling the CSS hierarchy and the insertion order of DOM elements, layout offset (CLS) is reduced.

[0046] This step effectively achieves a precise match between system resource allocation and interaction requirements. By dynamically allocating system resources (loading bandwidth, rendering computation) and deeply binding them to the predicted priority of UI elements, it ensures that high-probability interactive elements can preferentially acquire critical resources such as concurrent loading tasks, thereby significantly improving resource utilization efficiency and system response speed. Simultaneously, by finely controlling CSS hierarchy and DOM order during the rendering of high-priority elements, performance under high-frequency dynamic interactions is optimized, reducing the risk of stuttering caused by layout recalculation.

[0047] S106. Performance Monitoring and Closed-Loop Optimization. Details are as follows: Performance monitoring: Monitor key system performance indicators and compare the actual user interaction events with the predicted probability distribution results of step S103 to calculate error signals and prediction accuracy. When the prediction accuracy is lower than a preset threshold (e.g., 70%) for N consecutive times (e.g., 3 times), the error is deemed excessive, triggering a multi-level rollback mechanism to ensure a basic user experience. The multi-level rollback mechanism includes: Level 1 rollback: When the prediction accuracy is lower than the accuracy threshold for N consecutive times, rollback is performed to prioritize and allocate resources based on heuristic rules such as "first screen elements first" and "core function buttons first". Level 2 rollback: When a Level 1 rollback is triggered and the system's key performance indicators are still lower than the preset standards, the system will roll back to a fixed priority order based on static configuration for loading.

[0048] Closed-loop optimization: Using error signals and the latest behavioral data, the user behavior sequence prediction model is incrementally learned online, and the rating weight parameters in step S104 are dynamically optimized.

[0049] Specifically, the error signal and the latest behavioral data are input into the user behavior sequence prediction model, and the attention weights are fine-tuned through online learning (without retraining the complete model, and the update time is ≤1 second). At the same time, if the performance index does not reach the threshold (such as LCP>3 seconds), the scoring weight parameters in step S104 are dynamically adjusted (such as increasing W3 to 0.3) to optimize the subsequent scoring and scheduling accuracy.

[0050] In use, this invention fundamentally solves the problem of insufficient foresight in UI adjustment in existing technologies by using the prediction in step S103 and the advance adjustment in steps S104-S105. The system can pre-adjust the priority and resource allocation of UI elements based on the predicted behavior sequence before the user's actual operation, thereby preparing the optimal or better interface layout and state in advance. This effectively reduces the waiting time and operation steps required for subsequent user operations, significantly improving interaction efficiency. Simultaneously, in step S103, this invention constructs a dynamic user behavior sequence prediction model by integrating multi-dimensional behavioral features such as temporal patterns, contextual relationships, and environmental states. This allows subsequent UI adjustments to more accurately match the user's actual needs and current context, helping to reduce the user's error rate and cognitive load, thereby improving the personalized interaction experience.

Claims

1. A method for dynamically adjusting the priority of UI elements based on user behavior prediction, characterized in that: Includes the following steps: S101. System Initialization and Baseline Establishment: Initialize system modules, load the pre-trained user behavior sequence prediction model; collect and establish an environmental baseline of device performance parameters and network status; start user behavior monitoring and system performance monitoring. S102. Real-time data acquisition and preprocessing: Real-time acquisition of user interaction event sequences and conversion into standardized behavioral data; periodic or trigger-based updates of environmental parameters; S103. User Behavior Prediction: Based on behavioral data and environmental parameters, extract predictive features; input the extracted predictive features into the user behavior sequence prediction model, and output the predicted probability distribution of each UI element for the user's next operation; S104. Multi-dimensional priority scoring: For each UI element, calculate its score in different dimensions, and according to the preset weighting rules, merge the scores of different dimensions to calculate the comprehensive priority score of each UI element, and update the priority ranking of UI elements accordingly. S105. Adaptive Resource Scheduling and Rendering Execution: Based on the score range of the comprehensive priority score, a loading strategy is matched for each UI element; at the same time, the environmental resource allocation parameters are dynamically adjusted according to real-time environmental parameters; according to the updated priority sorting, resources are scheduled first and high-priority UI elements are rendered. S106. Performance monitoring and closed-loop optimization.

2. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 1, characterized in that: In step S101, the system adopts a layered design, including the following logical modules: Data acquisition layer module: includes a behavior tracker and an environmental monitor; the behavior tracker is used to collect user interaction event sequences in real time and process the collected interaction event sequences to form standardized behavior data; The environmental monitor is used to collect environmental parameters in real time, including equipment performance parameters and network status information. Prediction Calculation Layer Module: Includes a behavior predictor with a built-in machine learning model based on the Transformer architecture. It receives standardized behavior data and real-time environmental parameters output by the data acquisition layer module, runs the user behavior sequence prediction model, and outputs the predicted probability distribution of each UI element for the user's next operation. Priority scoring layer module: includes an element scorer and a priority queue; the element scorer is used to receive the element operation prediction probability distribution from the prediction calculation layer module, and calculate a comprehensive priority score for each UI element by combining four dimensions of indicators: prediction probability, element business importance, estimated loading cost, and user historical preferences; the priority queue is used to sort the comprehensive priority scores of each UI element in descending order. Resource scheduling layer module: includes a resource scheduler, which dynamically allocates environmental resources based on the sorted comprehensive priority score and real-time environmental parameters, determines the loading strategy of each element, and generates UI element rendering instructions; The execution feedback layer module includes a rendering executor and a performance monitor. The rendering executor executes UI element rendering instructions to complete page rendering. The performance monitor monitors key system performance indicators and compares them with the predicted probability distribution results, feeding error signals and performance data back to the prediction calculation layer module to drive incremental model optimization.

3. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 2, characterized in that: In step S101, the system modules are initialized, including the behavior predictor, element scorer, resource scheduler and performance monitor. The user behavior sequence prediction model is a machine learning model based on the Transformer architecture. Its configuration includes a mapping dictionary of UI element identifiers and model input indices, and a fixed-length behavior sequence N for model input.

4. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 1, characterized in that: In step S102, a sliding window mechanism is also used to manage behavioral data in order to control the data scale and timeliness. Specifically, the sliding window mechanism is used to maintain the most recent M behavioral data records, and old records that exceed the window length are automatically removed. The standardized behavioral data includes at least the behavior type, the identifier of the UI element being operated on, the timestamp, and the location information.

5. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 1, characterized in that: In step S103, the extracted prediction features include time-series features and element association features extracted from behavioral data, as well as device performance features and network quality features extracted from environmental parameters; the time-series features include session period, day of the week, and session duration. The element association features include a behavior type sequence, an operational UI element identifier sequence, and interaction frequency statistics for a specific UI element; the device performance features include normalized values ​​of memory size and CPU core count, and an identifier indicating whether the device type is a mobile device; the network quality features include a network speed mapping value and an identifier indicating whether it is in a low bandwidth state. The user behavior sequence prediction model focuses on key behavior associations through a multi-head attention mechanism and outputs the predicted probability distribution of each UI element for the user's next operation. Step S103 also includes temporarily storing the predicted probability distribution results output by the model for closed-loop optimization in the subsequent step S106.

6. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 1, characterized in that: In step S104, the scores for different dimensions include a predicted probability score, a preset business importance score, a loading cost score estimated based on the real-time environment, and a preference score based on historical user data; the comprehensive priority score is calculated using the following weighted formula: Overall priority score = W1 × prediction probability score + W2 × business importance score + W3 × loading cost score + W4 × preference score, where W1, W2, W3 and W4 are preset weight coefficients, and W1+W2+W3+W4=1; The priority ranking of the UI elements is updated in descending order based on the overall priority score of each UI element.

7. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 6, characterized in that: In step S104, the scores for different dimensions are calculated as follows: Prediction probability score: The probability value of the UI element being operated is directly taken from the output of the user behavior sequence prediction model as the score; Importance Score: Based on the type attribute of the UI element, a preset base score of business importance is matched as the score; Loading cost score = 1 - (estimated loading time / T_max), where estimated loading time = UI element data size / (current network bandwidth × device performance factor), and T_max is the preset maximum tolerable loading time constant; Preference Score: Based on the local historical access count of the UI element, the score is obtained by normalizing the data and mapping it to a range of 0 to 1.

8. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 1, characterized in that: In step S105, the loading strategies include immediate loading, preloading, and lazy loading. The specific rules for matching the loading strategy to UI elements are as follows: If the overall priority score of a UI element is greater than the first score threshold, then the immediate loading strategy will be matched for it. If the overall priority score of a UI element is between the first score threshold and the second score threshold, then a strategy of preloading critical resources will be matched for it. If the overall priority score of a UI element is less than the second score threshold, then a lazy loading strategy based on the visibility API will be matched for it. In step S105, the environmental resource allocation parameters are dynamically adjusted, including dynamically adjusting the number of concurrent tasks loading UI resources based on the current number of device CPU cores and network bandwidth level, and UI elements with high priority scores occupy concurrent resources first. In step S105, while rendering is being performed, layout offset is reduced by precisely controlling the CSS hierarchy and the insertion order of DOM elements.

9. The method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 1, characterized in that: Step S106 specifically involves: monitoring key performance indicators of the system, comparing the actual user interaction events with the predicted probability distribution results of step S103, calculating the error signal and prediction accuracy; triggering a multi-level fallback mechanism to ensure basic user experience when the prediction accuracy is lower than a preset threshold for N consecutive times; using the error signal and the latest behavioral data to perform online incremental learning on the user behavior sequence prediction model, and dynamically optimizing the scoring weight parameters in step S104.

10. A method for dynamically adjusting the priority of UI elements based on user behavior prediction according to claim 9, characterized in that: The multi-level rollback mechanism in step S106 includes: Level 1 rollback: When the prediction accuracy is lower than the accuracy threshold for N consecutive times, rollback is performed to priority determination and resource scheduling based on heuristic rules of "first screen element priority" and "core function button priority". Level 2 rollback: When the system's key performance indicators are still lower than the preset standards after Level 1 rollback is triggered, the loading will be rolled back to a fixed priority order based on static configuration. The online incremental learning in step S106 refers to fine-tuning the attention weight parameters of the user behavior sequence prediction model using error signals and the latest behavioral data, without having to retrain the complete model.