Cache control method and device, computer device and storage medium

CN122594042APending Publication Date: 2026-08-18SHANGHAI XINXIAOFEI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610745039.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种缓存控制方法、装置、计算机设备及存储介质,旨在解决传统采用单一数据和固定缓存方式导致整体资源利用率比较低,缓存性能比较差的问题

Benefits of technology

[0016]本申请实施例提供了一种缓存控制方法、装置、计算机设备及存储介质。其中,所述方法包括:获取多模态数据;将所述多模态数据输入预设的预测模型;利用所述预测模型从所述多模态数据中提取出时间序列特征、业务上下文特征、用户行为特征、内容特征和访问系统的状态特征;利用所述预测模型对所述时间特征、所述业务上下文特征、所述行为特征、所述内容特征和所述资源使用特征进行动态融合处理,得到访问预测结果;基于所述访问预测结果,确定待缓存数据的目标缓存结果;基于所述目标缓存结果对所述待缓存数据进行动态缓存控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594042A_ABST
    Figure CN122594042A_ABST
Patent Text Reader

Abstract

The application relates to a cache control method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring multi-modal data; inputting the multi-modal data into a preset prediction model; extracting time sequence features, business context features, user behavior features, content features and state features of an access system from the multi-modal data by using the prediction model; performing dynamic fusion processing on the time features, the business context features, the behavior features, the content features and the resource usage features by using the prediction model to obtain an access prediction result; determining a target cache result of to-be-cached data based on the access prediction result; and performing dynamic cache control on the to-be-cached data based on the target cache result. The application can improve cache performance and resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of caching technology, and in particular to a caching control method, apparatus, computer device, and storage medium. Background Technology

[0002] Caching technology is widely used to improve system performance, reduce database load, and reduce response latency.

[0003] Traditional cache control methods typically rely on a single dimension of historical access information, such as access time and access frequency, and employ a simple LRU strategy for static cache management.

[0004] However, due to the limited data dimensions, it is difficult to fully understand the user's access intent. Systems often employ an "over-caching" strategy to ensure service quality, but this can easily lead to a large amount of memory resources being occupied by invalid or inefficient data, resulting in resource waste. Furthermore, traditional caching strategies are highly rigid, causing high resource consumption even during off-peak hours, failing to release redundant cache in a timely manner, thus resulting in low overall resource utilization and poor caching performance. Summary of the Invention

[0005] This application provides a cache control method, apparatus, computer device, and storage medium, aiming to solve the problem of low overall resource utilization and poor cache performance caused by the traditional method of using single data and fixed caching.

[0006] In a first aspect, embodiments of this application provide a cache control method, the cache control method comprising: Acquire multimodal data, wherein the multimodal data includes access time, user access behavior, access content, and resource usage information of the access system; The multimodal data is input into a preset prediction model; The prediction model is used to extract time series features, business context features, user behavior features, content features, and access system status features from the multimodal data. The prediction model is used to dynamically fuse the time features, business context features, behavioral features, content features, and resource usage features to obtain access prediction results. Based on the access prediction results, the target cache result for the data to be cached is determined; Dynamic caching control is performed on the data to be cached based on the target caching result.

[0007] A further technical solution is that the access prediction result includes an access prediction mode, a lifecycle prediction value, and a hotspot prediction list; the target caching result includes a target caching type, a target caching time, and a preloading timing; and determining the target caching result of the data to be cached based on the access prediction result includes: Based on the access prediction pattern, the target cache type of the data to be cached is obtained; Based on the hotspot prediction list, the initial cache time is adjusted to obtain the target cache time for the data to be cached; Based on the lifecycle prediction value, the timing for preloading the data to be cached is determined.

[0008] A further technical solution is that extracting time-series features from the multimodal data using the prediction model includes: To obtain the short-term dynamic characteristics, seasonal decomposition characteristics, and frequency domain characteristics of time series; Based on the short-term dynamic change characteristics, the seasonal decomposition characteristics, and the frequency domain characteristics, the access time pattern is obtained. Obtain dynamic change characteristics, basic statistical indicators, and correlation coefficients between the access frequencies of different data items; Based on the dynamic change characteristics, the basic statistical indicators, and the correlation coefficient, the access frequency statistical characteristics are obtained; Based on the access time pattern and the access frequency statistical characteristics, time series features are obtained.

[0009] A further technical solution is that obtaining the short-term dynamic change characteristics and seasonal decomposition characteristics of the time series includes: The access logs are divided into multiple preset time windows; Determine the access frequency, access volume, and number of unique users within each time window; Based on the access frequency, the access volume, and the number of unique users, the short-term dynamic change characteristics of the time series are determined; The time series is decomposed using a preset algorithm to obtain the decomposed time series. The trend component, seasonality component, and residual component are extracted from the decomposed time series. The seasonal decomposition features are obtained by determining the weight coefficients corresponding to the trend component, the seasonal component, and the residual component.

[0010] A further technical solution is that the prediction model includes a feature encoding layer, a pattern recognition layer, and a prediction output layer, wherein the feature encoding layer includes a temporal encoder, a behavior encoder, a content encoder, and a state encoder; The prediction model dynamically fuses the time features, business context features, behavioral features, content features, and resource usage features to obtain access prediction results, including: The time features and the business context features are input into the timing encoder for timing encoding to obtain a timing encoding vector. The behavioral features are input into the behavior encoder for behavior encoding to obtain a behavior encoding vector. The content features are input into the content encoder for content encoding to obtain a content encoding vector; The state characteristics of the access system are input into the state encoder for state encoding to obtain a state encoding vector. The temporal encoding vector, the behavior encoding vector, the content encoding vector, and the state encoding vector are input into the pattern recognition layer for dynamic fusion processing to obtain the fusion processing result; The fusion processing result is input into the prediction output layer to obtain the access prediction result output by the prediction output layer.

[0011] A further technical solution is that the cache control system adopts a distributed cache cluster management module, which includes an application access layer, an intelligent proxy layer, and a Redis cluster layer; wherein, the application access layer includes multiple application servers, the intelligent proxy layer includes multiple cache proxy nodes, and the Redis cluster layer includes multiple Redis master nodes and multiple Redis slave nodes; the application servers, cache proxy nodes, Redis master nodes, and Redis slave nodes are all in one-to-one correspondence, and the dynamic cache control of the data to be cached based on the target cache result includes: The intelligent proxy layer dynamically determines the target Redis master node corresponding to the data caching request based on the target cache result and the load status of each Redis master node. The data caching request is forwarded to the target Redis master node and its corresponding Redis slave node through the cache proxy node corresponding to the target Redis master node.

