Intelligent request preloading and cache failure control method and device

By combining real-time interaction data and a dynamic weight prediction model of group historical behavior, resource preloading and cache management are optimized, solving the problems of resource waste and low cache efficiency in existing technologies, achieving efficient resource loading and cache management, and improving user experience and system performance.

CN120743538APending Publication Date: 2025-10-03TIANFU JIANGXI LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510929349.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing technologies lack a systematic method to apply accurate predictions of user behavior to resource preloading decisions and cache management, resulting in waste of preloading resources and inefficient caching, and an inability to dynamically adapt to changes in user behavior.

Method used

By integrating real-time interaction data with a dynamic weighted prediction model of group historical behavior, resource request probabilities are generated. The resource loading priority is calculated based on network status and device load, preloading and cache invalidation are triggered in real time, and prediction model parameters are dynamically adjusted to optimize accuracy.

Benefits of technology

It significantly improves resource loading efficiency and cache utilization, reduces invalid preloading, increases cache hit rate, reduces server load, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743538A_ABST
    Figure CN120743538A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent request preloading and cache failure control method and device, and the method comprises the steps: collecting the interaction behavior data of a user, synchronously obtaining the historical behavior data of a similar user group, generating real-time operation intention prediction through the interaction behavior data, generating group behavior trend prediction, and generating a resource request probability through dynamic weight fusion. The method comprises the following steps: calculating a resource loading priority by combining a real-time network state and an equipment load, triggering preloading of a high-priority resource in an idle period of a browser, setting a cache weight based on a request probability value, and actively triggering a cache failure when monitoring that the probability value is continuously lower than a set threshold value. And according to a matching result of the actual access behavior of the user and the preloaded resources, adjusting prediction model parameters in real time so as to optimize prediction precision. Through a dynamic weight prediction model fusing real-time interaction data and group historical behaviors and a cache intelligent elimination mechanism based on a probability threshold, the resource loading efficiency and the cache utilization rate are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of behavior prediction technology, and more specifically, to a method and device for intelligent request preloading and cache invalidation control. Background Art

[0002] With the in-depth development of Internet applications, users' requirements for web page and application responsiveness are increasing. Front-end performance optimization technologies, especially preloading and caching, have become key means to improve user experience. Preloading technology aims to proactively load resources that users may need in the future before they actually request them, so that the resources are locally available when the request is made, significantly reducing waiting time. Caching technology improves resource access speed by storing already obtained resources locally, avoiding repeated network requests and downloads. However, traditional preloading and caching strategies have significant limitations in practice.

[0003] Traditional preloading methods often rely on simple heuristics, such as those based on links within the current page, the user's historical visit sequence, or predefined configurations by the developer. These static or semi-static strategies lack a deep understanding of user behavior patterns and the ability to accurately predict them. The direct consequence is blind preloading: it can load a large number of resources that the user ultimately doesn't need, wasting network bandwidth and computing resources. Loading irrelevant resources can even slow down the application, negatively impacting the user experience. Therefore, the effectiveness of preloading relies heavily on accurately predicting the user's next behavior. Without this foundation, preloading significantly reduces its practical significance.

[0004] In terms of cache management, traditional mechanisms generally use fixed resource expiration times or simple cache replacement algorithms. These static strategies are difficult to dynamically adapt to changing user access patterns and content popularity. When user behavior patterns change, traditional cache strategies cannot adjust in a timely manner, which may lead to a decrease in cache hit rate and outdated cache content, thereby reducing I / O performance. At the same time, its expiration mechanism mainly relies on preset expiration times or manual refreshes. In situations where user behavior is complex and changing, it is easy for the cache to fail to update in time or for invalid data to occupy valuable cache space for a long time. How to dynamically adjust the cache lifecycle based on real-time user behavior and intelligently trigger cache loading and expiration is the core challenge in improving cache efficiency.

[0005] Existing technologies have proposed several improvements to address these issues. In the area of ​​preloading, researchers are exploring the use of machine learning techniques or analyzing user clickstream data to build interest models, aiming to more accurately predict future user requests and enable predictive preloading. In terms of cache optimization, context-aware caching algorithms and dynamic cache replacement strategies based on reinforcement learning (automatically learning optimal retention or elimination strategies based on changes in user access patterns) have emerged, aiming to incorporate user behavior patterns into cache management.

[0006] Despite this, existing technical solutions still have obvious shortcomings. The core problem is the lack of a systematic method that can simultaneously and effectively apply the accurate prediction of user behavior to guide resource preloading decisions and dynamic cache management. Specifically, existing solutions mostly focus on the improvement of a single technology and mainly rely on historical behavior data of individual users or simple group statistical patterns for analysis. They generally fail to fully utilize the contextual information generated by real-time user interactions and the behavioral patterns of similar user groups to enhance the accuracy of predictions. More importantly, how to convert the prediction results into specific preloading instructions and cache policy adjustments in real time and efficiently to maximize the user experience while minimizing resource waste remains an unresolved key issue. Summary of the Invention

