Hotspot cache data processing method and device, equipment and storage medium
By distinguishing between Class I and Class II hotspot cache data and adopting different caching strategies, the stability problem of the distributed cache server when facing a sudden increase in call volume is solved, rapid response and resource optimization are achieved, and the stability and reliability of the system are improved.
Patent Information
- Application Number
- CN202510657580.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-26
AI Technical Summary
When existing distributed cache servers face a sudden surge in call volume, the server CPU and memory usage increase sharply, which may cause blockage or downtime, affecting the overall cache system and application stability.
By using a trained hotspot cache data classification prediction model, we distinguish between first-class hotspot cache data and second-class hotspot cache data, and adopt different caching strategies based on different types. First-class hotspot cache data is directly stored in the local cache, while second-class hotspot cache data is deployed to non-hotspot cache instances on remote cache servers by adding a suffix identifier.
Dynamically adjust the cache strategy to adapt to changes in access patterns in different time periods and user groups, ensure rapid response to highly popular data, avoid excessive use of local cache resources, solve server congestion or downtime problems, and improve the stability of the cache system and applications.
Smart Images

Figure CN120705179A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of data processing technology and financial technology, and in particular to a method, device, equipment and storage medium for processing hotspot cache data. Background Art
[0002] Caching is a key technology widely used in current server-side backend development, typically categorized as local caching and remote caching. Common implementations include Ehcache, Redis, and Memcached. The core purpose of caching is to optimize data storage and access mechanisms. Its primary advantage is that it significantly reduces the pressure on the database caused by large numbers of query requests. By storing frequently accessed data in the cache, the system can quickly respond to query requests without having to read data from the slower database each time, effectively reducing database load while improving system response speed and throughput.
[0003] However, applying caching technology in real-world production environments presents numerous challenges. For example, in auto and non-auto insurance quote scenarios, query traffic often fluctuates due to marketing campaigns or holidays. Especially during promotional periods for specific insurance products, query volume can surge significantly, far exceeding typical levels. Furthermore, certain already-launched insurance products can experience sudden surges in query volume, placing even higher demands on the performance and stability of the hotspot caching system.
[0004] Common caching mechanisms don't specifically address hotspot caches; all cached data is evenly distributed across distributed cache servers. However, when a hotspot cache occurs, such as during a marketing campaign for an insurance product, the volume of inquiries and quote requests for that product can surge, causing the number of calls to cached data related to that product to increase by thousands or even tens of thousands of times. This situation is highly likely to cause CPU and memory usage to soar on the servers hosting the cached data, potentially leading to blockage or downtime, ultimately impacting the stability of the overall cache system and application. Summary of the Invention
[0005] The present invention provides a method, device, equipment and storage medium for processing hotspot cache data to solve the technical problem that when existing distributed cache servers face a sudden increase in call volume, the CPU and memory usage of the server carrying the cache data will increase sharply, which may cause the server to be blocked or crash, thereby affecting the stability of the overall cache system and application.
[0006] In a first aspect, a method for processing hotspot cache data is provided, comprising: Obtaining the number of requests for access identifiers of M users remotely accessing cached data within a preset interval period and the reading time after each access to the cached data; Inputting the request volume and reading time into a trained hotspot cache data classification prediction model to obtain first-class hotspot cache data or second-class hotspot cache data; Predicting, based on the first-category hotspot cache data or the second-category hotspot cache data, the type of cache data to be remotely accessed by the user within the next preset interval period; if the cache data to be remotely accessed by the user belongs to the first-category hotspot cache data, copying the cache data to the corresponding local cache to obtain local hotspot cache data; If the cache data accessed remotely by the user belongs to the second category of hotspot cache data, the access identifier of the cache data is combined with the preset N suffix identifiers to obtain N combination identifiers; each combination identifier and its corresponding hotspot cache data are deployed to the cache instance of the non-hotspot cache data of the remote cache server; Obtain the target access identifier of the cached data accessed by the current user; based on the target access identifier, determine whether the cached data accessed by the current user belongs to Class I hotspot cached data or Class II hotspot cached data; and obtain the cached data from the corresponding local cache or remote cache server based on the judgment result.
[0007] In a second aspect, a device for processing hotspot cache data is provided, comprising: An acquisition module, configured to acquire the number of requests for access identifiers of M users for remotely accessing cached data within a preset interval period and the reading time after each access to the cached data; A classification prediction module, configured to input the request volume and reading time into a trained hotspot cache data classification prediction model to obtain first-class hotspot cache data or second-class hotspot cache data; A local cache processing module is used to predict the type of cache data accessed remotely by the user within the next preset interval period based on the first-category hotspot cache data or the second-category hotspot cache data, and if the cache data accessed remotely by the user belongs to the first-category hotspot cache data, copy the cache data to the corresponding local cache to obtain local hotspot cache data; A remote cache processing module is configured to combine the access identifier of the cache data with N preset suffix identifiers to obtain N combination identifiers if the cache data accessed remotely by the user belongs to the second category of hotspot cache data; and deploy each combination identifier and its corresponding hotspot cache data to a cache instance of non-hotspot cache data on a remote cache server; An access module is used to obtain a target access identifier for the cached data accessed by the current user; based on the target access identifier, determine whether the cached data accessed by the current user belongs to a first-class hotspot cached data or a second-class hotspot cached data; and obtain the cached data from the corresponding local cache or remote cache server based on the judgment result.
[0008] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for processing hotspot cache data when executing the computer program.
[0009] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for processing hotspot cache data are implemented.
[0010] In the scheme implemented by the above-mentioned hotspot cache data processing method, device, equipment and storage medium, by using a trained hotspot cache data classification prediction model, the cache strategy can be dynamically adjusted according to historical access data to adapt to changes in access patterns of different time periods and different user groups. By distinguishing between Class I hotspot cache data and Class II hotspot cache data, and adopting different cache strategies according to different types of data. For highly popular data (Class I hotspot cache data), it is directly stored in the local cache for fast response; while for less popular data (Class II hotspot cache data), it is added with a suffix identifier and deployed to a non-hotspot cache instance of a remote cache server, which not only ensures relatively fast access to the hotspot cache data, but also avoids excessive occupation of local cache resources. This solves the technical problem that when existing distributed cache servers face a sudden increase in call volume, the CPU and memory usage of the server carrying the cache data will increase sharply, which may cause the server to be blocked or crash, thereby affecting the stability of the overall cache system and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0012] Figure 1 This is a schematic diagram of an application environment of a method for processing hotspot cache data in one embodiment of the present invention; Figure 2 It is a flowchart of a method for processing hotspot cache data in one embodiment of the present invention; Figure 3 1 is a schematic diagram of a second type of cache data processing flow of a method for processing hotspot cache data in one embodiment of the present invention; Figure 4 It is a structural diagram of a device for processing hotspot cache data in one embodiment of the present invention; Figure 5It is a structural diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0013] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0014] The method for processing hotspot cache data provided by the embodiment of the present invention can be applied in the following situations: Figure 1 In an application environment, the application environment includes a client and a server, wherein the client can communicate with the server through a network. Specifically, taking the server as an example, the server obtains the number of requests for access identifiers of M users who remotely access cached data within a preset interval period and the reading time after each access to the cached data; the request number and reading time are input into a trained hotspot cache data classification prediction model to obtain a type of hotspot cache data or a type of hotspot cache data; based on the type of hotspot cache data or the type of hotspot cache data, the cache data type of the user remotely accessed within the next preset interval period is predicted; if the cache data remotely accessed by the user belongs to a type of hotspot cache data, the cache data is copied to the corresponding local cache to obtain local hotspot cache data; if the user remotely accesses a cache data that belongs to a type of hotspot cache data, the cache data is copied to the corresponding local cache to obtain local hotspot cache data; If the cache data being accessed belongs to the second category of hotspot cache data, the access identifier of the cache data is combined with the preset N suffix identifiers to obtain N combination identifiers; each combination identifier and its corresponding hotspot cache data are deployed to the cache instance of the non-hotspot cache data of the remote cache server; the target access identifier of the cache data accessed by the current user is obtained; based on the target access identifier, it is determined whether the cache data accessed by the current user belongs to the first category of hotspot cache data or the second category of hotspot cache data; based on the judgment result, the cache data is obtained from the corresponding local cache or remote cache server, and the hotspot cache data is sent to the terminal client. Among them, the client is also called the user end, which refers to the program corresponding to the server that provides local services to customers. The client can be installed on but not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices. The server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0015] See also Figure 2 As shown, Figure 2 A flowchart of a method for processing hotspot cache data provided by an embodiment of the present invention includes the following steps: S10: Obtaining the number of requests for access identifiers of M users for remotely accessing cached data within a preset interval period and the reading time after each access to the cached data.
[0016] The cache in this embodiment is a storage mechanism used to improve data access speed. The cache is equivalent to a temporary storage space for data. When the system needs to access certain data, it first checks whether the data is already stored in the cache. If it is successfully found (i.e., a cache hit), the system can read the data directly from the cache without having to access slower storage devices (such as hard drives), significantly improving data access efficiency. Caches are generally divided into local caches and remote caches (distributed caches).
[0017] 1) Local caching involves storing data in local memory within the application, typically running within the same process. This approach offers the advantage of extremely fast read speeds, as data access does not require traversing the network, eliminating additional performance overhead. However, local caching also has limitations, such as limited storage capacity, which typically only allows for relatively small amounts of data. Furthermore, in clustered deployments, inconsistent data updates may occur.
[0018] 2) Remote caching (also known as distributed caching) stores data on remote servers and performs data read and write operations over the network. Common distributed caching systems include Redis and Memcached. The advantages of remote caching include its ability to store massive amounts of data and its flexible scalability through a distributed architecture, making it ideal for handling large-scale data storage and access needs. Furthermore, distributed caching utilizes multiple nodes (cache instances) for data storage and access, significantly increasing the system's storage capacity and enhancing data reliability and availability.
[0019] In this example, we consider the potential fluctuations in auto insurance and non-automotive product quotes during marketing events or holidays. The access cache data for auto insurance and non-automotive product quotes is stored on a Redis remote cache server. The following describes how to process hotspot cache data in more detail.
[0020] Redis Cache is an open-source, memory-based key-value database written in ANSI C and supporting network operations. Redis Cluster is a distributed data storage solution officially provided by Redis that supports storing and managing data on multiple nodes. Its network structure has no central node. Nodes communicate with each other using a binary protocol, and nodes and clients communicate with each other using an ASCII protocol. Each node can be a master node (Master) or a slave node (Slave). The master node is responsible for processing read and write requests and maintaining cluster information, while the slave node replicates the master node's data and status information. The cluster uses a hash slot mechanism to store data in a distributed manner across multiple nodes, with each node responsible for a portion of the hash slots, thereby achieving distributed data storage.
[0021] In Redis, a key is a unique identifier used to identify data. Users access and manipulate data using a key. A key can be any string and is typically used to specify the name or identifier of the data item to be manipulated. A value is the data associated with a key. In Redis, a value can be a variety of data types, including strings, lists, sets, ordered sets, and hashes. These data types provide a rich set of data manipulation capabilities to meet diverse application needs.
[0022] In this embodiment, a logging system is used to obtain the number of access identifier requests from M users accessing cached data remotely within a preset time interval, where M is greater than 0. First, ensure that the Redis cache system has logged user accesses. Typically, the logs contain information such as the user identifier, access identifier, access start time, and access exit time. If supported by the Redis cache system, access statistics can also be obtained directly from the cache system. Specifically, the logs or data streams are parsed to extract the user identifier and access identifier for each request. The requests for each user within the preset time interval are counted to calculate the number of requests.
[0023] In this embodiment, the reading time of each user accessing cached data is obtained by using the Redis log system. Reading time refers to the length of time a user spends reading or staying on the client after accessing cached data. Usually, the log records information such as the user identifier, access identifier, access start time, and access exit time. By calculating the difference between the access start time and the access exit time, the reading time of the current access to the cached data can be obtained. If the access exit time is not directly recorded in the log, it can be reasonably inferred based on the next access start time. S20: Inputting the request volume and reading time into a trained hotspot cache data classification prediction model to obtain first-class hotspot cache data or second-class hotspot cache data.
[0024] In this embodiment, the method in step S10 collects metrics related to user remote access to the cache node over a preset period (e.g., 24 hours), including the total number of requests (total number of requests) and the reading duration of each access (accurate to the millisecond level). These metrics are recorded in real time by the monitoring system and stored as a structured log. The data fields in the log include information such as the access start time, user identifier, access identifier, and reading duration, thereby constructing a complete time series dataset.
[0025] In this embodiment, before inputting the above time series data set into the trained hotspot cache data classification prediction model, the input data needs to be preprocessed as follows: 1) Generate time-segment features (e.g., hourly mean of requests, standard deviation of reading duration) by performing sliding window processing on the time series dataset. Specifically, determine the window length (e.g., 1 hour) and sliding step size (e.g., 15 minutes) based on the business scenario requirements to form continuous overlapping or non-overlapping time segments. The original time series dataset (e.g., request volume, reading duration) is segmented according to the specified windows, aligning timestamps and filling any missing values. For example, linear interpolation can be used to handle transient data loss due to network jitter.
[0026] 2) For the data within each window, calculate the following statistics: the mean, standard deviation, and maximum value of the request volume, and the mean, standard deviation, and maximum value of the reading time. These statistics together constitute the feature representation of the time segment.
[0027] In this embodiment, the hotspot cache data classification prediction model is used to identify cached data with high access frequency and long user dwell time (i.e., reading time), and classify it as hotspot data. This type of model is important for optimizing cache management, improving system performance, and enhancing user experience. Hotspot cache data classification prediction models are typically built based on machine learning or deep learning algorithms. These algorithms analyze cached data characteristics such as request volume and reading time to discover potential patterns and associations between data, thereby accurately classifying hotspot data.
[0028] In this embodiment, the hotspot cache data classification prediction model uses an LSTM network model. LSTM (Long Short-Term Memory) is a special recurrent neural network (RNN). By introducing memory cells and a gating mechanism, it effectively solves the vanishing or exploding gradient problems that traditional RNNs face when processing long sequences of data. This enables the LSTM network model to capture long-term dependencies in the data, making it suitable for analyzing user access behavior and predicting hotspot data.
[0029] The LSTM network model consists of an input layer, an LSTM layer, a fully connected layer, and an output layer. The input layer receives input data after preprocessing and feature selection. The LSTM layer uses LSTM units to capture long-term dependencies in the data. The fully connected layer processes the output of the LSTM layer, converting it into a fixed-size vector. This vector can be used for further classification tasks. The output layer converts the output of the fully connected layer into the final classification result. In multi-classification tasks, the Softmax activation function is often used to generate probabilities for each class.
[0030] In this embodiment, the extracted time segment features are input into the trained LSTM network model to output the classification labels of the first-class hotspot cache data or the second-class hotspot cache data. Through the output classification labels, it can be determined which cache data accessed by the user belong to the first-class hotspot cache data and which belong to the second-class hotspot cache data. The first-class hotspot cache data refers to the request volume higher than the preset threshold and the reading time is stable (such as the request volume is greater than 500 times / second and the reading time variance is <0.1); the second-class hotspot cache data refers to the request volume is medium but the reading time fluctuates greatly (such as the request volume is 200-500 times / second and the reading variance is >0.3); the cache data that does not belong to the first-class hotspot cache data or the second-class hotspot cache data is classified as non-hotspot cache data. S30: Based on the first-class hotspot cache data or the second-class hotspot cache data, predict the type of cache data that the user remotely accesses within the next preset interval period; if the cache data that the user remotely accesses belongs to the first-class hotspot cache data, copy the cache data to the corresponding local cache to obtain local hotspot cache data.
[0031] In this embodiment, the classification results output by the current LSTM network model are used as predictions of the cache data types that users will access remotely during the next preset interval. Based on the predictions, hotspot cache data of a type that users are likely to access during the next preset interval is copied to the corresponding local cache. This can significantly improve user access speed and reduce remote access latency and bandwidth consumption.
[0032] S40: If the cache data accessed remotely by the user belongs to the second category of hotspot cache data, the access identifier of the cache data is combined with the preset N suffix identifiers to obtain N combination identifiers; each of the combination identifiers and its corresponding hotspot cache data is deployed to the cache instance of the non-hotspot cache data of the remote cache server.
[0033] In this embodiment, based on the prediction result, the second type of hotspot cache data that the user may access within the next preset interval period is processed as follows: Extract the access identifier from the second-category hotspot cache data.
[0034] Define N suffix identifiers based on actual needs, where N is greater than 0. These suffix identifiers can be strings, numbers, special characters, or a combination thereof. The selection of suffix identifiers should take into account compatibility with the original access identifier, readability, and practical significance. Store the preset N suffix identifiers in a list, array, or other suitable data structure for subsequent combination operations.
[0035] For each access identifier of the second-class hotspot cache data, it is combined with the preset N suffix identifiers to obtain a combined identifier. The combination method can be simple string concatenation or other combination methods that meet actual needs.
[0036] Store the combined combined identifiers in a new list, array, or other suitable data structure.
[0037] like Figure 3 As shown in the figure, a non-hotspot cache instance is selected in the Redis remote cache server to store the second type of hotspot cache data. Next, a combination identifier and its corresponding hotspot cache data are selected and migrated to the selected non-hotspot cache instance. It is important to note that each non-hotspot cache instance can only store one combination identifier corresponding to the access identifier and its corresponding hotspot cache data. This migration process can be implemented through network transmission, data import tools, or APIs.
[0038] S50: Obtain the target access identifier of the cached data accessed by the current user; determine whether the cached data accessed by the current user belongs to Class I hotspot cached data or Class II hotspot cached data based on the target access identifier; obtain the cached data from the corresponding local cache or remote cache server based on the judgment result.
[0039] In this embodiment, the policy steps for user access to the first type of cached data and the second type of cached data in step S40 include the following: 1) When a user initiates a request, the target access identifier is extracted from the request. This identifier is usually a parameter in the request, such as a part of the URL or a specific field in the request header.
[0040] 2) By using the target access identifier, it is possible to check whether the data belongs to the first or second category of hotspot cache data. This judgment process can be dynamically implemented by searching a predefined hotspot data list.
[0041] 3) If the target access identifier points to a first-category hotspot cache, the local cache is searched first and the result is returned directly. If the data does not exist in the local cache, the remote server is queried. If the target access identifier corresponds to a second-category hotspot cache, the local cache is skipped and the remote cache server is used to retrieve the required data.
[0042] The hotspot cache data processing method of this embodiment, by using a trained hotspot cache data classification prediction model, can dynamically adjust the cache strategy according to historical access data to adapt to changes in access patterns of different time periods and different user groups. By distinguishing between Class I hotspot cache data and Class II hotspot cache data, and adopting different cache strategies according to different types of data. For highly popular data (Class I hotspot cache data), it is directly stored in the local cache for fast response; while for less popular data (Class II hotspot cache data), it is added with a suffix identifier and deployed to a non-hotspot cache instance of a remote cache server, which not only ensures relatively fast access to the hotspot cache data, but also avoids excessive occupation of local cache resources. This solves the technical problem that when existing distributed cache servers face a sudden increase in call volume, the CPU and memory usage of the server carrying the cache data will increase sharply, which may cause the server to be blocked or down, thereby affecting the stability of the overall cache system and application.
[0043] [PA1] Optionally, in step S20 above, the training process of the hotspot cache data classification prediction model includes: S201: Acquire historical user access information of remote access to cached data to obtain original access data.
[0044] In this embodiment, by collecting access logs from the Redis cache system, we can obtain information such as each user's access start time, user identifier, access identifier, and reading time, and then construct a time series data training set (i.e., raw access data). This time series data training set records the number of requests and reading time corresponding to each access identifier at a granularity of minutes. The reading time can be expressed as average reading time or the total reading time corresponding to the number of requests.
[0045] S202: Perform sliding window processing on the original access data to extract time series features to obtain a training feature data set, wherein the training feature data set includes the mean request volume, request volume variance, reading time mean and reading time variance of each cached data within a preset sampling time; and label the hotspot cache data type of the training feature data set.
[0046] In this embodiment, the time series data training set in step S201 is first segmented according to the preset interval period in step S10. Each segmented time series data set is then processed according to the statistical and preprocessing methods used in step S10 to extract time segment features, ultimately forming a training feature dataset containing multiple time segment features. This training feature dataset covers the mean request volume, request volume variance, reading time mean, and reading time variance of each cached data within a preset sampling time, where the preset sampling time is the window length defined in step S20. The cached data in the training feature dataset are labeled as hotspot cache data types based on the mean request volume and reading time variance within the window. For example, cached data with a mean request volume greater than 500 times / second and a reading time variance less than 0.1 within the window are labeled as Class I hotspot cache data; cached data with a mean request volume within the window in the interval [200, 500) times / second and a reading time variance greater than 0.3 within the window are labeled as Class II hotspot cache data.
[0047] S203: Input the labeled training feature data set into the hotspot cache data classification prediction model to obtain a prediction label of the hotspot cache data type corresponding to the training feature data.
[0048] In this embodiment, the hotspot cache data classification prediction model is an LSTM network model. The training feature dataset annotated in step S202 is divided into a training set and a validation set (or test set). The training set typically accounts for the majority of the data and is used to train the model, while the validation set (or test set) accounts for a smaller portion of the data and is used to evaluate model performance.
[0049] The training process is divided into batches, each containing a certain number of samples. For each batch, feature data is fed into the model for forward propagation. During this process, the data passes through the input layer, LSTM layer, fully connected layer, and output layer, ultimately obtaining a predicted label for the hotspot cache data type corresponding to the training feature data.
[0050] S204: Constructing a target loss function according to the predicted labels and the true labeled labels corresponding to the training feature data.
[0051] In this embodiment, the target loss function is defined as the negative log-likelihood between the predicted probability distribution and the true label distribution. For each sample, the cross entropy loss can be calculated as: Where C is the number of categories in the hotspot cache, is the value of the jth category in the true label of the i-th sample (in one-hot encoding, only one value is 1 and the rest are 0), is the probability of the jth category in the predicted label of the i-th sample. If the true label in step S201 is an integer label, it is first necessary to convert the integer label corresponding to the true label into a one-hot encoding form, and then calculate the cross entropy.
[0052] S205: Minimizing the target loss function by iteratively updating the parameters of the hotspot cache data classification prediction model to obtain the optimal parameter settings of the hotspot cache data classification prediction model.
[0053] In this embodiment, a backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters. During the backpropagation process, the gradient passes through the output layer, fully connected layer, LSTM layer, and input layer in sequence, ultimately obtaining the gradient value corresponding to each parameter. Based on the calculated gradient, the optimizer is used to update the model's weights and biases. During the update process, the learning rate can be adjusted to control the step size to ensure that the model converges stably to the optimal solution. When the loss function value gradually decreases and stabilizes during training, reaching a minimum value or no longer fluctuating significantly, the model is considered to have successfully and stably converged to the optimal solution. At the end of each iteration (epoch), the validation set is used to evaluate the model's performance. Metrics such as loss and accuracy are calculated on the validation set. If the validation set performance stops improving (for example, the loss value stops decreasing or the accuracy stops improving over multiple consecutive iterations), consider stopping training early to avoid overfitting.
[0054] The method for processing hotspot cache data in this embodiment, by inputting a training feature dataset into the model to obtain corresponding predicted labels and then comparing the predicted labels with the true labeled labels, can help the model better learn the true distribution and key features of the data, thereby improving prediction accuracy. The target loss function is an important tool for evaluating the difference between the model's predicted results and the true results. By continuously iteratively updating the model parameters to minimize the target loss function, the model performance can be gradually optimized to make it closer to the true data distribution, thereby providing users with real-time and accurate prediction results in practical applications.
[0055] Optionally, in the above step S20, that is, the data classification method of the hotspot cache data, further includes: S210: Obtaining a heat value of the cached data according to an average value of the request quantity of the access identifier.
[0056] In this embodiment, the popularity of cached data is generally used to measure the access frequency of the data. Specifically, a query request monitor is added upstream of the cache server to analyze the request volume ratio over a period of time and record the average request volume of the corresponding cache key.
[0057] S211: If the heat value of the access identifier is greater than W times the heat value of the same access identifier in the previous adjacent preset interval period, the cached data is hotspot cached data.
[0058] In this embodiment, for each cached data item, the heat value of the access identifier in the current preset interval is compared with the heat value of the same access identifier in the previous adjacent preset interval. If the heat value of the access identifier in the current preset interval is greater than W times the heat value of the same access identifier in the previous adjacent preset interval, the cached data item is classified as hot cache data, and W is greater than 0.
[0059] S212: If the heat value of the hotspot cache data is greater than the preset heat threshold, classify it as type I hotspot cache data; if the heat value of the hotspot cache data is not greater than the preset heat threshold, classify it as type II hotspot cache data.
[0060] In this embodiment, considering that the hotspot cache data in step S211 may contain extremely hot data, which requires special processing, it is necessary to separate this extremely hot data. Specifically, a preset heat threshold can be set, and the heat value of the current hotspot cache data can be compared with the threshold. If the heat value of the current hotspot cache data is higher than the preset threshold, it is classified as Class I hotspot cache data; if the heat value of the current hotspot cache data does not exceed the preset threshold, it is classified as Class II hotspot cache data.
[0061] The processing method of hotspot cache data of this embodiment divides the cache data into hotspot cache data and non-hotspot cache data by calculating the heat value. Furthermore, based on the comparison result of the heat value and the preset heat threshold, the hotspot cache data is refined and classified into Class I hotspot data and Class II hotspot data, thereby achieving more efficient management of cache resources. For Class I hotspot cache data, because it has a higher heat value, it can be given a higher priority, for example, it can be retained in a faster and more reliable cache medium to ensure its fast access needs. This solution completes data classification based on heat value and preset heat threshold, and the solution is simple to implement and easy to maintain.
[0062] Optionally, in the above step S50, that is, obtaining the cache data from the corresponding local cache or remote cache server according to the judgment result, includes the following steps: S501: If the cache data accessed by the target access identifier is a type of hotspot cache data, the cache data is obtained from the local hotspot cache data.
[0063] In this embodiment, a server receives an access request from a client or other service component that includes a target access identifier. First, the server parses and extracts the target access identifier. Then, based on the identifier, the server searches the index table of a class of hotspot cache data to determine whether the corresponding cache data belongs to the class of hotspot cache data. If the target access identifier is in the index table of a class of hotspot cache data, the server directly retrieves the class of hotspot cache data corresponding to the target access identifier from the local hotspot cache data.
[0064] S502: If the cache data accessed by the target access identifier is a second-category hotspot cache number, a corresponding combination identifier is obtained according to the target access identifier to obtain a query combination identifier; and the hotspot cache data is obtained from the cache instance corresponding to the remote cache server according to the query combination identifier.
[0065] In this embodiment, if the target access identifier in step S501 is not in the index table of the first-category hotspot cache data, a search is performed in the index table of the second-category hotspot cache data based on the target access identifier. If the target access identifier is in the index table of the second-category hotspot cache data, the corresponding combination identifier list is located based on the target access identifier, and the query combination identifier is obtained from the list. Subsequently, the relevant hotspot cache data is obtained from the corresponding cache instance of the remote cache server based on the query combination identifier.
[0066] The hotspot cache data processing method of this embodiment distinguishes between Category I and Category II hotspot cache data and adopts strategies for obtaining data from local and remote caches, respectively. Retrieving data from the local cache avoids unnecessary network communication and remote access, reduces the risk of access interruptions due to network or remote server failures, and improves system stability and reliability. For Category II hotspot cache data, storing and accessing it through remote cache servers can distribute data access pressure, avoid overloading a single node, and achieve load balancing.
[0067] Optionally, in the above step S502, that is, obtaining a corresponding combination identifier according to the target access identifier to obtain a query combination identifier, includes the following steps: S50201: Randomly obtain any one of the N suffix identifiers to obtain a query suffix identifier.
[0068] In this embodiment, N suffix identifiers are stored in an array, and a random array index value is generated using a random number generator. Then, the corresponding combination identifier is obtained from the array according to the randomly generated index value, thereby determining the combination identifier required for the query.
[0069] S50202: Concatenate the query suffix identifier and the target access identifier to obtain the query combination identifier.
[0070] In this embodiment, the query suffix identifier obtained in step S50201 can be directly added to the target access identifier. Figure 3 As shown in the example, if the target access identifier is key and the query suffix identifier is 03, the concatenated result is key03. Alternatively, you can add a separator (such as a colon, underscore, or hyphen) after the target access identifier before concatenating the query suffix identifier. The specific concatenation rules should be determined based on business requirements. Validate the concatenated query composite identifier to ensure it meets the expected format and length requirements.
[0071] The hotspot cache data processing method of this embodiment combines the query suffix identifier with the target access identifier to generate a query combination identifier that can more accurately locate the required data. This reduces the time spent searching through large amounts of data and improves the speed and efficiency of data retrieval.
[0072] Optionally, in the above step S502, that is, obtaining a corresponding combination identifier according to the target access identifier to obtain a query combination identifier, includes the following steps: S50210: Store the N combined identifiers in a data structure sorted in ascending order of access frequency; and associate the data structure with the corresponding target access identifiers.
[0073] In this embodiment, the step of storing the N combination identifiers in a data structure sorted in ascending order of access frequency includes: Choose a data structure that keeps elements sorted, for example, std::set in C++ or sortedcontainers.SortedList in Python.
[0074] Create an empty hash table to store the association between the target access identifier and the sort data structure.
[0075] For each target access identifier, an empty sorted data structure is initialized to store the combined identifier and its access frequency.
[0076] Iterate over N combination identifiers and, for each combination identifier, record its initial access frequency (which may be 0 or a preset value). Based on the target access identifier, find the corresponding sorted data structure in the hash table. Insert the combination identifier and its access frequency as a pair into the sorted data structure. Because the data structure remains sorted, the new element is automatically placed in the correct position.
[0077] S50220: Extract the combination identifier with the lowest access frequency in the corresponding data structure according to the target access identifier to obtain the query combination identifier.
[0078] In this embodiment, when searching for the combination identifier corresponding to a target access identifier, the corresponding sorted data structure can be located in the hash table based on the target access identifier. Since the data structure is sorted by access frequency, the combination identifier with the lowest access frequency will be located at the beginning of the data structure. In this case, the combination identifier can be extracted from the beginning of the data structure as the query result. If the access frequency of a combination identifier needs to be updated, the combination identifier is first searched in the sorted data structure and its access frequency value is updated.
[0079] The hotspot cache data processing method provided in this embodiment sorts the access frequencies of combination identifiers and prioritizes access to the combination identifiers with the lowest access frequencies, thereby ensuring that cache data requests for the target access identifiers are evenly distributed across multiple instances. This further addresses the problem of existing distributed cache servers, which can cause server congestion or downtime due to a sharp increase in CPU and memory usage on the servers hosting cached data when dealing with sudden high concurrency, effectively improving the stability of the overall cache system and applications.
[0080] Optionally, the method for updating local hotspot cache data includes the following steps: S60: Setting a scheduled task, wherein the scheduled task synchronously updates the corresponding hotspot cache data in the remote hotspot cache server to the corresponding local hotspot cache data through the access identifier corresponding to the local hotspot cache data according to a preset fixed update time interval.
[0081] In this embodiment, a suitable scheduled task framework or library is selected according to the development environment and programming language. The scheduled task scheduler is configured, and the execution interval and triggering conditions of the task are set. For example, the synchronization task can be set to execute once every 5 minutes. When the scheduled task is triggered (for example, at the end of each time interval), the corresponding hotspot data is obtained from the remote hotspot cache server based on the access identifier in the local cache. Subsequently, the data obtained from the remote server is compared with the data in the local cache. If a difference is found in the data (such as content update or expiration time change), the local cache is updated. If the data returned by the remote server indicates that some local cache entries have expired or are no longer needed, these entries are removed from the local cache.
[0082] The hotspot cache data processing method of this embodiment ensures that the local cache data remains consistent with the data on the remote server through a regular synchronization mechanism. This measure effectively reduces errors caused by data inconsistencies and improves the consistency of the user experience. In addition, the scheduled task can flexibly set a reasonable update time interval based on actual needs, thereby avoiding overly frequent or sparse synchronization operations and achieving optimal utilization of system resources (such as network bandwidth and CPU time).
[0083] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0084] In one embodiment, a device for processing hotspot cache data is provided, which corresponds to the method for processing hotspot cache data in the above embodiment. Figure 4 As shown, the hotspot cache data processing device includes an acquisition module 101, a classification prediction module 102, a local cache processing module 103, a remote cache processing module 104 and an access module 105. The functional modules are described in detail as follows: The acquisition module is used to acquire the request quantity of access identifiers for remotely accessing cached data by M users within a preset interval period and the reading time after each access to the cached data.
[0085] The classification prediction module is used to input the request volume and reading time into the trained hotspot cache data classification prediction model to obtain the first category hotspot cache data or the second category hotspot cache data.
[0086] A local cache processing module is used to predict the type of cache data that the user remotely accesses within the next preset interval period based on the first-category hotspot cache data or the second-category hotspot cache data. If the cache data that the user remotely accesses belongs to the first-category hotspot cache data, the cache data is copied to the corresponding local cache to obtain local hotspot cache data.
[0087] A remote cache processing module is used to combine the access identifier of the cache data with N preset suffix identifiers to obtain N combination identifiers if the cache data remotely accessed by the user belongs to the second type of hotspot cache data; and deploy each of the combination identifiers and its corresponding hotspot cache data to the cache instance of the non-hotspot cache data of the remote cache server.
[0088] An access module is used to obtain a target access identifier for the cached data accessed by the current user; based on the target access identifier, determine whether the cached data accessed by the current user belongs to a first-class hotspot cached data or a second-class hotspot cached data; and obtain the cached data from the corresponding local cache or remote cache server based on the judgment result.
[0089] Optionally, the classification prediction module 102 specifically includes: The historical data acquisition submodule is used to obtain the access information of historical users' remote access to cached data and obtain the original access data.
[0090] The data annotation submodule is used to perform sliding window processing on the original access data to extract time series features and obtain a training feature data set. The training feature data set includes the mean request volume, request volume variance, reading time mean and reading time variance of each cached data within a preset sampling time; and the hotspot cache data type annotation is performed on the training feature data set.
[0091] The prediction submodule is used to input the labeled training feature data set into the hotspot cache data classification prediction model to obtain the prediction label of the hotspot cache data type corresponding to the training feature data.
[0092] The loss function construction submodule is used to construct a target loss function according to the predicted labels and true labeled labels corresponding to the training feature data.
[0093] The parameter updating submodule is used to minimize the target loss function by iteratively updating the parameters of the hotspot cache data classification prediction model to obtain the optimal parameter setting of the hotspot cache data classification prediction model.
[0094] Optionally, the classification prediction module 102 specifically includes: The heat value calculation submodule is used to obtain the heat value of the cached data according to the average value of the request quantity of the access identifier.
[0095] The cache data classification submodule is configured to determine that the cache data is hotspot cache data if the heat value of the access identifier is greater than W times the heat value of the same access identifier in the previous adjacent preset interval period.
[0096] The hotspot cache data classification submodule is used to classify the hotspot cache data as Class I hotspot cache data if the heat value of the hotspot cache data is greater than a preset heat threshold; and to classify the hotspot cache data as Class II hotspot cache data if the heat value of the hotspot cache data is not greater than the preset heat threshold.
[0097] Optionally, the access module 105 specifically includes: A type-one hotspot cache data processing submodule is configured to obtain the cache data from the local hotspot cache data if the cache data accessed by the target access identifier is type-one hotspot cache data.
[0098] The second-category hotspot cache data processing sub-module is used to obtain a corresponding combination identifier according to the target access identifier to obtain a query combination identifier if the cache data accessed by the target access identifier is a second-category hotspot cache number; and obtain the cache data from the cache instance corresponding to the remote cache server according to the query combination identifier.
[0099] Optionally, the second-category hotspot cache data processing submodule specifically includes: The suffix identifier obtaining unit is used to randomly obtain any one of the N suffix identifiers to obtain a query suffix identifier.
[0100] The concatenation unit is configured to concatenate the query suffix identifier with the target access identifier to obtain the query combination identifier.
[0101] Optionally, the second-category hotspot cache data processing submodule specifically includes: The access frequency sorting unit is used to store the N combination identifiers in a data structure sorted from small to large according to access frequency; and associate the data structure with the corresponding target access identifier.
[0102] The result acquisition unit is configured to retrieve the combination identifier with the least access frequency in the corresponding data structure according to the target access identifier to obtain the query combination identifier.
[0103] Optionally, the local cache processing module 103 specifically includes: The timing update module is used to set a timing task. The timing task synchronizes the corresponding hotspot cache data in the remote hotspot cache server to the corresponding local hotspot cache data through the access identifier corresponding to the local hotspot cache data according to a preset fixed update time interval.
[0104] The present invention provides a processing device for hotspot cache data. By using a trained hotspot cache data classification prediction model, it can dynamically adjust the cache strategy according to historical access data to adapt to changes in access patterns of different time periods and different user groups. By distinguishing between Class I hotspot cache data and Class II hotspot cache data, and adopting different cache strategies according to different types of data. For highly popular data (Class I hotspot cache data), it is directly stored in the local cache for fast response; while for less popular data (Class II hotspot cache data), it is added with a suffix identifier and deployed to a non-hotspot cache instance of a remote cache server, which not only ensures relatively fast access to the hotspot cache data, but also avoids excessive occupation of local cache resources. It solves the technical problem that when the existing distributed cache server faces a sudden increase in the number of instantaneous calls, the CPU and memory usage of the server carrying the cache data will increase sharply, which may cause the server to be blocked or down, thereby affecting the stability of the overall cache system and application.
[0105] For the specific definition of the processing device for hotspot cache data, please refer to the definition of the processing method for hotspot cache data above, which will not be repeated here. The various modules in the above-mentioned processing device for hotspot cache data can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side method for processing hotspot cache data.
[0107] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of a method for processing hotspot cache data.
[0108] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed: The number of requests for access identifiers of M users who remotely access cached data within a preset interval period and the reading time after each access to the cached data are obtained.
[0109] The request volume and reading time are input into a trained hotspot cache data classification prediction model to obtain a first-category hotspot cache data or a second-category hotspot cache data.
[0110] Based on the first-class hotspot cache data or the second-class hotspot cache data, predict the type of cache data that the user remotely accesses within the next preset interval period. If the cache data that the user remotely accesses belongs to the first-class hotspot cache data, copy the cache data to the corresponding local cache to obtain local hotspot cache data.
[0111] If the cache data accessed remotely by the user belongs to the second category of hotspot cache data, the access identifier of the cache data is combined with the preset N suffix identifiers to obtain N combination identifiers; each of the combination identifiers and its corresponding hotspot cache data are deployed to the cache instance of the non-hotspot cache data of the remote cache server.
[0112] Obtain the target access identifier of the cached data accessed by the current user; based on the target access identifier, determine whether the cached data accessed by the current user belongs to Class I hotspot cached data or Class II hotspot cached data; and obtain the cached data from the corresponding local cache or remote cache server based on the judgment result.
[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: The number of requests for access identifiers of M users who remotely access cached data within a preset interval period and the reading time after each access to the cached data are obtained.
[0114] The request volume and reading time are input into a trained hotspot cache data classification prediction model to obtain a first-category hotspot cache data or a second-category hotspot cache data.
[0115] Based on the first-class hotspot cache data or the second-class hotspot cache data, predict the type of cache data that the user remotely accesses within the next preset interval period. If the cache data that the user remotely accesses belongs to the first-class hotspot cache data, copy the cache data to the corresponding local cache to obtain local hotspot cache data.
[0116] If the cache data accessed remotely by the user belongs to the second category of hotspot cache data, the access identifier of the cache data is combined with the preset N suffix identifiers to obtain N combination identifiers; each of the combination identifiers and its corresponding hotspot cache data are deployed to the cache instance of the non-hotspot cache data of the remote cache server.
[0117] Obtain the target access identifier of the cached data accessed by the current user; based on the target access identifier, determine whether the cached data accessed by the current user belongs to Class I hotspot cached data or Class II hotspot cached data; and obtain the cached data from the corresponding local cache or remote cache server based on the judgment result.
[0118] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0119] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0120] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0121] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
[0122] [PA1] Explain the technical effects of the exclusive technical solution.
Claims
1. A method for processing hotspot cache data, characterized in that: include: Obtaining the number of requests for access identifiers of M users remotely accessing cached data within a preset interval period and the reading time after each access to the cached data; Inputting the request volume and reading time into a trained hotspot cache data classification prediction model to obtain first-class hotspot cache data or second-class hotspot cache data; Predicting, based on the first-category hotspot cache data or the second-category hotspot cache data, the type of cache data to be remotely accessed by the user within the next preset interval period; if the cache data to be remotely accessed by the user belongs to the first-category hotspot cache data, copying the cache data to the corresponding local cache to obtain local hotspot cache data; If the cache data accessed remotely by the user belongs to the second category of hotspot cache data, the access identifier of the cache data is combined with the preset N suffix identifiers to obtain N combination identifiers; each combination identifier and its corresponding hotspot cache data are deployed to the cache instance of the non-hotspot cache data of the remote cache server; Get the target access identifier of the cached data accessed by the current user; According to the target access identifier, determining whether the cache data currently accessed by the user belongs to the first category of hotspot cache data or the second category of hotspot cache data; According to the judgment result, the cache data is obtained from the corresponding local cache or remote cache server.
2. The method for processing hotspot cache data according to claim 1, wherein: The training process of the hotspot cache data classification prediction model includes: Obtain access information of historical users' remote access to cached data and obtain original access data; Performing sliding window processing on the raw access data to extract time series features to obtain a training feature data set, wherein the training feature data set includes the mean request volume, request volume variance, reading time mean, and reading time variance of each cached data within a preset sampling time; and labeling the hotspot cache data type on the training feature data set; Inputting the labeled training feature data set into the hotspot cache data classification prediction model to obtain a prediction label of the hotspot cache data type corresponding to the training feature data; Constructing a target loss function based on the predicted labels and the true labeled labels corresponding to the training feature data; The target loss function is minimized by iteratively updating the parameters of the hotspot cache data classification prediction model to obtain the optimal parameter settings of the hotspot cache data classification prediction model.
3. The method for processing hotspot cache data according to claim 1, wherein: The data classification method of the hotspot cache data further includes: Obtaining a heat value of the cached data according to an average value of the request amount of the access identifier; If the heat value of the access identifier is greater than W times the heat value of the same access identifier in the previous adjacent preset interval period, the cached data is hotspot cached data; If the heat value of the hotspot cache data is greater than the preset heat threshold, it is classified as type I hotspot cache data; if the heat value of the hotspot cache data is not greater than the preset heat threshold, it is classified as type II hotspot cache data.
4. The method for processing hotspot cache data according to claim 1, wherein: Obtaining the cached data from a corresponding local cache or remote cache server according to the judgment result includes: If the cache data accessed by the target access identifier is a type of hotspot cache data, then obtaining the cache data from the local hotspot cache data; If the cache data accessed by the target access identifier is a second-category hotspot cache number, a corresponding combination identifier is obtained according to the target access identifier to obtain a query combination identifier; and the cache data is obtained from the cache instance corresponding to the remote cache server according to the query combination identifier.
5. The method for processing hotspot cache data according to claim 4, wherein: The acquiring a corresponding combined identifier according to the target access identifier to obtain a query combined identifier includes: Randomly obtain any one of the N suffix identifiers to obtain a query suffix identifier; The query suffix identifier is concatenated with the target access identifier to obtain the query combination identifier.
6. The method for processing hotspot cache data according to claim 4, wherein: The acquiring a corresponding combined identifier according to the target access identifier to obtain a query combined identifier includes: storing the N combination identifiers in a data structure sorted in ascending order of access frequency; and associating the data structure with the corresponding target access identifiers; According to the target access identifier, the combination identifier with the smallest access frequency in the corresponding data structure is retrieved to obtain the query combination identifier.
7. The method for processing hotspot cache data according to claim 1, wherein: The method for updating the local hotspot cache data includes: A timed task is set, and the timed task synchronously updates the corresponding hotspot cache data in the remote hotspot cache server to the corresponding local hotspot cache data through the access identifier corresponding to the local hotspot cache data according to a preset fixed update time interval.
8. A device for processing hotspot cache data, characterized in that: include: An acquisition module, configured to acquire the number of requests for access identifiers of M users for remotely accessing cached data within a preset interval period and the reading time after each access to the cached data; A classification prediction module, configured to input the request volume and reading time into a trained hotspot cache data classification prediction model to obtain first-class hotspot cache data or second-class hotspot cache data; A local cache processing module is used to predict the type of cache data accessed remotely by the user within the next preset interval period based on the first-category hotspot cache data or the second-category hotspot cache data, and if the cache data accessed remotely by the user belongs to the first-category hotspot cache data, copy the cache data to the corresponding local cache to obtain local hotspot cache data; A remote cache processing module is configured to combine the access identifier of the cache data with N preset suffix identifiers to obtain N combination identifiers if the cache data accessed remotely by the user belongs to the second category of hotspot cache data; and deploy each combination identifier and its corresponding hotspot cache data to a cache instance of non-hotspot cache data on a remote cache server; An access module, used to obtain a target access identifier of cached data accessed by the current user; According to the target access identifier, determining whether the cache data currently accessed by the user belongs to the first category of hotspot cache data or the second category of hotspot cache data; According to the judgment result, the cache data is obtained from the corresponding local cache or remote cache server.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for processing hotspot cache data according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for processing hotspot cache data according to any one of claims 1 to 7 are implemented.