[0012] A further technical solution is that the prediction model includes the following during the training phase: After obtaining the relevant indicator information after cache control, the relevant indicator information includes resource cost, operation and maintenance cost, storage cost, network cost, system response time, availability value, consistency value and user satisfaction; Based on resource costs, operation and maintenance costs, storage costs, and network costs, calculate the cost constraint components; The performance reward component is calculated based on the preset hit rate reward value, latency penalty value, throughput reward value and stability reward value; User experience components are determined based on the system's response time, availability, consistency, and user satisfaction. Based on the cost constraint component, the performance reward component, and the user experience component, a comprehensive reward value is obtained; The model parameters of the prediction model are updated based on the comprehensive reward value.

[0013] Secondly, embodiments of this application also provide a cache control device, which includes a unit for performing the above-described method.

[0014] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0016] This application provides a cache control method, apparatus, computer device, and storage medium. The method includes: acquiring multimodal data; inputting the multimodal data into a preset prediction model; using the prediction model to extract time-series features, business context features, user behavior features, content features, and access system state features from the multimodal data; using the prediction model to dynamically fuse the time features, business context features, behavior features, content features, and resource usage features to obtain an access prediction result; determining a target cache result for the data to be cached based on the access prediction result; and performing dynamic cache control on the data to be cached based on the target cache result.

[0017] This application embodiment can build a deep understanding of access intent by integrating multi-dimensional information such as user behavior, access content semantics, and business context. Secondly, by introducing the state characteristics of the access system, it can combine the system load to achieve accurate prediction. Then, the optimal caching strategy can be dynamically determined based on the access prediction results to improve caching performance and resource utilization efficiency. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0021] Figure 1 A flowchart illustrating an embodiment of a cache control method provided in this application; Figure 2 A schematic diagram of the architecture of an embodiment of a cache control system provided in this application; Figure 3 A schematic diagram of the architecture of the prediction model provided in this application; Figure 4 A schematic diagram of the architecture of the distributed cache cluster management module provided in this application; Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0024] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0025] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0026] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0027] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0028] To address the aforementioned issues, this application provides a cache control method that can improve cache performance and resource utilization.

[0029] See Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating an embodiment of a cache control method provided in this application. The cache control method includes the following steps: Step 110: Acquire multimodal data.

[0030] The multimodal data includes access time, user access behavior, access content, and resource usage information of the access system.

[0031] Step 120: Input the multimodal data into the preset prediction model.

[0032] Step 130: Use the prediction model to extract time series features, business context features, user behavior features, content features, and access system status features from the multimodal data.

[0033] In some embodiments, time series features may be access time, frequency, periodic patterns, etc.; user behavior features may be user profiles, access preferences, behavior sequences; content features may be data type, size, business attributes; and the status features of the access system may be load, latency, resource usage, etc.

[0034] Step 140: Use the prediction model to dynamically fuse the time features, business context features, behavioral features, content features, and resource usage features to obtain the access prediction result.

[0035] Step 150: Based on the access prediction results, determine the target cache result for the data to be cached.

[0036] Step 160: Perform dynamic caching control on the data to be cached based on the target caching result.

[0037] This embodiment can build a deep understanding of access intent by integrating multi-dimensional information such as user behavior, access content semantics, and business context. Secondly, by introducing the state characteristics of the access system, it can combine the system load to achieve accurate prediction. Then, the optimal caching strategy can be dynamically determined based on the access prediction results to improve caching performance and resource utilization efficiency.

[0038] In some possible implementations, the access prediction result includes an access prediction pattern, a lifecycle prediction value, and a hotspot prediction list; the target caching result includes a target cache type, a target cache time, and a preloading timing; step 150, which is determining the target caching result of the data to be cached based on the access prediction result, includes: Step 151: Based on the access prediction mode, obtain the target cache type of the data to be cached.

[0039] Step 152: Based on the hotspot prediction list, adjust the initial cache time to obtain the target cache time for the data to be cached.

[0040] Step 153: Based on the lifecycle prediction value, determine the preloading timing of the data to be cached.

[0041] In some possible implementations, step 130, which involves extracting time-series features from the multimodal data using the prediction model, includes: Step 131: Obtain the short-term dynamic change characteristics, seasonal decomposition characteristics, and frequency domain characteristics of the time series.

[0042] In some possible implementations, the short-term dynamic characteristics of a time series can be obtained through the following steps: Step 11: Divide the access logs into multiple preset time windows.

[0043] The preset time windows can be 1 minute, 5 minutes, 15 minutes, 1 hour, etc.

[0044] Step 12: Determine the statistical indicators such as access frequency, access volume, and number of unique users within each time window.

[0045] Step 13: Based on the access frequency, access volume, and number of unique users, determine the short-term dynamic change characteristics of the time series.

[0046] Step 13 can be to use the sliding window technique to capture the dynamic change features of the time series, identify the periodic features of the access patterns, such as daily, weekly, and monthly cycles, construct a multi-scale time feature representation, capture access patterns at different time granularities, and obtain short-term dynamic change features.

[0047] In some possible implementations, seasonal decomposition characteristics can be obtained through the following steps: Step 21: Decompose the time series using a preset algorithm to obtain the decomposed time series.

[0048] The preset algorithm can be a time series decomposition algorithm (Seasonal and Trend decomposition using Loess, STL).

[0049] Step 22: Extract the trend component, seasonal component, and residual component from the decomposed time series.

[0050] Among them, extracting trend components can identify long-term growth or decline trends in access; extracting seasonal components can identify periodic access patterns; and extracting residual components can identify abnormal access and sudden events.

[0051] Step 23: Determine the weighting coefficients corresponding to the trend component, the seasonal component, and the residual component to obtain the seasonal decomposition characteristics.

[0052] In some embodiments, the extraction of frequency domain features can be performed using the following process: 1) Use Fast Fourier Transform (FFT) to convert the time series to the frequency domain; 2) Extract the main frequency components and identify the periodic characteristics of the access; 3) Calculate the power spectral density and analyze the energy distribution at different frequencies; 4) Use wavelet transform to extract multi-scale time-frequency features; 5) Construct frequency domain feature vectors to enhance the model's ability to recognize periodic patterns.