[0007] The purpose of this application is to provide an intelligent request preloading and cache invalidation control method and device in order to overcome the existing technical defects. By integrating the dynamic weight prediction model of real-time interaction data and group historical behavior, and the cache intelligent elimination mechanism based on probability threshold, the resource loading efficiency and cache utilization are significantly improved.

[0008] The purpose of this application is achieved through the following technical solutions: In a first aspect, the present application proposes a method for intelligent request preloading and cache invalidation control, the method comprising: Collect user interaction behavior data in real time and simultaneously obtain historical behavior data of similar user groups; Use interactive behavior data to generate real-time operation intention predictions, use historical behavior data as input to generate group behavior trend predictions, and generate resource request probabilities through dynamic weight fusion; Based on the resource request probability, combined with real-time network status and device load, the resource loading priority is calculated, triggering the preloading of high-priority resources during the browser's idle period; For preloaded resources, a cache weight is set based on the request probability value. When the probability value is continuously lower than the set threshold, cache invalidation is triggered proactively. Based on the matching results between the user's actual access behavior and the preloaded resources, the prediction model parameters are adjusted in real time to optimize the prediction accuracy.

[0009] In a possible implementation, the interactive behavior data includes at least one of a mouse hover duration, a click frequency, a page scroll depth, and an operation sequence pattern; The historical behavior data of similar user groups is obtained through user portrait clustering. The user portrait includes user interest tags, historical access paths, and device type characteristics.

[0010] In a possible implementation, the step of dynamic weight fusion includes: Assigning the first weight to the real-time operation intention prediction and the second weight to the group behavior trend prediction; The first weight is increased according to the amount of user's current session data, and the second weight is increased according to the group data coverage.

[0011] In a possible implementation, when calculating resource loading priority, the resource request probability is positively correlated with the network quality score and negatively correlated with the resource size.

[0012] In one possible implementation, the conditions for triggering cache invalidation include: The resource request probability is lower than the threshold for multiple consecutive monitoring cycles; Receive notification of server resource changes; When cache space is insufficient, low-probability resources are eliminated by weight sorting.

[0013] In one possible implementation, dynamically adjusting prediction model parameters includes: When preloaded resources are accessed, the corresponding behavior feature weight is enhanced; Reduce the confidence of group behavior data when there is a high probability that the resource has not been accessed.

[0014] In one possible implementation, the method further includes preloading conflict handling: When a new preloaded task conflicts with an ongoing task, the low-value task is aborted based on priority; Pause all preloading immediately when the browser ends its idle state; When user active operation is detected, the network resources occupied by preloading are released.

[0015] In a second aspect, the present application proposes an intelligent request preloading and cache invalidation control device, the device comprising: The data collection module is used to collect user interaction behavior data in real time and simultaneously obtain historical behavior data of similar user groups; The weight fusion module is used to generate real-time operation intention predictions using interactive behavior data, generate group behavior trend predictions using historical behavior data as input, and generate resource request probabilities through dynamic weight fusion; The preloading module is used to calculate resource loading priority based on resource request probability, combined with real-time network status and device load, and trigger preloading of high-priority resources during browser idle periods; The cache invalidation module is used to set cache weights for preloaded resources based on request probability values, and actively trigger cache invalidation when the probability value is continuously lower than the set threshold; The parameter adjustment module is used to adjust the prediction model parameters in real time to optimize the prediction accuracy based on the matching results of the user's actual access behavior and the preloaded resources.

[0016] The above-mentioned main solution of this application and its various further options can be freely combined to form multiple solutions, all of which are solutions that can be adopted and protected by this application. Moreover, in this application, (non-conflicting options) can also be freely combined with each other and with other options. After understanding the solution of this application, those skilled in the art will understand that there are many combinations based on existing technology and common knowledge, all of which are technical solutions to be protected by this application, and this is not an exhaustive list.

[0017] This application discloses a method and device for intelligent request preloading and cache invalidation control, which collects user interaction behavior data and simultaneously obtains historical behavior data of similar user groups, uses interaction behavior data to generate real-time operation intention predictions, generates group behavior trend predictions, and generates resource request probabilities through dynamic weight fusion. It combines real-time network status and device load to calculate resource loading priorities, triggers preloading of high-priority resources during browser idle periods, sets cache weights based on request probability values, and actively triggers cache invalidation when the probability value is continuously lower than the set threshold. According to the matching results of the user's actual access behavior and the preloaded resources, the prediction model parameters are adjusted in real time to optimize the subsequent prediction accuracy. By integrating the dynamic weight prediction model of real-time interaction data and group historical behavior, and the cache intelligent elimination mechanism based on probability thresholds, the resource loading efficiency and cache utilization rate are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flow chart of an intelligent request preloading and cache invalidation control method proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0020] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0021] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.