[0053] Step 132: Based on the short-term dynamic change characteristics, the seasonal decomposition characteristics, and the frequency domain characteristics, obtain the access time pattern.

[0054] Step 133: Obtain the correlation coefficients between dynamic change characteristics, basic statistical indicators, and access frequencies of different data items.

[0055] For analysis of basic statistical indicators, please refer to the following: 1) Calculate the mean, variance, skewness, kurtosis, and other statistical measures of the access frequency; 2) Statistical analysis of the distribution characteristics and probability density of access intervals; 3) Calculate the quantiles of access frequency, such as P50, P90, P99, etc.; 4) Analyze the coefficient of variation and stability index of access frequency; 5) Construct a histogram and probability distribution model of access frequency.

[0056] For calculations of dynamic change characteristics, please refer to the following: 1) Calculate the first and second differences of the access frequency to capture the changing trend; 2) Use moving average and exponential smoothing techniques to smooth the access frequency series; 3) Calculate the rate of change and acceleration index of access frequency; 4) Identify abrupt changes and abnormal fluctuations in access frequency; 5) Construct a dynamic feature vector of access frequency changes.

[0057] Correlation analysis may include the following: 1) Calculate the correlation coefficient between the access frequencies of different data items; 2) Use mutual information to analyze the nonlinear correlation of access frequencies; 3) Construct a correlation network and perform cluster analysis based on access frequency; 4) Identify data combinations with similar access patterns; 5) Extract principal component and factor features of access frequency.

[0058] Step 134: Based on the dynamic change characteristics, the basic statistical indicators, and the correlation coefficient, obtain the access frequency statistical characteristics.

[0059] Step 135: Based on the access time pattern and the access frequency statistical characteristics, obtain the time series characteristics.

[0060] In some possible implementations, user behavior feature analysis may include user profile building and access sequence modeling.

[0061] User profiles can be constructed based on basic attribute feature analysis, behavioral preference analysis, and user clustering analysis.

[0062] Specifically, basic attribute feature analysis can include extracting basic user information, such as demographic characteristics like age, gender, region, and occupation; analyzing user device information, such as technical characteristics like operating system, browser, and device type; statistically analyzing user activity indicators, such as behavioral characteristics like login frequency, session duration, and access depth; calculating user value indicators, such as business characteristics like spending amount, contribution, and loyalty; and constructing a multidimensional feature vector and tag system for users.

[0063] Behavioral preference analysis can include analyzing users' content preferences and statistically analyzing the proportion of users accessing different types of content; identifying users' time preferences and analyzing users' activity patterns in different time periods; extracting users' functional preferences and statistically analyzing the frequency of users using different functional modules; analyzing users' interaction preferences, such as click, browsing, and search behavior patterns; and constructing probability distribution models of user preferences and recommendation features.

[0064] User clustering analysis can include using the K-means algorithm to cluster users and identify different user groups; applying hierarchical clustering analysis to analyze the hierarchical structure and similarity of user groups; using the DBSCAN algorithm to identify anomalous users and niche groups; analyzing the access patterns and caching requirements of different user groups; and building specialized prediction models and caching strategies for each user group. Access sequence modeling can include sequence pattern mining, session analysis, and sequence embedding representation.

[0065] Sequence pattern mining mainly involves using sequence pattern mining algorithms (such as PrefixSpan) to identify frequently accessed sequences; extracting user access path patterns and navigation rules; analyzing the length distribution and complexity characteristics of access sequences; identifying key nodes and transition points in access sequences; and constructing state transition graphs and Markov models of access sequences.

[0066] Session analytics primarily involves segmenting user sessions based on time intervals and behavioral characteristics; analyzing session duration, number of pages accessed, bounce rate, and other metrics; identifying session start, end, and interruption patterns; analyzing access order and dependencies within a session; and constructing session-level feature vectors and prediction models.

[0067] Sequence embedding representation mainly uses Word2Vec technology to map access items to vector representations; applies a sequence-to-sequence (Seq2Seq) model to learn the representation of access sequences; uses an attention mechanism to highlight important access items in the sequence; constructs hierarchical sequence representations to capture access patterns at different granularities; and generates fixed-length vector representations of the sequences for easy subsequent modeling.

[0068] Content features are mainly obtained through content feature engineering, which includes data attribute analysis and relationship mining.

[0069] Data attribute analysis includes basic attribute extraction, content semantic analysis, and business value assessment.

[0070] Specifically, basic attribute extraction mainly involves extracting the basic attributes of the data, such as data type, size, format, and creation time; analyzing the structural characteristics of the data, such as the number of fields, nesting level, and complexity; analyzing the quality indicators of the statistical data, such as completeness, accuracy, and consistency; calculating the access permissions and security level characteristics of the data; and constructing multidimensional feature vectors of the data attributes.

[0071] Content semantic analysis mainly uses natural language processing technology to analyze the semantic features of text content; extract semantic tags such as keywords, themes, and sentiments; calculate content similarity and relevance indicators; analyze the popularity and trend of content; and construct semantic vector representations and knowledge graphs of content.

[0072] Business value assessment mainly involves analyzing the business importance and value level of data; calculating the access and maintenance costs of data; evaluating the timeliness and lifecycle characteristics of data; analyzing the dependencies and scope of impact of data; and constructing a quantitative assessment model for data value.

[0073] Among them, relationship mining includes data association analysis, dependency modeling, and collaborative filtering features.

[0074] Specifically, data association analysis mainly uses association rule mining algorithms (such as Apriori and FP-Growth) to discover the relationships between data; calculate association indicators such as support, confidence, and lift between data items; identify data combinations with strong and weak associations; analyze the stability and time-varying characteristics of association relationships; and construct network graphs and clustering structures for data associations.

[0075] Dependency modeling mainly involves analyzing data read / write dependencies and update propagation paths; identifying upstream and downstream dependency chains; calculating the strength and importance weights of dependencies to analyze their impact on caching strategies; and constructing directed graphs and propagation models of dependencies.

[0076] Collaborative filtering features are mainly based on constructing a user-data collaborative filtering matrix based on user behavior; extracting latent factor features using matrix factorization techniques; calculating the similarity and clustering features between users and data; identifying data combinations and recommendation candidates from collaborative access; and constructing the embedding vector and prediction model for collaborative filtering.

[0077] See Figure 3In some possible implementations, the prediction model includes a feature encoding layer, a pattern recognition layer, and a prediction output layer. The feature encoding layer includes a temporal encoder, a behavioral encoder, a content encoder, and a state encoder. Step 140 involves the prediction model dynamically fusing the temporal features, the business context features, the behavioral features, the content features, and the resource usage features to obtain an access prediction result, including: Step 141: Input the time feature and the business context feature into the timing encoder for timing encoding to obtain the timing encoding vector.

[0078] Step 142: Input the behavioral features into the behavior encoder for behavior encoding to obtain a behavior encoding vector.

[0079] Step 143: Input the content features into the content encoder for content encoding to obtain the content encoding vector.

[0080] Step 144: Input the state characteristics of the access system into the state encoder for state encoding to obtain a state encoding vector.

[0081] Step 145: Input the temporal encoding vector, the behavior encoding vector, the content encoding vector, and the state encoding vector into the pattern recognition layer for dynamic fusion processing to obtain the fusion processing result.

[0082] In some embodiments, the fusion process may employ attention mechanisms and feature fusion strategies.

[0083] Attention mechanisms can include self-attention computation, cross-attention mechanisms, and hierarchical attention.

[0084] Specifically, self-attention computation can involve designing multi-head self-attention mechanisms to calculate correlation weights within features; using scaled dot product attention; implementing positional encoding to add positional information to sequence features; applying residual connections and layer normalization to improve model training stability; and designing visualization and interpretation mechanisms for attention weights.

[0085] The cross-attention mechanism mainly involves calculating the cross-attention weights between features of different modalities; designing information interaction and fusion strategies between modalities; implementing dynamic weight allocation to adjust modal importance according to task requirements; applying gating mechanisms to control information flow and feature selection; and constructing a multi-level cross-attention network structure.

[0086] Hierarchical attention mainly involves designing hierarchical attention structures at the word, sentence, and document levels; implementing feature aggregation from fine-grained to coarse-grained levels; applying pooling operations to generate fixed-length feature representations; designing regularization and constraint mechanisms for attention; and constructing interpretability analysis for hierarchical features.

[0087] Feature fusion strategies can include early fusion, mid-term fusion, and late-term fusion.

[0088] Early fusion can involve directly splicing original features from different modalities during the feature extraction stage; using fully connected layers to unify and transform feature dimensions; applying feature selection techniques to remove redundant and noisy features; achieving feature standardization and normalization; and constructing a quality assessment and optimization mechanism for fused features.

[0089] Intermediate fusion can involve encoding different modal features separately and then fusing them in an intermediate layer; using convolutional neural networks to extract local feature patterns; applying recurrent neural networks to capture sequence dependencies; implementing nonlinear transformations and abstract representations of features; and constructing a multi-scale feature fusion network structure.

[0090] Later-stage fusion can involve training specialized models for different modalities separately and then fusing the prediction results; using ensemble learning methods such as voting, weighted averaging, and stacking; achieving dynamic weight allocation and adaptive fusion of the models; and applying meta-learning techniques to learn the optimal fusion strategy. Construct a quantification of uncertainty and confidence assessment of the fusion results.

[0091] In some embodiments, the architecture of the prediction model can be optimized, for example, by employing a Transformer variant design, a multi-task learning framework, and an online learning mechanism.

[0092] Among them, Transformer variant design can be to design a Transformer variant architecture suitable for cached prediction; optimize the computational complexity and memory usage of the attention mechanism; implement sparse attention and local attention mechanisms; and apply knowledge distillation techniques to compress model size and construct parallel and distributed training strategies for the model.

[0093] A multi-task learning framework can be designed with a shared encoder and task-specific decoder architecture; implement multiple tasks such as access probability prediction, popularity prediction, and lifecycle prediction; apply task weight balancing and gradient balancing techniques; design knowledge sharing and transfer mechanisms between tasks; and construct joint optimization and alternating training strategies for multiple tasks.

[0094] Online learning mechanisms can include designing model architectures that support online updates; implementing incremental and continuous learning capabilities; applying forgetting mechanisms to handle concept drift and changes in data distribution; designing strategies for rapid model adaptation and fine-tuning; and building performance monitoring and quality control mechanisms for online learning.

[0095] Step 146: Input the fusion processing result into the prediction output layer to obtain the access prediction result output by the prediction output layer.

[0096] In some embodiments, the prediction output layer may employ a multi-step prediction generation method, such as including short-term expectations, long-term trend predictions, and anomaly detection and early warning.

[0097] Short-term forecasts include next-step forecasts, sliding window forecasts, and real-time forecast updates.

[0098] Specifically, the next step of prediction could be to predict the probability and volume of visits at the next time step; use an autoregressive model to predict future values ​​based on historical sequences; calculate the conditional probability, P(x_t+1|x_1,...,x_t); apply temperature sampling and kernel sampling techniques to control the diversity of predictions; and construct confidence intervals and quantify the uncertainty of the prediction results.

[0099] Sliding window prediction can use the sliding window technique to predict access patterns at multiple future time steps; implement both recursive and parallel prediction strategies; apply an attention mechanism to focus on important information in the historical sequence; design a mechanism for controlling and correcting the accumulation of prediction errors; and construct an adaptive adjustment strategy for the sliding window.

[0100] Real-time prediction updates can be implemented by: enabling real-time prediction updates based on streaming data; using online learning algorithms to quickly adapt to new access patterns; applying concept drift detection to identify pattern change points; designing rapid retraining and deployment mechanisms for prediction models; and building latency control and performance optimization for real-time predictions.

[0101] Long-term trend forecasting includes trend extrapolation, cyclical forecasting, and scenario forecasting.

[0102] Specifically, trend extrapolation can be achieved by using trend decomposition and extrapolation techniques to predict long-term visit trends; applying exponential smoothing and ARIMA models to capture trends and seasonality; realizing the modeling and prediction of nonlinear trends; designing detection and processing mechanisms for trend change points; and constructing credibility assessments and risk analyses for trend predictions.

[0103] Periodic prediction can identify and model the periodic characteristics of access patterns; extract periodic components using Fourier analysis and wavelet analysis; achieve superposition and interactive modeling of multiple periods; apply phase analysis to predict the time shift of periodic patterns; and construct a stability and robustness assessment of periodic prediction.