[0022] In order to solve the problems in the prior art, the embodiments of the present application propose an intelligent request preloading and cache invalidation control method and device. By real-time collection and analysis of user interaction behavior data, combined with the behavior patterns of similar user groups, it predicts the resources that the user may request next; then, based on the prediction results, these resources are preloaded before the user actually requests, and the cache loading and invalidation process is intelligently managed, thereby significantly improving resource access efficiency and user experience. It is described in detail below.

[0023] Please refer to Figure 1 , Figure 1 A flow chart of an intelligent request preloading and cache invalidation control method proposed in an embodiment of the present application is shown, and the method includes: Step S1: Collect user interaction behavior data in real time and simultaneously obtain historical behavior data of similar user groups. Interaction behavior data includes at least one of mouse hover duration, click frequency, page scroll depth, and operation sequence pattern; The historical behavior data of similar user groups is obtained through user portrait clustering. The user portrait includes user interest tags, historical access paths, and device type characteristics.

[0024] By deploying a data collection module on the application frontend, we can capture all kinds of user interaction data within the application in real time, monitoring fine-grained operations such as mouse movement trajectory, click events, scrolling behavior, page browsing order, and dwell time. For example, when a user browses a product list on an e-commerce website, the system accurately records the length of time the mouse hovers over a product image, the frequency of clicks on the "Add to Cart" button, the scrolling speed, and the dwell position.

[0025] The system then extracts historical behavioral data from similar user groups from the backend database as a crucial reference. This identification of similar user groups is based on multi-dimensional user profile matching, encompassing key attributes such as age, gender, region, interests, preferences, and spending habits. For example, if a young female user is currently browsing clothing items, the system quickly identifies past behavioral records of other users with similar profile characteristics in the same scenario.

[0026] Collected real-time user behavior data is deeply integrated with historical behavior data from similar user groups in the back-end analysis module. Data mining and machine learning algorithms are used to accurately extract key behavioral characteristics. On the one hand, this focuses on personalized features such as the pages an individual user has recently visited frequently, areas where they spend extended periods of time or repeatedly hover over the current page, and their sequence of actions. On the other hand, combined with data from similar groups, common behavioral trends are discovered, such as a user's preference for specific functional modules in specific scenarios and their browsing path patterns.

[0027] Step S2: Use interactive behavior data to generate real-time operation intention predictions, use historical behavior data as input to generate group behavior trend predictions, and generate resource request probabilities through dynamic weight fusion.

[0028] Real-time action intention predictions are generated using real-time interactive behavior data within the user's current session. Event listeners are used to capture real-time actions such as mouse hovering, clicking, and scrolling. Key features, such as hover duration, scrolling speed, and position change rate, are extracted through feature engineering and input into the deep learning-based intent prediction model. For example, when it is detected that the user's mouse has hovered over the "Product Details" link in the navigation bar for longer than a preset time, the model evaluates the probability of the user clicking on the link in real time. If the probability exceeds the set threshold, it predicts that the user is about to click, triggering the preloading of product details page resources to ensure a rapid response to user actions.

[0029] Using historical behavioral data from similar user groups as input, we generate group behavior trend predictions. Similar user groups are selected based on multi-dimensional user profile matching, encompassing basic attributes, behavioral patterns, and interests. We use machine learning methods like clustering or collaborative filtering to build group behavior models and analyze the group's behavioral trends in specific scenarios. For example, after browsing page A, a certain user group most frequently visits pages B and C. When a user visits page A, the model predicts the probability of them visiting page B based on group trends and preloads relevant resources.

[0030] A dynamic weighted fusion algorithm combines real-time action intention predictions with group behavior trend predictions to generate the final resource request probability. During the fusion process, weights are dynamically adjusted, assigning different weights to the two based on factors such as real-time prediction accuracy, network conditions, and device performance. For example, in scenarios with good network conditions, superior device performance, and high real-time prediction accuracy, real-time predictions are given a higher weight. In situations with insufficient new user data and high uncertainty in real-time predictions, group trend predictions are prioritized.

[0031] Step S3: Calculate resource loading priority based on resource request probability, combined with real-time network status and device load, and trigger preloading of high-priority resources during browser idle periods.

[0032] Before a user actually initiates a request, resource loading priorities are intelligently calculated based on the resource request probability output by the user behavior prediction model, combined with real-time network conditions and device load. For each type of resource predicted to be requested by the user, a preliminary priority order is determined based on the probability of the request. For example, if a user has a 90% probability of requesting resources for page B and only a 50% probability of requesting resources for page C, the resources for page B are initially prioritized before page C. The system also monitors performance indicators such as network bandwidth, latency, and device CPU and memory usage in real time to dynamically adjust the preliminary priority.