[0104] Scenario prediction can include designing access pattern predictions under various business scenarios; implementing conditional predictions based on external factors; applying Monte Carlo simulations to generate multiple possible prediction paths; designing probability weights and fusion strategies for scenarios; and constructing sensitivity analysis and risk assessments for scenario prediction.

[0105] Anomaly detection and early warning include statistical anomaly detection and machine learning anomaly detection.

[0106] Statistical anomaly detection can include threshold-based detection, distribution-based detection, and time-series-based detection.

[0107] Specifically, threshold-based detection can include setting normal range thresholds for metrics such as access frequency and volume; using the 3σ principle and box plot methods to detect statistical anomalies; implementing dynamic threshold adjustment to adapt to changes in data distribution; applying multivariate anomaly detection, considering the correlation between metrics; and constructing a severity assessment and grading mechanism for anomalies. Distribution-based detection can involve establishing a probability distribution model of access patterns; using likelihood ratio tests and KS tests to detect distribution anomalies; implementing nonparametric density estimation and anomaly probability calculation; applying change point detection algorithms to identify distribution change points; and constructing visualization and interpretation mechanisms for distribution anomalies.

[0108] Time-series-based detection can employ time-series anomaly detection algorithms such as LSTM-AE and IsolationForest; implement seasonal adjustments and trend removal to highlight anomalous patterns; apply sliding windows and recursive detection to improve real-time performance; design anomaly duration and recovery detection mechanisms; and construct root cause analysis and impact assessment for time-series anomalies.

[0109] Machine learning anomaly detection includes unsupervised anomaly detection, semi-supervised anomaly detection, and deep anomaly detection.

[0110] Specifically, unsupervised anomaly detection can be achieved by using unsupervised methods such as One-Class SVM and Isolation Forest; implementing autoencoder anomaly detection based on reconstruction error; applying clustering methods to identify outliers that deviate from normal clusters; designing anomaly score calculation and ranking mechanisms; and constructing performance evaluation and optimization mechanisms for unsupervised anomaly detection.

[0111] Semi-supervised anomaly detection can combine a small amount of labeled data with a large amount of unlabeled data for anomaly detection; use positive samples to learn normal patterns and detect deviations; achieve active learning to select the most valuable samples for labeling; apply domain adaptation techniques to handle changes in data distribution; and construct a labeling strategy and quality control for semi-supervised anomaly detection.

[0112] Deep anomaly detection can involve using deep neural networks to learn complex normal pattern representations; implementing anomaly detection using variational autoencoders (VAEs) and generative adversarial networks (GANs); applying attention mechanisms to identify key features of anomalies; designing interpretability and anomaly explanation mechanisms for deep models; and optimizing the computational efficiency and real-time performance of deep anomaly detection.

[0113] See Figure 4In some possible implementations, the cache control system employs a distributed cache cluster management module, which includes an application access layer, an intelligent proxy layer, and a Redis cluster layer. The application access layer includes multiple application servers, the intelligent proxy layer includes multiple cache proxy nodes, and the Redis cluster layer includes multiple Redis master nodes and multiple Redis slave nodes. Each application server, cache proxy node, Redis master node, and Redis slave node corresponds one-to-one. Step 160, i.e., dynamically controlling the caching of the data to be cached based on the target caching result, includes: Step 161: Using the intelligent proxy layer, dynamically determine the target Redis master node corresponding to the data caching request based on the target cache result and the load status of each Redis master node.

[0114] Step 162: Forward the data caching request to the target Redis master node and its corresponding Redis slave node through the cache proxy node corresponding to the target Redis master node.

[0115] In some possible implementations, reinforcement learning techniques can be used to automatically learn and optimize cache management strategies under multi-objective constraints, thereby achieving comprehensive optimization of cache hit rate, latency, and cost.

[0116] For details, please refer to the following process: 1. Environmental Modeling and State-Space Design: 1) Definition of state characteristics: 1-1) Cache status characteristics: current cache utilization, remaining capacity, access frequency of each data item in the data distribution, last access time, remaining TTL time, cache hit rate, historical statistics of miss rate, distribution and changing trend of hot data, status and priority distribution of cache eviction queue, etc.

[0117] 1-2) System status characteristics: CPU utilization, memory utilization, network bandwidth usage, number of concurrent requests, average response time, error rate, historical trends and predicted values ​​of system load, identification and impact assessment of resource bottlenecks, system health and stability indicators.

[0118] 1-3) Business status characteristics: current time, date, season and other time context, user activity, access patterns, behavioral characteristics, business scenarios, activity status, traffic characteristics, external environmental factors and influencing events, business goals and priority settings. 2. Action Space Design and Policy Networks: 2) Cache management actions: 2-1) Preloading actions: For example, this can include selecting the data items to be preloaded and their priorities, determining the timing and batch size of preloading; setting the TTL and storage location for preloading; controlling the resource consumption and concurrency of preloading; and monitoring the effect and success rate of preloading.

[0119] 2-2) Retirement strategy actions: such as selecting a cache eviction algorithm (LRU, LFU, custom, etc.); determining the data items to be evicted and the eviction order; setting eviction trigger conditions and thresholds; controlling the eviction speed and batch size; and evaluating the impact of eviction on system performance.

[0120] 2-3) TTL adjustment actions: such as dynamically adjusting the TTL value of data items; predicting and setting appropriate expiration times based on access patterns; implementing hierarchical management and differentiated settings of TTL; controlling the frequency and magnitude of TTL adjustments; and monitoring the impact of TTL adjustments on the hit rate.

[0121] 3. Reward function design.

[0122] In some possible implementations, the prediction model includes the following during the training phase: Step 31: Obtain relevant indicator information after cache control, including resource cost, operation and maintenance cost, storage cost, network cost, system response time, availability value, consistency value, and user satisfaction.

[0123] Step 32: Calculate the cost constraint components based on resource costs, operation and maintenance costs, storage costs, and network costs.

[0124] Step 33: Calculate the performance reward component based on the preset hit rate reward value, latency penalty value, throughput reward value, and stability reward value.

[0125] Step 34: Determine the user experience components based on the system's response time, availability value, consistency value, and user satisfaction.

[0126] Step 35: Based on the cost constraint component, the performance reward component, and the user experience component, obtain the comprehensive reward value.

[0127] Step 36: Update the model parameters of the prediction model based on the comprehensive reward value.

[0128] In some embodiments, an adaptive TTL management algorithm can be used to dynamically adjust the TTL (caching time) of cached data based on data access pattern prediction and lifecycle analysis, thereby optimizing cache space utilization and data freshness.

[0129] Among them, the adaptive TTL management algorithm integrates a lifecycle prediction model with a dynamic TTL adjustment strategy to achieve intelligent and automated management of the lifetime of cached data.

[0130] Specifically, the lifecycle prediction model is responsible for analyzing the data access decay pattern, predicting the probability of future access, and assessing its business relevance and dependency, thereby determining the effective lifecycle of the data.

[0131] The dynamic TTL adjustment strategy is based on prediction results and combined with cost-effectiveness optimization objectives. It adaptively calculates and adjusts the TTL value of each cache item to achieve the optimal balance between storage resources and access performance.

[0132] For example, the optimal TTL can be set based on access probability prediction; or a hierarchical TTL management system can be adopted, that is, different TTL strategies can be used for different types of data; or an adaptive adjustment mechanism can be adopted to dynamically adjust the TTL according to the actual access situation.

[0133] In some embodiments, the optimal TTL can be determined by defining an objective function, setting constraints such as TTL>0 and hit_rate>threshold, and then using the Lagrange multiplier method to solve for the optimal TTL.

[0134] In some embodiments, mathematical models are established to characterize the decay pattern of data access popularity over time, providing a quantitative basis for core predictions. The following two typical decay models are mainly employed: 1) Exponential decay model: The exponential decay model can describe the process in which the access probability decreases rapidly in an exponential manner over time. It is suitable for scenarios where popularity decays quickly (such as news and live streaming content).

[0135] Specifically, an exponential decay relationship between access probability and time can be established, the decay parameter λ can be estimated to reflect the rate of decrease in data popularity, and the decay differences of different data types can be considered to dynamically adjust the decay parameter to adapt to mode changes.

[0136] 2) Power-law decay model: Applicable to access patterns with a "long tail effect" (such as classic videos and technical documents), where the popularity decays slowly and exhibits non-linear characteristics.

[0137] Specifically, the power-law exponent α can be estimated to characterize the smoothness of the decay and the heavy-tail distribution characteristics. This addresses the "heavy-tail phenomenon" where access frequency persists for a long time but gradually decreases. Furthermore, the model parameters are optimized and adaptively adjusted based on business attributes (such as content category, user group, and publishing channel).

[0138] Based on the above embodiments, this application provides a cache control system, namely an AI intelligent cache prediction and adaptive management system. The system adopts a layered microservice architecture, which mainly includes an infrastructure layer, a data acquisition layer, an AI prediction engine layer, an intelligent decision-making layer, an adaptive execution layer, and a feedback optimization layer.

[0139] The infrastructure layer constructs the underlying technology foundation upon which the system operates, providing high-performance, highly available core services and supporting components, mainly including: 1) Distributed Cache Cluster: A high-performance, scalable cache storage cluster built on Redis, responsible for high-speed data read / write and persistence, supporting core caching functions.

[0140] 2) Message middleware: Integrates message queues (such as Kafka and RabbitMQ) to achieve asynchronous decoupling between components and supports efficient transmission and processing of real-time data streams.

[0141] 3) Unified monitoring platform: Deploy a comprehensive monitoring system (such as Prometheus + Grafana) to collect, visualize and alert on system performance, service status and business metrics in real time.

[0142] 4) Centralized Configuration Center: Using configuration management components (such as Nacos and Apollo), the system parameters, policy rules are centrally stored, dynamically updated, and canary releases are implemented to improve operational efficiency and system flexibility.

[0143] The data acquisition layer is primarily responsible for comprehensively and in real-time collecting multi-dimensional data during system operation and business interactions. The main data collected includes: 1) Cache access log: Capture every read and write request to the cache by the application in real time, and record information such as access time, key name, and user ID.

[0144] 2) Cache performance metrics: Continuously monitor the core performance data of the caching system, such as hit rate, average latency, and request throughput.

[0145] 3) Business characteristic data: Extract key information from the business level, including user behavior patterns (such as browsing and click sequences) and attribute characteristics of accessed content (such as product categories and news tags).

[0146] 4) System resource status: Monitor the operation of underlying servers and middleware, and collect system-level resource indicators such as CPU utilization, memory usage, and network I / O bandwidth.

[0147] The AI ​​prediction engine layer, as the intelligent core of the system, integrates multiple machine learning and deep learning models to make multi-dimensional predictions of the future state of the caching system, providing forward-looking insights for intelligent decision-making. Its main functions include: 1) Access pattern prediction: Based on deep learning models (such as LSTM and Transformer), analyze historical access sequences to predict the access probability and traffic trend of various types of data in the future.

[0148] 2) Hotspot data identification: Using time series analysis and anomaly detection algorithms, the system identifies currently accessed data in real time and predicts potential emerging hotspots, supporting priority resource scheduling.

[0149] 3) Lifetime prediction: Construct a data decay model to predict the effective lifetime and expiration time of cached items, providing a basis for dynamic adjustment of TTL and preloading strategies.

[0150] 4) System load prediction: Based on historical resource usage data, predict future system load trends and capacity requirements such as CPU, memory, and network to support flexible scaling decisions.

[0151] The intelligent decision-making layer, based on the output of the AI ​​prediction engine and combined with system objectives and real-time status, makes multi-dimensional and adaptive strategy decisions to achieve intelligent and optimized cache management. Core functions include: 1) Cache strategy optimization: Employ multi-objective optimization algorithms (such as reinforcement learning and Pareto optimization) to comprehensively balance performance, cost, and user experience, and dynamically select the optimal combination of cache management strategies.

[0152] 2) Dynamic TTL adjustment: Based on hotspot identification and lifecycle prediction results, the time to live (TTL) of each cache item is adjusted in real time to ensure that hot data resides in the cache for a long time and cold data is released in a timely manner.

[0153] 3) Preloading decision: Based on access pattern prediction and user behavior analysis, intelligently identify data with a high probability of being accessed and load it into the cache in advance to reduce access latency.

[0154] In some embodiments, an intelligent preloading algorithm can be used to predict access patterns and intelligently decide on the data that needs to be preloaded, thereby improving cache hit rate and user experience.

[0155] For details on the intelligent preloading algorithm, please refer to the following process: 1. Preload candidate recognition: 1-1) Access probability prediction: Predict the probability of accessing data in a future time window; 1-2) Correlation data analysis: Identify candidate data related to current hot data; 1-3) User behavior prediction: Predicting the data that users may access based on user behavior patterns; 1-4) Business scenario analysis: Identify preloading requirements based on business scenarios.