[0033] In order to avoid the preloading process interfering with the normal rendering and user interaction of the current page, the present invention makes full use of the browser's idle period to preload resources. Through the performance monitoring interface provided by the browser, such as requestIdleCallback, the browser's idle time period is accurately detected. When the browser is in an idle state, the preloading tasks of high-priority resources are triggered in sequence according to the calculated resource loading priority order. For example, when a user browses a product list page on an e-commerce website, the system predicts that the user may click on the details page of product A, and the current browser is in an idle period, it will immediately preload the key resources such as HTML, scripts, and styles of the details page of product A through the preloading mechanism.

[0034] Step S4: For preloaded resources, a cache weight is set based on the request probability value, and cache invalidation is actively triggered when the probability value is continuously lower than the set threshold.

[0035] After a resource is successfully preloaded, it is immediately stored in a client-side cache, such as the in-memory cache, Service Worker cache, or browser HTTP cache. An initial cache weight is assigned to each preloaded resource, based on the request probability output by the user behavior prediction model. For example, if a user is predicted to have a 90% probability of accessing resource A, its weight is set high; resources with lower predicted probabilities receive lower weights. These weights determine the priority of resources in the cache. High-weighted resources are retained first, even before their original expiration date. This ensures that users can quickly retrieve high-probability resources from the cache for subsequent requests.

[0036] The system continuously monitors changes in resource request probabilities. When the request probability for a resource is consistently below a set threshold, it determines that the resource is unlikely to be accessed in the future and proactively triggers cache invalidation, freeing up cache space for resources that are more likely to be accessed. At the same time, the system monitors changes in the backend data corresponding to the resource through subscription server push or timed verification mechanisms. If a data update is detected, such as a price change or news content update, the cached content will be immediately forced to update, even if the resource cache has not yet expired.

[0037] Step S5: According to the matching result between the user's actual access behavior and the preloaded resources, the prediction model parameters are adjusted in real time to optimize the prediction accuracy.

[0038] After implementing preloading and cache control, we continuously collect feedback data on actual user behavior, including detailed information such as the pages they actually visited, the links they clicked, and the resources they used. This actual behavior data is matched and analyzed with the preloaded resource list to form a feedback dataset. For example, if we predict that a user will visit page B and preload the relevant resources, and the user actually visits page B, this is recorded as a successful match. If the user actually visits page C, which was not predicted, this is recorded as a prediction deviation.

[0039] Based on feedback data sets, this paper uses an online learning algorithm to adjust prediction model parameters in real time to optimize prediction accuracy. For successfully matched predictions, the corresponding behavioral feature weights are strengthened, such as increasing the weights of features like mouse hover duration and click frequency, thereby improving the model's ability to predict similar behavior patterns. For prediction deviations, the discrepancies between actual and predicted behaviors are analyzed, and model parameters are dynamically adjusted, such as reducing the weights of certain irrelevant features or introducing new feature dimensions.

[0040] Analyze and adjust the cache strategy based on feedback data, and evaluate its effectiveness by measuring metrics such as cache hit rate and user wait time. For example, if the cache hit rate is low, it may be due to premature cache expiration or inaccurate preloaded resources. In this case, you can appropriately extend the cache lifecycle and optimize the selection criteria for preloaded resources. If the user wait time is long, it may be due to slow loading of preloaded resources. In this case, you can adjust the preload priority and optimize the resource loading order.

[0041] The steps of dynamic weight fusion include: Assigning the first weight to the real-time operation intention prediction and the second weight to the group behavior trend prediction; The first weight is increased according to the amount of user's current session data, and the second weight is increased according to the group data coverage.

[0042] First, assign a first weight to real-time action intention prediction and a second weight to group behavior trend prediction. Initially, the first weight can be set to 0.6 and the second weight to 0.4. Next, dynamically increase the first weight based on the amount of the user's current session data. A larger amount of session data indicates a deeper understanding of the user's current behavioral intention and a higher accuracy in real-time action intention prediction. Therefore, increasing the first weight enhances real-time and targeted prediction. Simultaneously, increase the second weight based on group data coverage. A higher group data coverage indicates more extensive behavioral data from similar users available for reference, increasing the reliability and accuracy of group behavior trend prediction. Appropriately increasing the second weight in this situation can fully leverage the breadth and diversity of group data and compensate for the shortcomings of individual user data.

[0043] When calculating resource loading priority, the resource request probability is positively correlated with the network quality score and negatively correlated with the resource size.

[0044] When calculating resource loading priority, a positive correlation is established between resource request probability and network quality score. A higher resource request probability indicates a greater likelihood of users requesting that resource; a higher network quality score indicates a more favorable network environment for rapid resource transmission. Therefore, resources with a high request probability and good network conditions are given higher priority, ensuring that users can quickly access resources when needed, improving the user experience.

[0045] At the same time, resource size is negatively correlated with loading priority. The larger the resource file, the longer it takes to load under the same network conditions. To optimize resource loading efficiency and avoid blocking the acquisition of other key resources due to loading large resources, the present invention appropriately lowers the loading priority of large resources. Prioritize loading small and critical resources, such as page core components and style sheets, to ensure that the page can quickly respond to user operations.

[0046] Conditions that trigger cache invalidation include: The resource request probability is lower than the threshold for multiple consecutive monitoring cycles; Receive notification of server resource changes; When cache space is insufficient, low-probability resources are eliminated by weight sorting.

[0047] A key condition for triggering cache invalidation is that the resource request probability remains below a set threshold for multiple consecutive monitoring cycles. The system continuously monitors the changes in the request probability of each cached resource. If the request probability of a resource remains low for multiple consecutive monitoring cycles, it indicates that the likelihood of users accessing the resource in the future is extremely low. In this case, the system will proactively trigger cache invalidation for that resource, freeing up the cache space occupied by the resource to make room for more likely resources.

[0048] When the system receives a resource change notification from the server, the corresponding cache invalidation mechanism is immediately triggered. A server resource change notification typically indicates an update to the resource's content, version, or related attributes. Continuing to use the old cache may cause users to obtain outdated or inaccurate information. Therefore, once a server notification is detected, the system will quickly mark the corresponding resource's cache as invalid, ensuring that the next time a user requests the resource, they can retrieve the latest content from the server.

[0049] When cache space is insufficient, a cache eviction strategy is implemented based on resource weights. Weight calculation takes into account multiple factors, including resource request probability, importance, and frequency of use. Resources with a low request probability have a relatively low cache weight. In this case, the system prioritizes eviction of these low-weight, low-request-probability resources to make room for newly preloaded, high-probability resources.

[0050] Dynamically adjust the prediction model parameters including: When preloaded resources are accessed, the corresponding behavior feature weight is enhanced; Reduce the confidence of group behavior data when there is a high probability that the resource has not been accessed.

[0051] When a preloaded resource is actually accessed by a user, it's considered a successful prediction by the prediction model. The present invention increases the weight of behavioral features associated with this prediction to strengthen the model's ability to identify similar behavioral patterns. For example, if a user clicks a link after hovering over it, the system will increase the weight of behavioral features such as "hover duration" and "click frequency."

[0052] If a resource predicted with a high probability is not actually accessed by the user, this indicates a possible bias in the group behavior trend prediction or a discrepancy between the current user's individual behavior and the group pattern. In this case, the present invention reduces the confidence level of the group behavior data, weakening the influence of the group behavior trend prediction in the dynamic weight fusion. In this way, the model will place greater emphasis on real-time operational intent prediction, thereby more accurately matching the current user's actual behavior pattern.

[0053] This method also includes preload conflict handling: When a new preloaded task conflicts with an ongoing task, the low-value task is aborted based on priority; Pause all preloading immediately when the browser ends its idle state; When user active operation is detected, the network resources occupied by preloading are released.

[0054] During the preloading process, if a new preloading task conflicts with an ongoing task, the system initiates a priority-based conflict resolution mechanism. Priority is determined by comprehensively considering the probability of resource requests, the urgency of user behavior intent, and the impact of the resource on the user experience. When a conflict occurs, the system immediately compares task priorities and terminates the low-priority task, freeing up the network bandwidth and system resources it occupies, ensuring smooth execution of the high-priority task.

[0055] Monitor the browser's operating status in real time. Once the browser is detected to be out of idle state, such as when the user starts scrolling, inputting data, or executing scripts on the page, all ongoing preloading tasks will be immediately paused. This is because when the browser is not idle, system resources are mainly used to respond to real-time user operations and normal page rendering. Preloading tasks may interfere with the performance of the current page.

[0056] When a user initiates an action, such as clicking a link, submitting a form, or triggering a page redirect, the system quickly releases the network resources used by the preload task. This strategy prioritizes network bandwidth and system resources required for active user actions, preventing preload tasks from negatively impacting user response speed.

[0057] In one possible embodiment, the present application is applied to a web application: Take the front-end application of an e-commerce website as an example. Suppose a user is browsing a product list page. The system performs intelligent preloading and cache control through the following steps: 1. User Behavior Data Collection: User behavior on product listings is collected in real time, including the duration of mouse hovers over product images, clicks on the "Add to Cart" button, scrolling speed and location, etc. The system also records the user's current session information (such as product categories viewed and duration of stay) and user profile information (such as historical purchasing preferences). This data is sent to the backend analysis module.

[0058] 2. Real-time interaction analysis: The analysis module interprets real-time user behavior. For example, if a user pauses on the image of Product A for three seconds and scrolls to the bottom of the page to view the "Next Page" button, these signs indicate that the user may be interested in Product A or may click "Next Page" to view more products. Therefore, real-time analysis predicts the user's likely next action: clicking on Product A to view details or turning to the second page.