[0156] 2. Preloading decision optimization: 2-1) Benefit-Cost Analysis: Evaluate the benefits and costs of preloading; 2-2) Resource Constraints: Optimize the preloading strategy under resource constraints; 2-3) Timing selection: Choose the optimal time for preloading; 2-4) Priority sorting: Prioritize the preloaded candidates.

[0157] 4) Selection of eviction strategy: Based on the current system load and data access characteristics, dynamically switch the optimal cache eviction algorithm (such as LRU, LFU) to maximize cache hit rate and system stability under high load.

[0158] In some embodiments, an intelligent eviction algorithm can be used to intelligently select cached data that needs to be evicted by combining multiple factors, thereby optimizing the utilization efficiency of cache space.

[0159] For details on the intelligent elimination algorithm, please refer to the following process: 1. Evaluation of eliminated candidates: 1-1) Access frequency analysis: Analyze the historical access frequency of the data; 1-2) Temporal locality: Consider the most recent access time of the data; 1-3) Future Access Prediction: Predicting the probability of future access to the data; 1-4) Data value assessment: comprehensively assess the business value of the data.

[0160] 2. Selection of elimination strategy: 2-1) Multi-strategy fusion: Combining multiple strategies such as LRU, LFU, and prediction; 2-2) Dynamic weight adjustment: Adjust the strategy weights according to the current state; 2-3) Tiered elimination: Different elimination strategies are adopted for different types of data; 2-4) Batch Elimination Optimization: Optimize the efficiency and effectiveness of batch elimination.

[0161] The adaptive execution layer is responsible for translating the optimization strategies generated by the intelligent decision-making layer into specific system operations, enabling automated and dynamic operation and maintenance and resource control of the caching architecture. Its main functions include: 1) Redis Cluster Management: Intelligent operation and maintenance of distributed Redis clusters, supporting dynamic configuration updates, node status monitoring and high availability switching to ensure the stable operation of caching services.

[0162] 2) Cache data synchronization: In multi-node or cross-regional deployment scenarios, ensure the consistency and integrity of cache data and coordinate master-slave replication and failure update mechanisms.

[0163] 3) Load balancing control: Based on real-time traffic characteristics and node load, dynamically adjust the load balancing strategy to distribute requests reasonably and avoid hotspot bottlenecks.

[0164] 4) Elastic capacity scaling: Based on load prediction results, the cache cluster is automatically scaled up or down horizontally to achieve on-demand resource allocation and improve resource utilization and cost-effectiveness.

[0165] The feedback optimization layer constructs a closed-loop mechanism for continuous system evolution. Through real-time feedback and data analysis, it drives iterative optimization of models and strategies, enabling the caching system to achieve self-learning and adaptive capabilities. Core functionalities include: 1) Execution effect evaluation: Quantitatively evaluate the implemented caching strategies (such as TTL adjustment and preloading) and measure their actual effectiveness through indicators such as hit rate, latency, and resource consumption.

[0166] 2) Continuous strategy learning: Based on evaluation results and user behavior feedback, use reinforcement learning or online learning algorithms to continuously optimize the decision-making model and improve the accuracy and adaptability of future strategies.

[0167] 3) Model Iteration and Update: Regularly or as needed, retrain and update AI models such as access prediction and hotspot identification to ensure that the models can adapt to business changes and data drift.

[0168] 4) Automatic parameter tuning: Utilizes automated parameter tuning techniques (such as Bayesian optimization and grid search) to dynamically optimize system configuration parameters and model hyperparameters, maximizing overall performance.

[0169] In some embodiments, the feedback optimization layer may employ model compression techniques and inference acceleration techniques to optimize the prediction model.

[0170] Model compression techniques can include knowledge distillation (e.g., using a small model to learn the predictive ability of a large model), model pruning (e.g., removing unimportant neurons and connections), quantization techniques (e.g., using low-precision numerical values ​​to reduce computational and storage overhead), and model parallelization techniques (e.g., distributing the model across multiple devices for parallel computation).

[0171] Inference acceleration techniques can include batch processing optimization (such as merging multiple prediction requests for batch processing), caching prediction results (such as caching commonly used prediction results to avoid redundant calculations), asynchronous prediction (such as using asynchronous mechanisms to improve prediction concurrency), and approximate computation (such as using approximate algorithms to balance accuracy and speed).

[0172] This reduces prediction latency, meeting the need for millisecond-level real-time prediction, and also compresses model size, reducing deployment and maintenance costs; increases prediction throughput, supporting large-scale concurrent prediction; and improves resource utilization.

[0173] In some embodiments, the feedback optimization layer may optimize cache operations using operation batching and concurrency control optimizations, wherein operation batching may include the following: 1) Batch preloading: Combines and executes multiple preloading operations; 2) Batch Elimination: Optimize the execution efficiency of batch elimination; 3) Batch TTL Updates: Merging TTL update operations reduces overhead; 4) Pipeline operations: Use Redis pipeline technology to improve operational efficiency.

[0174] Concurrency control optimization can include the following: 1) Read-write separation: Separating read and write operations improves concurrency performance; 2) Lock optimization: Use fine-grained locks to reduce lock contention; 3) Lock-free data structures: Use lock-free data structures to improve concurrency performance; 4) Asynchronous operations: Use asynchronous I / O to improve the concurrency of operations.

[0175] In this way, caching operation latency can be reduced by 60%, improving user experience; concurrent processing capacity can be increased by 300% to support high-concurrency access; system throughput can be increased by 400% to meet large-scale business needs; and resource consumption can be reduced by 40%, improving system efficiency.

[0176] Based on the above embodiments, the cache control method provided in this application can be widely applied to various business scenarios such as e-commerce, social networking, video, and games. It can not only improve performance such as cache hit rate, response latency, and throughput, but also improve cost-effectiveness, such as improving resource utilization, reducing operation and maintenance costs and hardware investment. In addition, it can improve predictive performance and adaptive capabilities, support millisecond-level real-time policy adjustments, quickly adapt to changes in access patterns, and improve the user experience, thereby effectively solving the problems of low hit rate, poor adaptability, and high cost of traditional cache management.