[0059] 3. Group Behavior Analysis: The system also analyzes the behavioral patterns of similar user groups. Through user profile matching, it was found that 80% of users belonging to the same group as the current user, "young women with a preference for clothing," click through to specific product details after browsing similar listings, with the top three items being the most frequently clicked. Product A on the current page is the top-selling item. Furthermore, users in this group browse an average of two pages before leaving the listing. This group behavior data supports the real-time analysis predictions, further confirming that users are likely to visit the details page for product A and flip through pages to browse for more products.

[0060] 4. User Behavior Prediction Model: Combining real-time and group analysis results, the prediction model outputs the probability of the user's next request. For example, it predicts that there is a 90% probability that the user will click on the details page of product A, a 70% probability of turning to the second page, and a lower probability of jumping to other pages. Based on these probabilities, the system generates a preload list, prioritizing resources for product A's details page and resources for the second page list.

[0061] 5. Perform intelligent preloading: The frontend begins loading relevant resources in the background based on the preload list. For example, it immediately preloads the HTML and key scripts for product A's detail page, while simultaneously using XMLHttpRequest or fetch to fetch the second page of product data while the browser is idle. These preloading operations do not block the rendering of the current page because they take advantage of the browser's idle time and low-priority requests.

[0062] 6. Cache Preloaded Resources: Preloaded resources are stored in the client cache. For example, the HTML and static resources for product A's detail page are cached in the Service Worker's cache storage, while the data for the second page is cached in the memory cache or local storage. At this point, although the user hasn't actually requested these resources, they are readily available.

[0063] 7. Intelligent Cache Control: The system adjusts its cache strategy based on predictions. Considering that the user is likely to visit the details page for Product A soon, the cache for that page is marked as high priority, preventing it from being easily eliminated even though its default cache duration is short. Conversely, the system detects that the user has not visited the "My Orders" page for a long time and predicts a low probability of future visits to that page. Therefore, it proactively removes the old cached content from the "My Orders" page from memory to free up space. Furthermore, the system subscribes to push notifications about product price changes. When the price of Product A is recently updated, the cached product details are immediately updated to ensure that users see the latest price when they click in.

[0064] 8. Actual User Requests and Feedback: When a user clicks on the image of product A, the front-end application immediately reads the preloaded detail page content from the cache and presents it to the user. The user sees the page content almost instantly, without having to wait for a network request. If the user then clicks "Next Page," the data for the second page can also be quickly loaded from the cache. During user operations, the system continuously collects feedback data, such as which pages the user actually browsed, how long they stayed on each page, and whether they made a purchase. This feedback is used to evaluate the accuracy of the prediction (for example, if the user actually visits the predicted page, the prediction is correct; if the user accidentally jumps to another page, this is recorded).

[0065] 9. Model Optimization: The backend analysis module regularly aggregates user feedback data to optimize the behavior prediction model. For example, if a prediction deviation is detected (a user does not access a page as expected), model parameters are adjusted or new features (such as the duration of the user's current session and device type) are introduced to improve prediction accuracy. Simultaneously, the effectiveness of caching strategies is analyzed, such as whether intelligent control has improved cache hit rates and reduced user wait times. Based on this information, cache loading and expiration conditions are fine-tuned.

[0066] The above examples demonstrate that this application can dynamically adjust resource loading and caching strategies based on user behavior on e-commerce websites. Users experience instant page jumps and a smooth interactive experience, driven by the system's accurate prediction of user intent and proactive resource preparation. Furthermore, the server burden is reduced because most resource requests are already cached or preloaded, leaving only truly new requests reaching the server.

[0067] In another possible embodiment, a news information mobile application is used as an example in the mobile application of this application. Mobile applications usually use WebView to load H5 pages or adopt hybrid development. Their network environment and user behavior are different from those of PC terminals (such as the network may be unstable and the user has many fragmented operations). The method of the present invention is also applicable to these scenarios: 1. User Behavior Collection: In news apps, user behaviors include swiping left and right to switch news items, clicking on news headlines, long-pressing to save news items, scrolling through news content, and dwell time. The app frontend reports this behavior data to the backend analysis system via the SDK. For example, if a user is reading a sports news article, scrolls to the end of the article, and repeatedly clicks the "Related News" tab, these behaviors are recorded.

[0068] 2. Real-time and group analysis: Real-time analysis reveals that users have a strong interest in sports news and are highly likely to click on a specific "related news" item. Group analysis shows that 60% of users who recently read the current news item will continue to read the first recommended related news item. Therefore, the predictive model determines that users are likely to read Recommended News A next.

[0069] 3. Preloading and Caching: The app silently loads the content page of News A in the background and caches it in local storage. Because mobile networks can be slow, preloading occurs only in Wi-Fi environments or when the network is idle. When the user clicks Recommended News A, the app directly reads and renders the content from the local cache, ensuring a lag-free reading experience.

[0070] 4. Intelligent Cache Expiration: Considering that news content may be updated at any time (e.g., comments added, follow-up reports), the system sets a short cache expiration time and checks for news content updates when the user enters the news list page. If the content of News A has been updated, the cache is forced to refresh. In addition, if it is detected that the user has read News A and jumped to another channel, the system assumes that the probability of News A being accessed again is reduced, and thus releases some of the cache space occupied by it (for example, only retaining the title and introduction and releasing the full text content).

[0071] By implementing this application in mobile apps, users experience almost no loading delay when switching news, making the reading experience smoother. At the same time, intelligent caching avoids long-term large storage space occupation, ensuring performance while taking into account the rational use of device resources.

[0072] To verify the effectiveness of the proposed method, an experimental comparison was conducted in a real-world web application. Two groups were set up: one group enabled the proposed intelligent preloading and cache control (the experimental group), and the other group used a traditional fixed-route preloading and LRU caching strategy (the control group). By simulating real user behavior, key performance indicators were recorded for comparative analysis.

[0073] The experimental results show that the experimental group outperforms the control group in multiple performance indicators. Table 1 shows a schematic diagram of the performance indicators: Table 1

[0074] From the above experimental data, we can see that: Page load times were significantly reduced: The average page load time for the experimental group dropped from 1.8 seconds to 0.5 seconds, a 72% decrease. This was because most resources required by users were preloaded locally, allowing them to be retrieved directly from cache when requested, without waiting for network transmission.

[0075] The cache hit rate was significantly improved: the experimental group achieved a cache hit rate of 90%, significantly higher than the control group's 65%. This indicates that the intelligent caching strategy of the present invention can more accurately retain the resources actually needed by users and reduce cache misses.

[0076] Reduced ineffective preloading: In the control group, 40% of preloaded resources were not actually used by users, resulting in waste. This percentage dropped to 5% in the experimental group. This demonstrates that the prediction-based preloading strategy effectively reduced unnecessary resource loading and improved preloading efficiency.

[0077] Fewer server requests: Due to improved preloading and cache hit rates, the experimental group experienced a 40% reduction in server requests per minute compared to the control group. This reduced server load and bandwidth consumption, enabling more users to access the service simultaneously in high-concurrency scenarios.

[0078] Furthermore, user research and A / B testing revealed that user satisfaction with page response speed significantly improved and bounce rates decreased, further demonstrating the effectiveness and value of the present invention in practical applications.

[0079] It has broad industrial application prospects. Here are several possible application scenarios: Large e-commerce platforms: E-commerce platforms contain a wealth of user behavior data, including browsing products, viewing details, and adding items to carts. The method presented in this paper can predict product details or activity pages that users are likely to view based on their browsing history, pre-loading relevant pages and product images to enhance the shopping experience. Furthermore, intelligent cache control ensures that users receive the latest product information (e.g., price, inventory) on every visit, avoiding user frustration caused by outdated cache.

[0080] News and content platforms: News websites or information apps can leverage this method to predict which articles or videos a user might read next based on their current reading and interests, pre-loading content resources. For example, when a user reads a piece of science news, the system can predict that the user might be interested in other science articles by the same author and pre-load the content of those articles. This eliminates the need for users to wait before clicking on the next article, providing a more seamless reading experience.

[0081] Social networks and video platforms: User behavior on social networks (such as scrolling through feeds, clicking on friend updates, and watching videos) can also be analyzed and predicted. For example, video platforms can predict the next video a user is likely to watch after finishing the current one and pre-buffer that video. Social apps can also predict that a user is likely to pull down to refresh for new messages and pre-load the latest updates. These pre-loading measures can reduce user wait time and improve the interactive experience.

[0082] Enterprise-level Web applications: In enterprise-level applications such as internal portals, CRM, and ERP, users typically follow fixed workflows (e.g., viewing reports, filling out forms, switching modules). The method described in this paper can preload data and interface resources for frequently used modules based on the user's role and historical operations. For example, after a finance employee logs into the system, it's predicted that they'll likely open the "Report Statistics" module. Preloading the relevant data and charts allows the user to immediately access the module, improving office efficiency.

[0083] Mobile Applications and the Internet of Things: In addition to traditional web applications, the concepts of this invention can also be applied to native mobile applications and IoT devices. For example, in mobile map applications, the user's driving route can be used to predict the area they will enter and preload map data for that area. In smart homes, data for related devices can be preloaded or pre-loaded based on the daily behavior patterns of family members. These are all extended applications of this invention in different fields.

[0084] Compared with the prior art, the embodiments of the present application have the following beneficial effects: First, resources are preloaded locally before user requests. Users do not need to wait for resource loading when operating. Page switching and operation responses are faster and smoother, significantly improving user experience satisfaction, especially under poor network conditions.

[0085] Second, by preloading resources that users may request, the resources requested by users are likely to be in the cache, thereby reducing the number of actual network requests.

[0086] Third, intelligent cache control can dynamically adjust cache content and life cycle according to user behavior, so that cache space can be used more to store resources that users really need, avoiding redundancy and waste and improving cache hit rate.

[0087] Fourth, preloading and a high cache hit rate effectively reduce repeated requests from users to the server, alleviating server pressure and network bandwidth consumption. The server can allocate more resources to uncached user requests, improving overall service capabilities.

[0088] Fifth, leveraging machine learning and data analytics, the system accurately predicts resource requests based on user behavior and dynamically adjusts preloading and caching strategies. The system adaptively optimizes performance across diverse user groups and usage scenarios, demonstrating strong flexibility and robustness.

[0089] A possible implementation of an intelligent request preloading and cache invalidation control device is provided below. The device is used to execute the various execution steps and corresponding technical effects of the intelligent request preloading and cache invalidation control method shown in the above embodiments and possible implementations. The device includes: The data collection module is used to collect user interaction behavior data in real time and simultaneously obtain historical behavior data of similar user groups; The weight fusion module is used to generate real-time operation intention predictions using interactive behavior data, generate group behavior trend predictions using historical behavior data as input, and generate resource request probabilities through dynamic weight fusion; The preloading module is used to calculate resource loading priority based on resource request probability, combined with real-time network status and device load, and trigger preloading of high-priority resources during browser idle periods; The cache invalidation module is used to set cache weights for preloaded resources based on request probability values, and actively trigger cache invalidation when the probability value is continuously lower than the set threshold; The parameter adjustment module is used to adjust the prediction model parameters in real time to optimize the prediction accuracy based on the matching results of the user's actual access behavior and the preloaded resources.

[0090] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. An intelligent request preloading and cache invalidation control method, characterized in that: The method comprises: Collect user interaction behavior data in real time and simultaneously obtain historical behavior data of similar user groups; Use interactive behavior data to generate real-time operation intention predictions, use historical behavior data as input to generate group behavior trend predictions, and generate resource request probabilities through dynamic weight fusion; Based on the resource request probability, combined with real-time network status and device load, the resource loading priority is calculated, triggering the preloading of high-priority resources during the browser's idle period; For preloaded resources, a cache weight is set based on the request probability value. When the probability value is continuously lower than the set threshold, cache invalidation is triggered proactively. Based on the matching results between the user's actual access behavior and the preloaded resources, the prediction model parameters are adjusted in real time to optimize the prediction accuracy.

2. The intelligent request preloading and cache invalidation control method according to claim 1, characterized in that: Interaction behavior data includes at least one of mouse hover duration, click frequency, page scroll depth, and operation sequence pattern; The historical behavior data of similar user groups is obtained through user portrait clustering. The user portrait includes user interest tags, historical access paths, and device type characteristics.

3. The intelligent request preloading and cache invalidation control method according to claim 1, characterized in that: The steps of dynamic weight fusion include: Assigning the first weight to the real-time operation intention prediction and the second weight to the group behavior trend prediction; The first weight is increased according to the amount of user's current session data, and the second weight is increased according to the group data coverage.

4. The intelligent request preloading and cache invalidation control method according to claim 1, wherein: When calculating resource loading priority, the resource request probability is positively correlated with the network quality score and negatively correlated with the resource size.

5. The intelligent request preloading and cache invalidation control method according to claim 1, characterized in that: Conditions that trigger cache invalidation include: The resource request probability is lower than the threshold for multiple consecutive monitoring cycles; Receive notification of server resource changes; When cache space is insufficient, low-probability resources are eliminated by weight sorting.

6. The intelligent request preloading and cache invalidation control method according to claim 1, characterized in that: Dynamically adjust the prediction model parameters including: When preloaded resources are accessed, the corresponding behavior feature weight is enhanced; Reduce the confidence of group behavior data when there is a high probability that the resource has not been accessed.

7. The intelligent request preloading and cache invalidation control method according to claim 1, characterized in that: The method further includes preloading conflict handling: When a new preloaded task conflicts with an ongoing task, the low-value task is aborted based on priority; Pause all preloading immediately when the browser ends its idle state; When user active operation is detected, the network resources occupied by preloading are released.

8. An intelligent request preloading and cache invalidation control device, characterized in that: The device comprises: The data collection module is used to collect user interaction behavior data in real time and simultaneously obtain historical behavior data of similar user groups; The weight fusion module is used to generate real-time operation intention predictions using interactive behavior data, generate group behavior trend predictions using historical behavior data as input, and generate resource request probabilities through dynamic weight fusion; The preloading module is used to calculate resource loading priority based on resource request probability, combined with real-time network status and device load, and trigger preloading of high-priority resources during browser idle periods; The cache invalidation module is used to set cache weights for preloaded resources based on request probability values, and actively trigger cache invalidation when the probability value is continuously lower than the set threshold; The parameter adjustment module is used to adjust the prediction model parameters in real time to optimize the prediction accuracy based on the matching results of the user's actual access behavior and the preloaded resources.