[0177] Corresponding to the above cache control methods, this application also provides a cache control device. The cache control device includes a unit for executing the cache control method of any of the above embodiments, and the cache control device can be configured in a desktop computer, tablet computer, laptop computer, or other terminal.

[0178] like Figure 5As shown in the figure, this application provides a computer device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the cache control method provided in any of the foregoing method embodiments, including: Acquire multimodal data, wherein the multimodal data includes access time, user access behavior, access content, and resource usage information of the access system; The multimodal data is input into a preset prediction model; The prediction model is used to extract time series features, business context features, user behavior features, content features, and access system status features from the multimodal data. The prediction model is used to dynamically fuse the time features, business context features, behavioral features, content features, and resource usage features to obtain access prediction results. Based on the access prediction results, the target cache result for the data to be cached is determined; Dynamic caching control is performed on the data to be cached based on the target caching result.

[0179] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0180] Therefore, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the cache control method provided in any of the foregoing method embodiments, including: Acquire multimodal data, wherein the multimodal data includes access time, user access behavior, access content, and resource usage information of the access system; The multimodal data is input into a preset prediction model; The prediction model is used to extract time series features, business context features, user behavior features, content features, and access system status features from the multimodal data. The prediction model is used to dynamically fuse the time features, business context features, behavioral features, content features, and resource usage features to obtain access prediction results. Based on the access prediction results, the target cache result for the data to be cached is determined; Dynamic caching control is performed on the data to be cached based on the target caching result.

[0181] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0182] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0183] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0184] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

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

[0186] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0187] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.

[0188] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A cache control method, characterized in that, The method includes: Acquire multimodal data, wherein the multimodal data includes access time, user access behavior, access content, and resource usage information of the access system; The multimodal data is input into a preset prediction model; The prediction model is used to extract time series features, business context features, user behavior features, content features, and access system status features from the multimodal data. The prediction model is used to dynamically fuse the time features, business context features, behavioral features, content features, and resource usage features to obtain access prediction results. Based on the access prediction results, the target cache result for the data to be cached is determined; Dynamic caching control is performed on the data to be cached based on the target caching result.

2. The cache control method according to claim 1, characterized in that, The access prediction result includes access prediction mode, lifecycle prediction value, and hotspot prediction list. The target caching result includes target cache type, target cache time, and preloading timing. Determining the target caching result for the data to be cached based on the access prediction result includes: Based on the access prediction pattern, the target cache type of the data to be cached is obtained; Based on the hotspot prediction list, the initial cache time is adjusted to obtain the target cache time for the data to be cached; Based on the lifecycle prediction value, the timing for preloading the data to be cached is determined.

3. The cache control method according to claim 1, characterized in that, The step of extracting time-series features from the multimodal data using the prediction model includes: To obtain the short-term dynamic characteristics, seasonal decomposition characteristics, and frequency domain characteristics of time series; Based on the short-term dynamic change characteristics, the seasonal decomposition characteristics, and the frequency domain characteristics, the access time pattern is obtained. Obtain dynamic change characteristics, basic statistical indicators, and correlation coefficients between the access frequencies of different data items; Based on the dynamic change characteristics, the basic statistical indicators, and the correlation coefficient, the access frequency statistical characteristics are obtained; Based on the access time pattern and the access frequency statistical characteristics, time series features are obtained.

4. The cache control method according to claim 3, characterized in that, The acquisition of short-term dynamic change characteristics and seasonal decomposition characteristics of time series includes: The access logs are divided into multiple preset time windows; Determine the access frequency, access volume, and number of unique users within each time window; Based on the access frequency, the access volume, and the number of unique users, the short-term dynamic change characteristics of the time series are determined; The time series is decomposed using a preset algorithm to obtain the decomposed time series. The trend component, seasonality component, and residual component are extracted from the decomposed time series. The seasonal decomposition features are obtained by determining the weight coefficients corresponding to the trend component, the seasonal component, and the residual component.

5. The cache control method according to claim 1, characterized in that, The prediction model includes a feature encoding layer, a pattern recognition layer, and a prediction output layer. The feature encoding layer includes a temporal encoder, an action encoder, a content encoder, and a state encoder. The prediction model dynamically fuses the time features, business context features, behavioral features, content features, and resource usage features to obtain access prediction results, including: The time features and the business context features are input into the timing encoder for timing encoding to obtain a timing encoding vector. The behavioral features are input into the behavior encoder for behavior encoding to obtain a behavior encoding vector. The content features are input into the content encoder for content encoding to obtain a content encoding vector; The state characteristics of the access system are input into the state encoder for state encoding to obtain a state encoding vector. The temporal encoding vector, the behavior encoding vector, the content encoding vector, and the state encoding vector are input into the pattern recognition layer for dynamic fusion processing to obtain the fusion processing result; The fusion processing result is input into the prediction output layer to obtain the access prediction result output by the prediction output layer.

6. The cache control method according to claim 1, characterized in that, The cache control system employs a distributed cache cluster management module, which includes an application access layer, an intelligent proxy layer, and a Redis cluster layer. The application access layer includes multiple application servers, the intelligent proxy layer includes multiple cache proxy nodes, and the Redis cluster layer includes multiple Redis master nodes and multiple Redis slave nodes. Each application server, cache proxy node, Redis master node, and Redis slave node corresponds one-to-one. The dynamic cache control of the data to be cached based on the target cache result includes: The intelligent proxy layer dynamically determines the target Redis master node corresponding to the data caching request based on the target cache result and the load status of each Redis master node. The data caching request is forwarded to the target Redis master node and its corresponding Redis slave node through the cache proxy node corresponding to the target Redis master node.

7. The cache control method according to claim 1, characterized in that, The prediction model includes the following during the training phase: After obtaining the relevant indicator information after cache control, the relevant indicator information includes resource cost, operation and maintenance cost, storage cost, network cost, system response time, availability value, consistency value and user satisfaction; Based on resource costs, operation and maintenance costs, storage costs, and network costs, calculate the cost constraint components; The performance reward component is calculated based on the preset hit rate reward value, latency penalty value, throughput reward value and stability reward value; User experience components are determined based on the system's response time, availability, consistency, and user satisfaction. Based on the cost constraint component, the performance reward component, and the user experience component, a comprehensive reward value is obtained; The model parameters of the prediction model are updated based on the comprehensive reward value.

8. A cache control device, characterized in that, Includes a unit for performing the method as described in any one of claims 1-7.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.